MailchimpMarketing 3.0.5 → 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/MailchimpMarketing.gemspec +2 -2
- data/README.md +22 -26
- data/lib/MailchimpMarketing.rb +1 -1
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +10 -71
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +16 -116
- data/lib/MailchimpMarketing/api/automations_api.rb +110 -704
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +27 -187
- data/lib/MailchimpMarketing/api/batches_api.rb +21 -150
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +27 -187
- data/lib/MailchimpMarketing/api/campaigns_api.rb +124 -828
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +26 -184
- data/lib/MailchimpMarketing/api/conversations_api.rb +30 -210
- data/lib/MailchimpMarketing/api/dashboard_api.rb +25 -227
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +387 -2371
- data/lib/MailchimpMarketing/api/external_auths_api.rb +16 -116
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +13 -85
- data/lib/MailchimpMarketing/api/file_manager_api.rb +59 -424
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +44 -296
- data/lib/MailchimpMarketing/api/lists_api.rb +420 -2707
- data/lib/MailchimpMarketing/api/ping_api.rb +5 -34
- data/lib/MailchimpMarketing/api/postcards_api.rb +7 -42
- data/lib/MailchimpMarketing/api/reporting_api.rb +34 -243
- data/lib/MailchimpMarketing/api/reports_api.rb +130 -925
- data/lib/MailchimpMarketing/api/root_api.rb +5 -38
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +6 -40
- data/lib/MailchimpMarketing/api/search_members_api.rb +6 -42
- data/lib/MailchimpMarketing/api/template_folders_api.rb +27 -187
- data/lib/MailchimpMarketing/api/templates_api.rb +33 -240
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +26 -175
- data/lib/MailchimpMarketing/api_client.rb +15 -161
- data/lib/MailchimpMarketing/api_error.rb +1 -1
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- metadata +5 -11
| @@ -3,7 +3,7 @@ | |
| 3 3 |  | 
| 4 4 | 
             
            #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
         | 
| 5 5 |  | 
| 6 | 
            -
            OpenAPI spec version: 3.0. | 
| 6 | 
            +
            OpenAPI spec version: 3.0.10
         | 
| 7 7 | 
             
            Contact: apihelp@mailchimp.com
         | 
| 8 8 | 
             
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         | 
| 9 9 | 
             
            Swagger Codegen version: 2.4.12
         | 
| @@ -19,241 +19,81 @@ module MailchimpMarketing | |
| 19 19 | 
             
                def initialize(api_client)
         | 
| 20 20 | 
             
                  @api_client = api_client
         | 
| 21 21 | 
             
                end
         | 
| 22 | 
            -
                # Delete batch webhook
         | 
| 23 | 
            -
                # Remove a batch webhook. Webhooks will no longer be sent to the given URL.
         | 
| 24 | 
            -
                # @param batch_webhook_id The unique id for the batch webhook.
         | 
| 25 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 26 | 
            -
                # @return [nil]
         | 
| 27 | 
            -
                def remove(batch_webhook_id = {}, opts = {})
         | 
| 28 | 
            -
                  remove_with_http_info(batch_webhook_id, opts)
         | 
| 29 | 
            -
                  nil
         | 
| 30 | 
            -
                end
         | 
| 31 22 |  | 
| 32 23 | 
             
                # Delete batch webhook
         | 
| 33 | 
            -
                 | 
| 34 | 
            -
             | 
| 35 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 36 | 
            -
                # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
         | 
| 37 | 
            -
                def remove_with_http_info(batch_webhook_id, opts = {})
         | 
| 38 | 
            -
                  # resource path
         | 
| 39 | 
            -
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 24 | 
            +
                def remove(batch_webhook_id, opts = {})
         | 
| 25 | 
            +
                  fail ArgumentError, "Missing required param: 'batch_webhook_id'" if batch_webhook_id.nil?
         | 
| 40 26 |  | 
| 41 | 
            -
                  # query parameters
         | 
| 42 27 | 
             
                  query_params = {}
         | 
| 43 | 
            -
             | 
| 44 | 
            -
                  # header parameters
         | 
| 45 | 
            -
                  header_params = {}
         | 
| 46 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 47 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 48 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 49 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 50 | 
            -
             | 
| 51 | 
            -
                  # form parameters
         | 
| 52 | 
            -
                  form_params = {}
         | 
| 53 | 
            -
             | 
| 54 | 
            -
                  # http body (model)
         | 
| 55 28 | 
             
                  post_body = nil
         | 
| 56 | 
            -
             | 
| 29 | 
            +
             | 
| 30 | 
            +
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 57 31 | 
             
                  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
         | 
| 58 | 
            -
                    :header_params => header_params,
         | 
| 59 32 | 
             
                    :query_params => query_params,
         | 
| 60 | 
            -
                    : | 
| 61 | 
            -
                    :body => post_body,
         | 
| 62 | 
            -
                    :auth_names => auth_names)
         | 
| 33 | 
            +
                    :body => post_body)
         | 
| 63 34 | 
             
                  return data, status_code, headers
         | 
| 64 35 | 
             
                end
         | 
| 65 | 
            -
                # Get batch webhook info
         | 
| 66 | 
            -
                # Get information about a specific batch webhook.
         | 
| 67 | 
            -
                # @param batch_webhook_id The unique id for the batch webhook.
         | 
| 68 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 69 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 70 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 71 | 
            -
                # @return [BatchWebhook]
         | 
| 72 | 
            -
                def get(batch_webhook_id = {}, opts = {})
         | 
| 73 | 
            -
                  data, _status_code, _headers = get_with_http_info(batch_webhook_id, opts)
         | 
| 74 | 
            -
                  data
         | 
| 75 | 
            -
                end
         | 
| 76 36 |  | 
| 77 37 | 
             
                # Get batch webhook info
         | 
| 78 | 
            -
                 | 
| 79 | 
            -
             | 
| 80 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 81 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 82 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 83 | 
            -
                # @return [Array<(BatchWebhook, Fixnum, Hash)>] BatchWebhook data, response status code and response headers
         | 
| 84 | 
            -
                def get_with_http_info(batch_webhook_id, opts = {})
         | 
| 85 | 
            -
                  # resource path
         | 
| 86 | 
            -
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 38 | 
            +
                def get(batch_webhook_id, opts = {})
         | 
| 39 | 
            +
                  fail ArgumentError, "Missing required param: 'batch_webhook_id'" if batch_webhook_id.nil?
         | 
| 87 40 |  | 
| 88 | 
            -
                  # query parameters
         | 
| 89 41 | 
             
                  query_params = {}
         | 
| 90 42 | 
             
                  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
         | 
| 91 43 | 
             
                  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
         | 
| 92 | 
            -
             | 
| 93 | 
            -
                  # header parameters
         | 
| 94 | 
            -
                  header_params = {}
         | 
| 95 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 96 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 97 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 98 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 99 | 
            -
             | 
| 100 | 
            -
                  # form parameters
         | 
| 101 | 
            -
                  form_params = {}
         | 
| 102 | 
            -
             | 
| 103 | 
            -
                  # http body (model)
         | 
| 104 44 | 
             
                  post_body = nil
         | 
| 105 | 
            -
             | 
| 45 | 
            +
             | 
| 46 | 
            +
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 106 47 | 
             
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
         | 
| 107 | 
            -
                    :header_params => header_params,
         | 
| 108 48 | 
             
                    :query_params => query_params,
         | 
| 109 | 
            -
                    : | 
| 110 | 
            -
                    :body => post_body,
         | 
| 111 | 
            -
                    :auth_names => auth_names,
         | 
| 112 | 
            -
                    :return_type => 'BatchWebhook')
         | 
| 49 | 
            +
                    :body => post_body)
         | 
| 113 50 | 
             
                  return data, status_code, headers
         | 
| 114 51 | 
             
                end
         | 
| 115 | 
            -
                # List batch webhooks
         | 
| 116 | 
            -
                # Get all webhooks that have been configured for batches.
         | 
| 117 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 118 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 119 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 120 | 
            -
                # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
         | 
| 121 | 
            -
                # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow.  [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
         | 
| 122 | 
            -
                # @return [BatchWebhooks]
         | 
| 123 | 
            -
                def list(opts = {})
         | 
| 124 | 
            -
                  data, _status_code, _headers = list_with_http_info(opts)
         | 
| 125 | 
            -
                  data
         | 
| 126 | 
            -
                end
         | 
| 127 52 |  | 
| 128 53 | 
             
                # List batch webhooks
         | 
| 129 | 
            -
                 | 
| 130 | 
            -
             | 
| 131 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 132 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 133 | 
            -
                # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
         | 
| 134 | 
            -
                # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow.  [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
         | 
| 135 | 
            -
                # @return [Array<(BatchWebhooks, Fixnum, Hash)>] BatchWebhooks data, response status code and response headers
         | 
| 136 | 
            -
                def list_with_http_info(opts = {})
         | 
| 137 | 
            -
                  # resource path
         | 
| 138 | 
            -
                  local_var_path = '/batch-webhooks'
         | 
| 54 | 
            +
                def list(opts = {})
         | 
| 55 | 
            +
                  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
         | 
| 139 56 |  | 
| 140 | 
            -
                  # query parameters
         | 
| 141 57 | 
             
                  query_params = {}
         | 
| 142 58 | 
             
                  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
         | 
| 143 59 | 
             
                  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
         | 
| 144 60 | 
             
                  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
         | 
| 145 61 | 
             
                  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
         | 
| 146 | 
            -
             | 
| 147 | 
            -
                  # header parameters
         | 
| 148 | 
            -
                  header_params = {}
         | 
| 149 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 150 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 151 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 152 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 153 | 
            -
             | 
| 154 | 
            -
                  # form parameters
         | 
| 155 | 
            -
                  form_params = {}
         | 
| 156 | 
            -
             | 
| 157 | 
            -
                  # http body (model)
         | 
| 158 62 | 
             
                  post_body = nil
         | 
| 159 | 
            -
             | 
| 63 | 
            +
             | 
| 64 | 
            +
                  local_var_path = '/batch-webhooks'
         | 
| 160 65 | 
             
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
         | 
| 161 | 
            -
                    :header_params => header_params,
         | 
| 162 66 | 
             
                    :query_params => query_params,
         | 
| 163 | 
            -
                    : | 
| 164 | 
            -
                    :body => post_body,
         | 
| 165 | 
            -
                    :auth_names => auth_names,
         | 
| 166 | 
            -
                    :return_type => 'BatchWebhooks')
         | 
| 67 | 
            +
                    :body => post_body)
         | 
| 167 68 | 
             
                  return data, status_code, headers
         | 
| 168 69 | 
             
                end
         | 
| 169 | 
            -
                # Update batch webhook
         | 
| 170 | 
            -
                # Update a webhook that will fire whenever any batch request completes processing.
         | 
| 171 | 
            -
                # @param batch_webhook_id The unique id for the batch webhook.
         | 
| 172 | 
            -
                # @param body 
         | 
| 173 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 174 | 
            -
                # @return [BatchWebhook]
         | 
| 175 | 
            -
                def update(batch_webhook_id = {}, body = {}, opts = {})
         | 
| 176 | 
            -
                  data, _status_code, _headers = update_with_http_info(batch_webhook_id, body, opts)
         | 
| 177 | 
            -
                  data
         | 
| 178 | 
            -
                end
         | 
| 179 70 |  | 
| 180 71 | 
             
                # Update batch webhook
         | 
| 181 | 
            -
                 | 
| 182 | 
            -
             | 
| 183 | 
            -
             | 
| 184 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 185 | 
            -
                # @return [Array<(BatchWebhook, Fixnum, Hash)>] BatchWebhook data, response status code and response headers
         | 
| 186 | 
            -
                def update_with_http_info(batch_webhook_id, body, opts = {})
         | 
| 187 | 
            -
                  # resource path
         | 
| 188 | 
            -
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 72 | 
            +
                def update(batch_webhook_id, body, opts = {})
         | 
| 73 | 
            +
                  fail ArgumentError, "Missing required param: 'batch_webhook_id'" if batch_webhook_id.nil?
         | 
| 74 | 
            +
                  fail ArgumentError, "Missing required param: 'body'" if body.nil?
         | 
| 189 75 |  | 
| 190 | 
            -
                  # query parameters
         | 
| 191 76 | 
             
                  query_params = {}
         | 
| 192 | 
            -
             | 
| 193 | 
            -
                  # header parameters
         | 
| 194 | 
            -
                  header_params = {}
         | 
| 195 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 196 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 197 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 198 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 199 | 
            -
             | 
| 200 | 
            -
                  # form parameters
         | 
| 201 | 
            -
                  form_params = {}
         | 
| 202 | 
            -
             | 
| 203 | 
            -
                  # http body (model)
         | 
| 204 77 | 
             
                  post_body = @api_client.object_to_http_body(body)
         | 
| 205 | 
            -
             | 
| 78 | 
            +
             | 
| 79 | 
            +
                  local_var_path = '/batch-webhooks/{batch_webhook_id}'.sub('{' + 'batch_webhook_id' + '}', batch_webhook_id.to_s)
         | 
| 206 80 | 
             
                  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
         | 
| 207 | 
            -
                    :header_params => header_params,
         | 
| 208 81 | 
             
                    :query_params => query_params,
         | 
| 209 | 
            -
                    : | 
| 210 | 
            -
                    :body => post_body,
         | 
| 211 | 
            -
                    :auth_names => auth_names,
         | 
| 212 | 
            -
                    :return_type => 'BatchWebhook')
         | 
| 82 | 
            +
                    :body => post_body)
         | 
| 213 83 | 
             
                  return data, status_code, headers
         | 
| 214 84 | 
             
                end
         | 
| 215 | 
            -
                # Add batch webhook
         | 
| 216 | 
            -
                # Configure a webhook that will fire whenever any batch request completes processing.
         | 
| 217 | 
            -
                # @param body 
         | 
| 218 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 219 | 
            -
                # @return [BatchWebhook]
         | 
| 220 | 
            -
                def create(body = {}, opts = {})
         | 
| 221 | 
            -
                  data, _status_code, _headers = create_with_http_info(body, opts)
         | 
| 222 | 
            -
                  data
         | 
| 223 | 
            -
                end
         | 
| 224 85 |  | 
| 225 86 | 
             
                # Add batch webhook
         | 
| 226 | 
            -
                 | 
| 227 | 
            -
             | 
| 228 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 229 | 
            -
                # @return [Array<(BatchWebhook, Fixnum, Hash)>] BatchWebhook data, response status code and response headers
         | 
| 230 | 
            -
                def create_with_http_info(body, opts = {})
         | 
| 231 | 
            -
                  # resource path
         | 
| 232 | 
            -
                  local_var_path = '/batch-webhooks'
         | 
| 87 | 
            +
                def create(body, opts = {})
         | 
| 88 | 
            +
                  fail ArgumentError, "Missing required param: 'body'" if body.nil?
         | 
| 233 89 |  | 
| 234 | 
            -
                  # query parameters
         | 
| 235 90 | 
             
                  query_params = {}
         | 
| 236 | 
            -
             | 
| 237 | 
            -
                  # header parameters
         | 
| 238 | 
            -
                  header_params = {}
         | 
| 239 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 240 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 241 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 242 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 243 | 
            -
             | 
| 244 | 
            -
                  # form parameters
         | 
| 245 | 
            -
                  form_params = {}
         | 
| 246 | 
            -
             | 
| 247 | 
            -
                  # http body (model)
         | 
| 248 91 | 
             
                  post_body = @api_client.object_to_http_body(body)
         | 
| 249 | 
            -
             | 
| 92 | 
            +
             | 
| 93 | 
            +
                  local_var_path = '/batch-webhooks'
         | 
| 250 94 | 
             
                  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
         | 
| 251 | 
            -
                    :header_params => header_params,
         | 
| 252 95 | 
             
                    :query_params => query_params,
         | 
| 253 | 
            -
                    : | 
| 254 | 
            -
                    :body => post_body,
         | 
| 255 | 
            -
                    :auth_names => auth_names,
         | 
| 256 | 
            -
                    :return_type => 'BatchWebhook')
         | 
| 96 | 
            +
                    :body => post_body)
         | 
| 257 97 | 
             
                  return data, status_code, headers
         | 
| 258 98 | 
             
                end
         | 
| 259 99 | 
             
              end
         | 
| @@ -3,7 +3,7 @@ | |
| 3 3 |  | 
| 4 4 | 
             
            #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
         | 
| 5 5 |  | 
| 6 | 
            -
            OpenAPI spec version: 3.0. | 
| 6 | 
            +
            OpenAPI spec version: 3.0.10
         | 
| 7 7 | 
             
            Contact: apihelp@mailchimp.com
         | 
| 8 8 | 
             
            Generated by: https://github.com/swagger-api/swagger-codegen.git
         | 
| 9 9 | 
             
            Swagger Codegen version: 2.4.12
         | 
| @@ -19,195 +19,66 @@ module MailchimpMarketing | |
| 19 19 | 
             
                def initialize(api_client)
         | 
| 20 20 | 
             
                  @api_client = api_client
         | 
| 21 21 | 
             
                end
         | 
| 22 | 
            -
                # Delete batch request
         | 
| 23 | 
            -
                # Stops a batch request from running. Since only one batch request is run at a time, this can be used to cancel a long running request. The results of any completed operations will not be available after this call.
         | 
| 24 | 
            -
                # @param batch_id The unique id for the batch operation.
         | 
| 25 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 26 | 
            -
                # @return [nil]
         | 
| 27 | 
            -
                def delete_request(batch_id = {}, opts = {})
         | 
| 28 | 
            -
                  delete_request_with_http_info(batch_id, opts)
         | 
| 29 | 
            -
                  nil
         | 
| 30 | 
            -
                end
         | 
| 31 22 |  | 
| 32 23 | 
             
                # Delete batch request
         | 
| 33 | 
            -
                 | 
| 34 | 
            -
             | 
| 35 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 36 | 
            -
                # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
         | 
| 37 | 
            -
                def delete_request_with_http_info(batch_id, opts = {})
         | 
| 38 | 
            -
                  # resource path
         | 
| 39 | 
            -
                  local_var_path = '/batches/{batch_id}'.sub('{' + 'batch_id' + '}', batch_id.to_s)
         | 
| 24 | 
            +
                def delete_request(batch_id, opts = {})
         | 
| 25 | 
            +
                  fail ArgumentError, "Missing required param: 'batch_id'" if batch_id.nil?
         | 
| 40 26 |  | 
| 41 | 
            -
                  # query parameters
         | 
| 42 27 | 
             
                  query_params = {}
         | 
| 43 | 
            -
             | 
| 44 | 
            -
                  # header parameters
         | 
| 45 | 
            -
                  header_params = {}
         | 
| 46 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 47 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 48 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 49 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 50 | 
            -
             | 
| 51 | 
            -
                  # form parameters
         | 
| 52 | 
            -
                  form_params = {}
         | 
| 53 | 
            -
             | 
| 54 | 
            -
                  # http body (model)
         | 
| 55 28 | 
             
                  post_body = nil
         | 
| 56 | 
            -
             | 
| 29 | 
            +
             | 
| 30 | 
            +
                  local_var_path = '/batches/{batch_id}'.sub('{' + 'batch_id' + '}', batch_id.to_s)
         | 
| 57 31 | 
             
                  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
         | 
| 58 | 
            -
                    :header_params => header_params,
         | 
| 59 32 | 
             
                    :query_params => query_params,
         | 
| 60 | 
            -
                    : | 
| 61 | 
            -
                    :body => post_body,
         | 
| 62 | 
            -
                    :auth_names => auth_names)
         | 
| 33 | 
            +
                    :body => post_body)
         | 
| 63 34 | 
             
                  return data, status_code, headers
         | 
| 64 35 | 
             
                end
         | 
| 65 | 
            -
                # List batch requests
         | 
| 66 | 
            -
                # Get a summary of batch requests that have been made.
         | 
| 67 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 68 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 69 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 70 | 
            -
                # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
         | 
| 71 | 
            -
                # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow.  [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
         | 
| 72 | 
            -
                # @return [BatchOperations]
         | 
| 73 | 
            -
                def list(opts = {})
         | 
| 74 | 
            -
                  data, _status_code, _headers = list_with_http_info(opts)
         | 
| 75 | 
            -
                  data
         | 
| 76 | 
            -
                end
         | 
| 77 36 |  | 
| 78 37 | 
             
                # List batch requests
         | 
| 79 | 
            -
                 | 
| 80 | 
            -
             | 
| 81 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 82 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 83 | 
            -
                # @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
         | 
| 84 | 
            -
                # @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow.  [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
         | 
| 85 | 
            -
                # @return [Array<(BatchOperations, Fixnum, Hash)>] BatchOperations data, response status code and response headers
         | 
| 86 | 
            -
                def list_with_http_info(opts = {})
         | 
| 87 | 
            -
                  # resource path
         | 
| 88 | 
            -
                  local_var_path = '/batches'
         | 
| 38 | 
            +
                def list(opts = {})
         | 
| 39 | 
            +
                  fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
         | 
| 89 40 |  | 
| 90 | 
            -
                  # query parameters
         | 
| 91 41 | 
             
                  query_params = {}
         | 
| 92 42 | 
             
                  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
         | 
| 93 43 | 
             
                  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
         | 
| 94 44 | 
             
                  query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
         | 
| 95 45 | 
             
                  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
         | 
| 96 | 
            -
             | 
| 97 | 
            -
                  # header parameters
         | 
| 98 | 
            -
                  header_params = {}
         | 
| 99 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 100 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 101 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 102 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 103 | 
            -
             | 
| 104 | 
            -
                  # form parameters
         | 
| 105 | 
            -
                  form_params = {}
         | 
| 106 | 
            -
             | 
| 107 | 
            -
                  # http body (model)
         | 
| 108 46 | 
             
                  post_body = nil
         | 
| 109 | 
            -
             | 
| 47 | 
            +
             | 
| 48 | 
            +
                  local_var_path = '/batches'
         | 
| 110 49 | 
             
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
         | 
| 111 | 
            -
                    :header_params => header_params,
         | 
| 112 50 | 
             
                    :query_params => query_params,
         | 
| 113 | 
            -
                    : | 
| 114 | 
            -
                    :body => post_body,
         | 
| 115 | 
            -
                    :auth_names => auth_names,
         | 
| 116 | 
            -
                    :return_type => 'BatchOperations')
         | 
| 51 | 
            +
                    :body => post_body)
         | 
| 117 52 | 
             
                  return data, status_code, headers
         | 
| 118 53 | 
             
                end
         | 
| 119 | 
            -
                # Get batch operation status
         | 
| 120 | 
            -
                # Get the status of a batch request.
         | 
| 121 | 
            -
                # @param batch_id The unique id for the batch operation.
         | 
| 122 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 123 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 124 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 125 | 
            -
                # @return [Batch]
         | 
| 126 | 
            -
                def status(batch_id = {}, opts = {})
         | 
| 127 | 
            -
                  data, _status_code, _headers = status_with_http_info(batch_id, opts)
         | 
| 128 | 
            -
                  data
         | 
| 129 | 
            -
                end
         | 
| 130 54 |  | 
| 131 55 | 
             
                # Get batch operation status
         | 
| 132 | 
            -
                 | 
| 133 | 
            -
             | 
| 134 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 135 | 
            -
                # @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
         | 
| 136 | 
            -
                # @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
         | 
| 137 | 
            -
                # @return [Array<(Batch, Fixnum, Hash)>] Batch data, response status code and response headers
         | 
| 138 | 
            -
                def status_with_http_info(batch_id, opts = {})
         | 
| 139 | 
            -
                  # resource path
         | 
| 140 | 
            -
                  local_var_path = '/batches/{batch_id}'.sub('{' + 'batch_id' + '}', batch_id.to_s)
         | 
| 56 | 
            +
                def status(batch_id, opts = {})
         | 
| 57 | 
            +
                  fail ArgumentError, "Missing required param: 'batch_id'" if batch_id.nil?
         | 
| 141 58 |  | 
| 142 | 
            -
                  # query parameters
         | 
| 143 59 | 
             
                  query_params = {}
         | 
| 144 60 | 
             
                  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
         | 
| 145 61 | 
             
                  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
         | 
| 146 | 
            -
             | 
| 147 | 
            -
                  # header parameters
         | 
| 148 | 
            -
                  header_params = {}
         | 
| 149 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 150 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 151 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 152 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 153 | 
            -
             | 
| 154 | 
            -
                  # form parameters
         | 
| 155 | 
            -
                  form_params = {}
         | 
| 156 | 
            -
             | 
| 157 | 
            -
                  # http body (model)
         | 
| 158 62 | 
             
                  post_body = nil
         | 
| 159 | 
            -
             | 
| 63 | 
            +
             | 
| 64 | 
            +
                  local_var_path = '/batches/{batch_id}'.sub('{' + 'batch_id' + '}', batch_id.to_s)
         | 
| 160 65 | 
             
                  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
         | 
| 161 | 
            -
                    :header_params => header_params,
         | 
| 162 66 | 
             
                    :query_params => query_params,
         | 
| 163 | 
            -
                    : | 
| 164 | 
            -
                    :body => post_body,
         | 
| 165 | 
            -
                    :auth_names => auth_names,
         | 
| 166 | 
            -
                    :return_type => 'Batch')
         | 
| 67 | 
            +
                    :body => post_body)
         | 
| 167 68 | 
             
                  return data, status_code, headers
         | 
| 168 69 | 
             
                end
         | 
| 169 | 
            -
                # Start batch operation
         | 
| 170 | 
            -
                # Begin processing a batch operations request.
         | 
| 171 | 
            -
                # @param body 
         | 
| 172 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 173 | 
            -
                # @return [Batch]
         | 
| 174 | 
            -
                def start(body = {}, opts = {})
         | 
| 175 | 
            -
                  data, _status_code, _headers = start_with_http_info(body, opts)
         | 
| 176 | 
            -
                  data
         | 
| 177 | 
            -
                end
         | 
| 178 70 |  | 
| 179 71 | 
             
                # Start batch operation
         | 
| 180 | 
            -
                 | 
| 181 | 
            -
             | 
| 182 | 
            -
                # @param [Hash] opts the optional parameters
         | 
| 183 | 
            -
                # @return [Array<(Batch, Fixnum, Hash)>] Batch data, response status code and response headers
         | 
| 184 | 
            -
                def start_with_http_info(body, opts = {})
         | 
| 185 | 
            -
                  # resource path
         | 
| 186 | 
            -
                  local_var_path = '/batches'
         | 
| 72 | 
            +
                def start(body, opts = {})
         | 
| 73 | 
            +
                  fail ArgumentError, "Missing required param: 'body'" if body.nil?
         | 
| 187 74 |  | 
| 188 | 
            -
                  # query parameters
         | 
| 189 75 | 
             
                  query_params = {}
         | 
| 190 | 
            -
             | 
| 191 | 
            -
                  # header parameters
         | 
| 192 | 
            -
                  header_params = {}
         | 
| 193 | 
            -
                  # HTTP header 'Accept' (if needed)
         | 
| 194 | 
            -
                  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
         | 
| 195 | 
            -
                  # HTTP header 'Content-Type'
         | 
| 196 | 
            -
                  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
         | 
| 197 | 
            -
             | 
| 198 | 
            -
                  # form parameters
         | 
| 199 | 
            -
                  form_params = {}
         | 
| 200 | 
            -
             | 
| 201 | 
            -
                  # http body (model)
         | 
| 202 76 | 
             
                  post_body = @api_client.object_to_http_body(body)
         | 
| 203 | 
            -
             | 
| 77 | 
            +
             | 
| 78 | 
            +
                  local_var_path = '/batches'
         | 
| 204 79 | 
             
                  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
         | 
| 205 | 
            -
                    :header_params => header_params,
         | 
| 206 80 | 
             
                    :query_params => query_params,
         | 
| 207 | 
            -
                    : | 
| 208 | 
            -
                    :body => post_body,
         | 
| 209 | 
            -
                    :auth_names => auth_names,
         | 
| 210 | 
            -
                    :return_type => 'Batch')
         | 
| 81 | 
            +
                    :body => post_body)
         | 
| 211 82 | 
             
                  return data, status_code, headers
         | 
| 212 83 | 
             
                end
         | 
| 213 84 | 
             
              end
         |