openapi

package
v4.0.0-rc.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 5 Imported by: 0

README

Go API client for

The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over SendGrid’s Web API or SMTP relay. These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more.

For a full list of Twilio SendGrid's Mail Settings, and what each one does, see Mail Settings.

You can also manage your Mail Settings in the Twilio SendGrid application user interface.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Build date: 2024-10-24T13:26:01.689053Z[Etc/UTC]
  • Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us

Installation

Install the following dependencies:

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:

import "./"

Documentation for API Endpoints

All URIs are relative to https://api.sendgrid.com

Class Method HTTP request Description
ListAddressWhitelist ListAddressWhitelist Get /v3/mail_settings/address_whitelist Retrieve address whitelist mail settings
ListBouncePurge ListBouncePurge Get /v3/mail_settings/bounce_purge Retrieve bounce purge mail settings
ListFooter ListFooter Get /v3/mail_settings/footer Retrieve footer mail settings
ListForwardBounce ListForwardBounce Get /v3/mail_settings/forward_bounce Retrieve forward bounce mail settings
ListForwardSpam ListForwardSpam Get /v3/mail_settings/forward_spam Retrieve forward spam mail settings
ListMailSetting ListMailSetting Get /v3/mail_settings Retrieve all mail settings
ListTemplate ListTemplate Get /v3/mail_settings/template Retrieve legacy template mail settings
UpdateAddressWhitelist UpdateAddressWhitelist Patch /v3/mail_settings/address_whitelist Update address whitelist mail settings
UpdateBouncePurge UpdateBouncePurge Patch /v3/mail_settings/bounce_purge Update bounce purge mail settings
UpdateFooter UpdateFooter Patch /v3/mail_settings/footer Update footer mail settings
UpdateForwardBounce UpdateForwardBounce Patch /v3/mail_settings/forward_bounce Update forward bounce mail settings
UpdateForwardSpam UpdateForwardSpam Patch /v3/mail_settings/forward_spam Update forward spam mail settings
UpdateTemplate UpdateTemplate Patch /v3/mail_settings/template Update template mail settings

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiService

type ApiService struct {
	// contains filtered or unexported fields
}

func NewApiService

func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService

func (*ApiService) ListAddressWhitelist

func (c *ApiService) ListAddressWhitelist(params *ListAddressWhitelistParam) (interface{}, error)

**This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.

func (*ApiService) ListBouncePurge

func (c *ApiService) ListBouncePurge(params *ListBouncePurgeParam) (interface{}, error)

**This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).

func (*ApiService) ListFooter

func (c *ApiService) ListFooter(params *ListFooterParam) (interface{}, error)

**This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).

func (*ApiService) ListForwardBounce

func (c *ApiService) ListForwardBounce(params *ListForwardBounceParam) (interface{}, error)

**This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active.

func (*ApiService) ListForwardSpam

func (c *ApiService) ListForwardSpam(params *ListForwardSpamParam) (interface{}, error)

**This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active.

func (*ApiService) ListMailSetting

func (c *ApiService) ListMailSetting(params *ListMailSettingParam) (interface{}, error)

**This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.

func (*ApiService) ListTemplate

func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error)

**This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).

func (*ApiService) UpdateAddressWhitelist

func (c *ApiService) UpdateAddressWhitelist(params *UpdateAddressWhitelistParam) (interface{}, error)

**This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions.

func (*ApiService) UpdateBouncePurge

func (c *ApiService) UpdateBouncePurge(params *UpdateBouncePurgeParam) (interface{}, error)

**This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces).

func (*ApiService) UpdateFooter

func (c *ApiService) UpdateFooter(params *UpdateFooterParam) (interface{}, error)

**This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).

func (*ApiService) UpdateForwardBounce

func (c *ApiService) UpdateForwardBounce(params *UpdateForwardBounceParam) (interface{}, error)

**This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).

func (*ApiService) UpdateForwardSpam

func (c *ApiService) UpdateForwardSpam(params *UpdateForwardSpamParam) (interface{}, error)

**This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings).

func (*ApiService) UpdateTemplate

func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error)

**This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/).

type ListAddressWhitelistParam

type ListAddressWhitelistParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListAddressWhitelistParam) SetOnbehalfof

func (params *ListAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *ListAddressWhitelistParam

type ListBouncePurgeParam

type ListBouncePurgeParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListBouncePurgeParam) SetOnbehalfof

func (params *ListBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *ListBouncePurgeParam

type ListFooterParam

type ListFooterParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListFooterParam) SetOnbehalfof

func (params *ListFooterParam) SetOnbehalfof(Onbehalfof string) *ListFooterParam

type ListForwardBounceParam

type ListForwardBounceParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListForwardBounceParam) SetOnbehalfof

func (params *ListForwardBounceParam) SetOnbehalfof(Onbehalfof string) *ListForwardBounceParam

type ListForwardSpamParam

type ListForwardSpamParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListForwardSpamParam) SetOnbehalfof

func (params *ListForwardSpamParam) SetOnbehalfof(Onbehalfof string) *ListForwardSpamParam

type ListMailSetting200Response

type ListMailSetting200Response struct {
	// The list of all mail settings.
	Result []ListMailSetting200ResponseResultInner `json:"result"`
}

ListMailSetting200Response struct for ListMailSetting200Response

type ListMailSetting200ResponseResultInner

type ListMailSetting200ResponseResultInner struct {
	// The title of the mail setting.
	Title string `json:"title"`
	// Indicates if this mail setting is currently enabled.
	Enabled bool `json:"enabled"`
	// The name of the mail setting.
	Name string `json:"name"`
	// A description of the mail setting.
	Description string `json:"description"`
}

ListMailSetting200ResponseResultInner struct for ListMailSetting200ResponseResultInner

type ListMailSettingParam

type ListMailSettingParam struct {
	// `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used.
	Limit *int32 `json:"limit,omitempty"`
	// The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list.
	Offset *int32 `json:"offset,omitempty"`
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListMailSettingParam) SetLimit

func (params *ListMailSettingParam) SetLimit(Limit int32) *ListMailSettingParam

func (*ListMailSettingParam) SetOffset

func (params *ListMailSettingParam) SetOffset(Offset int32) *ListMailSettingParam

func (*ListMailSettingParam) SetOnbehalfof

func (params *ListMailSettingParam) SetOnbehalfof(Onbehalfof string) *ListMailSettingParam

type ListTemplateParam

type ListTemplateParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
}

func (*ListTemplateParam) SetOnbehalfof

func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam

type MailSettingsAddressWhitelabel200

type MailSettingsAddressWhitelabel200 struct {
	// Indicates if you have an email address whitelist enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// All email addresses that are currently on the whitelist.
	List *[]string `json:"list,omitempty"`
}

MailSettingsAddressWhitelabel200 struct for MailSettingsAddressWhitelabel200

type MailSettingsBouncePurge

type MailSettingsBouncePurge struct {
	// Indicates if the bounce purge mail setting is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists.
	SoftBounces *int32 `json:"soft_bounces,omitempty"`
	// The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists.
	HardBounces *int32 `json:"hard_bounces,omitempty"`
}

MailSettingsBouncePurge struct for MailSettingsBouncePurge

type MailSettingsFooter

type MailSettingsFooter struct {
	// Indicates if the Footer mail setting is currently enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// The custom HTML content of your email footer.
	HtmlContent *string `json:"html_content,omitempty"`
	// The plain text content of your email footer.
	PlainContent *string `json:"plain_content,omitempty"`
}

MailSettingsFooter struct for MailSettingsFooter

type MailSettingsForwardBounce

type MailSettingsForwardBounce struct {
	// The email address that you would like your bounce reports forwarded to.
	Email *string `json:"email,omitempty"`
	// Indicates if the bounce forwarding mail setting is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

MailSettingsForwardBounce struct for MailSettingsForwardBounce

type MailSettingsForwardSpam

type MailSettingsForwardSpam struct {
	// The email address where you would like the spam reports to be forwarded.
	Email *string `json:"email,omitempty"`
	// Indicates if the Forward Spam setting is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

MailSettingsForwardSpam struct for MailSettingsForwardSpam

type MailSettingsTemplate200

type MailSettingsTemplate200 struct {
	// Indicates if the legacy email template setting is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// The HTML content that you want to use for your legacy email template.
	HtmlContent *string `json:"html_content,omitempty"`
}

MailSettingsTemplate200 struct for MailSettingsTemplate200

type UpdateAddressWhitelistParam

type UpdateAddressWhitelistParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	UpdateAddressWhitelistRequest *UpdateAddressWhitelistRequest `json:"UpdateAddressWhitelistRequest,omitempty"`
}

func (*UpdateAddressWhitelistParam) SetOnbehalfof

func (params *UpdateAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *UpdateAddressWhitelistParam

func (*UpdateAddressWhitelistParam) SetUpdateAddressWhitelistRequest

func (params *UpdateAddressWhitelistParam) SetUpdateAddressWhitelistRequest(UpdateAddressWhitelistRequest UpdateAddressWhitelistRequest) *UpdateAddressWhitelistParam

type UpdateAddressWhitelistRequest

type UpdateAddressWhitelistRequest struct {
	// Indicates if your email address whitelist is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted.
	List *[]string `json:"list,omitempty"`
}

UpdateAddressWhitelistRequest struct for UpdateAddressWhitelistRequest

type UpdateBouncePurgeParam

type UpdateBouncePurgeParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	MailSettingsBouncePurge *MailSettingsBouncePurge `json:"MailSettingsBouncePurge,omitempty"`
}

func (*UpdateBouncePurgeParam) SetMailSettingsBouncePurge

func (params *UpdateBouncePurgeParam) SetMailSettingsBouncePurge(MailSettingsBouncePurge MailSettingsBouncePurge) *UpdateBouncePurgeParam

func (*UpdateBouncePurgeParam) SetOnbehalfof

func (params *UpdateBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *UpdateBouncePurgeParam

type UpdateFooterParam

type UpdateFooterParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	MailSettingsFooter *MailSettingsFooter `json:"MailSettingsFooter,omitempty"`
}

func (*UpdateFooterParam) SetMailSettingsFooter

func (params *UpdateFooterParam) SetMailSettingsFooter(MailSettingsFooter MailSettingsFooter) *UpdateFooterParam

func (*UpdateFooterParam) SetOnbehalfof

func (params *UpdateFooterParam) SetOnbehalfof(Onbehalfof string) *UpdateFooterParam

type UpdateForwardBounceParam

type UpdateForwardBounceParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	MailSettingsForwardBounce *MailSettingsForwardBounce `json:"MailSettingsForwardBounce,omitempty"`
}

func (*UpdateForwardBounceParam) SetMailSettingsForwardBounce

func (params *UpdateForwardBounceParam) SetMailSettingsForwardBounce(MailSettingsForwardBounce MailSettingsForwardBounce) *UpdateForwardBounceParam

func (*UpdateForwardBounceParam) SetOnbehalfof

func (params *UpdateForwardBounceParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardBounceParam

type UpdateForwardSpamParam

type UpdateForwardSpamParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	MailSettingsForwardSpam *MailSettingsForwardSpam `json:"MailSettingsForwardSpam,omitempty"`
}

func (*UpdateForwardSpamParam) SetMailSettingsForwardSpam

func (params *UpdateForwardSpamParam) SetMailSettingsForwardSpam(MailSettingsForwardSpam MailSettingsForwardSpam) *UpdateForwardSpamParam

func (*UpdateForwardSpamParam) SetOnbehalfof

func (params *UpdateForwardSpamParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardSpamParam

type UpdateTemplate200Response

type UpdateTemplate200Response struct {
	// Indicates if the legacy email template mail setting is enabled.
	Enabled bool `json:"enabled"`
	// The HTML content of your legacy email template.
	HtmlContent string `json:"html_content"`
}

UpdateTemplate200Response struct for UpdateTemplate200Response

type UpdateTemplateParam

type UpdateTemplateParam struct {
	// The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id <account-id>`). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: <subuser-username>`). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information.
	Onbehalfof *string `json:"on-behalf-of,omitempty"`
	//
	UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"`
}

func (*UpdateTemplateParam) SetOnbehalfof

func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam

func (*UpdateTemplateParam) SetUpdateTemplateRequest

func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam

type UpdateTemplateRequest

type UpdateTemplateRequest struct {
	// Indicates if you want to enable the legacy email template mail setting.
	Enabled *bool `json:"enabled,omitempty"`
	// The new HTML content for your legacy email template.
	HtmlContent *string `json:"html_content,omitempty"`
}

UpdateTemplateRequest struct for UpdateTemplateRequest

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL