Class: MailchimpMarketing::BatchWebhooksApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::BatchWebhooksApi
- Defined in:
- lib/MailchimpMarketing/api/batch_webhooks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(body = {}, opts = {}) ⇒ BatchWebhook
Configure a webhook for batches Configure a webhook that will fire whenever any batch request completes processing.
-
#create_with_http_info(body, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Configure a webhook for batches Configure a webhook that will fire whenever any batch request completes processing.
-
#get(batch_webhook_id = {}, opts = {}) ⇒ BatchWebhook
Get a batch webook Get information about a specific batch webhook.
-
#get_with_http_info(batch_webhook_id, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Get a batch webook Get information about a specific batch webhook.
-
#initialize(api_client) ⇒ BatchWebhooksApi
constructor
A new instance of BatchWebhooksApi.
-
#list(opts = {}) ⇒ BatchWebhooks
Get a list of all webhooks configured for batches Get all webhooks that have been configured for batches.
-
#list_with_http_info(opts = {}) ⇒ Array<(BatchWebhooks, Fixnum, Hash)>
Get a list of all webhooks configured for batches Get all webhooks that have been configured for batches.
-
#remove(batch_webhook_id = {}, opts = {}) ⇒ nil
Delete a batch webhook Remove a batch webhook.
-
#remove_with_http_info(batch_webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a batch webhook Remove a batch webhook.
-
#update(batch_webhook_id = {}, body = {}, opts = {}) ⇒ BatchWebhook
Update a webhook for batches Update a webhook that will fire whenever any batch request completes processing.
-
#update_with_http_info(batch_webhook_id, body, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Update a webhook for batches Update a webhook that will fire whenever any batch request completes processing.
Constructor Details
#initialize(api_client) ⇒ BatchWebhooksApi
Returns a new instance of BatchWebhooksApi.
19 20 21 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 19 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client
17 18 19 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(body = {}, opts = {}) ⇒ BatchWebhook
Configure a webhook for batches Configure a webhook that will fire whenever any batch request completes processing.
220 221 222 223 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 220 def create(body = {}, opts = {}) data, _status_code, _headers = create_with_http_info(body, opts) data end |
#create_with_http_info(body, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Configure a webhook for batches Configure a webhook that will fire whenever any batch request completes processing.
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 230 def create_with_http_info(body, opts = {}) # resource path local_var_path = '/batch-webhooks' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BatchWebhook') return data, status_code, headers end |
#get(batch_webhook_id = {}, opts = {}) ⇒ BatchWebhook
Get a batch webook Get information about a specific batch webhook.
72 73 74 75 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 72 def get(batch_webhook_id = {}, opts = {}) data, _status_code, _headers = get_with_http_info(batch_webhook_id, opts) data end |
#get_with_http_info(batch_webhook_id, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Get a batch webook Get information about a specific batch webhook.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 84 def get_with_http_info(batch_webhook_id, opts = {}) # resource path local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BatchWebhook') return data, status_code, headers end |
#list(opts = {}) ⇒ BatchWebhooks
Get a list of all webhooks configured for batches Get all webhooks that have been configured for batches.
123 124 125 126 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 123 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) data end |
#list_with_http_info(opts = {}) ⇒ Array<(BatchWebhooks, Fixnum, Hash)>
Get a list of all webhooks configured for batches Get all webhooks that have been configured for batches.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 136 def list_with_http_info(opts = {}) # resource path local_var_path = '/batch-webhooks' # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BatchWebhooks') return data, status_code, headers end |
#remove(batch_webhook_id = {}, opts = {}) ⇒ nil
Delete a batch webhook Remove a batch webhook. Webhooks will no longer be sent to the given URL.
27 28 29 30 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 27 def remove(batch_webhook_id = {}, opts = {}) remove_with_http_info(batch_webhook_id, opts) nil end |
#remove_with_http_info(batch_webhook_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a batch webhook Remove a batch webhook. Webhooks will no longer be sent to the given URL.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 37 def remove_with_http_info(batch_webhook_id, opts = {}) # resource path local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) return data, status_code, headers end |
#update(batch_webhook_id = {}, body = {}, opts = {}) ⇒ BatchWebhook
Update a webhook for batches Update a webhook that will fire whenever any batch request completes processing.
175 176 177 178 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 175 def update(batch_webhook_id = {}, body = {}, opts = {}) data, _status_code, _headers = update_with_http_info(batch_webhook_id, body, opts) data end |
#update_with_http_info(batch_webhook_id, body, opts = {}) ⇒ Array<(BatchWebhook, Fixnum, Hash)>
Update a webhook for batches Update a webhook that will fire whenever any batch request completes processing.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/MailchimpMarketing/api/batch_webhooks_api.rb', line 186 def update_with_http_info(batch_webhook_id, body, opts = {}) # resource path local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BatchWebhook') return data, status_code, headers end |