Class: MailchimpTransactional::RejectsApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::RejectsApi
- Defined in:
- lib/MailchimpTransactional/api/rejects_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add(body = {}) ⇒ Array<(InlineResponse20040, Fixnum, Hash)>
Add email to denylist Adds an email to your email rejection denylist.
-
#delete(body = {}) ⇒ Array<(InlineResponse20042, Fixnum, Hash)>
Delete email from denylist Deletes an email rejection.
-
#initialize(api_client = ApiClient.default) ⇒ RejectsApi
constructor
A new instance of RejectsApi.
-
#list(body = {}) ⇒ Array<(Array<InlineResponse20041>, Fixnum, Hash)>
List denylisted emails Retrieves your email rejection denylist.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RejectsApi
Returns a new instance of RejectsApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/rejects_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/rejects_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add(body = {}) ⇒ Array<(InlineResponse20040, Fixnum, Hash)>
Add email to denylist Adds an email to your email rejection denylist. Addresses that you add manually will never expire and there is no reputation penalty for removing them from your denylist. Attempting to denylist an address that has been added to the allowlist will have no effect.
28 29 30 31 |
# File 'lib/MailchimpTransactional/api/rejects_api.rb', line 28 def add(body = {}) data = @api_client.call_api(:POST, '/rejects/add', body) data end |
#delete(body = {}) ⇒ Array<(InlineResponse20042, Fixnum, Hash)>
Delete email from denylist Deletes an email rejection. There is no limit to how many rejections you can remove from your denylist, but keep in mind that each deletion has an affect on your reputation.
38 39 40 41 |
# File 'lib/MailchimpTransactional/api/rejects_api.rb', line 38 def delete(body = {}) data = @api_client.call_api(:POST, '/rejects/delete', body) data end |
#list(body = {}) ⇒ Array<(Array<InlineResponse20041>, Fixnum, Hash)>
List denylisted emails Retrieves your email rejection denylist. You can provide an email address to limit the results. Returns up to 1000 results. By default, entries that have expired are excluded from the results; set include_expired to true to include them.
48 49 50 51 |
# File 'lib/MailchimpTransactional/api/rejects_api.rb', line 48 def list(body = {}) data = @api_client.call_api(:POST, '/rejects/list', body) data end |