Class: MailchimpTransactional::WhitelistsApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::WhitelistsApi
- Defined in:
- lib/MailchimpTransactional/api/whitelists_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add(body = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Add email to allowlist Adds an email to your email rejection allowlist.
-
#delete(body = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Remove email from allowlist Removes an email address from the allowlist.
-
#initialize(api_client = ApiClient.default) ⇒ WhitelistsApi
constructor
A new instance of WhitelistsApi.
-
#list(body = {}) ⇒ Array<(Array<InlineResponse2001>, Fixnum, Hash)>
List allowlisted emails Retrieves your email rejection allowlist.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WhitelistsApi
Returns a new instance of WhitelistsApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/whitelists_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpTransactional/api/whitelists_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add(body = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
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.
28 29 30 31 |
# 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 = {}) ⇒ Array<(InlineResponse2002, Fixnum, Hash)>
Remove email from allowlist Removes an email address from the allowlist.
38 39 40 41 |
# 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 = {}) ⇒ Array<(Array<InlineResponse2001>, Fixnum, Hash)>
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.
48 49 50 51 |
# File 'lib/MailchimpTransactional/api/whitelists_api.rb', line 48 def list(body = {}) data = @api_client.call_api(:POST, '/whitelists/list', body) data end |