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/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 ) 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 index 8ef85c0a..e04a232d 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-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) diff --git a/rest/api/v3/account_provisioning/api_authenticate_account.go b/rest/api/v3/account_provisioning/api_authenticate_account.go index e5383bab..c933bcdb 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{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 index 86290d88..2057dec4 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{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 index cacc4b80..7d93af22 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{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 index 621e565a..89b026f9 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{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 index 2cb085c6..5051ca78 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{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 index c594e8f3..c810415c 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{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 index 07e96bc6..40a7a358 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..fd0db615 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{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 index 300491b2..5d9270dc 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 2b2b690f..dac97bea 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-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) diff --git a/rest/api/v3/alerts/api_create_alert.go b/rest/api/v3/alerts/api_create_alert.go index 840688d3..c6394105 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{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 index c3b11758..8fd4ccf2 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{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 index 90a60725..2438b7c9 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{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 index df938ee4..15c6a8de 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/alerts/api_update_alert.go b/rest/api/v3/alerts/api_update_alert.go index f99d96d3..9d3ed489 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index f903de6f..010e8385 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-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) 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..df1356fe 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{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 index e7870f10..c4751cf3 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{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 index fddef224..38922161 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{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 index f6e17fc8..6e4b719a 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..c256950a 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{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 index cb3f5574..e641c58e 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 464525b5..5a105004 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-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) 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..4a6cd6d0 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{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 index 4ad4d29e..b84c9542 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{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 index a2c7706f..2cb05b45 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{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 index 394ef926..d06be95e 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{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 index 9c22693b..a70ae056 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{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 index 6ae7453f..9944cc46 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{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 index 8b814581..72c7ebf0 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{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 index 706777aa..c84c69fa 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{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 index 044f297a..3c87da0e 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{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 index c2c0d5f1..ea02910f 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{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 index 9a54f824..ba07edd3 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{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 index 58604ba7..946c626e 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{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 index 03476a2f..75230a0a 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{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 index 4f2cfef6..c99a0584 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..50ff1e32 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{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 index 7317b99c..9a19d23d 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index da29d146..de11c476 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-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) diff --git a/rest/api/v3/email_activity/api_download_csv.go b/rest/api/v3/email_activity/api_download_csv.go index 8ca4e14c..4490e27a 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{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 index 9466caef..e94cfae4 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{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 index 9788cb21..ccb93840 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{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 index 6c195154..0cb265cf 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index f12c5d19..af6d3899 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-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) 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..48c691dd 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{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 index 689f190d..d0364ff8 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{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 index 1461af35..5b218b94 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..2e1ab9b4 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 5a6ee8a6..5ce51635 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-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) 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..7c633a58 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..1b43aa93 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 788587b1..a7aafef9 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-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) diff --git a/rest/api/v3/integrations/api_add_integration.go b/rest/api/v3/integrations/api_add_integration.go index ecf7f465..618c0140 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{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 index 18cba8d4..8d429939 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{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 index 44a96ac6..0d44a223 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{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 index 10cf76a9..ce3f797f 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/integrations/api_update_integration.go b/rest/api/v3/integrations/api_update_integration.go index ef197361..26c0fb32 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index ad618659..3636ea94 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-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) 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..7e402244 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{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 index 6a4b052b..9691fb48 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{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 index f3762e71..83fb95f5 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{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 index d4cafeb4..bbe20e9c 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{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 index 831b257a..1a9acf1a 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{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 index 9c988c12..f9dc1611 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index ed077e30..33791ae1 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-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) 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..d54f9095 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{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 index 87c4bc6a..fac88fba 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{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 index e1c90a7d..9d7ee407 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{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 index 534e9e15..bffe9a8a 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{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 index d4c18090..9f6ac8c1 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{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 index 5fe7b538..95bb7bc8 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{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 index 3a769dc3..aef499b7 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{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 index 5f957bed..5a87786b 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{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 index 364e3f40..a3272515 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{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 index f0f31220..252b5f80 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{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 index 028ca395..243f5a8f 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{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 index ab8a4dca..25f87117 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{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 index 83a88d5a..b185c82c 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..cc6d1c65 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{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 index 05ac6c6f..37f9a59d 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 879bf54d..3658d1ab 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-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) 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..59cc809c 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{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 index 43a096d9..d5c3a84d 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..a907c869 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{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 index 5348c525..9e0947f8 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 6d950aac..6ee5f096 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-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) diff --git a/rest/api/v3/ips/api_add_ip.go b/rest/api/v3/ips/api_add_ip.go index b9da2f59..aa9d16b6 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{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 index 80609038..4c78e14c 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{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 index 527612c4..997942be 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{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 index 87376334..4588b006 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{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 index d72c63be..8284146e 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{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 index 91adac52..da116eb4 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{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 index 75806195..89c54266 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{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 index 1d031d00..2fc20788 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{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 index 28ba0487..1837af8b 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{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 index 5afcda48..3f400732 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{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 index 1a63697e..20a0a88c 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..1dfd77a5 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 01cfe61b..9a652498 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-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) 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..a591fa8d 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{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 index fef3f166..589fc3e6 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{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 index 781d2c8b..e2828ad1 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{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 index 4b36641b..989ae8b5 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{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 index 3957575e..b9ea2c56 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{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 index 6aafbeaa..3e20f45b 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{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 index 3a00bd17..fe1d6d67 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{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 index fdfda6cd..0e4a686d 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..454bb0f4 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{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 index c3501327..df9d7896 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index b368143a..214a012e 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-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) diff --git a/rest/api/v3/lmc_campaigns/api_create_campaign.go b/rest/api/v3/lmc_campaigns/api_create_campaign.go index 39caf532..1b96d7c3 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{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 index da543aa7..7224c1b0 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{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 index d337ce94..a1fcf38b 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{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 index 15941fd4..731ccec7 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{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 index 326e4536..29b304e1 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{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 index 69a51eb2..1394c148 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{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 index c9415c27..8b65c436 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{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 index b27be894..6c48dcf0 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..e6bb7253 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{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 index 98d6f597..cb35f513 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{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 index ebb4da29..433ec883 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md index 1c2063be..9cec6c51 100644 --- a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md +++ b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## DeleteCampaign -> DeleteCampaign(ctx, CampaignIdoptional) +> interface{} DeleteCampaign(ctx, CampaignIdoptional) Delete a Campaign @@ -35,7 +35,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md index 1d0db274..a6b87142 100644 --- a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md +++ b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## UnScheduleCampaign -> UnScheduleCampaign(ctx, CampaignIdoptional) +> interface{} UnScheduleCampaign(ctx, CampaignIdoptional) Unschedule a Scheduled Campaign @@ -35,7 +35,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization 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 index 26c0cbfd..45861477 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-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) diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient.go b/rest/api/v3/lmc_contactdb/api_add_recipient.go index acc797b0..b769b98b 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{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 index 537230e9..c5df2a19 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{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 index 28277d7b..f41944ce 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" @@ -27,7 +28,7 @@ type AddRecipientsToContactDbListParam 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"` + RequestBody *[]string `json:"request_body,omitempty"` } func (params *AddRecipientsToContactDbListParam) SetListId(ListId int32) *AddRecipientsToContactDbListParam { @@ -38,12 +39,12 @@ func (params *AddRecipientsToContactDbListParam) SetOnbehalfof(Onbehalfof string params.Onbehalfof = &Onbehalfof return params } -func (params *AddRecipientsToContactDbListParam) SetRequestBody(RequestBody []int32) *AddRecipientsToContactDbListParam { +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 should be passed exactly as they are returned from recipient endpoints. +// **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 { @@ -97,5 +98,5 @@ func (c *ApiService) AddRecipientsToContactDbList(params *AddRecipientsToContact 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/lmc_contactdb/api_create_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go index d9fde69b..a16254d8 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{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 index 6e6a8d32..79fb8a50 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{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 index 5ba66b40..883987dc 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{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 index 5300fcdc..a8619196 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{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 index 9698ecdf..4eca4942 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{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 index 132d5593..6922e534 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{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 index f6b2d8d3..ae613ae6 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{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 index 8a2c129e..ef0e3b8b 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{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 index db2072e4..1789c0e9 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{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 index bf6607cd..7c9c5d15 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{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 index 78a99ca0..efe82e8b 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{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 index 9fa22f4f..4ae1cd3c 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{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 index 4bccbaa4..b54e79b6 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{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 index 8368814a..15be33fc 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{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 index 4307012a..7bd02ed3 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{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 index 668df630..d9a2f56f 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{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 index fc1bb3af..4973479f 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{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 index 90c3c9bd..439cb1fe 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{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 index db2700e1..2d0cdbe0 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{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 index 68baf731..7f4e6d95 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{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 index 3d7a5857..4fac33fc 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{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 index b4d2bdf8..c52901f2 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{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 index 52c27544..080d2d83 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{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 index 1818c824..3cae2eea 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{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 index 5f969fda..9e71d3c2 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{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 index 4ea4c9da..08180a42 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{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 index a63395e1..810296ef 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..f4e48e57 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{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 index 7399c4ef..ccb7fa86 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{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 index 10340563..d5023966 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md index 1b9788b1..0a1cbd6c 100644 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## AddRecipientToContactDbList -> AddRecipientToContactDbList(ctx, ListIdRecipientIdoptional) +> interface{} AddRecipientToContactDbList(ctx, ListIdRecipientIdoptional) Add a Single Recipient to a List @@ -36,7 +36,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md index ba687bc9..4e67a243 100644 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md @@ -10,11 +10,11 @@ Method | HTTP request | Description ## AddRecipientsToContactDbList -> AddRecipientsToContactDbList(ctx, ListIdoptional) +> 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 should be passed exactly as they are returned from recipient endpoints. +**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 @@ -32,11 +32,11 @@ Other parameters are passed through a pointer to a AddRecipientsToContactDbListP Name | Type | Description ------------- | ------------- | ------------- **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-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** | +**RequestBody** | **[]string** | ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md index dfe3bbe6..23af3f29 100644 --- a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## DeleteContactDbList -> DeleteContactDbList(ctx, ListIdoptional) +> interface{} DeleteContactDbList(ctx, ListIdoptional) Delete a List @@ -37,7 +37,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md index 4acbb584..9f510860 100644 --- a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## DeleteContactDbLists -> DeleteContactDbLists(ctx, optional) +> interface{} DeleteContactDbLists(ctx, optional) Delete Multiple lists @@ -32,7 +32,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md index 236c6d0d..250be368 100644 --- a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## DeleteRecipientFromContactDbList -> DeleteRecipientFromContactDbList(ctx, ListIdRecipientIdoptional) +> interface{} DeleteRecipientFromContactDbList(ctx, ListIdRecipientIdoptional) Delete a Single Recipient from a Single List @@ -37,7 +37,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md index 8bf76595..fbda5503 100644 --- a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md +++ b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## DeleteSegment -> DeleteSegment(ctx, SegmentIdoptional) +> interface{} DeleteSegment(ctx, SegmentIdoptional) Delete a segment @@ -37,7 +37,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization 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 index ef51bf59..7f23b87b 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-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) diff --git a/rest/api/v3/lmc_senders/api_create_sender.go b/rest/api/v3/lmc_senders/api_create_sender.go index 02c7bd06..a3420d11 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{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 index 0324940b..abdf177e 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{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 index 3f95a9ba..125c0007 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{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 index 6c4ca9cd..f612bc1e 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{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 index 13aaa1bd..4e93f231 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..ea0161ba 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index d368a329..4140add1 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-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) diff --git a/rest/api/v3/mail/api_create_mail_batch.go b/rest/api/v3/mail/api_create_mail_batch.go index 8b28bd2f..e832f8cb 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{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 index 30c4ca73..26ce8e90 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{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 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/.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 index 3bb27e29..0ea4bce1 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-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) 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..c2421011 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{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 index c1611625..30ee837d 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{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 index d1c8cab0..79f3771c 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{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 index b6113625..83555b52 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{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 index c8fb14ac..e6871850 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{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 index 25a5b6e1..fbfe8cb2 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{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 index 76783e88..d03cd5ef 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..8acf2d8b 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{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 index 8f99dbe9..80f822e2 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{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 index 32551254..9d6bcf09 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{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 index 797b2a04..7288ee75 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{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 index dbc04c1b..06bf9f29 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{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 index 72091647..aff59dcb 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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/.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 index 3de167f1..cfb76ce1 100644 --- a/rest/api/v3/mc_designs/README.md +++ b/rest/api/v3/mc_designs/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.066640+05:30[Asia/Kolkata] +- 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) diff --git a/rest/api/v3/mc_designs/api_create_design.go b/rest/api/v3/mc_designs/api_create_design.go index c8b41d3c..4d95da09 100644 --- a/rest/api/v3/mc_designs/api_create_design.go +++ b/rest/api/v3/mc_designs/api_create_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -68,5 +69,5 @@ func (c *ApiService) CreateDesign(params *CreateDesignParam) (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/mc_designs/api_delete_design.go b/rest/api/v3/mc_designs/api_delete_design.go index eec2321c..3cb9db85 100644 --- a/rest/api/v3/mc_designs/api_delete_design.go +++ b/rest/api/v3/mc_designs/api_delete_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) DeleteDesign(params *DeleteDesignParam) (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/mc_designs/api_duplicate_design.go b/rest/api/v3/mc_designs/api_duplicate_design.go index 823d9a41..10379e3a 100644 --- a/rest/api/v3/mc_designs/api_duplicate_design.go +++ b/rest/api/v3/mc_designs/api_duplicate_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) DuplicateDesign(params *DuplicateDesignParam) (interface{}, 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/mc_designs/api_duplicate_pre_built_design.go b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go index f8965925..d4b439e4 100644 --- a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go +++ b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) DuplicatePreBuiltDesign(params *DuplicatePreBuiltDesignPara 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/mc_designs/api_get_design.go b/rest/api/v3/mc_designs/api_get_design.go index 39708536..05438323 100644 --- a/rest/api/v3/mc_designs/api_get_design.go +++ b/rest/api/v3/mc_designs/api_get_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) GetDesign(params *GetDesignParam) (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/mc_designs/api_get_pre_built_design.go b/rest/api/v3/mc_designs/api_get_pre_built_design.go index 026869c5..7cee9d39 100644 --- a/rest/api/v3/mc_designs/api_get_pre_built_design.go +++ b/rest/api/v3/mc_designs/api_get_pre_built_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) GetPreBuiltDesign(params *GetPreBuiltDesignParam) (interfac 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/mc_designs/api_list_design.go b/rest/api/v3/mc_designs/api_list_design.go index 246480bf..e8c93d96 100644 --- a/rest/api/v3/mc_designs/api_list_design.go +++ b/rest/api/v3/mc_designs/api_list_design.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListDesign(params *ListDesignParam) (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/mc_designs/api_list_pre_built_design.go b/rest/api/v3/mc_designs/api_list_pre_built_design.go index 2416565f..8b80f3fa 100644 --- a/rest/api/v3/mc_designs/api_list_pre_built_design.go +++ b/rest/api/v3/mc_designs/api_list_pre_built_design.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListPreBuiltDesign(params *ListPreBuiltDesignParam) (interf 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/mc_designs/api_update_design.go b/rest/api/v3/mc_designs/api_update_design.go index 3b1122bc..66cb8bae 100644 --- a/rest/api/v3/mc_designs/api_update_design.go +++ b/rest/api/v3/mc_designs/api_update_design.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) UpdateDesign(params *UpdateDesignParam) (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/mc_lists/.openapi-generator b/rest/api/v3/mc_lists/.openapi-generator deleted file mode 100644 index 8033448a..00000000 --- a/rest/api/v3/mc_lists/.openapi-generator +++ /dev/null @@ -1,45 +0,0 @@ -.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 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 index f4ddc383..e2aa7644 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-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) 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..2674f041 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{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 index 70a82f48..b7d09a8e 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{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 index dacef8dd..aec93ac9 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{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 index ed2b8b7c..4c1b6fe6 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{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 index 7d014e37..3018ad40 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{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 index 05140272..c057ef8f 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..73954db0 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index cbb26e0c..eed4bd30 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-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) diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go index 1d43ee1d..5e82b2f1 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{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 index d63c67b9..8d7fbcc3 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{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 index f026f989..80a58cd6 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 5bd42753..a4abdf89 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-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) 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..022d8b8b 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{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 index 086aab52..192318c0 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{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 index dbab96c3..ee17dd6c 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{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 index dcd34e83..e20699e8 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{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 index cadfe784..b72b78ee 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..324cc4f4 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/mc_senders/.openapi-generator b/rest/api/v3/mc_senders/.openapi-generator deleted file mode 100644 index e2d6ff1c..00000000 --- a/rest/api/v3/mc_senders/.openapi-generator +++ /dev/null @@ -1,35 +0,0 @@ -.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 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 index ab35271c..716cda89 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-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) diff --git a/rest/api/v3/mc_senders/api_create_sender.go b/rest/api/v3/mc_senders/api_create_sender.go index 4c1ed8f8..c39979a5 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{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 index d6ad6699..d2226a7c 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{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 index 2f8820f9..17c7ddd2 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{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 index 93d74b0c..9024a22a 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{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 index f1476bd0..270fb3e9 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..23892f4e 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index d3315aa0..c6ab60e7 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-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) 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..ef5f67fd 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{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 index fc1cb6a3..01608356 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{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 index ebe93580..e3735759 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{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 index 8dfd6ddf..d6bc40f4 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{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 index a794b6d0..84369624 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{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 index 92da9755..61ed40a2 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{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 index 944060d8..563d0182 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{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 index 11925ac1..5ea75202 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{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 index 95d6382b..dc4794fb 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{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 index 998bb10d..c2c142bd 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..ca12d700 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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/.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 index 057ea8ba..2bf6a68d 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-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) 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..a84adcc3 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index a7b0173a..2de743a8 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-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) diff --git a/rest/api/v3/partner/api_list_partner_setting.go b/rest/api/v3/partner/api_list_partner_setting.go index 6eb0e351..31efe6d4 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index e92003dc..79de6829 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-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) 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..a3394ef6 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 827356d4..d3767ab4 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-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) 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..9d41024c 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{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 index c2ee8788..d93067b1 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{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 index 58d5a494..4eb8b76c 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..6bf9ea86 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{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 index 5c35b817..a9721489 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/scheduled_sends/.openapi-generator b/rest/api/v3/scheduled_sends/.openapi-generator deleted file mode 100644 index 513dff8e..00000000 --- a/rest/api/v3/scheduled_sends/.openapi-generator +++ /dev/null @@ -1,31 +0,0 @@ -.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 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 index b6b7629b..8c2cd905 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-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) 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..536ba3b9 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{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 index cfd11d55..ed4e6a6e 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{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 index aafae9ca..b254b33b 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{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 index a1c25889..4c179891 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..6627c809 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md index 7b28ab5a..b2ec61ee 100644 --- a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md +++ b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## UpdateScheduledSend -> UpdateScheduledSend(ctx, BatchIdoptional) +> interface{} UpdateScheduledSend(ctx, BatchIdoptional) Update a scheduled send @@ -36,7 +36,7 @@ Name | Type | Description ### Return type - (empty response body) +**interface{}** ### Authorization 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/.openapi-generator b/rest/api/v3/seq/.openapi-generator deleted file mode 100644 index 1351e965..00000000 --- a/rest/api/v3/seq/.openapi-generator +++ /dev/null @@ -1,18 +0,0 @@ -.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 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 index ad2ee0c2..0f4e4cb4 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-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) 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..878812db 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{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 index 41a85f79..8176b507 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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/.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 index 731a302f..f754ac08 100644 --- a/rest/api/v3/sso/README.md +++ b/rest/api/v3/sso/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.437973+05:30[Asia/Kolkata] +- 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) diff --git a/rest/api/v3/sso/api_create_sso_certificate.go b/rest/api/v3/sso/api_create_sso_certificate.go index f23bc4dd..93f844de 100644 --- a/rest/api/v3/sso/api_create_sso_certificate.go +++ b/rest/api/v3/sso/api_create_sso_certificate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -100,5 +101,5 @@ func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (in 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/sso/api_create_sso_integration.go b/rest/api/v3/sso/api_create_sso_integration.go index 2113b4f5..8544aa17 100644 --- a/rest/api/v3/sso/api_create_sso_integration.go +++ b/rest/api/v3/sso/api_create_sso_integration.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -100,5 +101,5 @@ func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (in 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/sso/api_create_sso_teammate.go b/rest/api/v3/sso/api_create_sso_teammate.go index ac3f8c9b..ae49f75c 100644 --- a/rest/api/v3/sso/api_create_sso_teammate.go +++ b/rest/api/v3/sso/api_create_sso_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -100,5 +101,5 @@ func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interfac 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/sso/api_delete_sso_certificate.go b/rest/api/v3/sso/api_delete_sso_certificate.go index 4deeb0a5..d47bc8a3 100644 --- a/rest/api/v3/sso/api_delete_sso_certificate.go +++ b/rest/api/v3/sso/api_delete_sso_certificate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -96,5 +97,5 @@ func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (in 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/sso/api_delete_sso_integration.go b/rest/api/v3/sso/api_delete_sso_integration.go index fd63f994..5ecefab4 100644 --- a/rest/api/v3/sso/api_delete_sso_integration.go +++ b/rest/api/v3/sso/api_delete_sso_integration.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -88,5 +89,5 @@ func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (in 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/sso/api_get_sso_certificate.go b/rest/api/v3/sso/api_get_sso_certificate.go index 81234a78..cc1c9ee0 100644 --- a/rest/api/v3/sso/api_get_sso_certificate.go +++ b/rest/api/v3/sso/api_get_sso_certificate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -96,5 +97,5 @@ func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interfac 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/sso/api_get_sso_integration.go b/rest/api/v3/sso/api_get_sso_integration.go index 4ada401b..69b10522 100644 --- a/rest/api/v3/sso/api_get_sso_integration.go +++ b/rest/api/v3/sso/api_get_sso_integration.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -107,5 +108,5 @@ func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interfac 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/sso/api_list_sso_integration.go b/rest/api/v3/sso/api_list_sso_integration.go index 9e89db77..45ae2724 100644 --- a/rest/api/v3/sso/api_list_sso_integration.go +++ b/rest/api/v3/sso/api_list_sso_integration.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -96,5 +97,5 @@ func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interf 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/sso/api_list_sso_integration_certificate.go b/rest/api/v3/sso/api_list_sso_integration_certificate.go index 4086e929..716201f5 100644 --- a/rest/api/v3/sso/api_list_sso_integration_certificate.go +++ b/rest/api/v3/sso/api_list_sso_integration_certificate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -96,5 +97,5 @@ func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCer 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/sso/api_update_sso_certificate.go b/rest/api/v3/sso/api_update_sso_certificate.go index 58803890..f06da50e 100644 --- a/rest/api/v3/sso/api_update_sso_certificate.go +++ b/rest/api/v3/sso/api_update_sso_certificate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -111,5 +112,5 @@ func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (in 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/sso/api_update_sso_integration.go b/rest/api/v3/sso/api_update_sso_integration.go index 5a8f9639..f5a8415b 100644 --- a/rest/api/v3/sso/api_update_sso_integration.go +++ b/rest/api/v3/sso/api_update_sso_integration.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -121,5 +122,5 @@ func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (in 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/sso/api_update_sso_teammate.go b/rest/api/v3/sso/api_update_sso_teammate.go index af816bea..ded4c5ba 100644 --- a/rest/api/v3/sso/api_update_sso_teammate.go +++ b/rest/api/v3/sso/api_update_sso_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -111,5 +112,5 @@ func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interfac 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/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 index dd7596bf..cbe90f58 100644 --- a/rest/api/v3/stats/README.md +++ b/rest/api/v3/stats/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.471509+05:30[Asia/Kolkata] +- 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) diff --git a/rest/api/v3/stats/api_get_client_stat.go b/rest/api/v3/stats/api_get_client_stat.go index 8289a1c3..79d26053 100644 --- a/rest/api/v3/stats/api_get_client_stat.go +++ b/rest/api/v3/stats/api_get_client_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -94,5 +95,5 @@ func (c *ApiService) GetClientStat(params *GetClientStatParam) (interface{}, err 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/stats/api_list_browser_stat.go b/rest/api/v3/stats/api_list_browser_stat.go index 3e84d689..ba98d00b 100644 --- a/rest/api/v3/stats/api_list_browser_stat.go +++ b/rest/api/v3/stats/api_list_browser_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -110,5 +111,5 @@ func (c *ApiService) ListBrowserStat(params *ListBrowserStatParam) (interface{}, 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/stats/api_list_category.go b/rest/api/v3/stats/api_list_category.go index 9805977a..7e8feae7 100644 --- a/rest/api/v3/stats/api_list_category.go +++ b/rest/api/v3/stats/api_list_category.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -91,5 +92,5 @@ func (c *ApiService) ListCategory(params *ListCategoryParam) (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/stats/api_list_category_stat.go b/rest/api/v3/stats/api_list_category_stat.go index 442d45f9..c3fdfd6d 100644 --- a/rest/api/v3/stats/api_list_category_stat.go +++ b/rest/api/v3/stats/api_list_category_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -92,5 +93,5 @@ func (c *ApiService) ListCategoryStat(params *ListCategoryStatParam) (interface{ 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/stats/api_list_category_stat_sum.go b/rest/api/v3/stats/api_list_category_stat_sum.go index 02c40c28..4e438e67 100644 --- a/rest/api/v3/stats/api_list_category_stat_sum.go +++ b/rest/api/v3/stats/api_list_category_stat_sum.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -119,5 +120,5 @@ func (c *ApiService) ListCategoryStatSum(params *ListCategoryStatSumParam) (inte 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/stats/api_list_client_stat.go b/rest/api/v3/stats/api_list_client_stat.go index f663bac0..baa57667 100644 --- a/rest/api/v3/stats/api_list_client_stat.go +++ b/rest/api/v3/stats/api_list_client_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -83,5 +84,5 @@ func (c *ApiService) ListClientStat(params *ListClientStatParam) (interface{}, e 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/stats/api_list_device_stat.go b/rest/api/v3/stats/api_list_device_stat.go index 24bc46a2..0f099f97 100644 --- a/rest/api/v3/stats/api_list_device_stat.go +++ b/rest/api/v3/stats/api_list_device_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListDeviceStat(params *ListDeviceStatParam) (interface{}, e 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/stats/api_list_geo_stat.go b/rest/api/v3/stats/api_list_geo_stat.go index 083560d2..fda486f1 100644 --- a/rest/api/v3/stats/api_list_geo_stat.go +++ b/rest/api/v3/stats/api_list_geo_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -110,5 +111,5 @@ func (c *ApiService) ListGeoStat(params *ListGeoStatParam) (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/stats/api_list_mailbox_provider_stat.go b/rest/api/v3/stats/api_list_mailbox_provider_stat.go index 98436deb..b9e15837 100644 --- a/rest/api/v3/stats/api_list_mailbox_provider_stat.go +++ b/rest/api/v3/stats/api_list_mailbox_provider_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -110,5 +111,5 @@ func (c *ApiService) ListMailboxProviderStat(params *ListMailboxProviderStatPara 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/stats/api_list_stat.go b/rest/api/v3/stats/api_list_stat.go index 9b0f05e8..ee9c2531 100644 --- a/rest/api/v3/stats/api_list_stat.go +++ b/rest/api/v3/stats/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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/subusers/.openapi-generator b/rest/api/v3/subusers/.openapi-generator deleted file mode 100644 index da3cd51b..00000000 --- a/rest/api/v3/subusers/.openapi-generator +++ /dev/null @@ -1,95 +0,0 @@ -.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 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 index fc71698f..69ea0a1d 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-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) diff --git a/rest/api/v3/subusers/api_create_subuser.go b/rest/api/v3/subusers/api_create_subuser.go index c57cabea..3421ac96 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{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 index 9449f73e..fcba9fa2 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{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 index 6e4e3998..220e17ec 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{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 index afe7d8dc..459e4fec 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{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 index 8b6bba0e..dd0981dd 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{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 index 9896d1d2..29db8ba9 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{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 index 0f220c27..31a791fa 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{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 index 1c7a281a..5e531161 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{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 index a0b694a0..84c5f03e 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser.go b/rest/api/v3/subusers/api_update_subuser.go index 2985531a..55d2254f 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{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 index 11a0bfe2..9210a304 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{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 index 57320ccc..62ad065c 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{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 index 1b17febb..4e34d1d1 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{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 index 38384cd9..54e3572a 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/teammates/.openapi-generator b/rest/api/v3/teammates/.openapi-generator deleted file mode 100644 index 3d306f1a..00000000 --- a/rest/api/v3/teammates/.openapi-generator +++ /dev/null @@ -1,65 +0,0 @@ -.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 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 index b737841f..8fc932cd 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-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) diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go index 8bbc5450..0bb4e0dd 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{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 index e7a451b1..16e08595 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{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 index 45f2a7bb..c80fb7ae 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{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 index a41dca17..90b19902 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{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 index 6331225a..2fefdcea 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{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 index f52e7d1a..fcd7c60f 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{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 index 2e703563..32d03d2b 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{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 index 585f60ca..fc8e2137 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go index 83c1d5d4..e3146553 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/templates/.openapi-generator b/rest/api/v3/templates/.openapi-generator deleted file mode 100644 index 15d4d7d4..00000000 --- a/rest/api/v3/templates/.openapi-generator +++ /dev/null @@ -1,65 +0,0 @@ -.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 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 index d37cb730..a3219329 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-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) diff --git a/rest/api/v3/templates/api_activate_template_version.go b/rest/api/v3/templates/api_activate_template_version.go index defc3076..440b1ae8 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{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 index 783d94aa..1e8f6a53 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{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 index ca08ddff..a4fad70e 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{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 index 01d3f63d..18dfb477 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{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 index b80da19b..761b8d6e 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{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 index a17e9178..58551315 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{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 index 85c005b9..9df68311 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{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 index 13d44a21..5b6e002d 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{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 index 2f66317f..6ad261eb 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/templates/api_update_template.go b/rest/api/v3/templates/api_update_template.go index cc483ed9..29317d5b 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{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 index 358bc618..74d7aedf 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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 index 5359dddf..c7da454a 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-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) 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..e9c1c2ce 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{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 index eb245ccd..78afc83f 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{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 index fea7e0bf..3d834495 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{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 index 0b1c1897..d540ac73 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{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 index 03bd6d65..64b13c74 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..06bd79ff 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{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 index 5de9af69..c0e4e45c 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{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 index 3f8feb68..3d634c20 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{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 index 94359c04..899c7ef0 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } 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/.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 index e5f26d25..4eedcf03 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-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) diff --git a/rest/api/v3/webhooks/api_create_event_webhook.go b/rest/api/v3/webhooks/api_create_event_webhook.go index 0dd3432d..06a7f84e 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{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 index cc7a8562..06da2b1e 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{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 index df797e9e..b503351a 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{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 index e4332ebc..d5711ce9 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{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 index 89484ed5..e487f65d 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{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 index 3efb389a..8914ba24 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{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 index 3ee37388..27b29365 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{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 index e1b4bb6b..bb7dbec9 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{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 index cb0cd5e4..ab066d56 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{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 index 5d7129ae..1fc38e96 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, 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..9a15fb2d 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{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 index eb308063..815da018 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{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 index 19db3589..96179afa 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{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 index 403effeb..7cc2f68a 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{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/sendgrid.go b/sendgrid.go index 4a1b2881..5dd16ea0 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -36,17 +36,20 @@ 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" + 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" 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" @@ -54,6 +57,8 @@ import ( 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,17 +83,20 @@ type RestClient struct { LmcSendersV3 *LmcSendersV3.ApiService MailV3 *MailV3.ApiService MailSettingsV3 *MailSettingsV3.ApiService + McCustomFieldsV3 *McCustomFieldsV3.ApiService McDesignsV3 *McDesignsV3.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 @@ -96,6 +104,8 @@ type RestClient struct { TeammatesV3 *TeammatesV3.ApiService TemplatesV3 *TemplatesV3.ApiService TrackingSettingsV3 *TrackingSettingsV3.ApiService + UserV3 *UserV3.ApiService + VerifiedSendersV3 *VerifiedSendersV3.ApiService WebhooksV3 *WebhooksV3.ApiService } @@ -204,17 +214,20 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.LmcSendersV3 = LmcSendersV3.NewApiService(c.RequestHandler) c.MailV3 = MailV3.NewApiService(c.RequestHandler) c.MailSettingsV3 = MailSettingsV3.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) 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) @@ -222,6 +235,8 @@ func NewRestClientWithParams(params ClientParams) *RestClient { 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