class MailchimpTransactional::WhitelistsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/MailchimpTransactional/api/whitelists_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

add(body = {}) click to toggle source

Add email to allowlist Adds an email to your email rejection allowlist. If the address is currently on your denylist, that denylist entry will be removed automatically. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20076, Fixnum, Hash)>] InlineResponse20076 data, response status code and response headers

# File lib/MailchimpTransactional/api/whitelists_api.rb, line 28
def add(body = {})
  data = @api_client.call_api(:POST, '/whitelists/add', body)
  data
end
delete(body = {}) click to toggle source

Remove email from allowlist Removes an email address from the allowlist. @param body @param [Hash] opts the optional parameters @return [Array<(InlineResponse20078, Fixnum, Hash)>] InlineResponse20078 data, response status code and response headers

# File lib/MailchimpTransactional/api/whitelists_api.rb, line 38
def delete(body = {})
  data = @api_client.call_api(:POST, '/whitelists/delete', body)
  data
end
list(body = {}) click to toggle source

List allowlisted emails Retrieves your email rejection allowlist. You can provide an email address or search prefix to limit the results. Returns up to 1000 results. @param body @param [Hash] opts the optional parameters @return [Array<(Array<InlineResponse20077>, Fixnum, Hash)>] Array<InlineResponse20077> data, response status code and response headers

# File lib/MailchimpTransactional/api/whitelists_api.rb, line 48
def list(body = {})
  data = @api_client.call_api(:POST, '/whitelists/list', body)
  data
end