Class: MailchimpTransactional::SubaccountsApi
- Inherits:
-
Object
- Object
- MailchimpTransactional::SubaccountsApi
- Defined in:
- lib/MailchimpTransactional/api/subaccounts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add(body = {}) ⇒ Array<(InlineResponse20051, Fixnum, Hash)>
Add subaccount Add a new subaccount.
-
#delete(body = {}) ⇒ Array<(InlineResponse20054, Fixnum, Hash)>
Delete subaccount Delete an existing subaccount.
-
#info(body = {}) ⇒ Array<(InlineResponse20052, Fixnum, Hash)>
Get subaccount info Given the ID of an existing subaccount, return the data about it.
-
#initialize(api_client = ApiClient.default) ⇒ SubaccountsApi
constructor
A new instance of SubaccountsApi.
-
#list(body = {}) ⇒ Array<(Array<InlineResponse20050>, Fixnum, Hash)>
List subaccounts Get the list of subaccounts defined for the account, optionally filtered by a prefix.
-
#pause(body = {}) ⇒ Array<(InlineResponse20055, Fixnum, Hash)>
Pause subaccount Pause a subaccount's sending.
-
#resume(body = {}) ⇒ Array<(InlineResponse20056, Fixnum, Hash)>
Resume subaccount Resume a paused subaccount's sending.
-
#update(body = {}) ⇒ Array<(InlineResponse20053, Fixnum, Hash)>
Update subaccount Update an existing subaccount.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SubaccountsApi
Returns a new instance of SubaccountsApi.
19 20 21 |
# File 'lib/MailchimpTransactional/api/subaccounts_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/subaccounts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add(body = {}) ⇒ Array<(InlineResponse20051, Fixnum, Hash)>
Add subaccount Add a new subaccount.
28 29 30 31 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 28 def add(body = {}) data = @api_client.call_api(:POST, '/subaccounts/add', body) data end |
#delete(body = {}) ⇒ Array<(InlineResponse20054, Fixnum, Hash)>
Delete subaccount Delete an existing subaccount. Any email related to the subaccount will be saved, but stats will be removed and any future sending calls to this subaccount will fail.
38 39 40 41 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 38 def delete(body = {}) data = @api_client.call_api(:POST, '/subaccounts/delete', body) data end |
#info(body = {}) ⇒ Array<(InlineResponse20052, Fixnum, Hash)>
Get subaccount info Given the ID of an existing subaccount, return the data about it.
48 49 50 51 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 48 def info(body = {}) data = @api_client.call_api(:POST, '/subaccounts/info', body) data end |
#list(body = {}) ⇒ Array<(Array<InlineResponse20050>, Fixnum, Hash)>
List subaccounts Get the list of subaccounts defined for the account, optionally filtered by a prefix.
58 59 60 61 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 58 def list(body = {}) data = @api_client.call_api(:POST, '/subaccounts/list', body) data end |
#pause(body = {}) ⇒ Array<(InlineResponse20055, Fixnum, Hash)>
Pause subaccount Pause a subaccount's sending. Any future emails delivered to this subaccount will be queued for a maximum of 3 days until the subaccount is resumed.
68 69 70 71 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 68 def pause(body = {}) data = @api_client.call_api(:POST, '/subaccounts/pause', body) data end |
#resume(body = {}) ⇒ Array<(InlineResponse20056, Fixnum, Hash)>
Resume subaccount Resume a paused subaccount's sending.
78 79 80 81 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 78 def resume(body = {}) data = @api_client.call_api(:POST, '/subaccounts/resume', body) data end |
#update(body = {}) ⇒ Array<(InlineResponse20053, Fixnum, Hash)>
Update subaccount Update an existing subaccount.
88 89 90 91 |
# File 'lib/MailchimpTransactional/api/subaccounts_api.rb', line 88 def update(body = {}) data = @api_client.call_api(:POST, '/subaccounts/update', body) data end |