[
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "content": "Note: This repository is auto-generated, and does not accept pull requests.\n\nTo make changes or open issues for this SDK, use the [code generation repository](https://github.com/mailchimp/mailchimp-client-lib-codegen).\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"6\"\n  - \"6.1\"\n  - \"5\"\n  - \"5.11\"\n\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n## Transactional\n\n### 1.0.48\n* Allowing users to schedule messages (using messages/send, messages/send-template, messages/send-raw and messages/reschedule APIs) within a year from the date of scheduling.\n\n### 1.0.46\n* Added a little more granularity to the `set_timeout` method to the Client class in the Ruby SDK; now supports `read`, `write` and `connect` parameters, which will default to the `timeout` param if unspecified, or 300 seconds if `timeout` is unspecified.\n\n### 1.0.45\n* Added a `set_timeout` method to the Client class in the Ruby SDK\n\n### 1.0.44\n* Added a `set_timeout` method to the Client class in the Python SDK\n\n### 1.0.43\n* Added a `setTimeout` method to the Configuration class in the PHP SDK.\n\n### 1.0.42\n* Added a `setDefaultTimeoutMs` method to the node client. This allows users to override the default timeout for API requests, which is set to 5 minutes by default.\n\n### 1.0.41\n* Updated the \"reject_reasons\" response for /messages/send and /messages/send-template to correctly use \"hard-bounce\" and \"soft-bounce\" instead of the previously stated \"hard_bounce\" and \"soft_bounce\".\n\n### 1.0.40\n* Added the new /allowlists/ series of endpoints and the /exports/allowlist endpoint to the API reference\n\n### 1.0.39\n* Fixes the output directory for the Changelog for the php client library\n\n### 1.0.38\n* A change was made to `mailchimp-transactional-php` - the API client will now always return an `Exception`, instead of an `Exception` or a string, when the API returns an error. Having to parse the response as a string was found to be a bit clunky.\n\n### 1.0.37\n* Added a changelog, which will be used to describe changes to both transactional and marketing client libraries.\n\n## Marketing\n\n### 3.0.72\n* Updated the `PATCH /automations/.../emails/.../` documentation to state the required `workflow_type`\n\n### 3.0.70\n* Added more granularity for the `timeout` field in the Ruby Marketing SDK; now supports `read_timeout`, `write_timeout` and `connect_timeout` fields which will default to the `timeout` value.\n\n### 3.0.69\n* Added handling for a `timeout` field in the config block passed to the client constructor in the Ruby Marketing SDK.\n\n### 3.0.68\n* Added handling for a `'timeout'` field in `set_config()` in the Python Marketing SDK.\n\n### 3.0.67\n* Added a `setTimeout()` method to the configuration class in the PHP Marketing SDK, to allow manually setting the timeout for Guzzle requests.\n\n### 3.0.65\n* Added a new API endpoint, `/3.0/account-exports`, allowing users to programatically export their account information\n\n### 3.0.64\n* Fixes the output directory for the Changelog for the php client library\n\n### 3.0.63\n* Added a changelog, which will be used to describe changes to both transactional and marketing client libraries.\n"
  },
  {
    "path": "LICENSE",
    "content": "Mailchimp Client Library License Agreement\n \nIMPORTANT- PLEASE READ CAREFULLY BEFORE OPENING, INSTALLING, COPYING OR USING THE CLIENT LIBRARY.  This Client Library License Agreement (“Agreement”) is a legal document by and between you (hereinafter referred to as “You” “Your” or “Licensee”) and The Rocket Science Group LLC (“Mailchimp”) (each a “Party” and collectively, “Parties”) for the client library, including any upgrades, modified versions, updates, additions, and copies of the foregoing, including the software and related documentation (the “Mailchimp Client Library”).\n \nBY OPENING, INSTALLING, COPYING OR USING THE MAILCHIMP CLIENT LIBRARY OR ANY PORTION THEREOF, YOU AGREE TO ALL THE TERMS OF THIS AGREEMENT.  IF YOU ARE AGREEING TO THIS AGREEMENT AS AN INDIVIDUAL, “YOU” “YOUR” AND “LICENSEE” REFERS TO YOU INDIVIDUALLY.  IF YOU ARE AGREEING TO THIS AGREEMENT AS A REPRESENTATIVE OF A LEGAL ENTITY, YOU REPRESENT THAT YOU HAVE THE AUTHORITY TO BIND THAT ENTITY AND “YOU” “YOUR” AND “LICENSEE” REFERS TO THAT LEGAL ENTITY AND ALL THE USERS ACCESSING THE SOFTWARE BY, THROUGH OR ON BEHALF OF THAT LEGAL ENTITY. IF YOU DO NOT AGREE WITH ALL OF THE TERMS OF THIS AGREEMENT, DO NOT (AND ENSURE THAT YOUR END USERS DO NOT) OPEN, INSTALL, COPY OR USE THE MAILCHIMP CLIENT LIBRARY.\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n1. Definitions.\n“License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 10 of these Terms and Conditions for Use, Reproduction and Distribution.\n“Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\n“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License.\n“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\n“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\n“Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.\n“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\n“Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Mailchimp for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to Mailchimp or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Mailchimp for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.”\n“Contributor” shall mean Mailchimp and any individual or Legal Entity on behalf of whom a Contribution has been received by Mailchimp and subsequently incorporated within the Work.\n\n2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\n\n3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\n\n4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\na) You must give any other recipients of the Work or Derivative Works a copy of this License; and\nb) You must cause any modified files to carry prominent notices stating that You changed the files; and\nc) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\nd) If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.\nYou may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\n\n5. Submission of Contributions. Any Contribution submitted for inclusion in the Work by You to Mailchimp shall be made under the terms and conditions of the Individual Contributor License Agreement or the  Software Grant and Corporate Contributor License Agreement, as applicable.\n\n6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of Mailchimp, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\n\n7. Export controls. The Mailchimp Client Library is subject to united states export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the Mailchimp Client Library. These laws include restrictions on destinations, end-users and end use. \n\n8. Disclaimer of Warranty.    Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\n\n9. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\n\n10. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\n\nCopyright 2020, The Rocket Science Group LLC\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\nYou should include a copy of the License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file.\n\nTo apply the License to specific files in your work, attach the following boilerplate declaration, with the fields enclosed by brackets “[]” replaced with your own identifying information. (Don’t include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.\nCopyright [yyyy] [name of copyright owner]\n\nLicensed under the Mailchimp Client Library License Agreement (the “License”); you may not use this file except in compliance with the License. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either or express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n  <a href=\"https://mailchimp.com/developer/\">\n    <img src=\"https://raw.githubusercontent.com/mailchimp/mailchimp-client-lib-codegen/main/resources/images/mcdev-banner.png\" alt=\"Mailchimp Developer\" width=\"100%\" height=\"auto\">\n  </a>\n</p>\n\n# Mailchimp Marketing – Node.js\n\nThe official Node.js client library for the Mailchimp Marketing API\n\n## Installation\n\n```\nnpm install @mailchimp/mailchimp_marketing\n```\n\n## Quick Start\n\n```javascript\nconst mailchimp = require('@mailchimp/mailchimp_marketing');\n\nmailchimp.setConfig({\n  apiKey: 'YOUR_API_KEY',\n  server: 'YOUR_SERVER_PREFIX',\n});\n\nasync function callPing() {\n  const response = await mailchimp.ping.get();\n  console.log(response);\n}\n\ncallPing();\n```\n\n## Authentication Methods\n\nThe client library can be configured to use either **Basic Auth** or **OAuth2**.\n\nFor either method, a server prefix should be passed in i.e. `us19`, in order for the client to determine to appropriate host url.\n\n### Basic Auth\n```javascript\nmailchimp.setConfig({\n  apiKey: 'YOUR_API_KEY',\n  server: 'YOUR_SERVER_PREFIX',\n});\n```\n\n### OAuth2\n```javascript\nmailchimp.setConfig({\n  accessToken: 'YOUR_ACCESS_TOKEN',\n  server: 'YOUR_SERVER_PREFIX',\n});\n```\n\n## PRs and Issues\nThis repo is autogenerated from https://github.com/mailchimp/mailchimp-client-lib-codegen -- please submit PRs or issues there!\n\n## API Endpoints\n\nAll URIs are relative to *https://server.api.mailchimp.com/3.0*\n\n| Method | Endpoint |\n| ---------- | -------- |\n| **accountExport.getAccountExports** | /account-exports/{export_id} |\n| **accountExports.listAccountExports** | /account-exports |\n| **accountExports.createAccountExport** | /account-exports |\n| **activityFeed.getChimpChatter** | /activity-feed/chimp-chatter |\n| **authorizedApps.list** | /authorized-apps |\n| **authorizedApps.get** | /authorized-apps/{app_id} |\n| **automations.archive** | /automations/{workflow_id}/actions/archive |\n| **automations.deleteWorkflowEmail** | /automations/{workflow_id}/emails/{workflow_email_id} |\n| **automations.list** | /automations |\n| **automations.get** | /automations/{workflow_id} |\n| **automations.listAllWorkflowEmails** | /automations/{workflow_id}/emails |\n| **automations.getWorkflowEmail** | /automations/{workflow_id}/emails/{workflow_email_id} |\n| **automations.getWorkflowEmailSubscriberQueue** | /automations/{workflow_id}/emails/{workflow_email_id}/queue |\n| **automations.getWorkflowEmailSubscriber** | /automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash} |\n| **automations.listWorkflowEmailSubscribersRemoved** | /automations/{workflow_id}/removed-subscribers |\n| **automations.getRemovedWorkflowEmailSubscriber** | /automations/{workflow_id}/removed-subscribers/{subscriber_hash} |\n| **automations.updateWorkflowEmail** | /automations/{workflow_id}/emails/{workflow_email_id} |\n| **automations.create** | /automations |\n| **automations.pauseAllEmails** | /automations/{workflow_id}/actions/pause-all-emails |\n| **automations.startAllEmails** | /automations/{workflow_id}/actions/start-all-emails |\n| **automations.pauseWorkflowEmail** | /automations/{workflow_id}/emails/{workflow_email_id}/actions/pause |\n| **automations.startWorkflowEmail** | /automations/{workflow_id}/emails/{workflow_email_id}/actions/start |\n| **automations.addWorkflowEmailSubscriber** | /automations/{workflow_id}/emails/{workflow_email_id}/queue |\n| **automations.removeWorkflowEmailSubscriber** | /automations/{workflow_id}/removed-subscribers |\n| **batchWebhooks.remove** | /batch-webhooks/{batch_webhook_id} |\n| **batchWebhooks.get** | /batch-webhooks/{batch_webhook_id} |\n| **batchWebhooks.list** | /batch-webhooks |\n| **batchWebhooks.update** | /batch-webhooks/{batch_webhook_id} |\n| **batchWebhooks.create** | /batch-webhooks |\n| **batches.deleteRequest** | /batches/{batch_id} |\n| **batches.list** | /batches |\n| **batches.status** | /batches/{batch_id} |\n| **batches.start** | /batches |\n| **campaignFolders.remove** | /campaign-folders/{folder_id} |\n| **campaignFolders.list** | /campaign-folders |\n| **campaignFolders.get** | /campaign-folders/{folder_id} |\n| **campaignFolders.update** | /campaign-folders/{folder_id} |\n| **campaignFolders.create** | /campaign-folders |\n| **campaigns.remove** | /campaigns/{campaign_id} |\n| **campaigns.deleteFeedbackMessage** | /campaigns/{campaign_id}/feedback/{feedback_id} |\n| **campaigns.list** | /campaigns |\n| **campaigns.get** | /campaigns/{campaign_id} |\n| **campaigns.getContent** | /campaigns/{campaign_id}/content |\n| **campaigns.getFeedback** | /campaigns/{campaign_id}/feedback |\n| **campaigns.getFeedbackMessage** | /campaigns/{campaign_id}/feedback/{feedback_id} |\n| **campaigns.getSendChecklist** | /campaigns/{campaign_id}/send-checklist |\n| **campaigns.update** | /campaigns/{campaign_id} |\n| **campaigns.updateFeedbackMessage** | /campaigns/{campaign_id}/feedback/{feedback_id} |\n| **campaigns.create** | /campaigns |\n| **campaigns.cancelSend** | /campaigns/{campaign_id}/actions/cancel-send |\n| **campaigns.createResend** | /campaigns/{campaign_id}/actions/create-resend |\n| **campaigns.pause** | /campaigns/{campaign_id}/actions/pause |\n| **campaigns.replicate** | /campaigns/{campaign_id}/actions/replicate |\n| **campaigns.resume** | /campaigns/{campaign_id}/actions/resume |\n| **campaigns.schedule** | /campaigns/{campaign_id}/actions/schedule |\n| **campaigns.send** | /campaigns/{campaign_id}/actions/send |\n| **campaigns.sendTestEmail** | /campaigns/{campaign_id}/actions/test |\n| **campaigns.unschedule** | /campaigns/{campaign_id}/actions/unschedule |\n| **campaigns.addFeedback** | /campaigns/{campaign_id}/feedback |\n| **campaigns.setContent** | /campaigns/{campaign_id}/content |\n| **connectedSites.remove** | /connected-sites/{connected_site_id} |\n| **connectedSites.list** | /connected-sites |\n| **connectedSites.get** | /connected-sites/{connected_site_id} |\n| **connectedSites.create** | /connected-sites |\n| **connectedSites.verifyScriptInstallation** | /connected-sites/{connected_site_id}/actions/verify-script-installation |\n| **conversations.list** | /conversations |\n| **conversations.get** | /conversations/{conversation_id} |\n| **conversations.getConversationMessages** | /conversations/{conversation_id}/messages |\n| **conversations.getConversationMessage** | /conversations/{conversation_id}/messages/{message_id} |\n| **customerJourneys.trigger** | /customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger |\n| **ecommerce.deleteStore** | /ecommerce/stores/{store_id} |\n| **ecommerce.deleteStoreCart** | /ecommerce/stores/{store_id}/carts/{cart_id} |\n| **ecommerce.deleteCartLineItem** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} |\n| **ecommerce.deleteStoreCustomer** | /ecommerce/stores/{store_id}/customers/{customer_id} |\n| **ecommerce.deleteOrder** | /ecommerce/stores/{store_id}/orders/{order_id} |\n| **ecommerce.deleteOrderLineItem** | /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} |\n| **ecommerce.deleteStoreProduct** | /ecommerce/stores/{store_id}/products/{product_id} |\n| **ecommerce.deleteProductImage** | /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} |\n| **ecommerce.deleteProductVariant** | /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} |\n| **ecommerce.deletePromoCode** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} |\n| **ecommerce.deletePromoRule** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} |\n| **ecommerce.orders** | /ecommerce/orders |\n| **ecommerce.stores** | /ecommerce/stores |\n| **ecommerce.getStore** | /ecommerce/stores/{store_id} |\n| **ecommerce.getStoreCarts** | /ecommerce/stores/{store_id}/carts |\n| **ecommerce.getStoreCart** | /ecommerce/stores/{store_id}/carts/{cart_id} |\n| **ecommerce.getAllCartLineItems** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines |\n| **ecommerce.getCartLineItem** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} |\n| **ecommerce.getAllStoreCustomers** | /ecommerce/stores/{store_id}/customers |\n| **ecommerce.getStoreCustomer** | /ecommerce/stores/{store_id}/customers/{customer_id} |\n| **ecommerce.getStoreOrders** | /ecommerce/stores/{store_id}/orders |\n| **ecommerce.getOrder** | /ecommerce/stores/{store_id}/orders/{order_id} |\n| **ecommerce.getAllOrderLineItems** | /ecommerce/stores/{store_id}/orders/{order_id}/lines |\n| **ecommerce.getOrderLineItem** | /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} |\n| **ecommerce.getAllStoreProducts** | /ecommerce/stores/{store_id}/products |\n| **ecommerce.getStoreProduct** | /ecommerce/stores/{store_id}/products/{product_id} |\n| **ecommerce.getProductImages** | /ecommerce/stores/{store_id}/products/{product_id}/images |\n| **ecommerce.getProductImage** | /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} |\n| **ecommerce.getProductVariants** | /ecommerce/stores/{store_id}/products/{product_id}/variants |\n| **ecommerce.getProductVariant** | /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} |\n| **ecommerce.getPromoCodes** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes |\n| **ecommerce.getPromoCode** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} |\n| **ecommerce.listPromoRules** | /ecommerce/stores/{store_id}/promo-rules |\n| **ecommerce.getPromoRule** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} |\n| **ecommerce.updateStore** | /ecommerce/stores/{store_id} |\n| **ecommerce.updateStoreCart** | /ecommerce/stores/{store_id}/carts/{cart_id} |\n| **ecommerce.updateCartLineItem** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} |\n| **ecommerce.updateStoreCustomer** | /ecommerce/stores/{store_id}/customers/{customer_id} |\n| **ecommerce.updateOrder** | /ecommerce/stores/{store_id}/orders/{order_id} |\n| **ecommerce.updateOrderLineItem** | /ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id} |\n| **ecommerce.updateStoreProduct** | /ecommerce/stores/{store_id}/products/{product_id} |\n| **ecommerce.updateProductImage** | /ecommerce/stores/{store_id}/products/{product_id}/images/{image_id} |\n| **ecommerce.updateProductVariant** | /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} |\n| **ecommerce.updatePromoCode** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id} |\n| **ecommerce.updatePromoRule** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id} |\n| **ecommerce.addStore** | /ecommerce/stores |\n| **ecommerce.addStoreCart** | /ecommerce/stores/{store_id}/carts |\n| **ecommerce.addCartLineItem** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines |\n| **ecommerce.addStoreCustomer** | /ecommerce/stores/{store_id}/customers |\n| **ecommerce.addStoreOrder** | /ecommerce/stores/{store_id}/orders |\n| **ecommerce.addOrderLineItem** | /ecommerce/stores/{store_id}/orders/{order_id}/lines |\n| **ecommerce.addStoreProduct** | /ecommerce/stores/{store_id}/products |\n| **ecommerce.addProductImage** | /ecommerce/stores/{store_id}/products/{product_id}/images |\n| **ecommerce.addProductVariants** | /ecommerce/stores/{store_id}/products/{product_id}/variants |\n| **ecommerce.addPromoCode** | /ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes |\n| **ecommerce.addPromoRules** | /ecommerce/stores/{store_id}/promo-rules |\n| **ecommerce.setStoreCustomer** | /ecommerce/stores/{store_id}/customers/{customer_id} |\n| **ecommerce.addProductVariant** | /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} |\n| **facebookAds.list** | /facebook-ads |\n| **facebookAds.getAd** | /facebook-ads/{outreach_id} |\n| **fileManager.deleteFile** | /file-manager/files/{file_id} |\n| **fileManager.deleteFolder** | /file-manager/folders/{folder_id} |\n| **fileManager.files** | /file-manager/files |\n| **fileManager.getFile** | /file-manager/files/{file_id} |\n| **fileManager.listFolders** | /file-manager/folders |\n| **fileManager.getFolder** | /file-manager/folders/{folder_id} |\n| **fileManager.updateFile** | /file-manager/files/{file_id} |\n| **fileManager.updateFolder** | /file-manager/folders/{folder_id} |\n| **fileManager.upload** | /file-manager/files |\n| **fileManager.createFolder** | /file-manager/folders |\n| **landingPages.deletePage** | /landing-pages/{page_id} |\n| **landingPages.getAll** | /landing-pages |\n| **landingPages.getPage** | /landing-pages/{page_id} |\n| **landingPages.getPageContent** | /landing-pages/{page_id}/content |\n| **landingPages.updatePage** | /landing-pages/{page_id} |\n| **landingPages.create** | /landing-pages |\n| **landingPages.publishPage** | /landing-pages/{page_id}/actions/publish |\n| **landingPages.unpublishPage** | /landing-pages/{page_id}/actions/unpublish |\n| **lists.deleteList** | /lists/{list_id} |\n| **lists.deleteInterestCategory** | /lists/{list_id}/interest-categories/{interest_category_id} |\n| **lists.deleteInterestCategoryInterest** | /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id} |\n| **lists.deleteListMember** | /lists/{list_id}/members/{subscriber_hash} |\n| **lists.deleteListMemberNote** | /lists/{list_id}/members/{subscriber_hash}/notes/{note_id} |\n| **lists.deleteListMergeField** | /lists/{list_id}/merge-fields/{merge_id} |\n| **lists.deleteSegment** | /lists/{list_id}/segments/{segment_id} |\n| **lists.removeSegmentMember** | /lists/{list_id}/segments/{segment_id}/members/{subscriber_hash} |\n| **lists.deleteListWebhook** | /lists/{list_id}/webhooks/{webhook_id} |\n| **lists.getListMemberTags** | /lists/{list_id}/members/{subscriber_hash}/tags |\n| **lists.getAllLists** | /lists |\n| **lists.getList** | /lists/{list_id} |\n| **lists.getListAbuseReports** | /lists/{list_id}/abuse-reports |\n| **lists.getListAbuseReportDetails** | /lists/{list_id}/abuse-reports/{report_id} |\n| **lists.getListRecentActivity** | /lists/{list_id}/activity |\n| **lists.getListClients** | /lists/{list_id}/clients |\n| **lists.getListGrowthHistory** | /lists/{list_id}/growth-history |\n| **lists.getListGrowthHistoryByMonth** | /lists/{list_id}/growth-history/{month} |\n| **lists.getListInterestCategories** | /lists/{list_id}/interest-categories |\n| **lists.getInterestCategory** | /lists/{list_id}/interest-categories/{interest_category_id} |\n| **lists.listInterestCategoryInterests** | /lists/{list_id}/interest-categories/{interest_category_id}/interests |\n| **lists.getInterestCategoryInterest** | /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id} |\n| **lists.getListLocations** | /lists/{list_id}/locations |\n| **lists.getListMembersInfo** | /lists/{list_id}/members |\n| **lists.getListMember** | /lists/{list_id}/members/{subscriber_hash} |\n| **lists.getListMemberActivity** | /lists/{list_id}/members/{subscriber_hash}/activity |\n| **lists.getListMemberActivityFeed** | /lists/{list_id}/members/{subscriber_hash}/activity-feed |\n| **lists.getListMemberEvents** | /lists/{list_id}/members/{subscriber_hash}/events |\n| **lists.getListMemberGoals** | /lists/{list_id}/members/{subscriber_hash}/goals |\n| **lists.getListMemberNotes** | /lists/{list_id}/members/{subscriber_hash}/notes |\n| **lists.getListMemberNote** | /lists/{list_id}/members/{subscriber_hash}/notes/{note_id} |\n| **lists.getListMergeFields** | /lists/{list_id}/merge-fields |\n| **lists.getListMergeField** | /lists/{list_id}/merge-fields/{merge_id} |\n| **lists.getSegment** | /lists/{list_id}/segments/{segment_id} |\n| **lists.getSegmentMembersList** | /lists/{list_id}/segments/{segment_id}/members |\n| **lists.getListSignupForms** | /lists/{list_id}/signup-forms |\n| **lists.getAllSurveysForList** | /lists/{list_id}/surveys |\n| **lists.getSurvey** | /lists/{list_id}/surveys/{survey_id} |\n| **lists.getListWebhooks** | /lists/{list_id}/webhooks |\n| **lists.getListWebhook** | /lists/{list_id}/webhooks/{webhook_id} |\n| **lists.updateList** | /lists/{list_id} |\n| **lists.updateInterestCategory** | /lists/{list_id}/interest-categories/{interest_category_id} |\n| **lists.updateInterestCategoryInterest** | /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id} |\n| **lists.updateListMember** | /lists/{list_id}/members/{subscriber_hash} |\n| **lists.updateListMemberNote** | /lists/{list_id}/members/{subscriber_hash}/notes/{note_id} |\n| **lists.updateListMergeField** | /lists/{list_id}/merge-fields/{merge_id} |\n| **lists.updateSegment** | /lists/{list_id}/segments/{segment_id} |\n| **lists.updateListWebhook** | /lists/{list_id}/webhooks/{webhook_id} |\n| **lists.createListMemberEvent** | /lists/{list_id}/members/{subscriber_hash}/events |\n| **lists.updateListMemberTags** | /lists/{list_id}/members/{subscriber_hash}/tags |\n| **lists.createList** | /lists |\n| **lists.batchListMembers** | /lists/{list_id} |\n| **lists.createListInterestCategory** | /lists/{list_id}/interest-categories |\n| **lists.createInterestCategoryInterest** | /lists/{list_id}/interest-categories/{interest_category_id}/interests |\n| **lists.addListMember** | /lists/{list_id}/members |\n| **lists.deleteListMemberPermanent** | /lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent |\n| **lists.createListMemberNote** | /lists/{list_id}/members/{subscriber_hash}/notes |\n| **lists.addListMergeField** | /lists/{list_id}/merge-fields |\n| **lists.createSegment** | /lists/{list_id}/segments |\n| **lists.batchSegmentMembers** | /lists/{list_id}/segments/{segment_id} |\n| **lists.createSegmentMember** | /lists/{list_id}/segments/{segment_id}/members |\n| **lists.updateListSignupForm** | /lists/{list_id}/signup-forms |\n| **lists.createListWebhook** | /lists/{list_id}/webhooks |\n| **lists.listSegments** | /lists/{list_id}/segments |\n| **lists.setListMember** | /lists/{list_id}/members/{subscriber_hash} |\n| **lists.tagSearch** | /lists/{list_id}/tag-search |\n| **ping.get** | /ping |\n| **reporting.getFacebookAdsReportAll** | /reporting/facebook-ads |\n| **reporting.getFacebookAdReport** | /reporting/facebook-ads/{outreach_id} |\n| **reporting.getFacebookAdProductActivityReport** | /reporting/facebook-ads/{outreach_id}/ecommerce-product-activity |\n| **reporting.getLandingPageReportsAll** | /reporting/landing-pages |\n| **reporting.getLandingPageReport** | /reporting/landing-pages/{outreach_id} |\n| **reporting.getSurveyReportsAll** | /reporting/surveys |\n| **reporting.getSurveyReport** | /reporting/surveys/{outreach_id} |\n| **reporting.getSurveyQuestionReportsAll** | /reporting/surveys/{outreach_id}/questions |\n| **reporting.getSurveyQuestionReport** | /reporting/surveys/{outreach_id}/questions/{question_id} |\n| **reporting.getSurveyQuestionAnswers** | /reporting/surveys/{outreach_id}/questions/{question_id}/answers |\n| **reporting.getSurveyResponsesAll** | /reporting/surveys/{outreach_id}/responses |\n| **reporting.getSurveyResponse** | /reporting/surveys/{outreach_id}/responses/{response_id} |\n| **reports.getAllCampaignReports** | /reports |\n| **reports.getCampaignReport** | /reports/{campaign_id} |\n| **reports.getCampaignAbuseReports** | /reports/{campaign_id}/abuse-reports |\n| **reports.getCampaignAbuseReport** | /reports/{campaign_id}/abuse-reports/{report_id} |\n| **reports.getCampaignAdvice** | /reports/{campaign_id}/advice |\n| **reports.getCampaignClickDetails** | /reports/{campaign_id}/click-details |\n| **reports.getCampaignClickDetailsForLink** | /reports/{campaign_id}/click-details/{link_id} |\n| **reports.getSubscribersInfo** | /reports/{campaign_id}/click-details/{link_id}/members |\n| **reports.getSubscriberInfo** | /reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash} |\n| **reports.getDomainPerformanceForCampaign** | /reports/{campaign_id}/domain-performance |\n| **reports.getEcommerceProductActivityForCampaign** | /reports/{campaign_id}/ecommerce-product-activity |\n| **reports.getEepurlActivityForCampaign** | /reports/{campaign_id}/eepurl |\n| **reports.getEmailActivityForCampaign** | /reports/{campaign_id}/email-activity |\n| **reports.getEmailActivityForSubscriber** | /reports/{campaign_id}/email-activity/{subscriber_hash} |\n| **reports.getLocationsForCampaign** | /reports/{campaign_id}/locations |\n| **reports.getCampaignOpenDetails** | /reports/{campaign_id}/open-details |\n| **reports.getSubscriberInfoForOpenedCampaign** | /reports/{campaign_id}/open-details/{subscriber_hash} |\n| **reports.getCampaignRecipients** | /reports/{campaign_id}/sent-to |\n| **reports.getCampaignRecipient** | /reports/{campaign_id}/sent-to/{subscriber_hash} |\n| **reports.getSubReportsForCampaign** | /reports/{campaign_id}/sub-reports |\n| **reports.getUnsubscribedListForCampaign** | /reports/{campaign_id}/unsubscribed |\n| **reports.getUnsubscribedListMember** | /reports/{campaign_id}/unsubscribed/{subscriber_hash} |\n| **root.getRoot** | / |\n| **searchCampaigns.search** | /search-campaigns |\n| **searchMembers.search** | /search-members |\n| **Surveys.publishSurvey** | /lists/{list_id}/surveys/{survey_id}/actions/publish |\n| **Surveys.unpublishSurvey** | /lists/{list_id}/surveys/{survey_id}/actions/unpublish |\n| **templateFolders.remove** | /template-folders/{folder_id} |\n| **templateFolders.list** | /template-folders |\n| **templateFolders.get** | /template-folders/{folder_id} |\n| **templateFolders.update** | /template-folders/{folder_id} |\n| **templateFolders.create** | /template-folders |\n| **templates.deleteTemplate** | /templates/{template_id} |\n| **templates.list** | /templates |\n| **templates.getTemplate** | /templates/{template_id} |\n| **templates.getDefaultContentForTemplate** | /templates/{template_id}/default-content |\n| **templates.updateTemplate** | /templates/{template_id} |\n| **templates.create** | /templates |\n| **verifiedDomains.createVerifiedDomain** | /verified-domains |\n| **verifiedDomains.deleteDomain** | /verified-domains/{domain_name} |\n| **verifiedDomains.getDomain** | /verified-domains/{domain_name} |\n| **verifiedDomains.getVerifiedDomainsAll** | /verified-domains |\n| **verifiedDomains.submitDomainVerification** | /verified-domains/{domain_name}/actions/verify |\n\n\n\n## Additional Libraries\n\nMailchimp Marketing libraries are available in the following languages:\n\n<div>\n  <a href=\"https://github.com/mailchimp/mailchimp-marketing-node\">\n  <img src=\"https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/resources/images/lang_node.png?raw=true\" width=\"44\" height=\"44\">\n  </a>\n  <a href=\"https://github.com/mailchimp/mailchimp-marketing-php\">\n  <img src=\"https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/resources/images/lang_php.png?raw=true\" width=\"44\" height=\"44\">\n  </a>\n  <a href=\"https://github.com/mailchimp/mailchimp-marketing-ruby\">\n  <img src=\"https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/resources/images/lang_ruby.png?raw=true\" width=\"44\" height=\"44\">\n  </a>\n  <a href=\"https://github.com/mailchimp/mailchimp-marketing-python\">\n  <img src=\"https://github.com/mailchimp/mailchimp-client-lib-codegen/blob/main/resources/images/lang_python.png?raw=true\" width=\"44\" height=\"44\">\n  </a>\n</div>\n"
  },
  {
    "path": "git_push.sh",
    "content": "#!/bin/sh\n# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/\n#\n# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl \"minor update\"\n\ngit_user_id=$1\ngit_repo_id=$2\nrelease_note=$3\n\nif [ \"$git_user_id\" = \"\" ]; then\n    git_user_id=\"GIT_USER_ID\"\n    echo \"[INFO] No command line input provided. Set \\$git_user_id to $git_user_id\"\nfi\n\nif [ \"$git_repo_id\" = \"\" ]; then\n    git_repo_id=\"GIT_REPO_ID\"\n    echo \"[INFO] No command line input provided. Set \\$git_repo_id to $git_repo_id\"\nfi\n\nif [ \"$release_note\" = \"\" ]; then\n    release_note=\"Minor update\"\n    echo \"[INFO] No command line input provided. Set \\$release_note to $release_note\"\nfi\n\n# Initialize the local directory as a Git repository\ngit init\n\n# Adds the files in the local repository and stages them for commit.\ngit add .\n\n# Commits the tracked changes and prepares them to be pushed to a remote repository. \ngit commit -m \"$release_note\"\n\n# Sets the new remote\ngit_remote=`git remote`\nif [ \"$git_remote\" = \"\" ]; then # git remote not defined\n\n    if [ \"$GIT_TOKEN\" = \"\" ]; then\n        echo \"[INFO] \\$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment.\"\n        git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git\n    else\n        git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git\n    fi\n\nfi\n\ngit pull origin master\n\n# Pushes (Forces) the changes in the local repository up to the remote repository\necho \"Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git\"\ngit push origin master 2>&1 | grep -v 'To https'\n\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@mailchimp/mailchimp_marketing\",\n  \"version\": \"3.0.80\",\n  \"description\": \"The official Node client library for the Mailchimp Marketing API\",\n  \"license\": \"Apache 2.0\",\n  \"main\": \"src/index.js\",\n  \"scripts\": {\n    \"test\": \"jest --setupFiles dotenv/config\"\n  },\n  \"browser\": {\n    \"fs\": false\n  },\n  \"dependencies\": {\n    \"superagent\": \"3.8.1\",\n    \"dotenv\": \"^8.2.0\"\n  },\n  \"devDependencies\": {\n    \"mocha\": \"~2.3.4\",\n    \"sinon\": \"1.17.3\",\n    \"jest\": \"^26.2.2\"\n  },\n  \"homepage\": \"https://github.com/mailchimp/mailchimp-marketing-node\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/mailchimp/mailchimp-marketing-node.git\"\n  },\n  \"bugs\": {\n    \"url\": \"https://github.com/mailchimp/mailchimp-client-lib-codegen/issues\"\n  },\n  \"keywords\": [\n    \"mailchimp\",\n    \"api\",\n    \"v3\"\n  ],\n  \"engines\": {\n    \"node\": \">=10.0.0\"\n  }\n}\n"
  },
  {
    "path": "src/ApiClient.js",
    "content": "/**\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.7\n *\n * Do not edit the class manually.\n *\n */\n\nvar superagent = require('superagent');\nvar querystring = require('querystring');\n\nvar AccountExport = require('./api/AccountExportApi');\nvar AccountExports = require('./api/AccountExportsApi');\nvar ActivityFeed = require('./api/ActivityFeedApi');\nvar AuthorizedApps = require('./api/AuthorizedAppsApi');\nvar Automations = require('./api/AutomationsApi');\nvar BatchWebhooks = require('./api/BatchWebhooksApi');\nvar Batches = require('./api/BatchesApi');\nvar CampaignFolders = require('./api/CampaignFoldersApi');\nvar Campaigns = require('./api/CampaignsApi');\nvar ConnectedSites = require('./api/ConnectedSitesApi');\nvar Conversations = require('./api/ConversationsApi');\nvar CustomerJourneys = require('./api/CustomerJourneysApi');\nvar Ecommerce = require('./api/EcommerceApi');\nvar FacebookAds = require('./api/FacebookAdsApi');\nvar FileManager = require('./api/FileManagerApi');\nvar LandingPages = require('./api/LandingPagesApi');\nvar Lists = require('./api/ListsApi');\nvar Ping = require('./api/PingApi');\nvar Reporting = require('./api/ReportingApi');\nvar Reports = require('./api/ReportsApi');\nvar Root = require('./api/RootApi');\nvar SearchCampaigns = require('./api/SearchCampaignsApi');\nvar SearchMembers = require('./api/SearchMembersApi');\nvar Surveys = require('./api/SurveysApi');\nvar TemplateFolders = require('./api/TemplateFoldersApi');\nvar Templates = require('./api/TemplatesApi');\nvar VerifiedDomains = require('./api/VerifiedDomainsApi');\n\n/**\n * @module ApiClient\n * @version 3.0.80\n */\n\n/**\n * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an\n * application to use this class directly - the *Api and model classes provide the public API for the service. The\n * contents of this file should be regarded as internal but are documented for completeness.\n * @alias module:ApiClient\n * @class\n */\nvar exports = function() {\n\n  /**\n   * The base URL against which to resolve every API call's (relative) path.\n   * @type {String}\n   * @default https://server.api.mailchimp.com/3.0\n   */\n  this.basePath = 'https://server.api.mailchimp.com/3.0'.replace(/\\/+$/, '');\n\n  /**\n   * The API configuration settings object\n   * @type {Object}\n   * @default {}\n   */\n  this.config = {\n    apiKey: '',\n    accessToken: '',\n    server: 'invalid-server'\n  };\n\n  /**\n   * The default HTTP headers to be included for all API calls.\n   * @type {Array.<String>}\n   * @default {}\n   */\n  this.defaultHeaders = {};\n  /**\n   * The default HTTP timeout for all API calls.\n   * @type {Number}\n   * @default 60000\n   */\n  this.timeout = 120000;\n\n  /**\n   * If set to false an additional timestamp parameter is added to all API GET calls to\n   * prevent browser caching\n   * @type {Boolean}\n   * @default true\n   */\n  this.cache = true;\n\n  /**\n   * If set to true, the client will save the cookies from each server\n   * response, and return them in the next request.\n   * @default false\n   */\n  this.enableCookies = false;\n\n  /*\n   * Used to save and return cookies in a node.js (non-browser) setting,\n   * if this.enableCookies is set to true.\n   */\n  if (typeof window === 'undefined') {\n    this.agent = new superagent.agent();\n  }\n\n  // API Routes\n  this.accountExport = new AccountExport(this);\n  this.accountExports = new AccountExports(this);\n  this.activityFeed = new ActivityFeed(this);\n  this.authorizedApps = new AuthorizedApps(this);\n  this.automations = new Automations(this);\n  this.batchWebhooks = new BatchWebhooks(this);\n  this.batches = new Batches(this);\n  this.campaignFolders = new CampaignFolders(this);\n  this.campaigns = new Campaigns(this);\n  this.connectedSites = new ConnectedSites(this);\n  this.conversations = new Conversations(this);\n  this.customerJourneys = new CustomerJourneys(this);\n  this.ecommerce = new Ecommerce(this);\n  this.facebookAds = new FacebookAds(this);\n  this.fileManager = new FileManager(this);\n  this.landingPages = new LandingPages(this);\n  this.lists = new Lists(this);\n  this.ping = new Ping(this);\n  this.reporting = new Reporting(this);\n  this.reports = new Reports(this);\n  this.root = new Root(this);\n  this.searchCampaigns = new SearchCampaigns(this);\n  this.searchMembers = new SearchMembers(this);\n  this.Surveys = new Surveys(this);\n  this.templateFolders = new TemplateFolders(this);\n  this.templates = new Templates(this);\n  this.verifiedDomains = new VerifiedDomains(this);\n};\n\n/**\n * Sets the API configuration settings object.\n * @param config {Object} The configuration object\n */\nexports.prototype.setConfig = function(config = {}) {\n  var _this = this;\n  this.config = config;\n};\n\n/**\n * Returns a string representation for an actual parameter.\n * @param param The actual parameter.\n * @returns {String} The string representation of <code>param</code>.\n */\nexports.prototype.paramToString = function(param) {\n  if (param == undefined || param == null) {\n    return '';\n  }\n  if (param instanceof Date) {\n    return param.toJSON();\n  }\n  return param.toString();\n};\n\n/**\n * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.\n * NOTE: query parameters are not handled here.\n * @param {String} path The path to append to the base URL.\n * @param {Object} pathParams The parameter values to append.\n * @returns {String} The encoded path with parameter values substituted.\n */\nexports.prototype.buildUrl = function(path, pathParams) {\n  if (!path.match(/^\\//)) {\n    path = '/' + path;\n  }\n  var url = this.basePath + path;\n  var _this = this;\n  url = url.replace(/\\{([\\w-]+)\\}/g, function(fullMatch, key) {\n    var value;\n    if (pathParams.hasOwnProperty(key)) {\n      value = _this.paramToString(pathParams[key]);\n    } else {\n      value = fullMatch;\n    }\n    return encodeURIComponent(value);\n  });\n\n  // Define the server\n  if (typeof this.config.server !== 'undefined') {\n    url = url.replace('server', this.config.server);\n  }\n\n  return url;\n};\n\n/**\n * Checks whether the given content type represents JSON.<br>\n * JSON content type examples:<br>\n * <ul>\n * <li>application/json</li>\n * <li>application/json; charset=UTF8</li>\n * <li>APPLICATION/JSON</li>\n * </ul>\n * @param {String} contentType The MIME content type to check.\n * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.\n */\nexports.prototype.isJsonMime = function(contentType) {\n  return Boolean(contentType != null && contentType.match(/^application\\/json(;.*)?$/i));\n};\n\n/**\n * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.\n * @param {Array.<String>} contentTypes\n * @returns {String} The chosen content type, preferring JSON.\n */\nexports.prototype.jsonPreferredMime = function(contentTypes) {\n  for (var i = 0; i < contentTypes.length; i++) {\n    if (this.isJsonMime(contentTypes[i])) {\n      return contentTypes[i];\n    }\n  }\n  return contentTypes[0];\n};\n\n/**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns {Boolean} <code>true</code> if <code>param</code> represents a file.\n */\nexports.prototype.isFileParam = function(param) {\n  // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)\n  if (typeof require === 'function') {\n    var fs;\n    try {\n      fs = require('fs');\n    } catch (err) {}\n    if (fs && fs.ReadStream && param instanceof fs.ReadStream) {\n      return true;\n    }\n  }\n  // Buffer in Node.js\n  if (typeof Buffer === 'function' && param instanceof Buffer) {\n    return true;\n  }\n  // Blob in browser\n  if (typeof Blob === 'function' && param instanceof Blob) {\n    return true;\n  }\n  // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n  if (typeof File === 'function' && param instanceof File) {\n    return true;\n  }\n  return false;\n};\n\n/**\n * Normalizes parameter values:\n * <ul>\n * <li>remove nils</li>\n * <li>keep files and arrays</li>\n * <li>format to string with `paramToString` for other cases</li>\n * </ul>\n * @param {Object.<String, Object>} params The parameters as object properties.\n * @returns {Object.<String, Object>} normalized parameters.\n */\nexports.prototype.normalizeParams = function(params) {\n  var newParams = {};\n  for (var key in params) {\n    if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {\n      var value = params[key];\n      if (this.isFileParam(value) || Array.isArray(value)) {\n        newParams[key] = value;\n      } else {\n        newParams[key] = this.paramToString(value);\n      }\n    }\n  }\n  return newParams;\n};\n\n/**\n * Enumeration of collection format separator strategies.\n * @enum {String}\n * @readonly\n */\nexports.CollectionFormatEnum = {\n  /**\n   * Comma-separated values. Value: <code>csv</code>\n   * @const\n   */\n  CSV: ',',\n  /**\n   * Space-separated values. Value: <code>ssv</code>\n   * @const\n   */\n  SSV: ' ',\n  /**\n   * Tab-separated values. Value: <code>tsv</code>\n   * @const\n   */\n  TSV: '\\t',\n  /**\n   * Pipe(|)-separated values. Value: <code>pipes</code>\n   * @const\n   */\n  PIPES: '|',\n  /**\n   * Native array. Value: <code>multi</code>\n   * @const\n   */\n  MULTI: 'multi'\n};\n\n/**\n * Builds a string representation of an array-type actual parameter, according to the given collection format.\n * @param {Array} param An array parameter.\n * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.\n * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns\n * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.\n */\nexports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) {\n  if (param == null) {\n    return null;\n  }\n  switch (collectionFormat) {\n    case 'csv':\n      return param.map(this.paramToString).join(',');\n    case 'ssv':\n      return param.map(this.paramToString).join(' ');\n    case 'tsv':\n      return param.map(this.paramToString).join('\\t');\n    case 'pipes':\n      return param.map(this.paramToString).join('|');\n    case 'multi':\n      // return the array directly as SuperAgent will handle it as expected\n      return param.map(this.paramToString);\n    default:\n      throw new Error('Unknown collection format: ' + collectionFormat);\n  }\n};\n\n/**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param {Object} response A SuperAgent response object.\n * @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns A value of the specified type.\n */\nexports.prototype.deserialize = function deserialize(response, returnType) {\n  if (response == null || returnType == null || response.status == 204) {\n    return null;\n  }\n  // Rely on SuperAgent for parsing response body.\n  // See http://visionmedia.github.io/superagent/#parsing-response-bodies\n  var data = response.body;\n  if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {\n    // SuperAgent does not always produce a body; use the unparsed response as a fallback\n    data = response.text;\n  }\n  return exports.convertToType(data, returnType);\n};\n\n/**\n * Invokes the REST service using the supplied settings and parameters.\n * @param {String} path The base URL to invoke.\n * @param {String} httpMethod The HTTP method to use.\n * @param {Object.<String, String>} pathParams A map of path parameters and their values.\n * @param {Object.<String, Object>} queryParams A map of query parameters and their values.\n * @param {Object.<String, Object>} headerParams A map of header parameters and their values.\n * @param {Object.<String, Object>} formParams A map of form parameters and their values.\n * @param {Object} bodyParam The value to pass as the request body.\n * @param {Array.<String>} authNames An array of authentication type names.\n * @param {Array.<String>} contentTypes An array of request MIME types.\n * @param {Array.<String>} accepts An array of acceptable response MIME types.\n * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the\n * constructor for a complex type.\n * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.\n */\nexports.prototype.callApi = function callApi(path, httpMethod, pathParams,\n    queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,\n    returnType) {\n\n  var _this = this;\n  var url = this.buildUrl(path, pathParams);\n  var request = superagent(httpMethod, url);\n\n  // Basic Authentication\n  if (this.config.apiKey !== undefined && this.config.apiKey !== '') {\n    request.auth('user', this.config.apiKey);\n  }\n\n  // OAuth Authentication\n  else if (this.config.accessToken !== undefined && this.config.accessToken !== '') {\n    request.set({'Authorization': 'Bearer ' + this.config.accessToken});\n  }\n\n  // set query parameters\n  if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {\n    queryParams['_'] = new Date().getTime();\n  }\n  request.query(this.normalizeParams(queryParams));\n\n  // set header parameters\n  request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));\n\n  // set request timeout\n  request.timeout(this.timeout);\n\n  var contentType = this.jsonPreferredMime(contentTypes);\n  if (contentType) {\n    // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)\n    if(contentType != 'multipart/form-data') {\n      request.type(contentType);\n    }\n  } else if (!HeaderUtils.caseInsensitiveGet(request.header, 'content-type')) {\n    request.type('application/json');\n  }\n\n  if (contentType === 'application/x-www-form-urlencoded') {\n    request.send(querystring.stringify(this.normalizeParams(formParams)));\n  } else if (contentType == 'multipart/form-data') {\n    var _formParams = this.normalizeParams(formParams);\n    for (var key in _formParams) {\n      if (_formParams.hasOwnProperty(key)) {\n        if (this.isFileParam(_formParams[key])) {\n          // file field\n          request.attach(key, _formParams[key]);\n        } else {\n          request.field(key, _formParams[key]);\n        }\n      }\n    }\n  } else if (bodyParam) {\n    request.send(bodyParam);\n  }\n\n  var accept = this.jsonPreferredMime(accepts);\n  if (accept) {\n    request.accept(accept);\n  }\n\n  if (returnType === 'Blob') {\n    request.responseType('blob');\n  } else if (returnType === 'String') {\n    request.responseType('string');\n  }\n\n  // Attach previously saved cookies, if enabled\n  if (this.enableCookies){\n    if (typeof window === 'undefined') {\n      this.agent.attachCookies(request);\n    }\n    else {\n      request.withCredentials();\n    }\n  }\n\n  return new Promise(function(resolve, reject) {\n    request.end(function(error, response) {\n      if (error) {\n        reject(error);\n      } else {\n        try {\n          var data = _this.deserialize(response, returnType);\n          if (_this.enableCookies && typeof window === 'undefined'){\n            _this.agent.saveCookies(response);\n          }\n          resolve({data: data, response: response});\n        } catch (err) {\n          reject(err);\n        }\n      }\n    });\n  });\n  };\n\n/**\n * Parses an ISO-8601 string representation of a date value.\n * @param {String} str The date value as a string.\n * @returns {Date} The parsed date object.\n */\nexports.parseDate = function(str) {\n  return new Date(str.replace(/T/i, ' '));\n};\n\n/**\n * Converts a value to the specified type.\n * @param {(String|Object)} data The data to convert, as a string or object.\n * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns An instance of the specified type or null or undefined if data is null or undefined.\n */\nexports.convertToType = function(data, type) {\n  if (data === null || data === undefined)\n    return data\n\n  switch (type) {\n    case 'Boolean':\n      return Boolean(data);\n    case 'Integer':\n      return parseInt(data, 10);\n    case 'Number':\n      return parseFloat(data);\n    case 'String':\n      return String(data);\n    case 'Date':\n      return this.parseDate(String(data));\n    case 'Blob':\n      return data;\n    default:\n      if (type === Object) {\n        // generic object, return directly\n        return data;\n      } else if (typeof type === 'function') {\n        // for model type like: User\n        return type.constructFromObject(data);\n      } else if (Array.isArray(type)) {\n        // for array type like: ['String']\n        var itemType = type[0];\n        return data.map(function(item) {\n          return exports.convertToType(item, itemType);\n        });\n      } else if (typeof type === 'object') {\n        // for plain object type like: {'String': 'Integer'}\n        var keyType, valueType;\n        for (var k in type) {\n          if (type.hasOwnProperty(k)) {\n            keyType = k;\n            valueType = type[k];\n            break;\n          }\n        }\n        var result = {};\n        for (var k in data) {\n          if (data.hasOwnProperty(k)) {\n            var key = exports.convertToType(k, keyType);\n            var value = exports.convertToType(data[k], valueType);\n            result[key] = value;\n          }\n        }\n        return result;\n      } else {\n        // for unknown type, return the data directly\n        return data;\n      }\n  }\n};\n\n/**\n * Constructs a new map or array model from REST data.\n * @param data {Object|Array} The REST data.\n * @param obj {Object|Array} The target object or array.\n */\nexports.constructFromObject = function(data, obj, itemType) {\n  if (Array.isArray(data)) {\n    for (var i = 0; i < data.length; i++) {\n      if (data.hasOwnProperty(i))\n        obj[i] = exports.convertToType(data[i], itemType);\n    }\n  } else {\n    for (var k in data) {\n      if (data.hasOwnProperty(k))\n        obj[k] = exports.convertToType(data[k], itemType);\n    }\n  }\n};\n\n  /**\n * The default API client implementation.\n * @type {module:ApiClient}\n */\nexports.instance = new exports();\n\nmodule.exports = exports;\n"
  },
  {
    "path": "src/api/AccountExportApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * AccountExport service.\n * @module api/AccountExportApi\n */\n\n/**\n * Constructs a new AccountExportApi. \n * @alias module:api/AccountExportApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Get account export info\n   * Get information about a specific account export.\n   * @param {String} exportId The unique id for the account export.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2001Exports} and HTTP response\n   */\n  this.getAccountExportsWithHttpInfo = function(exportId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'exportId' is set\n    if (exportId === undefined || exportId === null) {\n      throw new Error(\"Missing the required parameter 'exportId' when calling \");\n    }\n\n    var pathParams = {\n      'export_id': exportId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/account-exports/{export_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get account export info\n   * Get information about a specific account export.\n   * @param {String} exportId The unique id for the account export.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2001Exports}\n   */\n  this.getAccountExports = function(exportId, opts) {\n    return this.getAccountExportsWithHttpInfo(exportId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/AccountExportsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * AccountExports service.\n * @module api/AccountExportsApi\n */\n\n/**\n * Constructs a new AccountExportsApi. \n * @alias module:api/AccountExportsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List account exports\n   * Get a list of account exports for a given account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2001} and HTTP response\n   */\n  this.listAccountExportsWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/account-exports', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List account exports\n   * Get a list of account exports for a given account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2001}\n   */\n  this.listAccountExports = function(opts) {\n    return this.listAccountExportsWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add export\n   * Create a new account export in your Mailchimp account.\n   * @param {module:model/CreateAnAccountExport} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2001Exports} and HTTP response\n   */\n  this.createAccountExportWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/account-exports', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add export\n   * Create a new account export in your Mailchimp account.\n   * @param {module:model/CreateAnAccountExport} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2001Exports}\n   */\n  this.createAccountExport = function(body) {\n    return this.createAccountExportWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ActivityFeedApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * ActivityFeed service.\n * @module api/ActivityFeedApi\n */\n\n/**\n * Constructs a new ActivityFeedApi. \n * @alias module:api/ActivityFeedApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Get latest chimp chatter\n   * Return the Chimp Chatter for this account ordered by most recent.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse200} and HTTP response\n   */\n  this.getChimpChatterWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/activity-feed/chimp-chatter', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get latest chimp chatter\n   * Return the Chimp Chatter for this account ordered by most recent.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse200}\n   */\n  this.getChimpChatter = function(opts) {\n    return this.getChimpChatterWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/AuthorizedAppsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * AuthorizedApps service.\n * @module api/AuthorizedAppsApi\n */\n\n/**\n * Constructs a new AuthorizedAppsApi. \n * @alias module:api/AuthorizedAppsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List authorized apps\n   * Get a list of an account's registered, connected applications.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2002} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/authorized-apps', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List authorized apps\n   * Get a list of an account's registered, connected applications.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2002}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get authorized app info\n   * Get information about a specific authorized application.\n   * @param {String} appId The unique id for the connected authorized application.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2002Apps} and HTTP response\n   */\n  this.getWithHttpInfo = function(appId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'appId' is set\n    if (appId === undefined || appId === null) {\n      throw new Error(\"Missing the required parameter 'appId' when calling \");\n    }\n\n    var pathParams = {\n      'app_id': appId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/authorized-apps/{app_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get authorized app info\n   * Get information about a specific authorized application.\n   * @param {String} appId The unique id for the connected authorized application.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2002Apps}\n   */\n  this.get = function(appId, opts) {\n    return this.getWithHttpInfo(appId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/AutomationsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Automations service.\n * @module api/AutomationsApi\n */\n\n/**\n * Constructs a new AutomationsApi. \n * @alias module:api/AutomationsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Archive automation\n   * Archiving will permanently end your automation and keep the report data. You’ll be able to replicate your archived automation, but you can’t restart it.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.archiveWithHttpInfo = function(workflowId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/actions/archive', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Archive automation\n   * Archiving will permanently end your automation and keep the report data. You’ll be able to replicate your archived automation, but you can’t restart it.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.archive = function(workflowId) {\n    return this.archiveWithHttpInfo(workflowId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete workflow email\n   * Removes an individual classic automation workflow email. Emails from certain workflow types, including the Abandoned Cart Email (abandonedCart) and Product Retargeting Email (abandonedBrowse) Workflows, cannot be deleted.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteWorkflowEmailWithHttpInfo = function(workflowId, workflowEmailId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete workflow email\n   * Removes an individual classic automation workflow email. Emails from certain workflow types, including the Abandoned Cart Email (abandonedCart) and Product Retargeting Email (abandonedBrowse) Workflows, cannot be deleted.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteWorkflowEmail = function(workflowId, workflowEmailId) {\n    return this.deleteWorkflowEmailWithHttpInfo(workflowId, workflowEmailId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List automations\n   * Get a summary of an account's classic automations.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Date} opts.beforeCreateTime Restrict the response to automations created before this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceCreateTime Restrict the response to automations created after this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.beforeStartTime Restrict the response to automations started before this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceStartTime Restrict the response to automations started after this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {module:model/String} opts.status Restrict the results to automations with the specified status.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2003} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'before_create_time': ( opts['beforeCreateTime'] ? opts['beforeCreateTime'] : opts['before_create_time']),\n      'since_create_time': ( opts['sinceCreateTime'] ? opts['sinceCreateTime'] : opts['since_create_time']),\n      'before_start_time': ( opts['beforeStartTime'] ? opts['beforeStartTime'] : opts['before_start_time']),\n      'since_start_time': ( opts['sinceStartTime'] ? opts['sinceStartTime'] : opts['since_start_time']),\n      'status': ( opts['status'] ? opts['status'] : opts['status'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List automations\n   * Get a summary of an account's classic automations.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Date} opts.beforeCreateTime Restrict the response to automations created before this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceCreateTime Restrict the response to automations created after this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.beforeStartTime Restrict the response to automations started before this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceStartTime Restrict the response to automations started after this time. Uses the ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {module:model/String} opts.status Restrict the results to automations with the specified status.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2003}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get automation info\n   * Get a summary of an individual classic automation workflow's settings and content. The `trigger_settings` object returns information for the first email in the workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutomationWorkflow} and HTTP response\n   */\n  this.getWithHttpInfo = function(workflowId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get automation info\n   * Get a summary of an individual classic automation workflow's settings and content. The `trigger_settings` object returns information for the first email in the workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutomationWorkflow}\n   */\n  this.get = function(workflowId, opts) {\n    return this.getWithHttpInfo(workflowId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List automated emails\n   * Get a summary of the emails in a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutomationEmails} and HTTP response\n   */\n  this.listAllWorkflowEmailsWithHttpInfo = function(workflowId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List automated emails\n   * Get a summary of the emails in a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutomationEmails}\n   */\n  this.listAllWorkflowEmails = function(workflowId) {\n    return this.listAllWorkflowEmailsWithHttpInfo(workflowId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get workflow email info\n   * Get information about an individual classic automation workflow email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutomationWorkflowEmail} and HTTP response\n   */\n  this.getWorkflowEmailWithHttpInfo = function(workflowId, workflowEmailId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get workflow email info\n   * Get information about an individual classic automation workflow email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutomationWorkflowEmail}\n   */\n  this.getWorkflowEmail = function(workflowId, workflowEmailId) {\n    return this.getWorkflowEmailWithHttpInfo(workflowId, workflowEmailId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List automated email subscribers\n   * Get information about a classic automation email queue.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2004} and HTTP response\n   */\n  this.getWorkflowEmailSubscriberQueueWithHttpInfo = function(workflowId, workflowEmailId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}/queue', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List automated email subscribers\n   * Get information about a classic automation email queue.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2004}\n   */\n  this.getWorkflowEmailSubscriberQueue = function(workflowId, workflowEmailId) {\n    return this.getWorkflowEmailSubscriberQueueWithHttpInfo(workflowId, workflowEmailId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get automated email subscriber\n   * Get information about a specific subscriber in a classic automation email queue.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberInAutomationQueue2} and HTTP response\n   */\n  this.getWorkflowEmailSubscriberWithHttpInfo = function(workflowId, workflowEmailId, subscriberHash) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get automated email subscriber\n   * Get information about a specific subscriber in a classic automation email queue.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberInAutomationQueue2}\n   */\n  this.getWorkflowEmailSubscriber = function(workflowId, workflowEmailId, subscriberHash) {\n    return this.getWorkflowEmailSubscriberWithHttpInfo(workflowId, workflowEmailId, subscriberHash)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List subscribers removed from workflow\n   * Get information about subscribers who were removed from a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RemovedSubscribers} and HTTP response\n   */\n  this.listWorkflowEmailSubscribersRemovedWithHttpInfo = function(workflowId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/removed-subscribers', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List subscribers removed from workflow\n   * Get information about subscribers who were removed from a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RemovedSubscribers}\n   */\n  this.listWorkflowEmailSubscribersRemoved = function(workflowId) {\n    return this.listWorkflowEmailSubscribersRemovedWithHttpInfo(workflowId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get subscriber removed from workflow\n   * Get information about a specific subscriber who was removed from a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberRemovedFromAutomationWorkflow} and HTTP response\n   */\n  this.getRemovedWorkflowEmailSubscriberWithHttpInfo = function(workflowId, subscriberHash) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get subscriber removed from workflow\n   * Get information about a specific subscriber who was removed from a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberRemovedFromAutomationWorkflow}\n   */\n  this.getRemovedWorkflowEmailSubscriber = function(workflowId, subscriberHash) {\n    return this.getRemovedWorkflowEmailSubscriberWithHttpInfo(workflowId, subscriberHash)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update workflow email\n   * Update settings for a classic automation workflow email.  Only works with workflows of type: abandonedBrowse, abandonedCart, emailFollowup, or singleWelcome.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {module:model/UpdateInformationAboutASpecificWorkflowEmail} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutomationWorkflowEmail} and HTTP response\n   */\n  this.updateWorkflowEmailWithHttpInfo = function(workflowId, workflowEmailId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update workflow email\n   * Update settings for a classic automation workflow email.  Only works with workflows of type: abandonedBrowse, abandonedCart, emailFollowup, or singleWelcome.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {module:model/UpdateInformationAboutASpecificWorkflowEmail} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutomationWorkflowEmail}\n   */\n  this.updateWorkflowEmail = function(workflowId, workflowEmailId, body) {\n    return this.updateWorkflowEmailWithHttpInfo(workflowId, workflowEmailId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add automation\n   * Create a new classic automation in your Mailchimp account.\n   * @param {module:model/AutomationWorkflow1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AutomationWorkflow} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add automation\n   * Create a new classic automation in your Mailchimp account.\n   * @param {module:model/AutomationWorkflow1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AutomationWorkflow}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Pause automation emails\n   * Pause all emails in a specific classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.pauseAllEmailsWithHttpInfo = function(workflowId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/actions/pause-all-emails', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Pause automation emails\n   * Pause all emails in a specific classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.pauseAllEmails = function(workflowId) {\n    return this.pauseAllEmailsWithHttpInfo(workflowId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Start automation emails\n   * Start all emails in a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.startAllEmailsWithHttpInfo = function(workflowId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/actions/start-all-emails', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Start automation emails\n   * Start all emails in a classic automation workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.startAllEmails = function(workflowId) {\n    return this.startAllEmailsWithHttpInfo(workflowId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Pause automated email\n   * Pause an automated email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.pauseWorkflowEmailWithHttpInfo = function(workflowId, workflowEmailId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}/actions/pause', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Pause automated email\n   * Pause an automated email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.pauseWorkflowEmail = function(workflowId, workflowEmailId) {\n    return this.pauseWorkflowEmailWithHttpInfo(workflowId, workflowEmailId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Start automated email\n   * Start an automated email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.startWorkflowEmailWithHttpInfo = function(workflowId, workflowEmailId) {\n    var postBody = null;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}/actions/start', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Start automated email\n   * Start an automated email.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.startWorkflowEmail = function(workflowId, workflowEmailId) {\n    return this.startWorkflowEmailWithHttpInfo(workflowId, workflowEmailId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add subscriber to workflow email\n   * Manually add a subscriber to a workflow, bypassing the default trigger settings. You can also use this endpoint to trigger a series of automated emails in an API 3.0 workflow type.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {module:model/SubscriberInAutomationQueue1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberInAutomationQueue2} and HTTP response\n   */\n  this.addWorkflowEmailSubscriberWithHttpInfo = function(workflowId, workflowEmailId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'workflowEmailId' is set\n    if (workflowEmailId === undefined || workflowEmailId === null) {\n      throw new Error(\"Missing the required parameter 'workflowEmailId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId,\n      'workflow_email_id': workflowEmailId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/emails/{workflow_email_id}/queue', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add subscriber to workflow email\n   * Manually add a subscriber to a workflow, bypassing the default trigger settings. You can also use this endpoint to trigger a series of automated emails in an API 3.0 workflow type.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {String} workflowEmailId The unique id for the Automation workflow email.\n   * @param {module:model/SubscriberInAutomationQueue1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberInAutomationQueue2}\n   */\n  this.addWorkflowEmailSubscriber = function(workflowId, workflowEmailId, body) {\n    return this.addWorkflowEmailSubscriberWithHttpInfo(workflowId, workflowEmailId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Remove subscriber from workflow\n   * Remove a subscriber from a specific classic automation workflow. You can remove a subscriber at any point in an automation workflow, regardless of how many emails they've been sent from that workflow. Once they're removed, they can never be added back to the same workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {module:model/SubscriberInAutomationQueue3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberRemovedFromAutomationWorkflow} and HTTP response\n   */\n  this.removeWorkflowEmailSubscriberWithHttpInfo = function(workflowId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'workflowId' is set\n    if (workflowId === undefined || workflowId === null) {\n      throw new Error(\"Missing the required parameter 'workflowId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'workflow_id': workflowId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/automations/{workflow_id}/removed-subscribers', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Remove subscriber from workflow\n   * Remove a subscriber from a specific classic automation workflow. You can remove a subscriber at any point in an automation workflow, regardless of how many emails they've been sent from that workflow. Once they're removed, they can never be added back to the same workflow.\n   * @param {String} workflowId The unique id for the Automation workflow.\n   * @param {module:model/SubscriberInAutomationQueue3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberRemovedFromAutomationWorkflow}\n   */\n  this.removeWorkflowEmailSubscriber = function(workflowId, body) {\n    return this.removeWorkflowEmailSubscriberWithHttpInfo(workflowId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/BatchWebhooksApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * BatchWebhooks service.\n * @module api/BatchWebhooksApi\n */\n\n/**\n * Constructs a new BatchWebhooksApi. \n * @alias module:api/BatchWebhooksApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete batch webhook\n   * Remove a batch webhook. Webhooks will no longer be sent to the given URL.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeWithHttpInfo = function(batchWebhookId) {\n    var postBody = null;\n\n    // verify the required parameter 'batchWebhookId' is set\n    if (batchWebhookId === undefined || batchWebhookId === null) {\n      throw new Error(\"Missing the required parameter 'batchWebhookId' when calling \");\n    }\n\n    var pathParams = {\n      'batch_webhook_id': batchWebhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batch-webhooks/{batch_webhook_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete batch webhook\n   * Remove a batch webhook. Webhooks will no longer be sent to the given URL.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.remove = function(batchWebhookId) {\n    return this.removeWithHttpInfo(batchWebhookId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get batch webhook info\n   * Get information about a specific batch webhook.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchWebhook} and HTTP response\n   */\n  this.getWithHttpInfo = function(batchWebhookId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'batchWebhookId' is set\n    if (batchWebhookId === undefined || batchWebhookId === null) {\n      throw new Error(\"Missing the required parameter 'batchWebhookId' when calling \");\n    }\n\n    var pathParams = {\n      'batch_webhook_id': batchWebhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batch-webhooks/{batch_webhook_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get batch webhook info\n   * Get information about a specific batch webhook.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchWebhook}\n   */\n  this.get = function(batchWebhookId, opts) {\n    return this.getWithHttpInfo(batchWebhookId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List batch webhooks\n   * Get all webhooks that have been configured for batches.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchWebhooks} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batch-webhooks', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List batch webhooks\n   * Get all webhooks that have been configured for batches.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchWebhooks}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update batch webhook\n   * Update a webhook that will fire whenever any batch request completes processing.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @param {module:model/BatchWebhook2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchWebhook} and HTTP response\n   */\n  this.updateWithHttpInfo = function(batchWebhookId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'batchWebhookId' is set\n    if (batchWebhookId === undefined || batchWebhookId === null) {\n      throw new Error(\"Missing the required parameter 'batchWebhookId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'batch_webhook_id': batchWebhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batch-webhooks/{batch_webhook_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update batch webhook\n   * Update a webhook that will fire whenever any batch request completes processing.\n   * @param {String} batchWebhookId The unique id for the batch webhook.\n   * @param {module:model/BatchWebhook2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchWebhook}\n   */\n  this.update = function(batchWebhookId, body) {\n    return this.updateWithHttpInfo(batchWebhookId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add batch webhook\n   * Configure a webhook that will fire whenever any batch request completes processing.  You may only have a maximum of 20 batch webhooks.\n   * @param {module:model/BatchWebhook1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchWebhook} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batch-webhooks', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add batch webhook\n   * Configure a webhook that will fire whenever any batch request completes processing.  You may only have a maximum of 20 batch webhooks.\n   * @param {module:model/BatchWebhook1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchWebhook}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/BatchesApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Batches service.\n * @module api/BatchesApi\n */\n\n/**\n * Constructs a new BatchesApi. \n * @alias module:api/BatchesApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete batch request\n   * 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.\n   * @param {String} batchId The unique id for the batch operation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteRequestWithHttpInfo = function(batchId) {\n    var postBody = null;\n\n    // verify the required parameter 'batchId' is set\n    if (batchId === undefined || batchId === null) {\n      throw new Error(\"Missing the required parameter 'batchId' when calling \");\n    }\n\n    var pathParams = {\n      'batch_id': batchId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batches/{batch_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete batch request\n   * 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.\n   * @param {String} batchId The unique id for the batch operation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteRequest = function(batchId) {\n    return this.deleteRequestWithHttpInfo(batchId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List batch requests\n   * Get a summary of batch requests that have been made.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchOperations} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batches', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List batch requests\n   * Get a summary of batch requests that have been made.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchOperations}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get batch operation status\n   * Get the status of a batch request.\n   * @param {String} batchId The unique id for the batch operation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Batch} and HTTP response\n   */\n  this.statusWithHttpInfo = function(batchId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'batchId' is set\n    if (batchId === undefined || batchId === null) {\n      throw new Error(\"Missing the required parameter 'batchId' when calling \");\n    }\n\n    var pathParams = {\n      'batch_id': batchId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batches/{batch_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get batch operation status\n   * Get the status of a batch request.\n   * @param {String} batchId The unique id for the batch operation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Batch}\n   */\n  this.status = function(batchId, opts) {\n    return this.statusWithHttpInfo(batchId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Start batch operation\n   * Begin processing a batch operations request.\n   * @param {module:model/Body} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Batch} and HTTP response\n   */\n  this.startWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/batches', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Start batch operation\n   * Begin processing a batch operations request.\n   * @param {module:model/Body} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Batch}\n   */\n  this.start = function(body) {\n    return this.startWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/CampaignFoldersApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * CampaignFolders service.\n * @module api/CampaignFoldersApi\n */\n\n/**\n * Constructs a new CampaignFoldersApi. \n * @alias module:api/CampaignFoldersApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete campaign folder\n   * Delete a specific campaign folder, and mark all the campaigns in the folder as 'unfiled'.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeWithHttpInfo = function(folderId) {\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaign-folders/{folder_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete campaign folder\n   * Delete a specific campaign folder, and mark all the campaigns in the folder as 'unfiled'.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.remove = function(folderId) {\n    return this.removeWithHttpInfo(folderId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign folders\n   * Get all folders used to organize campaigns.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFolders} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaign-folders', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign folders\n   * Get all folders used to organize campaigns.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFolders}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign folder\n   * Get information about a specific folder used to organize campaigns.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFolder} and HTTP response\n   */\n  this.getWithHttpInfo = function(folderId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaign-folders/{folder_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign folder\n   * Get information about a specific folder used to organize campaigns.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFolder}\n   */\n  this.get = function(folderId, opts) {\n    return this.getWithHttpInfo(folderId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update campaign folder\n   * Update a specific folder used to organize campaigns.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @param {module:model/CampaignFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFolder} and HTTP response\n   */\n  this.updateWithHttpInfo = function(folderId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaign-folders/{folder_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update campaign folder\n   * Update a specific folder used to organize campaigns.\n   * @param {String} folderId The unique id for the campaign folder.\n   * @param {module:model/CampaignFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFolder}\n   */\n  this.update = function(folderId, body) {\n    return this.updateWithHttpInfo(folderId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add campaign folder\n   * Create a new campaign folder.\n   * @param {module:model/CampaignFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFolder} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaign-folders', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add campaign folder\n   * Create a new campaign folder.\n   * @param {module:model/CampaignFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFolder}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/CampaignsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Campaigns service.\n * @module api/CampaignsApi\n */\n\n/**\n * Constructs a new CampaignsApi. \n * @alias module:api/CampaignsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete campaign\n   * Remove a campaign from your Mailchimp account.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete campaign\n   * Remove a campaign from your Mailchimp account.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.remove = function(campaignId) {\n    return this.removeWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete campaign feedback message\n   * Remove a specific feedback message for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteFeedbackMessageWithHttpInfo = function(campaignId, feedbackId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'feedbackId' is set\n    if (feedbackId === undefined || feedbackId === null) {\n      throw new Error(\"Missing the required parameter 'feedbackId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'feedback_id': feedbackId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/feedback/{feedback_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete campaign feedback message\n   * Remove a specific feedback message for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteFeedbackMessage = function(campaignId, feedbackId) {\n    return this.deleteFeedbackMessageWithHttpInfo(campaignId, feedbackId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaigns\n   * Get all campaigns in an account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.type The campaign type.\n   * @param {module:model/String} opts.status The status of the campaign.\n   * @param {Date} opts.beforeSendTime Restrict the response to campaigns sent before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceSendTime Restrict the response to campaigns sent after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.beforeCreateTime Restrict the response to campaigns created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceCreateTime Restrict the response to campaigns created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.listId The unique id for the list.\n   * @param {String} opts.folderId The unique folder id.\n   * @param {String} opts.memberId Retrieve campaigns sent to a particular list member. Member ID is The MD5 hash of the lowercase version of the list member’s email address.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2005} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'status': ( opts['status'] ? opts['status'] : opts['status']),\n      'before_send_time': ( opts['beforeSendTime'] ? opts['beforeSendTime'] : opts['before_send_time']),\n      'since_send_time': ( opts['sinceSendTime'] ? opts['sinceSendTime'] : opts['since_send_time']),\n      'before_create_time': ( opts['beforeCreateTime'] ? opts['beforeCreateTime'] : opts['before_create_time']),\n      'since_create_time': ( opts['sinceCreateTime'] ? opts['sinceCreateTime'] : opts['since_create_time']),\n      'list_id': ( opts['listId'] ? opts['listId'] : opts['list_id']),\n      'folder_id': ( opts['folderId'] ? opts['folderId'] : opts['folder_id']),\n      'member_id': ( opts['memberId'] ? opts['memberId'] : opts['member_id']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaigns\n   * Get all campaigns in an account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.type The campaign type.\n   * @param {module:model/String} opts.status The status of the campaign.\n   * @param {Date} opts.beforeSendTime Restrict the response to campaigns sent before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceSendTime Restrict the response to campaigns sent after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.beforeCreateTime Restrict the response to campaigns created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceCreateTime Restrict the response to campaigns created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.listId The unique id for the list.\n   * @param {String} opts.folderId The unique folder id.\n   * @param {String} opts.memberId Retrieve campaigns sent to a particular list member. Member ID is The MD5 hash of the lowercase version of the list member’s email address.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2005}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign info\n   * Get information about a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaign} and HTTP response\n   */\n  this.getWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign info\n   * Get information about a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaign}\n   */\n  this.get = function(campaignId, opts) {\n    return this.getWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign content\n   * Get the the HTML and plain-text content for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignContent} and HTTP response\n   */\n  this.getContentWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/content', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign content\n   * Get the the HTML and plain-text content for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignContent}\n   */\n  this.getContent = function(campaignId, opts) {\n    return this.getContentWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign feedback\n   * Get team feedback while you're working together on a Mailchimp campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignReports} and HTTP response\n   */\n  this.getFeedbackWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/feedback', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign feedback\n   * Get team feedback while you're working together on a Mailchimp campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignReports}\n   */\n  this.getFeedback = function(campaignId, opts) {\n    return this.getFeedbackWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign feedback message\n   * Get a specific feedback message from a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFeedback2} and HTTP response\n   */\n  this.getFeedbackMessageWithHttpInfo = function(campaignId, feedbackId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'feedbackId' is set\n    if (feedbackId === undefined || feedbackId === null) {\n      throw new Error(\"Missing the required parameter 'feedbackId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'feedback_id': feedbackId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/feedback/{feedback_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign feedback message\n   * Get a specific feedback message from a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFeedback2}\n   */\n  this.getFeedbackMessage = function(campaignId, feedbackId, opts) {\n    return this.getFeedbackMessageWithHttpInfo(campaignId, feedbackId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign send checklist\n   * Review the send checklist for a campaign, and resolve any issues before sending.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SendChecklist} and HTTP response\n   */\n  this.getSendChecklistWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/send-checklist', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign send checklist\n   * Review the send checklist for a campaign, and resolve any issues before sending.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SendChecklist}\n   */\n  this.getSendChecklist = function(campaignId, opts) {\n    return this.getSendChecklistWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update campaign settings\n   * Update some or all of the settings for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Campaign2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaign} and HTTP response\n   */\n  this.updateWithHttpInfo = function(campaignId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update campaign settings\n   * Update some or all of the settings for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Campaign2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaign}\n   */\n  this.update = function(campaignId, body) {\n    return this.updateWithHttpInfo(campaignId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update campaign feedback message\n   * Update a specific feedback message for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @param {module:model/CampaignFeedback3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFeedback2} and HTTP response\n   */\n  this.updateFeedbackMessageWithHttpInfo = function(campaignId, feedbackId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'feedbackId' is set\n    if (feedbackId === undefined || feedbackId === null) {\n      throw new Error(\"Missing the required parameter 'feedbackId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'feedback_id': feedbackId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/feedback/{feedback_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update campaign feedback message\n   * Update a specific feedback message for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} feedbackId The unique id for the feedback message.\n   * @param {module:model/CampaignFeedback3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFeedback2}\n   */\n  this.updateFeedbackMessage = function(campaignId, feedbackId, body) {\n    return this.updateFeedbackMessageWithHttpInfo(campaignId, feedbackId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add campaign\n   * Create a new Mailchimp campaign.\n   * @param {module:model/Campaign1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaign} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add campaign\n   * Create a new Mailchimp campaign.\n   * @param {module:model/Campaign1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaign}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Cancel campaign\n   * Cancel a Regular or Plain-Text Campaign after you send, before all of your recipients receive it. This feature is included with Mailchimp Pro.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.cancelSendWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/cancel-send', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Cancel campaign\n   * Cancel a Regular or Plain-Text Campaign after you send, before all of your recipients receive it. This feature is included with Mailchimp Pro.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.cancelSend = function(campaignId) {\n    return this.cancelSendWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Resend campaign\n   * Creates a Resend to Non-Openers version of this campaign. We will also check if this campaign meets the criteria for Resend to Non-Openers campaigns.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaign3} and HTTP response\n   */\n  this.createResendWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/create-resend', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Resend campaign\n   * Creates a Resend to Non-Openers version of this campaign. We will also check if this campaign meets the criteria for Resend to Non-Openers campaigns.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaign3}\n   */\n  this.createResend = function(campaignId) {\n    return this.createResendWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Pause rss campaign\n   * Pause an RSS-Driven campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.pauseWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/pause', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Pause rss campaign\n   * Pause an RSS-Driven campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.pause = function(campaignId) {\n    return this.pauseWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Replicate campaign\n   * Replicate a campaign in saved or send status.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaign3} and HTTP response\n   */\n  this.replicateWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/replicate', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Replicate campaign\n   * Replicate a campaign in saved or send status.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaign3}\n   */\n  this.replicate = function(campaignId) {\n    return this.replicateWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Resume rss campaign\n   * Resume an RSS-Driven campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.resumeWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/resume', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Resume rss campaign\n   * Resume an RSS-Driven campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.resume = function(campaignId) {\n    return this.resumeWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Schedule campaign\n   * Schedule a campaign for delivery. If you're using Multivariate Campaigns to test send times or sending RSS Campaigns, use the send action instead.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Body1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.scheduleWithHttpInfo = function(campaignId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/schedule', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Schedule campaign\n   * Schedule a campaign for delivery. If you're using Multivariate Campaigns to test send times or sending RSS Campaigns, use the send action instead.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Body1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.schedule = function(campaignId, body) {\n    return this.scheduleWithHttpInfo(campaignId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Send campaign\n   * Send a Mailchimp campaign. For RSS Campaigns, the campaign will send according to its schedule. All other campaigns will send immediately.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.sendWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/send', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Send campaign\n   * Send a Mailchimp campaign. For RSS Campaigns, the campaign will send according to its schedule. All other campaigns will send immediately.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.send = function(campaignId) {\n    return this.sendWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Send test email\n   * Send a test email.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Body2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.sendTestEmailWithHttpInfo = function(campaignId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/test', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Send test email\n   * Send a test email.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/Body2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.sendTestEmail = function(campaignId, body) {\n    return this.sendTestEmailWithHttpInfo(campaignId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Unschedule campaign\n   * Unschedule a scheduled campaign that hasn't started sending.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.unscheduleWithHttpInfo = function(campaignId) {\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/actions/unschedule', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Unschedule campaign\n   * Unschedule a scheduled campaign that hasn't started sending.\n   * @param {String} campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.unschedule = function(campaignId) {\n    return this.unscheduleWithHttpInfo(campaignId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add campaign feedback\n   * Add feedback on a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/CampaignFeedback1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignFeedback2} and HTTP response\n   */\n  this.addFeedbackWithHttpInfo = function(campaignId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/feedback', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add campaign feedback\n   * Add feedback on a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/CampaignFeedback1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignFeedback2}\n   */\n  this.addFeedback = function(campaignId, body) {\n    return this.addFeedbackWithHttpInfo(campaignId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Set campaign content\n   * Set the content for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/CampaignContent1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignContent} and HTTP response\n   */\n  this.setContentWithHttpInfo = function(campaignId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/campaigns/{campaign_id}/content', 'PUT',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Set campaign content\n   * Set the content for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {module:model/CampaignContent1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignContent}\n   */\n  this.setContent = function(campaignId, body) {\n    return this.setContentWithHttpInfo(campaignId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ConnectedSitesApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * ConnectedSites service.\n * @module api/ConnectedSitesApi\n */\n\n/**\n * Constructs a new ConnectedSitesApi. \n * @alias module:api/ConnectedSitesApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete connected site\n   * Remove a connected site from your Mailchimp account.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeWithHttpInfo = function(connectedSiteId) {\n    var postBody = null;\n\n    // verify the required parameter 'connectedSiteId' is set\n    if (connectedSiteId === undefined || connectedSiteId === null) {\n      throw new Error(\"Missing the required parameter 'connectedSiteId' when calling \");\n    }\n\n    var pathParams = {\n      'connected_site_id': connectedSiteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/connected-sites/{connected_site_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete connected site\n   * Remove a connected site from your Mailchimp account.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.remove = function(connectedSiteId) {\n    return this.removeWithHttpInfo(connectedSiteId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List connected sites\n   * Get all connected sites in an account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ConnectedSites} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/connected-sites', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List connected sites\n   * Get all connected sites in an account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ConnectedSites}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get connected site\n   * Get information about a specific connected site.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ConnectedSite} and HTTP response\n   */\n  this.getWithHttpInfo = function(connectedSiteId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'connectedSiteId' is set\n    if (connectedSiteId === undefined || connectedSiteId === null) {\n      throw new Error(\"Missing the required parameter 'connectedSiteId' when calling \");\n    }\n\n    var pathParams = {\n      'connected_site_id': connectedSiteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/connected-sites/{connected_site_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get connected site\n   * Get information about a specific connected site.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ConnectedSite}\n   */\n  this.get = function(connectedSiteId, opts) {\n    return this.getWithHttpInfo(connectedSiteId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add connected site\n   * Create a new Mailchimp connected site.\n   * @param {module:model/ConnectedSite1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ConnectedSite} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/connected-sites', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add connected site\n   * Create a new Mailchimp connected site.\n   * @param {module:model/ConnectedSite1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ConnectedSite}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Verify connected site script\n   * Verify that the connected sites script has been installed, either via the script URL or fragment.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.verifyScriptInstallationWithHttpInfo = function(connectedSiteId) {\n    var postBody = null;\n\n    // verify the required parameter 'connectedSiteId' is set\n    if (connectedSiteId === undefined || connectedSiteId === null) {\n      throw new Error(\"Missing the required parameter 'connectedSiteId' when calling \");\n    }\n\n    var pathParams = {\n      'connected_site_id': connectedSiteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/connected-sites/{connected_site_id}/actions/verify-script-installation', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Verify connected site script\n   * Verify that the connected sites script has been installed, either via the script URL or fragment.\n   * @param {String} connectedSiteId The unique identifier for the site.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.verifyScriptInstallation = function(connectedSiteId) {\n    return this.verifyScriptInstallationWithHttpInfo(connectedSiteId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ConversationsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Conversations service.\n * @module api/ConversationsApi\n */\n\n/**\n * Constructs a new ConversationsApi. \n * @alias module:api/ConversationsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List conversations\n   * Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.hasUnreadMessages Whether the conversation has any unread messages.\n   * @param {String} opts.listId The unique id for the list.\n   * @param {String} opts.campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TrackedConversations} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'has_unread_messages': ( opts['hasUnreadMessages'] ? opts['hasUnreadMessages'] : opts['has_unread_messages']),\n      'list_id': ( opts['listId'] ? opts['listId'] : opts['list_id']),\n      'campaign_id': ( opts['campaignId'] ? opts['campaignId'] : opts['campaign_id'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/conversations', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List conversations\n   * Get a list of conversations for the account. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.hasUnreadMessages Whether the conversation has any unread messages.\n   * @param {String} opts.listId The unique id for the list.\n   * @param {String} opts.campaignId The unique id for the campaign.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TrackedConversations}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get conversation\n   * Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Conversation} and HTTP response\n   */\n  this.getWithHttpInfo = function(conversationId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'conversationId' is set\n    if (conversationId === undefined || conversationId === null) {\n      throw new Error(\"Missing the required parameter 'conversationId' when calling \");\n    }\n\n    var pathParams = {\n      'conversation_id': conversationId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/conversations/{conversation_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get conversation\n   * Get details about an individual conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Conversation}\n   */\n  this.get = function(conversationId, opts) {\n    return this.getWithHttpInfo(conversationId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List messages\n   * Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {module:model/String} opts.isRead Whether a conversation message has been marked as read.\n   * @param {Date} opts.beforeTimestamp Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceTimestamp Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfConversationMessages} and HTTP response\n   */\n  this.getConversationMessagesWithHttpInfo = function(conversationId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'conversationId' is set\n    if (conversationId === undefined || conversationId === null) {\n      throw new Error(\"Missing the required parameter 'conversationId' when calling \");\n    }\n\n    var pathParams = {\n      'conversation_id': conversationId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'is_read': ( opts['isRead'] ? opts['isRead'] : opts['is_read']),\n      'before_timestamp': ( opts['beforeTimestamp'] ? opts['beforeTimestamp'] : opts['before_timestamp']),\n      'since_timestamp': ( opts['sinceTimestamp'] ? opts['sinceTimestamp'] : opts['since_timestamp'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/conversations/{conversation_id}/messages', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List messages\n   * Get messages from a specific conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {module:model/String} opts.isRead Whether a conversation message has been marked as read.\n   * @param {Date} opts.beforeTimestamp Restrict the response to messages created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceTimestamp Restrict the response to messages created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfConversationMessages}\n   */\n  this.getConversationMessages = function(conversationId, opts) {\n    return this.getConversationMessagesWithHttpInfo(conversationId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get message\n   * Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {String} messageId The unique id for the conversation message.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ConversationMessage} and HTTP response\n   */\n  this.getConversationMessageWithHttpInfo = function(conversationId, messageId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'conversationId' is set\n    if (conversationId === undefined || conversationId === null) {\n      throw new Error(\"Missing the required parameter 'conversationId' when calling \");\n    }\n\n    // verify the required parameter 'messageId' is set\n    if (messageId === undefined || messageId === null) {\n      throw new Error(\"Missing the required parameter 'messageId' when calling \");\n    }\n\n    var pathParams = {\n      'conversation_id': conversationId,\n      'message_id': messageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/conversations/{conversation_id}/messages/{message_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get message\n   * Get an individual message in a conversation. Conversations has been deprecated in favor of Inbox and these endpoints don't include Inbox data. Past Conversations are still available via this endpoint, but new campaign replies and other Inbox messages aren’t available using this endpoint.\n   * @param {String} conversationId The unique id for the conversation.\n   * @param {String} messageId The unique id for the conversation message.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ConversationMessage}\n   */\n  this.getConversationMessage = function(conversationId, messageId, opts) {\n    return this.getConversationMessageWithHttpInfo(conversationId, messageId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/CustomerJourneysApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * CustomerJourneys service.\n * @module api/CustomerJourneysApi\n */\n\n/**\n * Constructs a new CustomerJourneysApi. \n * @alias module:api/CustomerJourneysApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Customer Journeys API trigger for a contact\n   * A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact.\n   * @param {Number} journeyId The id for the Journey.\n   * @param {Number} stepId The id for the Step.\n   * @param {module:model/SubscriberInCustomerJourneysAudience} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response\n   */\n  this.triggerWithHttpInfo = function(journeyId, stepId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'journeyId' is set\n    if (journeyId === undefined || journeyId === null) {\n      throw new Error(\"Missing the required parameter 'journeyId' when calling \");\n    }\n\n    // verify the required parameter 'stepId' is set\n    if (stepId === undefined || stepId === null) {\n      throw new Error(\"Missing the required parameter 'stepId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'journey_id': journeyId,\n      'step_id': stepId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/customer-journeys/journeys/{journey_id}/steps/{step_id}/actions/trigger', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Customer Journeys API trigger for a contact\n   * A step trigger in a Customer Journey. To use it, create a starting point or step from the Customer Journey builder in the app using the Customer Journeys API condition. We’ll provide a url during the process that includes the {journey_id} and {step_id}. You’ll then be able to use this endpoint to trigger the condition for the posted contact.\n   * @param {Number} journeyId The id for the Journey.\n   * @param {Number} stepId The id for the Step.\n   * @param {module:model/SubscriberInCustomerJourneysAudience} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}\n   */\n  this.trigger = function(journeyId, stepId, body) {\n    return this.triggerWithHttpInfo(journeyId, stepId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/EcommerceApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Ecommerce service.\n * @module api/EcommerceApi\n */\n\n/**\n * Constructs a new EcommerceApi. \n * @alias module:api/EcommerceApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete store\n   * Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.\n   * @param {String} storeId The store id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response\n   */\n  this.deleteStoreWithHttpInfo = function(storeId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete store\n   * Delete a store. Deleting a store will also delete any associated subresources, including Customers, Orders, Products, and Carts.\n   * @param {String} storeId The store id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object}\n   */\n  this.deleteStore = function(storeId) {\n    return this.deleteStoreWithHttpInfo(storeId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete cart\n   * Delete a cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteStoreCartWithHttpInfo = function(storeId, cartId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete cart\n   * Delete a cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteStoreCart = function(storeId, cartId) {\n    return this.deleteStoreCartWithHttpInfo(storeId, cartId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete cart line item\n   * Delete a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteCartLineItemWithHttpInfo = function(storeId, cartId, lineId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete cart line item\n   * Delete a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteCartLineItem = function(storeId, cartId, lineId) {\n    return this.deleteCartLineItemWithHttpInfo(storeId, cartId, lineId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete customer\n   * Delete a customer from a store.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteStoreCustomerWithHttpInfo = function(storeId, customerId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'customerId' is set\n    if (customerId === undefined || customerId === null) {\n      throw new Error(\"Missing the required parameter 'customerId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'customer_id': customerId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers/{customer_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete customer\n   * Delete a customer from a store.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteStoreCustomer = function(storeId, customerId) {\n    return this.deleteStoreCustomerWithHttpInfo(storeId, customerId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete order\n   * Delete an order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteOrderWithHttpInfo = function(storeId, orderId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete order\n   * Delete an order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteOrder = function(storeId, orderId) {\n    return this.deleteOrderWithHttpInfo(storeId, orderId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete order line item\n   * Delete a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteOrderLineItemWithHttpInfo = function(storeId, orderId, lineId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete order line item\n   * Delete a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteOrderLineItem = function(storeId, orderId, lineId) {\n    return this.deleteOrderLineItemWithHttpInfo(storeId, orderId, lineId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete product\n   * Delete a product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteStoreProductWithHttpInfo = function(storeId, productId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete product\n   * Delete a product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteStoreProduct = function(storeId, productId) {\n    return this.deleteStoreProductWithHttpInfo(storeId, productId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete product image\n   * Delete a product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteProductImageWithHttpInfo = function(storeId, productId, imageId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'imageId' is set\n    if (imageId === undefined || imageId === null) {\n      throw new Error(\"Missing the required parameter 'imageId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'image_id': imageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete product image\n   * Delete a product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteProductImage = function(storeId, productId, imageId) {\n    return this.deleteProductImageWithHttpInfo(storeId, productId, imageId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete product variant\n   * Delete a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteProductVariantWithHttpInfo = function(storeId, productId, variantId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'variantId' is set\n    if (variantId === undefined || variantId === null) {\n      throw new Error(\"Missing the required parameter 'variantId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'variant_id': variantId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete product variant\n   * Delete a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteProductVariant = function(storeId, productId, variantId) {\n    return this.deleteProductVariantWithHttpInfo(storeId, productId, variantId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete promo code\n   * Delete a promo code from a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deletePromoCodeWithHttpInfo = function(storeId, promoRuleId, promoCodeId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'promoCodeId' is set\n    if (promoCodeId === undefined || promoCodeId === null) {\n      throw new Error(\"Missing the required parameter 'promoCodeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId,\n      'promo_code_id': promoCodeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete promo code\n   * Delete a promo code from a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deletePromoCode = function(storeId, promoRuleId, promoCodeId) {\n    return this.deletePromoCodeWithHttpInfo(storeId, promoRuleId, promoCodeId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete promo rule\n   * Delete a promo rule from a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deletePromoRuleWithHttpInfo = function(storeId, promoRuleId) {\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete promo rule\n   * Delete a promo rule from a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deletePromoRule = function(storeId, promoRuleId) {\n    return this.deletePromoRuleWithHttpInfo(storeId, promoRuleId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List account orders\n   * Get information about an account's orders.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.campaignId Restrict results to orders with a specific `campaign_id` value.\n   * @param {String} opts.outreachId Restrict results to orders with a specific `outreach_id` value.\n   * @param {String} opts.customerId Restrict results to orders made by a specific customer.\n   * @param {Boolean} opts.hasOutreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Orders} and HTTP response\n   */\n  this.ordersWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'campaign_id': ( opts['campaignId'] ? opts['campaignId'] : opts['campaign_id']),\n      'outreach_id': ( opts['outreachId'] ? opts['outreachId'] : opts['outreach_id']),\n      'customer_id': ( opts['customerId'] ? opts['customerId'] : opts['customer_id']),\n      'has_outreach': ( opts['hasOutreach'] ? opts['hasOutreach'] : opts['has_outreach'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/orders', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List account orders\n   * Get information about an account's orders.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.campaignId Restrict results to orders with a specific `campaign_id` value.\n   * @param {String} opts.outreachId Restrict results to orders with a specific `outreach_id` value.\n   * @param {String} opts.customerId Restrict results to orders made by a specific customer.\n   * @param {Boolean} opts.hasOutreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Orders}\n   */\n  this.orders = function(opts) {\n    return this.ordersWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List stores\n   * Get information about all stores in the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceStores} and HTTP response\n   */\n  this.storesWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List stores\n   * Get information about all stores in the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceStores}\n   */\n  this.stores = function(opts) {\n    return this.storesWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get store info\n   * Get information about a specific store.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceStore} and HTTP response\n   */\n  this.getStoreWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get store info\n   * Get information about a specific store.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceStore}\n   */\n  this.getStore = function(storeId, opts) {\n    return this.getStoreWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List carts\n   * Get information about a store's carts.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Carts} and HTTP response\n   */\n  this.getStoreCartsWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List carts\n   * Get information about a store's carts.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Carts}\n   */\n  this.getStoreCarts = function(storeId, opts) {\n    return this.getStoreCartsWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get cart info\n   * Get information about a specific cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCart} and HTTP response\n   */\n  this.getStoreCartWithHttpInfo = function(storeId, cartId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get cart info\n   * Get information about a specific cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCart}\n   */\n  this.getStoreCart = function(storeId, cartId, opts) {\n    return this.getStoreCartWithHttpInfo(storeId, cartId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List cart line items\n   * Get information about a cart's line items.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CartLines} and HTTP response\n   */\n  this.getAllCartLineItemsWithHttpInfo = function(storeId, cartId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List cart line items\n   * Get information about a cart's line items.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CartLines}\n   */\n  this.getAllCartLineItems = function(storeId, cartId, opts) {\n    return this.getAllCartLineItemsWithHttpInfo(storeId, cartId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get cart line item\n   * Get information about a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCartLineItem} and HTTP response\n   */\n  this.getCartLineItemWithHttpInfo = function(storeId, cartId, lineId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get cart line item\n   * Get information about a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCartLineItem}\n   */\n  this.getCartLineItem = function(storeId, cartId, lineId, opts) {\n    return this.getCartLineItemWithHttpInfo(storeId, cartId, lineId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List customers\n   * Get information about a store's customers.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.emailAddress Restrict the response to customers with the email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Customers} and HTTP response\n   */\n  this.getAllStoreCustomersWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'email_address': ( opts['emailAddress'] ? opts['emailAddress'] : opts['email_address'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List customers\n   * Get information about a store's customers.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.emailAddress Restrict the response to customers with the email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Customers}\n   */\n  this.getAllStoreCustomers = function(storeId, opts) {\n    return this.getAllStoreCustomersWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get customer info\n   * Get information about a specific customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCustomer} and HTTP response\n   */\n  this.getStoreCustomerWithHttpInfo = function(storeId, customerId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'customerId' is set\n    if (customerId === undefined || customerId === null) {\n      throw new Error(\"Missing the required parameter 'customerId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'customer_id': customerId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers/{customer_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get customer info\n   * Get information about a specific customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCustomer}\n   */\n  this.getStoreCustomer = function(storeId, customerId, opts) {\n    return this.getStoreCustomerWithHttpInfo(storeId, customerId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List orders\n   * Get information about a store's orders.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.customerId Restrict results to orders made by a specific customer.\n   * @param {Boolean} opts.hasOutreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.\n   * @param {String} opts.campaignId Restrict results to orders with a specific `campaign_id` value.\n   * @param {String} opts.outreachId Restrict results to orders with a specific `outreach_id` value.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Orders1} and HTTP response\n   */\n  this.getStoreOrdersWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'customer_id': ( opts['customerId'] ? opts['customerId'] : opts['customer_id']),\n      'has_outreach': ( opts['hasOutreach'] ? opts['hasOutreach'] : opts['has_outreach']),\n      'campaign_id': ( opts['campaignId'] ? opts['campaignId'] : opts['campaign_id']),\n      'outreach_id': ( opts['outreachId'] ? opts['outreachId'] : opts['outreach_id'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List orders\n   * Get information about a store's orders.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.customerId Restrict results to orders made by a specific customer.\n   * @param {Boolean} opts.hasOutreach Restrict results to orders that have an outreach attached. For example, an email campaign or Facebook ad.\n   * @param {String} opts.campaignId Restrict results to orders with a specific `campaign_id` value.\n   * @param {String} opts.outreachId Restrict results to orders with a specific `outreach_id` value.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Orders1}\n   */\n  this.getStoreOrders = function(storeId, opts) {\n    return this.getStoreOrdersWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get order info\n   * Get information about a specific order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrder} and HTTP response\n   */\n  this.getOrderWithHttpInfo = function(storeId, orderId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get order info\n   * Get information about a specific order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrder}\n   */\n  this.getOrder = function(storeId, orderId, opts) {\n    return this.getOrderWithHttpInfo(storeId, orderId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List order line items\n   * Get information about an order's line items.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OrderLines} and HTTP response\n   */\n  this.getAllOrderLineItemsWithHttpInfo = function(storeId, orderId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List order line items\n   * Get information about an order's line items.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OrderLines}\n   */\n  this.getAllOrderLineItems = function(storeId, orderId, opts) {\n    return this.getAllOrderLineItemsWithHttpInfo(storeId, orderId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get order line item\n   * Get information about a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrderLineItem} and HTTP response\n   */\n  this.getOrderLineItemWithHttpInfo = function(storeId, orderId, lineId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get order line item\n   * Get information about a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrderLineItem}\n   */\n  this.getOrderLineItem = function(storeId, orderId, lineId, opts) {\n    return this.getOrderLineItemWithHttpInfo(storeId, orderId, lineId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List product\n   * Get information about a store's products.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Products} and HTTP response\n   */\n  this.getAllStoreProductsWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List product\n   * Get information about a store's products.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Products}\n   */\n  this.getAllStoreProducts = function(storeId, opts) {\n    return this.getAllStoreProductsWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get product info\n   * Get information about a specific product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProduct} and HTTP response\n   */\n  this.getStoreProductWithHttpInfo = function(storeId, productId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get product info\n   * Get information about a specific product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProduct}\n   */\n  this.getStoreProduct = function(storeId, productId, opts) {\n    return this.getStoreProductWithHttpInfo(storeId, productId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List product images\n   * Get information about a product's images.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductImages} and HTTP response\n   */\n  this.getProductImagesWithHttpInfo = function(storeId, productId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/images', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List product images\n   * Get information about a product's images.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductImages}\n   */\n  this.getProductImages = function(storeId, productId, opts) {\n    return this.getProductImagesWithHttpInfo(storeId, productId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get product image info\n   * Get information about a specific product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductImage} and HTTP response\n   */\n  this.getProductImageWithHttpInfo = function(storeId, productId, imageId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'imageId' is set\n    if (imageId === undefined || imageId === null) {\n      throw new Error(\"Missing the required parameter 'imageId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'image_id': imageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get product image info\n   * Get information about a specific product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductImage}\n   */\n  this.getProductImage = function(storeId, productId, imageId, opts) {\n    return this.getProductImageWithHttpInfo(storeId, productId, imageId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List product variants\n   * Get information about a product's variants.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductVariants} and HTTP response\n   */\n  this.getProductVariantsWithHttpInfo = function(storeId, productId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List product variants\n   * Get information about a product's variants.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductVariants}\n   */\n  this.getProductVariants = function(storeId, productId, opts) {\n    return this.getProductVariantsWithHttpInfo(storeId, productId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get product variant info\n   * Get information about a specific product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductVariant} and HTTP response\n   */\n  this.getProductVariantWithHttpInfo = function(storeId, productId, variantId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'variantId' is set\n    if (variantId === undefined || variantId === null) {\n      throw new Error(\"Missing the required parameter 'variantId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'variant_id': variantId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get product variant info\n   * Get information about a specific product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductVariant}\n   */\n  this.getProductVariant = function(storeId, productId, variantId, opts) {\n    return this.getProductVariantWithHttpInfo(storeId, productId, variantId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List promo codes\n   * Get information about a store's promo codes.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PromoCodes} and HTTP response\n   */\n  this.getPromoCodesWithHttpInfo = function(promoRuleId, storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'promo_rule_id': promoRuleId,\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List promo codes\n   * Get information about a store's promo codes.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PromoCodes}\n   */\n  this.getPromoCodes = function(promoRuleId, storeId, opts) {\n    return this.getPromoCodesWithHttpInfo(promoRuleId, storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get promo code\n   * Get information about a specific promo code.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoCode} and HTTP response\n   */\n  this.getPromoCodeWithHttpInfo = function(storeId, promoRuleId, promoCodeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'promoCodeId' is set\n    if (promoCodeId === undefined || promoCodeId === null) {\n      throw new Error(\"Missing the required parameter 'promoCodeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId,\n      'promo_code_id': promoCodeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get promo code\n   * Get information about a specific promo code.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoCode}\n   */\n  this.getPromoCode = function(storeId, promoRuleId, promoCodeId, opts) {\n    return this.getPromoCodeWithHttpInfo(storeId, promoRuleId, promoCodeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List promo rules\n   * Get information about a store's promo rules.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/PromoRules} and HTTP response\n   */\n  this.listPromoRulesWithHttpInfo = function(storeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List promo rules\n   * Get information about a store's promo rules.\n   * @param {String} storeId The store id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/PromoRules}\n   */\n  this.listPromoRules = function(storeId, opts) {\n    return this.listPromoRulesWithHttpInfo(storeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get promo rule\n   * Get information about a specific promo rule.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoRule} and HTTP response\n   */\n  this.getPromoRuleWithHttpInfo = function(storeId, promoRuleId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get promo rule\n   * Get information about a specific promo rule.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoRule}\n   */\n  this.getPromoRule = function(storeId, promoRuleId, opts) {\n    return this.getPromoRuleWithHttpInfo(storeId, promoRuleId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update store\n   * Update a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceStore2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceStore} and HTTP response\n   */\n  this.updateStoreWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update store\n   * Update a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceStore2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceStore}\n   */\n  this.updateStore = function(storeId, body) {\n    return this.updateStoreWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update cart\n   * Update a specific cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {module:model/EcommerceCart2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCart} and HTTP response\n   */\n  this.updateStoreCartWithHttpInfo = function(storeId, cartId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update cart\n   * Update a specific cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {module:model/EcommerceCart2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCart}\n   */\n  this.updateStoreCart = function(storeId, cartId, body) {\n    return this.updateStoreCartWithHttpInfo(storeId, cartId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update cart line item\n   * Update a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @param {module:model/EcommerceCartLineItem4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCartLineItem} and HTTP response\n   */\n  this.updateCartLineItemWithHttpInfo = function(storeId, cartId, lineId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update cart line item\n   * Update a specific cart line item.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {String} lineId The id for the line item of a cart.\n   * @param {module:model/EcommerceCartLineItem4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCartLineItem}\n   */\n  this.updateCartLineItem = function(storeId, cartId, lineId, body) {\n    return this.updateCartLineItemWithHttpInfo(storeId, cartId, lineId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update customer\n   * Update a customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {module:model/EcommerceCustomer5} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCustomer} and HTTP response\n   */\n  this.updateStoreCustomerWithHttpInfo = function(storeId, customerId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'customerId' is set\n    if (customerId === undefined || customerId === null) {\n      throw new Error(\"Missing the required parameter 'customerId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'customer_id': customerId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers/{customer_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update customer\n   * Update a customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {module:model/EcommerceCustomer5} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCustomer}\n   */\n  this.updateStoreCustomer = function(storeId, customerId, body) {\n    return this.updateStoreCustomerWithHttpInfo(storeId, customerId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update order\n   * Update a specific order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {module:model/EcommerceOrder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrder} and HTTP response\n   */\n  this.updateOrderWithHttpInfo = function(storeId, orderId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update order\n   * Update a specific order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {module:model/EcommerceOrder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrder}\n   */\n  this.updateOrder = function(storeId, orderId, body) {\n    return this.updateOrderWithHttpInfo(storeId, orderId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update order line item\n   * Update a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @param {module:model/EcommerceOrderLineItem4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrderLineItem} and HTTP response\n   */\n  this.updateOrderLineItemWithHttpInfo = function(storeId, orderId, lineId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    // verify the required parameter 'lineId' is set\n    if (lineId === undefined || lineId === null) {\n      throw new Error(\"Missing the required parameter 'lineId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId,\n      'line_id': lineId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}/lines/{line_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update order line item\n   * Update a specific order line item.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {String} lineId The id for the line item of an order.\n   * @param {module:model/EcommerceOrderLineItem4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrderLineItem}\n   */\n  this.updateOrderLineItem = function(storeId, orderId, lineId, body) {\n    return this.updateOrderLineItemWithHttpInfo(storeId, orderId, lineId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update product\n   * Update a specific product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProduct2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProduct} and HTTP response\n   */\n  this.updateStoreProductWithHttpInfo = function(storeId, productId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update product\n   * Update a specific product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProduct2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProduct}\n   */\n  this.updateStoreProduct = function(storeId, productId, body) {\n    return this.updateStoreProductWithHttpInfo(storeId, productId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update product image\n   * Update a product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @param {module:model/EcommerceProductImage4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductImage} and HTTP response\n   */\n  this.updateProductImageWithHttpInfo = function(storeId, productId, imageId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'imageId' is set\n    if (imageId === undefined || imageId === null) {\n      throw new Error(\"Missing the required parameter 'imageId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'image_id': imageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/images/{image_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update product image\n   * Update a product image.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} imageId The id for the product image.\n   * @param {module:model/EcommerceProductImage4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductImage}\n   */\n  this.updateProductImage = function(storeId, productId, imageId, body) {\n    return this.updateProductImageWithHttpInfo(storeId, productId, imageId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update product variant\n   * Update a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {module:model/EcommerceProductVariant5} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductVariant} and HTTP response\n   */\n  this.updateProductVariantWithHttpInfo = function(storeId, productId, variantId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'variantId' is set\n    if (variantId === undefined || variantId === null) {\n      throw new Error(\"Missing the required parameter 'variantId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'variant_id': variantId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update product variant\n   * Update a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {module:model/EcommerceProductVariant5} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductVariant}\n   */\n  this.updateProductVariant = function(storeId, productId, variantId, body) {\n    return this.updateProductVariantWithHttpInfo(storeId, productId, variantId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update promo code\n   * Update a promo code.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @param {module:model/EcommercePromoCode2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoCode} and HTTP response\n   */\n  this.updatePromoCodeWithHttpInfo = function(storeId, promoRuleId, promoCodeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'promoCodeId' is set\n    if (promoCodeId === undefined || promoCodeId === null) {\n      throw new Error(\"Missing the required parameter 'promoCodeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId,\n      'promo_code_id': promoCodeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes/{promo_code_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update promo code\n   * Update a promo code.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {String} promoCodeId The id for the promo code of a store.\n   * @param {module:model/EcommercePromoCode2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoCode}\n   */\n  this.updatePromoCode = function(storeId, promoRuleId, promoCodeId, body) {\n    return this.updatePromoCodeWithHttpInfo(storeId, promoRuleId, promoCodeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update promo rule\n   * Update a promo rule.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {module:model/EcommercePromoRule2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoRule} and HTTP response\n   */\n  this.updatePromoRuleWithHttpInfo = function(storeId, promoRuleId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update promo rule\n   * Update a promo rule.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {module:model/EcommercePromoRule2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoRule}\n   */\n  this.updatePromoRule = function(storeId, promoRuleId, body) {\n    return this.updatePromoRuleWithHttpInfo(storeId, promoRuleId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add store\n   * Add a new store to your Mailchimp account.\n   * @param {module:model/EcommerceStore1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceStore} and HTTP response\n   */\n  this.addStoreWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add store\n   * Add a new store to your Mailchimp account.\n   * @param {module:model/EcommerceStore1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceStore}\n   */\n  this.addStore = function(body) {\n    return this.addStoreWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add cart\n   * Add a new cart to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceCart1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCart} and HTTP response\n   */\n  this.addStoreCartWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add cart\n   * Add a new cart to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceCart1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCart}\n   */\n  this.addStoreCart = function(storeId, body) {\n    return this.addStoreCartWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add cart line item\n   * Add a new line item to an existing cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {module:model/EcommerceCartLineItem3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCartLineItem} and HTTP response\n   */\n  this.addCartLineItemWithHttpInfo = function(storeId, cartId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'cartId' is set\n    if (cartId === undefined || cartId === null) {\n      throw new Error(\"Missing the required parameter 'cartId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'cart_id': cartId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/carts/{cart_id}/lines', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add cart line item\n   * Add a new line item to an existing cart.\n   * @param {String} storeId The store id.\n   * @param {String} cartId The id for the cart.\n   * @param {module:model/EcommerceCartLineItem3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCartLineItem}\n   */\n  this.addCartLineItem = function(storeId, cartId, body) {\n    return this.addCartLineItemWithHttpInfo(storeId, cartId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add customer\n   * Add a new customer to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceCustomer3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCustomer} and HTTP response\n   */\n  this.addStoreCustomerWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add customer\n   * Add a new customer to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceCustomer3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCustomer}\n   */\n  this.addStoreCustomer = function(storeId, body) {\n    return this.addStoreCustomerWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add order\n   * Add a new order to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceOrder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrder} and HTTP response\n   */\n  this.addStoreOrderWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add order\n   * Add a new order to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceOrder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrder}\n   */\n  this.addStoreOrder = function(storeId, body) {\n    return this.addStoreOrderWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add order line item\n   * Add a new line item to an existing order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {module:model/EcommerceOrderLineItem3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceOrderLineItem} and HTTP response\n   */\n  this.addOrderLineItemWithHttpInfo = function(storeId, orderId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'orderId' is set\n    if (orderId === undefined || orderId === null) {\n      throw new Error(\"Missing the required parameter 'orderId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'order_id': orderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/orders/{order_id}/lines', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add order line item\n   * Add a new line item to an existing order.\n   * @param {String} storeId The store id.\n   * @param {String} orderId The id for the order in a store.\n   * @param {module:model/EcommerceOrderLineItem3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceOrderLineItem}\n   */\n  this.addOrderLineItem = function(storeId, orderId, body) {\n    return this.addOrderLineItemWithHttpInfo(storeId, orderId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add product\n   * Add a new product to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceProduct1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProduct} and HTTP response\n   */\n  this.addStoreProductWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add product\n   * Add a new product to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommerceProduct1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProduct}\n   */\n  this.addStoreProduct = function(storeId, body) {\n    return this.addStoreProductWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add product image\n   * Add a new image to the product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProductImage3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductImage} and HTTP response\n   */\n  this.addProductImageWithHttpInfo = function(storeId, productId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/images', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add product image\n   * Add a new image to the product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProductImage3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductImage}\n   */\n  this.addProductImage = function(storeId, productId, body) {\n    return this.addProductImageWithHttpInfo(storeId, productId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add product variant\n   * Add a new variant to the product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProductVariant3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductVariant} and HTTP response\n   */\n  this.addProductVariantsWithHttpInfo = function(storeId, productId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add product variant\n   * Add a new variant to the product.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {module:model/EcommerceProductVariant3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductVariant}\n   */\n  this.addProductVariants = function(storeId, productId, body) {\n    return this.addProductVariantsWithHttpInfo(storeId, productId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add promo code\n   * Add a new promo code to a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {module:model/EcommercePromoCode1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoCode} and HTTP response\n   */\n  this.addPromoCodeWithHttpInfo = function(storeId, promoRuleId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'promoRuleId' is set\n    if (promoRuleId === undefined || promoRuleId === null) {\n      throw new Error(\"Missing the required parameter 'promoRuleId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'promo_rule_id': promoRuleId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules/{promo_rule_id}/promo-codes', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add promo code\n   * Add a new promo code to a store.\n   * @param {String} storeId The store id.\n   * @param {String} promoRuleId The id for the promo rule of a store.\n   * @param {module:model/EcommercePromoCode1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoCode}\n   */\n  this.addPromoCode = function(storeId, promoRuleId, body) {\n    return this.addPromoCodeWithHttpInfo(storeId, promoRuleId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add promo rule\n   * Add a new promo rule to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommercePromoRule1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommercePromoRule} and HTTP response\n   */\n  this.addPromoRulesWithHttpInfo = function(storeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/promo-rules', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add promo rule\n   * Add a new promo rule to a store.\n   * @param {String} storeId The store id.\n   * @param {module:model/EcommercePromoRule1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommercePromoRule}\n   */\n  this.addPromoRules = function(storeId, body) {\n    return this.addPromoRulesWithHttpInfo(storeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add or update customer\n   * Add or update a customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {module:model/EcommerceCustomer4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceCustomer} and HTTP response\n   */\n  this.setStoreCustomerWithHttpInfo = function(storeId, customerId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'customerId' is set\n    if (customerId === undefined || customerId === null) {\n      throw new Error(\"Missing the required parameter 'customerId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'customer_id': customerId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/customers/{customer_id}', 'PUT',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add or update customer\n   * Add or update a customer.\n   * @param {String} storeId The store id.\n   * @param {String} customerId The id for the customer of a store.\n   * @param {module:model/EcommerceCustomer4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceCustomer}\n   */\n  this.setStoreCustomer = function(storeId, customerId, body) {\n    return this.setStoreCustomerWithHttpInfo(storeId, customerId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add or update product variant\n   * Add or update a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {module:model/EcommerceProductVariant4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EcommerceProductVariant} and HTTP response\n   */\n  this.addProductVariantWithHttpInfo = function(storeId, productId, variantId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'storeId' is set\n    if (storeId === undefined || storeId === null) {\n      throw new Error(\"Missing the required parameter 'storeId' when calling \");\n    }\n\n    // verify the required parameter 'productId' is set\n    if (productId === undefined || productId === null) {\n      throw new Error(\"Missing the required parameter 'productId' when calling \");\n    }\n\n    // verify the required parameter 'variantId' is set\n    if (variantId === undefined || variantId === null) {\n      throw new Error(\"Missing the required parameter 'variantId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'store_id': storeId,\n      'product_id': productId,\n      'variant_id': variantId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}', 'PUT',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add or update product variant\n   * Add or update a product variant.\n   * @param {String} storeId The store id.\n   * @param {String} productId The id for the product of a store.\n   * @param {String} variantId The id for the product variant.\n   * @param {module:model/EcommerceProductVariant4} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EcommerceProductVariant}\n   */\n  this.addProductVariant = function(storeId, productId, variantId, body) {\n    return this.addProductVariantWithHttpInfo(storeId, productId, variantId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/FacebookAdsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * FacebookAds service.\n * @module api/FacebookAdsApi\n */\n\n/**\n * Constructs a new FacebookAdsApi. \n * @alias module:api/FacebookAdsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List facebook ads\n   * Get list of Facebook ads.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2008} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/facebook-ads', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List facebook ads\n   * Get list of Facebook ads.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2008}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get facebook ad info\n   * Get details of a Facebook ad.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2009} and HTTP response\n   */\n  this.getAdWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/facebook-ads/{outreach_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get facebook ad info\n   * Get details of a Facebook ad.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2009}\n   */\n  this.getAd = function(outreachId, opts) {\n    return this.getAdWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/FileManagerApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * FileManager service.\n * @module api/FileManagerApi\n */\n\n/**\n * Constructs a new FileManagerApi. \n * @alias module:api/FileManagerApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete file\n   * Remove a specific file from the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteFileWithHttpInfo = function(fileId) {\n    var postBody = null;\n\n    // verify the required parameter 'fileId' is set\n    if (fileId === undefined || fileId === null) {\n      throw new Error(\"Missing the required parameter 'fileId' when calling \");\n    }\n\n    var pathParams = {\n      'file_id': fileId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/files/{file_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete file\n   * Remove a specific file from the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteFile = function(fileId) {\n    return this.deleteFileWithHttpInfo(fileId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete folder\n   * Delete a specific folder in the File Manager.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteFolderWithHttpInfo = function(folderId) {\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/folders/{folder_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete folder\n   * Delete a specific folder in the File Manager.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteFolder = function(folderId) {\n    return this.deleteFolderWithHttpInfo(folderId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List stored files\n   * Get a list of available images and files stored in the File Manager for the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type The file type for the File Manager file.\n   * @param {String} opts.createdBy The Mailchimp account user who created the File Manager file.\n   * @param {String} opts.beforeCreatedAt Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCreatedAt Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileManager} and HTTP response\n   */\n  this.filesWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'created_by': ( opts['createdBy'] ? opts['createdBy'] : opts['created_by']),\n      'before_created_at': ( opts['beforeCreatedAt'] ? opts['beforeCreatedAt'] : opts['before_created_at']),\n      'since_created_at': ( opts['sinceCreatedAt'] ? opts['sinceCreatedAt'] : opts['since_created_at']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/files', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List stored files\n   * Get a list of available images and files stored in the File Manager for the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type The file type for the File Manager file.\n   * @param {String} opts.createdBy The Mailchimp account user who created the File Manager file.\n   * @param {String} opts.beforeCreatedAt Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCreatedAt Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileManager}\n   */\n  this.files = function(opts) {\n    return this.filesWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get file\n   * Get information about a specific file in the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFile} and HTTP response\n   */\n  this.getFileWithHttpInfo = function(fileId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'fileId' is set\n    if (fileId === undefined || fileId === null) {\n      throw new Error(\"Missing the required parameter 'fileId' when calling \");\n    }\n\n    var pathParams = {\n      'file_id': fileId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/files/{file_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get file\n   * Get information about a specific file in the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFile}\n   */\n  this.getFile = function(fileId, opts) {\n    return this.getFileWithHttpInfo(fileId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List folders\n   * Get a list of all folders in the File Manager.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.createdBy The Mailchimp account user who created the File Manager file.\n   * @param {String} opts.beforeCreatedAt Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCreatedAt Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileManagerFolders} and HTTP response\n   */\n  this.listFoldersWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'created_by': ( opts['createdBy'] ? opts['createdBy'] : opts['created_by']),\n      'before_created_at': ( opts['beforeCreatedAt'] ? opts['beforeCreatedAt'] : opts['before_created_at']),\n      'since_created_at': ( opts['sinceCreatedAt'] ? opts['sinceCreatedAt'] : opts['since_created_at'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/folders', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List folders\n   * Get a list of all folders in the File Manager.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.createdBy The Mailchimp account user who created the File Manager file.\n   * @param {String} opts.beforeCreatedAt Restrict the response to files created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCreatedAt Restrict the response to files created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileManagerFolders}\n   */\n  this.listFolders = function(opts) {\n    return this.listFoldersWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get folder\n   * Get information about a specific folder in the File Manager.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFolder} and HTTP response\n   */\n  this.getFolderWithHttpInfo = function(folderId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/folders/{folder_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get folder\n   * Get information about a specific folder in the File Manager.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFolder}\n   */\n  this.getFolder = function(folderId, opts) {\n    return this.getFolderWithHttpInfo(folderId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update file\n   * Update a file in the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @param {module:model/GalleryFile2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFile} and HTTP response\n   */\n  this.updateFileWithHttpInfo = function(fileId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'fileId' is set\n    if (fileId === undefined || fileId === null) {\n      throw new Error(\"Missing the required parameter 'fileId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'file_id': fileId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/files/{file_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update file\n   * Update a file in the File Manager.\n   * @param {String} fileId The unique id for the File Manager file.\n   * @param {module:model/GalleryFile2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFile}\n   */\n  this.updateFile = function(fileId, body) {\n    return this.updateFileWithHttpInfo(fileId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update folder\n   * Update a specific File Manager folder.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @param {module:model/GalleryFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFolder} and HTTP response\n   */\n  this.updateFolderWithHttpInfo = function(folderId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/folders/{folder_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update folder\n   * Update a specific File Manager folder.\n   * @param {String} folderId The unique id for the File Manager folder.\n   * @param {module:model/GalleryFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFolder}\n   */\n  this.updateFolder = function(folderId, body) {\n    return this.updateFolderWithHttpInfo(folderId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add file\n   * Upload a new image or file to the File Manager.\n   * @param {module:model/GalleryFile1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFile} and HTTP response\n   */\n  this.uploadWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/files', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add file\n   * Upload a new image or file to the File Manager.\n   * @param {module:model/GalleryFile1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFile}\n   */\n  this.upload = function(body) {\n    return this.uploadWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add folder\n   * Create a new folder in the File Manager.\n   * @param {module:model/GalleryFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GalleryFolder} and HTTP response\n   */\n  this.createFolderWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/file-manager/folders', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add folder\n   * Create a new folder in the File Manager.\n   * @param {module:model/GalleryFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GalleryFolder}\n   */\n  this.createFolder = function(body) {\n    return this.createFolderWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/LandingPagesApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * LandingPages service.\n * @module api/LandingPagesApi\n */\n\n/**\n * Constructs a new LandingPagesApi. \n * @alias module:api/LandingPagesApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete landing page\n   * Delete a landing page.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deletePageWithHttpInfo = function(pageId) {\n    var postBody = null;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete landing page\n   * Delete a landing page.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deletePage = function(pageId) {\n    return this.deletePageWithHttpInfo(pageId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List landing pages\n   * Get all landing pages.\n   * @param {Object} opts Optional parameters\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2006} and HTTP response\n   */\n  this.getAllWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List landing pages\n   * Get all landing pages.\n   * @param {Object} opts Optional parameters\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2006}\n   */\n  this.getAll = function(opts) {\n    return this.getAllWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get landing page info\n   * Get information about a specific page.\n   * @param {String} pageId The unique id for the page.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LandingPage} and HTTP response\n   */\n  this.getPageWithHttpInfo = function(pageId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get landing page info\n   * Get information about a specific page.\n   * @param {String} pageId The unique id for the page.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LandingPage}\n   */\n  this.getPage = function(pageId, opts) {\n    return this.getPageWithHttpInfo(pageId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get landing page content\n   * Get the the HTML for your landing page.\n   * @param {String} pageId The unique id for the page.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LandingPageContent} and HTTP response\n   */\n  this.getPageContentWithHttpInfo = function(pageId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}/content', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get landing page content\n   * Get the the HTML for your landing page.\n   * @param {String} pageId The unique id for the page.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LandingPageContent}\n   */\n  this.getPageContent = function(pageId, opts) {\n    return this.getPageContentWithHttpInfo(pageId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update landing page\n   * Update a landing page.\n   * @param {String} pageId The unique id for the page.\n   * @param {module:model/LandingPage2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LandingPage} and HTTP response\n   */\n  this.updatePageWithHttpInfo = function(pageId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update landing page\n   * Update a landing page.\n   * @param {String} pageId The unique id for the page.\n   * @param {module:model/LandingPage2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LandingPage}\n   */\n  this.updatePage = function(pageId, body) {\n    return this.updatePageWithHttpInfo(pageId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add landing page\n   * Create a new Mailchimp landing page.\n   * @param {module:model/LandingPage1} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.useDefaultList Will create the Landing Page using the account's Default List instead of requiring a list_id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LandingPage} and HTTP response\n   */\n  this.createWithHttpInfo = function(body, opts) {\n    opts = opts || {};\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'use_default_list': ( opts['useDefaultList'] ? opts['useDefaultList'] : opts['use_default_list'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add landing page\n   * Create a new Mailchimp landing page.\n   * @param {module:model/LandingPage1} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.useDefaultList Will create the Landing Page using the account's Default List instead of requiring a list_id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LandingPage}\n   */\n  this.create = function(body, opts) {\n    return this.createWithHttpInfo(body, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Publish landing page\n   * Publish a landing page that is in draft, unpublished, or has been previously published and edited.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.publishPageWithHttpInfo = function(pageId) {\n    var postBody = null;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}/actions/publish', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Publish landing page\n   * Publish a landing page that is in draft, unpublished, or has been previously published and edited.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.publishPage = function(pageId) {\n    return this.publishPageWithHttpInfo(pageId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Unpublish landing page\n   * Unpublish a landing page that is in draft or has been published.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.unpublishPageWithHttpInfo = function(pageId) {\n    var postBody = null;\n\n    // verify the required parameter 'pageId' is set\n    if (pageId === undefined || pageId === null) {\n      throw new Error(\"Missing the required parameter 'pageId' when calling \");\n    }\n\n    var pathParams = {\n      'page_id': pageId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/landing-pages/{page_id}/actions/unpublish', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Unpublish landing page\n   * Unpublish a landing page that is in draft or has been published.\n   * @param {String} pageId The unique id for the page.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.unpublishPage = function(pageId) {\n    return this.unpublishPageWithHttpInfo(pageId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ListsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Lists service.\n * @module api/ListsApi\n */\n\n/**\n * Constructs a new ListsApi. \n * @alias module:api/ListsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete list\n   * Delete a list from your Mailchimp account. If you delete a list, you'll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListWithHttpInfo = function(listId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete list\n   * Delete a list from your Mailchimp account. If you delete a list, you'll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteList = function(listId) {\n    return this.deleteListWithHttpInfo(listId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete interest category\n   * Delete a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteInterestCategoryWithHttpInfo = function(listId, interestCategoryId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete interest category\n   * Delete a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteInterestCategory = function(listId, interestCategoryId) {\n    return this.deleteInterestCategoryWithHttpInfo(listId, interestCategoryId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete interest in category\n   * Delete interests or group names in a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteInterestCategoryInterestWithHttpInfo = function(listId, interestCategoryId, interestId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    // verify the required parameter 'interestId' is set\n    if (interestId === undefined || interestId === null) {\n      throw new Error(\"Missing the required parameter 'interestId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId,\n      'interest_id': interestId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete interest in category\n   * Delete interests or group names in a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteInterestCategoryInterest = function(listId, interestCategoryId, interestId) {\n    return this.deleteInterestCategoryInterestWithHttpInfo(listId, interestCategoryId, interestId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Archive list member\n   * Archive a list member. To permanently delete, use the delete-permanent action.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListMemberWithHttpInfo = function(listId, subscriberHash) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Archive list member\n   * Archive a list member. To permanently delete, use the delete-permanent action.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteListMember = function(listId, subscriberHash) {\n    return this.deleteListMemberWithHttpInfo(listId, subscriberHash)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete note\n   * Delete a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListMemberNoteWithHttpInfo = function(listId, subscriberHash, noteId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'noteId' is set\n    if (noteId === undefined || noteId === null) {\n      throw new Error(\"Missing the required parameter 'noteId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash,\n      'note_id': noteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete note\n   * Delete a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteListMemberNote = function(listId, subscriberHash, noteId) {\n    return this.deleteListMemberNoteWithHttpInfo(listId, subscriberHash, noteId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete merge field\n   * Delete a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListMergeFieldWithHttpInfo = function(listId, mergeId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'mergeId' is set\n    if (mergeId === undefined || mergeId === null) {\n      throw new Error(\"Missing the required parameter 'mergeId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'merge_id': mergeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/merge-fields/{merge_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete merge field\n   * Delete a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteListMergeField = function(listId, mergeId) {\n    return this.deleteListMergeFieldWithHttpInfo(listId, mergeId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete segment\n   * Delete a specific segment in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteSegmentWithHttpInfo = function(listId, segmentId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete segment\n   * Delete a specific segment in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteSegment = function(listId, segmentId) {\n    return this.deleteSegmentWithHttpInfo(listId, segmentId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Remove list member from segment\n   * Remove a member from the specified static segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeSegmentMemberWithHttpInfo = function(listId, segmentId, subscriberHash) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Remove list member from segment\n   * Remove a member from the specified static segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.removeSegmentMember = function(listId, segmentId, subscriberHash) {\n    return this.removeSegmentMemberWithHttpInfo(listId, segmentId, subscriberHash)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete webhook\n   * Delete a specific webhook in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListWebhookWithHttpInfo = function(listId, webhookId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'webhookId' is set\n    if (webhookId === undefined || webhookId === null) {\n      throw new Error(\"Missing the required parameter 'webhookId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'webhook_id': webhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/webhooks/{webhook_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete webhook\n   * Delete a specific webhook in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteListWebhook = function(listId, webhookId) {\n    return this.deleteListWebhookWithHttpInfo(listId, webhookId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List member tags\n   * Get the tags on a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfTags} and HTTP response\n   */\n  this.getListMemberTagsWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/tags', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List member tags\n   * Get the tags on a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfTags}\n   */\n  this.getListMemberTags = function(listId, subscriberHash, opts) {\n    return this.getListMemberTagsWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get lists info\n   * Get information about all lists in the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.beforeDateCreated Restrict response to lists created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceDateCreated Restrict results to lists created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeCampaignLastSent Restrict results to lists created before the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCampaignLastSent Restrict results to lists created after the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.email Restrict results to lists that include a specific subscriber's email address.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Boolean} opts.hasEcommerceStore Restrict results to lists that contain an active, connected, undeleted ecommerce store.\n   * @param {Boolean} opts.includeTotalContacts Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberLists} and HTTP response\n   */\n  this.getAllListsWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'before_date_created': ( opts['beforeDateCreated'] ? opts['beforeDateCreated'] : opts['before_date_created']),\n      'since_date_created': ( opts['sinceDateCreated'] ? opts['sinceDateCreated'] : opts['since_date_created']),\n      'before_campaign_last_sent': ( opts['beforeCampaignLastSent'] ? opts['beforeCampaignLastSent'] : opts['before_campaign_last_sent']),\n      'since_campaign_last_sent': ( opts['sinceCampaignLastSent'] ? opts['sinceCampaignLastSent'] : opts['since_campaign_last_sent']),\n      'email': ( opts['email'] ? opts['email'] : opts['email']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir']),\n      'has_ecommerce_store': ( opts['hasEcommerceStore'] ? opts['hasEcommerceStore'] : opts['has_ecommerce_store']),\n      'include_total_contacts': ( opts['includeTotalContacts'] ? opts['includeTotalContacts'] : opts['include_total_contacts'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get lists info\n   * Get information about all lists in the account.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.beforeDateCreated Restrict response to lists created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceDateCreated Restrict results to lists created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeCampaignLastSent Restrict results to lists created before the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceCampaignLastSent Restrict results to lists created after the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.email Restrict results to lists that include a specific subscriber's email address.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Boolean} opts.hasEcommerceStore Restrict results to lists that contain an active, connected, undeleted ecommerce store.\n   * @param {Boolean} opts.includeTotalContacts Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberLists}\n   */\n  this.getAllLists = function(opts) {\n    return this.getAllListsWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get list info\n   * Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Boolean} opts.includeTotalContacts Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberList} and HTTP response\n   */\n  this.getListWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'include_total_contacts': ( opts['includeTotalContacts'] ? opts['includeTotalContacts'] : opts['include_total_contacts'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get list info\n   * Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven't confirmed their subscription yet and unsubscribed or cleaned.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Boolean} opts.includeTotalContacts Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberList}\n   */\n  this.getList = function(listId, opts) {\n    return this.getListWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List abuse reports\n   * Get all abuse reports for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AbuseComplaints} and HTTP response\n   */\n  this.getListAbuseReportsWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/abuse-reports', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List abuse reports\n   * Get all abuse reports for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AbuseComplaints}\n   */\n  this.getListAbuseReports = function(listId, opts) {\n    return this.getListAbuseReportsWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get abuse report\n   * Get details about a specific abuse report.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} reportId The id for the abuse report.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AbuseComplaint} and HTTP response\n   */\n  this.getListAbuseReportDetailsWithHttpInfo = function(listId, reportId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'reportId' is set\n    if (reportId === undefined || reportId === null) {\n      throw new Error(\"Missing the required parameter 'reportId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'report_id': reportId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/abuse-reports/{report_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get abuse report\n   * Get details about a specific abuse report.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} reportId The id for the abuse report.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AbuseComplaint}\n   */\n  this.getListAbuseReportDetails = function(listId, reportId, opts) {\n    return this.getListAbuseReportDetailsWithHttpInfo(listId, reportId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List recent activity\n   * Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListActivity} and HTTP response\n   */\n  this.getListRecentActivityWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/activity', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List recent activity\n   * Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListActivity}\n   */\n  this.getListRecentActivity = function(listId, opts) {\n    return this.getListRecentActivityWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List top email clients\n   * Get a list of the top email clients based on user-agent strings.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailClients} and HTTP response\n   */\n  this.getListClientsWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/clients', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List top email clients\n   * Get a list of the top email clients based on user-agent strings.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailClients}\n   */\n  this.getListClients = function(listId, opts) {\n    return this.getListClientsWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List growth history data\n   * Get a month-by-month summary of a specific list's growth activity.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GrowthHistory} and HTTP response\n   */\n  this.getListGrowthHistoryWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/growth-history', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List growth history data\n   * Get a month-by-month summary of a specific list's growth activity.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GrowthHistory}\n   */\n  this.getListGrowthHistory = function(listId, opts) {\n    return this.getListGrowthHistoryWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get growth history by month\n   * Get a summary of a specific list's growth activity for a specific month and year.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} month A specific month of list growth history.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GrowthHistory} and HTTP response\n   */\n  this.getListGrowthHistoryByMonthWithHttpInfo = function(listId, month, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'month' is set\n    if (month === undefined || month === null) {\n      throw new Error(\"Missing the required parameter 'month' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'month': month\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/growth-history/{month}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get growth history by month\n   * Get a summary of a specific list's growth activity for a specific month and year.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} month A specific month of list growth history.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GrowthHistory}\n   */\n  this.getListGrowthHistoryByMonth = function(listId, month, opts) {\n    return this.getListGrowthHistoryByMonthWithHttpInfo(listId, month, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List interest categories\n   * Get information about a list's interest categories.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type Restrict results a type of interest group\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InterestGroupings} and HTTP response\n   */\n  this.getListInterestCategoriesWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List interest categories\n   * Get information about a list's interest categories.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type Restrict results a type of interest group\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InterestGroupings}\n   */\n  this.getListInterestCategories = function(listId, opts) {\n    return this.getListInterestCategoriesWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get interest category info\n   * Get information about a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InterestCategory} and HTTP response\n   */\n  this.getInterestCategoryWithHttpInfo = function(listId, interestCategoryId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get interest category info\n   * Get information about a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InterestCategory}\n   */\n  this.getInterestCategory = function(listId, interestCategoryId, opts) {\n    return this.getInterestCategoryWithHttpInfo(listId, interestCategoryId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List interests in category\n   * Get a list of this category's interests.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Interests} and HTTP response\n   */\n  this.listInterestCategoryInterestsWithHttpInfo = function(listId, interestCategoryId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}/interests', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List interests in category\n   * Get a list of this category's interests.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Interests}\n   */\n  this.listInterestCategoryInterests = function(listId, interestCategoryId, opts) {\n    return this.listInterestCategoryInterestsWithHttpInfo(listId, interestCategoryId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get interest in category\n   * Get interests or 'group names' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Interest} and HTTP response\n   */\n  this.getInterestCategoryInterestWithHttpInfo = function(listId, interestCategoryId, interestId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    // verify the required parameter 'interestId' is set\n    if (interestId === undefined || interestId === null) {\n      throw new Error(\"Missing the required parameter 'interestId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId,\n      'interest_id': interestId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get interest in category\n   * Get interests or 'group names' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Interest}\n   */\n  this.getInterestCategoryInterest = function(listId, interestCategoryId, interestId, opts) {\n    return this.getInterestCategoryInterestWithHttpInfo(listId, interestCategoryId, interestId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List locations\n   * Get the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListLocations} and HTTP response\n   */\n  this.getListLocationsWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/locations', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List locations\n   * Get the locations (countries) that the list's subscribers have been tagged to based on geocoding their IP address.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListLocations}\n   */\n  this.getListLocations = function(listId, opts) {\n    return this.getListLocationsWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List members info\n   * Get information about members in a specific Mailchimp list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.emailType The email type.\n   * @param {module:model/String} opts.status The subscriber's status.\n   * @param {String} opts.sinceTimestampOpt Restrict results to subscribers who opted-in after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeTimestampOpt Restrict results to subscribers who opted-in before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceLastChanged Restrict results to subscribers whose information changed after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeLastChanged Restrict results to subscribers whose information changed before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.uniqueEmailId A unique identifier for the email address across all Mailchimp lists.\n   * @param {Boolean} opts.vipOnly A filter to return only the list's VIP members. Passing `true` will restrict results to VIP list members, passing `false` will return all list members.\n   * @param {String} opts.interestCategoryId The unique id for the interest category.\n   * @param {String} opts.interestIds Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.\n   * @param {module:model/String} opts.interestMatch Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. \\\"any\\\" will match a member with any of the interest supplied, \\\"all\\\" will only match members with every interest supplied, and \\\"none\\\" will match members without any of the interest supplied.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Boolean} opts.sinceLastCampaign Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.\n   * @param {String} opts.unsubscribedSince Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers2} and HTTP response\n   */\n  this.getListMembersInfoWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'email_type': ( opts['emailType'] ? opts['emailType'] : opts['email_type']),\n      'status': ( opts['status'] ? opts['status'] : opts['status']),\n      'since_timestamp_opt': ( opts['sinceTimestampOpt'] ? opts['sinceTimestampOpt'] : opts['since_timestamp_opt']),\n      'before_timestamp_opt': ( opts['beforeTimestampOpt'] ? opts['beforeTimestampOpt'] : opts['before_timestamp_opt']),\n      'since_last_changed': ( opts['sinceLastChanged'] ? opts['sinceLastChanged'] : opts['since_last_changed']),\n      'before_last_changed': ( opts['beforeLastChanged'] ? opts['beforeLastChanged'] : opts['before_last_changed']),\n      'unique_email_id': ( opts['uniqueEmailId'] ? opts['uniqueEmailId'] : opts['unique_email_id']),\n      'vip_only': ( opts['vipOnly'] ? opts['vipOnly'] : opts['vip_only']),\n      'interest_category_id': ( opts['interestCategoryId'] ? opts['interestCategoryId'] : opts['interest_category_id']),\n      'interest_ids': ( opts['interestIds'] ? opts['interestIds'] : opts['interest_ids']),\n      'interest_match': ( opts['interestMatch'] ? opts['interestMatch'] : opts['interest_match']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir']),\n      'since_last_campaign': ( opts['sinceLastCampaign'] ? opts['sinceLastCampaign'] : opts['since_last_campaign']),\n      'unsubscribed_since': ( opts['unsubscribedSince'] ? opts['unsubscribedSince'] : opts['unsubscribed_since'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List members info\n   * Get information about members in a specific Mailchimp list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.emailType The email type.\n   * @param {module:model/String} opts.status The subscriber's status.\n   * @param {String} opts.sinceTimestampOpt Restrict results to subscribers who opted-in after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeTimestampOpt Restrict results to subscribers who opted-in before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.sinceLastChanged Restrict results to subscribers whose information changed after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeLastChanged Restrict results to subscribers whose information changed before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.uniqueEmailId A unique identifier for the email address across all Mailchimp lists.\n   * @param {Boolean} opts.vipOnly A filter to return only the list's VIP members. Passing `true` will restrict results to VIP list members, passing `false` will return all list members.\n   * @param {String} opts.interestCategoryId The unique id for the interest category.\n   * @param {String} opts.interestIds Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.\n   * @param {module:model/String} opts.interestMatch Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. \\\"any\\\" will match a member with any of the interest supplied, \\\"all\\\" will only match members with every interest supplied, and \\\"none\\\" will match members without any of the interest supplied.\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Boolean} opts.sinceLastCampaign Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.\n   * @param {String} opts.unsubscribedSince Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers2}\n   */\n  this.getListMembersInfo = function(listId, opts) {\n    return this.getListMembersInfoWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get member info\n   * Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers2} and HTTP response\n   */\n  this.getListMemberWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get member info\n   * Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers2}\n   */\n  this.getListMember = function(listId, subscriberHash, opts) {\n    return this.getListMemberWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * View recent activity 50\n   * Get the last 50 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.action A comma seperated list of actions to return.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemberActivityEvents} and HTTP response\n   */\n  this.getListMemberActivityWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'action': this.apiClient.buildCollectionParam(opts['action'] ? opts['action'] : opts['action'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/activity', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * View recent activity 50\n   * Get the last 50 events of a member's activity on a specific list, including opens, clicks, and unsubscribes.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.action A comma seperated list of actions to return.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemberActivityEvents}\n   */\n  this.getListMemberActivity = function(listId, subscriberHash, opts) {\n    return this.getListMemberActivityWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * View recent activity\n   * Get a member's activity on a specific list, including opens, clicks, and unsubscribes.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.activityFilters A comma-separated list of activity filters that correspond to a set of activity types, e.g \\\"?activity_filters=open,bounce,click\\\".\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemberActivityEvents1} and HTTP response\n   */\n  this.getListMemberActivityFeedWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'activity_filters': this.apiClient.buildCollectionParam(opts['activityFilters'] ? opts['activityFilters'] : opts['activity_filters'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/activity-feed', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * View recent activity\n   * Get a member's activity on a specific list, including opens, clicks, and unsubscribes.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.activityFilters A comma-separated list of activity filters that correspond to a set of activity types, e.g \\\"?activity_filters=open,bounce,click\\\".\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemberActivityEvents1}\n   */\n  this.getListMemberActivityFeed = function(listId, subscriberHash, opts) {\n    return this.getListMemberActivityFeedWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List member events\n   * Get events for a contact.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfEvents} and HTTP response\n   */\n  this.getListMemberEventsWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/events', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List member events\n   * Get events for a contact.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfEvents}\n   */\n  this.getListMemberEvents = function(listId, subscriberHash, opts) {\n    return this.getListMemberEventsWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List member goal events\n   * Get the last 50 Goal events for a member on a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfMemberActivityEvents} and HTTP response\n   */\n  this.getListMemberGoalsWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/goals', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List member goal events\n   * Get the last 50 Goal events for a member on a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfMemberActivityEvents}\n   */\n  this.getListMemberGoals = function(listId, subscriberHash, opts) {\n    return this.getListMemberGoalsWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List recent member notes\n   * Get recent notes for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {module:model/String} opts.sortField Returns notes sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfNotes} and HTTP response\n   */\n  this.getListMemberNotesWithHttpInfo = function(listId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir']),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/notes', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List recent member notes\n   * Get recent notes for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {module:model/String} opts.sortField Returns notes sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfNotes}\n   */\n  this.getListMemberNotes = function(listId, subscriberHash, opts) {\n    return this.getListMemberNotesWithHttpInfo(listId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get member note\n   * Get a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemberNotes} and HTTP response\n   */\n  this.getListMemberNoteWithHttpInfo = function(listId, subscriberHash, noteId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'noteId' is set\n    if (noteId === undefined || noteId === null) {\n      throw new Error(\"Missing the required parameter 'noteId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash,\n      'note_id': noteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get member note\n   * Get a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemberNotes}\n   */\n  this.getListMemberNote = function(listId, subscriberHash, noteId, opts) {\n    return this.getListMemberNoteWithHttpInfo(listId, subscriberHash, noteId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List merge fields\n   * Get a list of all merge fields for an audience.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type The merge field type.\n   * @param {Boolean} opts.required Whether it's a required merge field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfMergeFields} and HTTP response\n   */\n  this.getListMergeFieldsWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'required': ( opts['required'] ? opts['required'] : opts['required'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/merge-fields', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List merge fields\n   * Get a list of all merge fields for an audience.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type The merge field type.\n   * @param {Boolean} opts.required Whether it's a required merge field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfMergeFields}\n   */\n  this.getListMergeFields = function(listId, opts) {\n    return this.getListMergeFieldsWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get merge field\n   * Get information about a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MergeField} and HTTP response\n   */\n  this.getListMergeFieldWithHttpInfo = function(listId, mergeId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'mergeId' is set\n    if (mergeId === undefined || mergeId === null) {\n      throw new Error(\"Missing the required parameter 'mergeId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'merge_id': mergeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/merge-fields/{merge_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get merge field\n   * Get information about a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MergeField}\n   */\n  this.getListMergeField = function(listId, mergeId, opts) {\n    return this.getListMergeFieldWithHttpInfo(listId, mergeId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get segment info\n   * Get information about a specific segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/List7} and HTTP response\n   */\n  this.getSegmentWithHttpInfo = function(listId, segmentId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'include_cleaned': ( opts['includeCleaned'] ? opts['includeCleaned'] : opts['include_cleaned']),\n      'include_transactional': ( opts['includeTransactional'] ? opts['includeTransactional'] : opts['include_transactional']),\n      'include_unsubscribed': ( opts['includeUnsubscribed'] ? opts['includeUnsubscribed'] : opts['include_unsubscribed'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get segment info\n   * Get information about a specific segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/List7}\n   */\n  this.getSegment = function(listId, segmentId, opts) {\n    return this.getSegmentWithHttpInfo(listId, segmentId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List members in segment\n   * Get information about members in a saved segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SegmentMembers} and HTTP response\n   */\n  this.getSegmentMembersListWithHttpInfo = function(listId, segmentId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'include_cleaned': ( opts['includeCleaned'] ? opts['includeCleaned'] : opts['include_cleaned']),\n      'include_transactional': ( opts['includeTransactional'] ? opts['includeTransactional'] : opts['include_transactional']),\n      'include_unsubscribed': ( opts['includeUnsubscribed'] ? opts['includeUnsubscribed'] : opts['include_unsubscribed'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}/members', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List members in segment\n   * Get information about members in a saved segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SegmentMembers}\n   */\n  this.getSegmentMembersList = function(listId, segmentId, opts) {\n    return this.getSegmentMembersListWithHttpInfo(listId, segmentId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List signup forms\n   * Get signup forms for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListSignupForms} and HTTP response\n   */\n  this.getListSignupFormsWithHttpInfo = function(listId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/signup-forms', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List signup forms\n   * Get signup forms for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListSignupForms}\n   */\n  this.getListSignupForms = function(listId) {\n    return this.getListSignupFormsWithHttpInfo(listId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get information about all surveys for a list\n   * Get information about all available surveys for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.getAllSurveysForListWithHttpInfo = function(listId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/surveys', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get information about all surveys for a list\n   * Get information about all available surveys for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.getAllSurveysForList = function(listId) {\n    return this.getAllSurveysForListWithHttpInfo(listId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get survey\n   * Get details about a specific survey.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.getSurveyWithHttpInfo = function(listId, surveyId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'surveyId' is set\n    if (surveyId === undefined || surveyId === null) {\n      throw new Error(\"Missing the required parameter 'surveyId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'survey_id': surveyId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/surveys/{survey_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get survey\n   * Get details about a specific survey.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.getSurvey = function(listId, surveyId) {\n    return this.getSurveyWithHttpInfo(listId, surveyId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List webhooks\n   * Get information about all webhooks for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWebhooks} and HTTP response\n   */\n  this.getListWebhooksWithHttpInfo = function(listId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/webhooks', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List webhooks\n   * Get information about all webhooks for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWebhooks}\n   */\n  this.getListWebhooks = function(listId) {\n    return this.getListWebhooksWithHttpInfo(listId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get webhook info\n   * Get information about a specific webhook.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWebhooks} and HTTP response\n   */\n  this.getListWebhookWithHttpInfo = function(listId, webhookId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'webhookId' is set\n    if (webhookId === undefined || webhookId === null) {\n      throw new Error(\"Missing the required parameter 'webhookId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'webhook_id': webhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/webhooks/{webhook_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get webhook info\n   * Get information about a specific webhook.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWebhooks}\n   */\n  this.getListWebhook = function(listId, webhookId) {\n    return this.getListWebhookWithHttpInfo(listId, webhookId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update lists\n   * Update the settings for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/SubscriberList2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberList} and HTTP response\n   */\n  this.updateListWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update lists\n   * Update the settings for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/SubscriberList2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberList}\n   */\n  this.updateList = function(listId, body) {\n    return this.updateListWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update interest category\n   * Update a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {module:model/InterestCategory2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InterestCategory} and HTTP response\n   */\n  this.updateInterestCategoryWithHttpInfo = function(listId, interestCategoryId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update interest category\n   * Update a specific interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {module:model/InterestCategory2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InterestCategory}\n   */\n  this.updateInterestCategory = function(listId, interestCategoryId, body) {\n    return this.updateInterestCategoryWithHttpInfo(listId, interestCategoryId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update interest in category\n   * Update interests or 'group names' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @param {module:model/Interest2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Interest} and HTTP response\n   */\n  this.updateInterestCategoryInterestWithHttpInfo = function(listId, interestCategoryId, interestId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    // verify the required parameter 'interestId' is set\n    if (interestId === undefined || interestId === null) {\n      throw new Error(\"Missing the required parameter 'interestId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId,\n      'interest_id': interestId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update interest in category\n   * Update interests or 'group names' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {String} interestId The specific interest or 'group name'.\n   * @param {module:model/Interest2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Interest}\n   */\n  this.updateInterestCategoryInterest = function(listId, interestCategoryId, interestId, body) {\n    return this.updateInterestCategoryInterestWithHttpInfo(listId, interestCategoryId, interestId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update list member\n   * Update information for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/AddListMembers3} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers2} and HTTP response\n   */\n  this.updateListMemberWithHttpInfo = function(listId, subscriberHash, body, opts) {\n    opts = opts || {};\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'skip_merge_validation': ( opts['skipMergeValidation'] ? opts['skipMergeValidation'] : opts['skip_merge_validation'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update list member\n   * Update information for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/AddListMembers3} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers2}\n   */\n  this.updateListMember = function(listId, subscriberHash, body, opts) {\n    return this.updateListMemberWithHttpInfo(listId, subscriberHash, body, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update note\n   * Update a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @param {module:model/MemberNotes2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemberNotes} and HTTP response\n   */\n  this.updateListMemberNoteWithHttpInfo = function(listId, subscriberHash, noteId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'noteId' is set\n    if (noteId === undefined || noteId === null) {\n      throw new Error(\"Missing the required parameter 'noteId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash,\n      'note_id': noteId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update note\n   * Update a specific note for a specific list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {String} noteId The id for the note.\n   * @param {module:model/MemberNotes2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemberNotes}\n   */\n  this.updateListMemberNote = function(listId, subscriberHash, noteId, body) {\n    return this.updateListMemberNoteWithHttpInfo(listId, subscriberHash, noteId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update merge field\n   * Update a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @param {module:model/MergeField2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MergeField} and HTTP response\n   */\n  this.updateListMergeFieldWithHttpInfo = function(listId, mergeId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'mergeId' is set\n    if (mergeId === undefined || mergeId === null) {\n      throw new Error(\"Missing the required parameter 'mergeId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'merge_id': mergeId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/merge-fields/{merge_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update merge field\n   * Update a specific merge field.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} mergeId The id for the merge field.\n   * @param {module:model/MergeField2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MergeField}\n   */\n  this.updateListMergeField = function(listId, mergeId, body) {\n    return this.updateListMergeFieldWithHttpInfo(listId, mergeId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update segment\n   * Update a specific segment in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {module:model/List9} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/List7} and HTTP response\n   */\n  this.updateSegmentWithHttpInfo = function(listId, segmentId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update segment\n   * Update a specific segment in a list.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {module:model/List9} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/List7}\n   */\n  this.updateSegment = function(listId, segmentId, body) {\n    return this.updateSegmentWithHttpInfo(listId, segmentId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update webhook\n   * Update the settings for an existing webhook.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @param {module:model/AddWebhook1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWebhooks} and HTTP response\n   */\n  this.updateListWebhookWithHttpInfo = function(listId, webhookId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'webhookId' is set\n    if (webhookId === undefined || webhookId === null) {\n      throw new Error(\"Missing the required parameter 'webhookId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'webhook_id': webhookId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/webhooks/{webhook_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update webhook\n   * Update the settings for an existing webhook.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} webhookId The webhook's id.\n   * @param {module:model/AddWebhook1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWebhooks}\n   */\n  this.updateListWebhook = function(listId, webhookId, body) {\n    return this.updateListWebhookWithHttpInfo(listId, webhookId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add event\n   * Add an event for a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/Events} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.createListMemberEventWithHttpInfo = function(listId, subscriberHash, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/events', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add event\n   * Add an event for a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/Events} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.createListMemberEvent = function(listId, subscriberHash, body) {\n    return this.createListMemberEventWithHttpInfo(listId, subscriberHash, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add or remove member tags\n   * Add or remove tags from a list member. If a tag that does not exist is passed in and set as 'active', a new tag will be created.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {module:model/MemberTags} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.updateListMemberTagsWithHttpInfo = function(listId, subscriberHash, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/tags', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add or remove member tags\n   * Add or remove tags from a list member. If a tag that does not exist is passed in and set as 'active', a new tag will be created.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {module:model/MemberTags} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.updateListMemberTags = function(listId, subscriberHash, body) {\n    return this.updateListMemberTagsWithHttpInfo(listId, subscriberHash, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add list\n   * Create a new list in your Mailchimp account.\n   * @param {module:model/SubscriberList1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SubscriberList} and HTTP response\n   */\n  this.createListWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add list\n   * Create a new list in your Mailchimp account.\n   * @param {module:model/SubscriberList1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SubscriberList}\n   */\n  this.createList = function(body) {\n    return this.createListWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Batch subscribe or unsubscribe\n   * Batch subscribe or unsubscribe list members.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/MembersToSubscribeUnsubscribeTofromAListInBatch} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @param {Boolean} opts.skipDuplicateCheck If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchUpdateListMembers} and HTTP response\n   */\n  this.batchListMembersWithHttpInfo = function(listId, body, opts) {\n    opts = opts || {};\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'skip_merge_validation': ( opts['skipMergeValidation'] ? opts['skipMergeValidation'] : opts['skip_merge_validation']),\n      'skip_duplicate_check': ( opts['skipDuplicateCheck'] ? opts['skipDuplicateCheck'] : opts['skip_duplicate_check'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Batch subscribe or unsubscribe\n   * Batch subscribe or unsubscribe list members.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/MembersToSubscribeUnsubscribeTofromAListInBatch} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @param {Boolean} opts.skipDuplicateCheck If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchUpdateListMembers}\n   */\n  this.batchListMembers = function(listId, body, opts) {\n    return this.batchListMembersWithHttpInfo(listId, body, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add interest category\n   * Create a new interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/InterestCategory1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InterestCategory} and HTTP response\n   */\n  this.createListInterestCategoryWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add interest category\n   * Create a new interest category.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/InterestCategory1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InterestCategory}\n   */\n  this.createListInterestCategory = function(listId, body) {\n    return this.createListInterestCategoryWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add interest in category\n   * Create a new interest or 'group name' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {module:model/Interest1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Interest} and HTTP response\n   */\n  this.createInterestCategoryInterestWithHttpInfo = function(listId, interestCategoryId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'interestCategoryId' is set\n    if (interestCategoryId === undefined || interestCategoryId === null) {\n      throw new Error(\"Missing the required parameter 'interestCategoryId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'interest_category_id': interestCategoryId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/interest-categories/{interest_category_id}/interests', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add interest in category\n   * Create a new interest or 'group name' for a specific category.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} interestCategoryId The unique ID for the interest category.\n   * @param {module:model/Interest1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Interest}\n   */\n  this.createInterestCategoryInterest = function(listId, interestCategoryId, body) {\n    return this.createInterestCategoryInterestWithHttpInfo(listId, interestCategoryId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add member to list\n   * Add a new member to the list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/AddListMembers1} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers2} and HTTP response\n   */\n  this.addListMemberWithHttpInfo = function(listId, body, opts) {\n    opts = opts || {};\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'skip_merge_validation': ( opts['skipMergeValidation'] ? opts['skipMergeValidation'] : opts['skip_merge_validation'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add member to list\n   * Add a new member to the list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/AddListMembers1} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers2}\n   */\n  this.addListMember = function(listId, body, opts) {\n    return this.addListMemberWithHttpInfo(listId, body, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete list member\n   * Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteListMemberPermanentWithHttpInfo = function(listId, subscriberHash) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete list member\n   * Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteListMemberPermanent = function(listId, subscriberHash) {\n    return this.deleteListMemberPermanentWithHttpInfo(listId, subscriberHash)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add member note\n   * Add a new note for a specific subscriber.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {module:model/MemberNotes1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MemberNotes} and HTTP response\n   */\n  this.createListMemberNoteWithHttpInfo = function(listId, subscriberHash, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}/notes', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add member note\n   * Add a new note for a specific subscriber.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {module:model/MemberNotes1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MemberNotes}\n   */\n  this.createListMemberNote = function(listId, subscriberHash, body) {\n    return this.createListMemberNoteWithHttpInfo(listId, subscriberHash, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add merge field\n   * Add a new merge field for a specific audience.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/MergeField1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/MergeField} and HTTP response\n   */\n  this.addListMergeFieldWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/merge-fields', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add merge field\n   * Add a new merge field for a specific audience.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/MergeField1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/MergeField}\n   */\n  this.addListMergeField = function(listId, body) {\n    return this.addListMergeFieldWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add segment\n   * Create a new segment in a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/List8} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/List7} and HTTP response\n   */\n  this.createSegmentWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add segment\n   * Create a new segment in a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/List8} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/List7}\n   */\n  this.createSegment = function(listId, body) {\n    return this.createSegmentWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Batch add or remove members\n   * Batch add/remove list members to static segment\n   * @param {module:model/MembersToAddremoveTofromAStaticSegment} body \n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/BatchAddremoveListMembersTofromStaticSegment} and HTTP response\n   */\n  this.batchSegmentMembersWithHttpInfo = function(body, listId, segmentId) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Batch add or remove members\n   * Batch add/remove list members to static segment\n   * @param {module:model/MembersToAddremoveTofromAStaticSegment} body \n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/BatchAddremoveListMembersTofromStaticSegment}\n   */\n  this.batchSegmentMembers = function(body, listId, segmentId) {\n    return this.batchSegmentMembersWithHttpInfo(body, listId, segmentId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add member to segment\n   * Add a member to a static segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {module:model/Body3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers1} and HTTP response\n   */\n  this.createSegmentMemberWithHttpInfo = function(listId, segmentId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'segmentId' is set\n    if (segmentId === undefined || segmentId === null) {\n      throw new Error(\"Missing the required parameter 'segmentId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'segment_id': segmentId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments/{segment_id}/members', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add member to segment\n   * Add a member to a static segment.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} segmentId The unique id for the segment.\n   * @param {module:model/Body3} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers1}\n   */\n  this.createSegmentMember = function(listId, segmentId, body) {\n    return this.createSegmentMemberWithHttpInfo(listId, segmentId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Customize signup form\n   * Customize a list's default signup form.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/SignupForm1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SignupForm} and HTTP response\n   */\n  this.updateListSignupFormWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/signup-forms', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Customize signup form\n   * Customize a list's default signup form.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/SignupForm1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SignupForm}\n   */\n  this.updateListSignupForm = function(listId, body) {\n    return this.updateListSignupFormWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add webhook\n   * Create a new webhook for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/AddWebhook} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListWebhooks} and HTTP response\n   */\n  this.createListWebhookWithHttpInfo = function(listId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/webhooks', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add webhook\n   * Create a new webhook for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {module:model/AddWebhook} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListWebhooks}\n   */\n  this.createListWebhook = function(listId, body) {\n    return this.createListWebhookWithHttpInfo(listId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List segments\n   * Get information about all available segments for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type Limit results based on segment type.\n   * @param {String} opts.sinceCreatedAt Restrict results to segments created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeCreatedAt Restrict results to segments created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @param {String} opts.sinceUpdatedAt Restrict results to segments update after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeUpdatedAt Restrict results to segments update before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CollectionOfSegments} and HTTP response\n   */\n  this.listSegmentsWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'since_created_at': ( opts['sinceCreatedAt'] ? opts['sinceCreatedAt'] : opts['since_created_at']),\n      'before_created_at': ( opts['beforeCreatedAt'] ? opts['beforeCreatedAt'] : opts['before_created_at']),\n      'include_cleaned': ( opts['includeCleaned'] ? opts['includeCleaned'] : opts['include_cleaned']),\n      'include_transactional': ( opts['includeTransactional'] ? opts['includeTransactional'] : opts['include_transactional']),\n      'include_unsubscribed': ( opts['includeUnsubscribed'] ? opts['includeUnsubscribed'] : opts['include_unsubscribed']),\n      'since_updated_at': ( opts['sinceUpdatedAt'] ? opts['sinceUpdatedAt'] : opts['since_updated_at']),\n      'before_updated_at': ( opts['beforeUpdatedAt'] ? opts['beforeUpdatedAt'] : opts['before_updated_at'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/segments', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List segments\n   * Get information about all available segments for a specific list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.type Limit results based on segment type.\n   * @param {String} opts.sinceCreatedAt Restrict results to segments created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeCreatedAt Restrict results to segments created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Boolean} opts.includeCleaned Include cleaned members in response\n   * @param {Boolean} opts.includeTransactional Include transactional members in response\n   * @param {Boolean} opts.includeUnsubscribed Include unsubscribed members in response\n   * @param {String} opts.sinceUpdatedAt Restrict results to segments update after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeUpdatedAt Restrict results to segments update before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CollectionOfSegments}\n   */\n  this.listSegments = function(listId, opts) {\n    return this.listSegmentsWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add or update list member\n   * Add or update a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/AddListMembers2} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ListMembers2} and HTTP response\n   */\n  this.setListMemberWithHttpInfo = function(listId, subscriberHash, body, opts) {\n    opts = opts || {};\n    var postBody = body;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'skip_merge_validation': ( opts['skipMergeValidation'] ? opts['skipMergeValidation'] : opts['skip_merge_validation'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/members/{subscriber_hash}', 'PUT',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add or update list member\n   * Add or update a list member.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address. This endpoint also accepts a list member's email address or contact_id.\n   * @param {module:model/AddListMembers2} body \n   * @param {Object} opts Optional parameters\n   * @param {Boolean} opts.skipMergeValidation If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ListMembers2}\n   */\n  this.setListMember = function(listId, subscriberHash, body, opts) {\n    return this.setListMemberWithHttpInfo(listId, subscriberHash, body, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Search for tags on a list by name.\n   * Search for tags on a list by name. If no name is provided, will return all tags on the list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {String} opts.name The search query used to filter tags.  The search query will be compared to each tag as a prefix, so all tags that have a name starting with this field will be returned.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagSearchResults} and HTTP response\n   */\n  this.tagSearchWithHttpInfo = function(listId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'name': ( opts['name'] ? opts['name'] : opts['name'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/tag-search', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Search for tags on a list by name.\n   * Search for tags on a list by name. If no name is provided, will return all tags on the list.\n   * @param {String} listId The unique ID for the list.\n   * @param {Object} opts Optional parameters\n   * @param {String} opts.name The search query used to filter tags.  The search query will be compared to each tag as a prefix, so all tags that have a name starting with this field will be returned.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagSearchResults}\n   */\n  this.tagSearch = function(listId, opts) {\n    return this.tagSearchWithHttpInfo(listId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/PingApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Ping service.\n * @module api/PingApi\n */\n\n/**\n * Constructs a new PingApi. \n * @alias module:api/PingApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Ping\n   * A health check for the API that won't return any account-specific information.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/APIHealthStatus} and HTTP response\n   */\n  this.getWithHttpInfo = function() {\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/ping', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Ping\n   * A health check for the API that won't return any account-specific information.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/APIHealthStatus}\n   */\n  this.get = function() {\n    return this.getWithHttpInfo()\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ReportingApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Reporting service.\n * @module api/ReportingApi\n */\n\n/**\n * Constructs a new ReportingApi. \n * @alias module:api/ReportingApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List facebook ads reports\n   * Get reports of Facebook ads.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20010} and HTTP response\n   */\n  this.getFacebookAdsReportAllWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/facebook-ads', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List facebook ads reports\n   * Get reports of Facebook ads.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20010}\n   */\n  this.getFacebookAdsReportAll = function(opts) {\n    return this.getFacebookAdsReportAllWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get facebook ad report\n   * Get report of a Facebook ad.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20011} and HTTP response\n   */\n  this.getFacebookAdReportWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/facebook-ads/{outreach_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get facebook ad report\n   * Get report of a Facebook ad.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20011}\n   */\n  this.getFacebookAdReport = function(outreachId, opts) {\n    return this.getFacebookAdReportWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List facebook ecommerce report\n   * Get breakdown of product activity for an outreach.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2007} and HTTP response\n   */\n  this.getFacebookAdProductActivityReportWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/facebook-ads/{outreach_id}/ecommerce-product-activity', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List facebook ecommerce report\n   * Get breakdown of product activity for an outreach.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2007}\n   */\n  this.getFacebookAdProductActivityReport = function(outreachId, opts) {\n    return this.getFacebookAdProductActivityReportWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List landing pages reports\n   * Get reports of landing pages.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20012} and HTTP response\n   */\n  this.getLandingPageReportsAllWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/landing-pages', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List landing pages reports\n   * Get reports of landing pages.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20012}\n   */\n  this.getLandingPageReportsAll = function(opts) {\n    return this.getLandingPageReportsAllWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get landing page report\n   * Get report of a landing page.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LandingPageReport} and HTTP response\n   */\n  this.getLandingPageReportWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/landing-pages/{outreach_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get landing page report\n   * Get report of a landing page.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LandingPageReport}\n   */\n  this.getLandingPageReport = function(outreachId, opts) {\n    return this.getLandingPageReportWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List survey reports\n   * Get reports for surveys.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20013} and HTTP response\n   */\n  this.getSurveyReportsAllWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List survey reports\n   * Get reports for surveys.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20013}\n   */\n  this.getSurveyReportsAll = function(opts) {\n    return this.getSurveyReportsAllWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get survey report\n   * Get report for a survey.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SurveyReport} and HTTP response\n   */\n  this.getSurveyReportWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get survey report\n   * Get report for a survey.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SurveyReport}\n   */\n  this.getSurveyReport = function(outreachId, opts) {\n    return this.getSurveyReportWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List survey question reports\n   * Get reports for survey questions.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20014} and HTTP response\n   */\n  this.getSurveyQuestionReportsAllWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}/questions', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List survey question reports\n   * Get reports for survey questions.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20014}\n   */\n  this.getSurveyQuestionReportsAll = function(outreachId, opts) {\n    return this.getSurveyQuestionReportsAllWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get survey question report\n   * Get report for a survey question.\n   * @param {String} outreachId The outreach id.\n   * @param {String} questionId The ID of the survey question.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SurveyQuestionReport} and HTTP response\n   */\n  this.getSurveyQuestionReportWithHttpInfo = function(outreachId, questionId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    // verify the required parameter 'questionId' is set\n    if (questionId === undefined || questionId === null) {\n      throw new Error(\"Missing the required parameter 'questionId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId,\n      'question_id': questionId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}/questions/{question_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get survey question report\n   * Get report for a survey question.\n   * @param {String} outreachId The outreach id.\n   * @param {String} questionId The ID of the survey question.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SurveyQuestionReport}\n   */\n  this.getSurveyQuestionReport = function(outreachId, questionId, opts) {\n    return this.getSurveyQuestionReportWithHttpInfo(outreachId, questionId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List answers for question\n   * Get answers for a survey question.\n   * @param {String} outreachId The outreach id.\n   * @param {String} questionId The ID of the survey question.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {module:model/String} opts.respondentFamiliarityIs Filter survey responses by familiarity of the respondents.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20015} and HTTP response\n   */\n  this.getSurveyQuestionAnswersWithHttpInfo = function(outreachId, questionId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    // verify the required parameter 'questionId' is set\n    if (questionId === undefined || questionId === null) {\n      throw new Error(\"Missing the required parameter 'questionId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId,\n      'question_id': questionId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'respondent_familiarity_is': ( opts['respondentFamiliarityIs'] ? opts['respondentFamiliarityIs'] : opts['respondent_familiarity_is'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}/questions/{question_id}/answers', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List answers for question\n   * Get answers for a survey question.\n   * @param {String} outreachId The outreach id.\n   * @param {String} questionId The ID of the survey question.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {module:model/String} opts.respondentFamiliarityIs Filter survey responses by familiarity of the respondents.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20015}\n   */\n  this.getSurveyQuestionAnswers = function(outreachId, questionId, opts) {\n    return this.getSurveyQuestionAnswersWithHttpInfo(outreachId, questionId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List survey responses\n   * Get responses to a survey.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.answeredQuestion The ID of the question that was answered.\n   * @param {String} opts.choseAnswer The ID of the option chosen to filter responses on.\n   * @param {module:model/String} opts.respondentFamiliarityIs Filter survey responses by familiarity of the respondents.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse20016} and HTTP response\n   */\n  this.getSurveyResponsesAllWithHttpInfo = function(outreachId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'answered_question': ( opts['answeredQuestion'] ? opts['answeredQuestion'] : opts['answered_question']),\n      'chose_answer': ( opts['choseAnswer'] ? opts['choseAnswer'] : opts['chose_answer']),\n      'respondent_familiarity_is': ( opts['respondentFamiliarityIs'] ? opts['respondentFamiliarityIs'] : opts['respondent_familiarity_is'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}/responses', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List survey responses\n   * Get responses to a survey.\n   * @param {String} outreachId The outreach id.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.answeredQuestion The ID of the question that was answered.\n   * @param {String} opts.choseAnswer The ID of the option chosen to filter responses on.\n   * @param {module:model/String} opts.respondentFamiliarityIs Filter survey responses by familiarity of the respondents.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse20016}\n   */\n  this.getSurveyResponsesAll = function(outreachId, opts) {\n    return this.getSurveyResponsesAllWithHttpInfo(outreachId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get survey response\n   * Get a single survey response.\n   * @param {String} outreachId The outreach id.\n   * @param {String} responseId The ID of the survey response.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SurveyResponse} and HTTP response\n   */\n  this.getSurveyResponseWithHttpInfo = function(outreachId, responseId) {\n    var postBody = null;\n\n    // verify the required parameter 'outreachId' is set\n    if (outreachId === undefined || outreachId === null) {\n      throw new Error(\"Missing the required parameter 'outreachId' when calling \");\n    }\n\n    // verify the required parameter 'responseId' is set\n    if (responseId === undefined || responseId === null) {\n      throw new Error(\"Missing the required parameter 'responseId' when calling \");\n    }\n\n    var pathParams = {\n      'outreach_id': outreachId,\n      'response_id': responseId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reporting/surveys/{outreach_id}/responses/{response_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get survey response\n   * Get a single survey response.\n   * @param {String} outreachId The outreach id.\n   * @param {String} responseId The ID of the survey response.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SurveyResponse}\n   */\n  this.getSurveyResponse = function(outreachId, responseId) {\n    return this.getSurveyResponseWithHttpInfo(outreachId, responseId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/ReportsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Reports service.\n * @module api/ReportsApi\n */\n\n/**\n * Constructs a new ReportsApi. \n * @alias module:api/ReportsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List campaign reports\n   * Get campaign reports.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.type The campaign type.\n   * @param {Date} opts.beforeSendTime Restrict the response to campaigns sent before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceSendTime Restrict the response to campaigns sent after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignReports1} and HTTP response\n   */\n  this.getAllCampaignReportsWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'before_send_time': ( opts['beforeSendTime'] ? opts['beforeSendTime'] : opts['before_send_time']),\n      'since_send_time': ( opts['sinceSendTime'] ? opts['sinceSendTime'] : opts['since_send_time'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign reports\n   * Get campaign reports.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.type The campaign type.\n   * @param {Date} opts.beforeSendTime Restrict the response to campaigns sent before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {Date} opts.sinceSendTime Restrict the response to campaigns sent after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignReports1}\n   */\n  this.getAllCampaignReports = function(opts) {\n    return this.getAllCampaignReportsWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign report\n   * Get report details for a specific sent campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignReport} and HTTP response\n   */\n  this.getCampaignReportWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign report\n   * Get report details for a specific sent campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignReport}\n   */\n  this.getCampaignReport = function(campaignId, opts) {\n    return this.getCampaignReportWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List abuse reports\n   * Get a list of abuse complaints for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AbuseComplaints1} and HTTP response\n   */\n  this.getCampaignAbuseReportsWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/abuse-reports', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List abuse reports\n   * Get a list of abuse complaints for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AbuseComplaints1}\n   */\n  this.getCampaignAbuseReports = function(campaignId, opts) {\n    return this.getCampaignAbuseReportsWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get abuse report\n   * Get information about a specific abuse report for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} reportId The id for the abuse report.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AbuseComplaint1} and HTTP response\n   */\n  this.getCampaignAbuseReportWithHttpInfo = function(campaignId, reportId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'reportId' is set\n    if (reportId === undefined || reportId === null) {\n      throw new Error(\"Missing the required parameter 'reportId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'report_id': reportId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/abuse-reports/{report_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get abuse report\n   * Get information about a specific abuse report for a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} reportId The id for the abuse report.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AbuseComplaint1}\n   */\n  this.getCampaignAbuseReport = function(campaignId, reportId, opts) {\n    return this.getCampaignAbuseReportWithHttpInfo(campaignId, reportId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign feedback\n   * Get feedback based on a campaign's statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignAdviceReport} and HTTP response\n   */\n  this.getCampaignAdviceWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/advice', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign feedback\n   * Get feedback based on a campaign's statistics. Advice feedback is based on campaign stats like opens, clicks, unsubscribes, bounces, and more.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignAdviceReport}\n   */\n  this.getCampaignAdvice = function(campaignId, opts) {\n    return this.getCampaignAdviceWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign details\n   * Get information about clicks on specific links in your Mailchimp campaigns.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClickDetailReport} and HTTP response\n   */\n  this.getCampaignClickDetailsWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/click-details', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign details\n   * Get information about clicks on specific links in your Mailchimp campaigns.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClickDetailReport}\n   */\n  this.getCampaignClickDetails = function(campaignId, opts) {\n    return this.getCampaignClickDetailsWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign link details\n   * Get click details for a specific link in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClickDetailReport} and HTTP response\n   */\n  this.getCampaignClickDetailsForLinkWithHttpInfo = function(campaignId, linkId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'linkId' is set\n    if (linkId === undefined || linkId === null) {\n      throw new Error(\"Missing the required parameter 'linkId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'link_id': linkId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/click-details/{link_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign link details\n   * Get click details for a specific link in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClickDetailReport}\n   */\n  this.getCampaignClickDetailsForLink = function(campaignId, linkId, opts) {\n    return this.getCampaignClickDetailsForLinkWithHttpInfo(campaignId, linkId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List clicked link subscribers\n   * Get information about list members who clicked on a specific link in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClickDetailMembers} and HTTP response\n   */\n  this.getSubscribersInfoWithHttpInfo = function(campaignId, linkId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'linkId' is set\n    if (linkId === undefined || linkId === null) {\n      throw new Error(\"Missing the required parameter 'linkId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'link_id': linkId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/click-details/{link_id}/members', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List clicked link subscribers\n   * Get information about list members who clicked on a specific link in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClickDetailMembers}\n   */\n  this.getSubscribersInfo = function(campaignId, linkId, opts) {\n    return this.getSubscribersInfoWithHttpInfo(campaignId, linkId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get clicked link subscriber\n   * Get information about a specific subscriber who clicked a link in a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ClickDetailMember} and HTTP response\n   */\n  this.getSubscriberInfoWithHttpInfo = function(campaignId, linkId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'linkId' is set\n    if (linkId === undefined || linkId === null) {\n      throw new Error(\"Missing the required parameter 'linkId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'link_id': linkId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/click-details/{link_id}/members/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get clicked link subscriber\n   * Get information about a specific subscriber who clicked a link in a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} linkId The id for the link.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ClickDetailMember}\n   */\n  this.getSubscriberInfo = function(campaignId, linkId, subscriberHash, opts) {\n    return this.getSubscriberInfoWithHttpInfo(campaignId, linkId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List domain performance stats\n   * Get statistics for the top-performing email domains in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DomainPerformance} and HTTP response\n   */\n  this.getDomainPerformanceForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/domain-performance', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List domain performance stats\n   * Get statistics for the top-performing email domains in a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DomainPerformance}\n   */\n  this.getDomainPerformanceForCampaign = function(campaignId, opts) {\n    return this.getDomainPerformanceForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign product activity\n   * Get breakdown of product activity for a campaign\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2007} and HTTP response\n   */\n  this.getEcommerceProductActivityForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/ecommerce-product-activity', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign product activity\n   * Get breakdown of product activity for a campaign\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {module:model/String} opts.sortField Returns files sorted by the specified field.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2007}\n   */\n  this.getEcommerceProductActivityForCampaign = function(campaignId, opts) {\n    return this.getEcommerceProductActivityForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List EepURL activity\n   * Get a summary of social activity for the campaign, tracked by EepURL.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EepurlActivity} and HTTP response\n   */\n  this.getEepurlActivityForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/eepurl', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List EepURL activity\n   * Get a summary of social activity for the campaign, tracked by EepURL.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EepurlActivity}\n   */\n  this.getEepurlActivityForCampaign = function(campaignId, opts) {\n    return this.getEepurlActivityForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List email activity\n   * Get a list of member's subscriber activity in a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.since Restrict results to email activity events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActivity} and HTTP response\n   */\n  this.getEmailActivityForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'since': ( opts['since'] ? opts['since'] : opts['since'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/email-activity', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List email activity\n   * Get a list of member's subscriber activity in a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.since Restrict results to email activity events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActivity}\n   */\n  this.getEmailActivityForCampaign = function(campaignId, opts) {\n    return this.getEmailActivityForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get subscriber email activity\n   * Get a specific list member's activity in a campaign including opens, clicks, and bounces.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {String} opts.since Restrict results to email activity events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EmailActivity} and HTTP response\n   */\n  this.getEmailActivityForSubscriberWithHttpInfo = function(campaignId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'since': ( opts['since'] ? opts['since'] : opts['since'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/email-activity/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get subscriber email activity\n   * Get a specific list member's activity in a campaign including opens, clicks, and bounces.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {String} opts.since Restrict results to email activity events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EmailActivity}\n   */\n  this.getEmailActivityForSubscriber = function(campaignId, subscriberHash, opts) {\n    return this.getEmailActivityForSubscriberWithHttpInfo(campaignId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List top open activities\n   * Get top open locations for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OpenLocations} and HTTP response\n   */\n  this.getLocationsForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/locations', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List top open activities\n   * Get top open locations for a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenLocations}\n   */\n  this.getLocationsForCampaign = function(campaignId, opts) {\n    return this.getLocationsForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign open details\n   * Get detailed information about any campaign emails that were opened by a list member.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.since Restrict results to campaign open events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OpenDetailReport} and HTTP response\n   */\n  this.getCampaignOpenDetailsWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'since': ( opts['since'] ? opts['since'] : opts['since'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/open-details', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign open details\n   * Get detailed information about any campaign emails that were opened by a list member.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.since Restrict results to campaign open events that occur after a specific time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenDetailReport}\n   */\n  this.getCampaignOpenDetails = function(campaignId, opts) {\n    return this.getCampaignOpenDetailsWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get opened campaign subscriber\n   * Get information about a specific subscriber who opened a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OpenActivity} and HTTP response\n   */\n  this.getSubscriberInfoForOpenedCampaignWithHttpInfo = function(campaignId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/open-details/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get opened campaign subscriber\n   * Get information about a specific subscriber who opened a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OpenActivity}\n   */\n  this.getSubscriberInfoForOpenedCampaign = function(campaignId, subscriberHash, opts) {\n    return this.getSubscriberInfoForOpenedCampaignWithHttpInfo(campaignId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List campaign recipients\n   * Get information about campaign recipients.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SentTo} and HTTP response\n   */\n  this.getCampaignRecipientsWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/sent-to', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List campaign recipients\n   * Get information about campaign recipients.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SentTo}\n   */\n  this.getCampaignRecipients = function(campaignId, opts) {\n    return this.getCampaignRecipientsWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get campaign recipient info\n   * Get information about a specific campaign recipient.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SentTo} and HTTP response\n   */\n  this.getCampaignRecipientWithHttpInfo = function(campaignId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/sent-to/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get campaign recipient info\n   * Get information about a specific campaign recipient.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SentTo}\n   */\n  this.getCampaignRecipient = function(campaignId, subscriberHash, opts) {\n    return this.getCampaignRecipientWithHttpInfo(campaignId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List child campaign reports\n   * Get a list of reports with child campaigns for a specific parent campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CampaignSubReports} and HTTP response\n   */\n  this.getSubReportsForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/sub-reports', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List child campaign reports\n   * Get a list of reports with child campaigns for a specific parent campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CampaignSubReports}\n   */\n  this.getSubReportsForCampaign = function(campaignId, opts) {\n    return this.getSubReportsForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List unsubscribed members\n   * Get information about members who have unsubscribed from a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Unsubscribes} and HTTP response\n   */\n  this.getUnsubscribedListForCampaignWithHttpInfo = function(campaignId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/unsubscribed', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List unsubscribed members\n   * Get information about members who have unsubscribed from a specific campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Unsubscribes}\n   */\n  this.getUnsubscribedListForCampaign = function(campaignId, opts) {\n    return this.getUnsubscribedListForCampaignWithHttpInfo(campaignId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get unsubscribed member\n   * Get information about a specific list member who unsubscribed from a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Unsubscribes} and HTTP response\n   */\n  this.getUnsubscribedListMemberWithHttpInfo = function(campaignId, subscriberHash, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'campaignId' is set\n    if (campaignId === undefined || campaignId === null) {\n      throw new Error(\"Missing the required parameter 'campaignId' when calling \");\n    }\n\n    // verify the required parameter 'subscriberHash' is set\n    if (subscriberHash === undefined || subscriberHash === null) {\n      throw new Error(\"Missing the required parameter 'subscriberHash' when calling \");\n    }\n\n    var pathParams = {\n      'campaign_id': campaignId,\n      'subscriber_hash': subscriberHash\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/reports/{campaign_id}/unsubscribed/{subscriber_hash}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get unsubscribed member\n   * Get information about a specific list member who unsubscribed from a campaign.\n   * @param {String} campaignId The unique id for the campaign.\n   * @param {String} subscriberHash The MD5 hash of the lowercase version of the list member's email address.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Unsubscribes}\n   */\n  this.getUnsubscribedListMember = function(campaignId, subscriberHash, opts) {\n    return this.getUnsubscribedListMemberWithHttpInfo(campaignId, subscriberHash, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/RootApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Root service.\n * @module api/RootApi\n */\n\n/**\n * Constructs a new RootApi. \n * @alias module:api/RootApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * List api root resources\n   * Get links to all other resources available in the API.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/APIRoot} and HTTP response\n   */\n  this.getRootWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List api root resources\n   * Get links to all other resources available in the API.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/APIRoot}\n   */\n  this.getRoot = function(opts) {\n    return this.getRootWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/SearchCampaignsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * SearchCampaigns service.\n * @module api/SearchCampaignsApi\n */\n\n/**\n * Constructs a new SearchCampaignsApi. \n * @alias module:api/SearchCampaignsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Search campaigns\n   * Search all campaigns for the specified query terms.\n   * @param {String} query The search query used to filter results.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Campaigns} and HTTP response\n   */\n  this.searchWithHttpInfo = function(query, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'query' is set\n    if (query === undefined || query === null) {\n      throw new Error(\"Missing the required parameter 'query' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'query': query\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/search-campaigns', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Search campaigns\n   * Search all campaigns for the specified query terms.\n   * @param {String} query The search query used to filter results.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Campaigns}\n   */\n  this.search = function(query, opts) {\n    return this.searchWithHttpInfo(query, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/SearchMembersApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * SearchMembers service.\n * @module api/SearchMembersApi\n */\n\n/**\n * Constructs a new SearchMembersApi. \n * @alias module:api/SearchMembersApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Search members\n   * Search for list members. This search can be restricted to a specific list, or can be used to search across all lists in an account.\n   * @param {String} query The search query used to filter results. Query should be a valid email, or a string representing a contact's first or last name.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {String} opts.listId The unique id for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Members} and HTTP response\n   */\n  this.searchWithHttpInfo = function(query, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'query' is set\n    if (query === undefined || query === null) {\n      throw new Error(\"Missing the required parameter 'query' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'query': query,\n      'list_id': ( opts['listId'] ? opts['listId'] : opts['list_id'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/search-members', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Search members\n   * Search for list members. This search can be restricted to a specific list, or can be used to search across all lists in an account.\n   * @param {String} query The search query used to filter results. Query should be a valid email, or a string representing a contact's first or last name.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {String} opts.listId The unique id for the list.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Members}\n   */\n  this.search = function(query, opts) {\n    return this.searchWithHttpInfo(query, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/SurveysApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Surveys service.\n * @module api/SurveysApi\n */\n\n/**\n * Constructs a new SurveysApi. \n * @alias module:api/SurveysApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Publish a Survey\n   * Publish a survey that is in draft, unpublished, or has been previously published and edited.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.publishSurveyWithHttpInfo = function(listId, surveyId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'surveyId' is set\n    if (surveyId === undefined || surveyId === null) {\n      throw new Error(\"Missing the required parameter 'surveyId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'survey_id': surveyId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/surveys/{survey_id}/actions/publish', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Publish a Survey\n   * Publish a survey that is in draft, unpublished, or has been previously published and edited.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.publishSurvey = function(listId, surveyId) {\n    return this.publishSurveyWithHttpInfo(listId, surveyId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Unpublish a Survey\n   * Unpublish a survey that has been published.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.unpublishSurveyWithHttpInfo = function(listId, surveyId) {\n    var postBody = null;\n\n    // verify the required parameter 'listId' is set\n    if (listId === undefined || listId === null) {\n      throw new Error(\"Missing the required parameter 'listId' when calling \");\n    }\n\n    // verify the required parameter 'surveyId' is set\n    if (surveyId === undefined || surveyId === null) {\n      throw new Error(\"Missing the required parameter 'surveyId' when calling \");\n    }\n\n    var pathParams = {\n      'list_id': listId,\n      'survey_id': surveyId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/lists/{list_id}/surveys/{survey_id}/actions/unpublish', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Unpublish a Survey\n   * Unpublish a survey that has been published.\n   * @param {String} listId The unique ID for the list.\n   * @param {String} surveyId The ID of the survey.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.unpublishSurvey = function(listId, surveyId) {\n    return this.unpublishSurveyWithHttpInfo(listId, surveyId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/TemplateFoldersApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * TemplateFolders service.\n * @module api/TemplateFoldersApi\n */\n\n/**\n * Constructs a new TemplateFoldersApi. \n * @alias module:api/TemplateFoldersApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete template folder\n   * Delete a specific template folder, and mark all the templates in the folder as 'unfiled'.\n   * @param {String} folderId The unique id for the template folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.removeWithHttpInfo = function(folderId) {\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/template-folders/{folder_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete template folder\n   * Delete a specific template folder, and mark all the templates in the folder as 'unfiled'.\n   * @param {String} folderId The unique id for the template folder.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.remove = function(folderId) {\n    return this.removeWithHttpInfo(folderId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List template folders\n   * Get all folders used to organize templates.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFolders} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/template-folders', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List template folders\n   * Get all folders used to organize templates.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFolders}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get template folder\n   * Get information about a specific folder used to organize templates.\n   * @param {String} folderId The unique id for the template folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFolder} and HTTP response\n   */\n  this.getWithHttpInfo = function(folderId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/template-folders/{folder_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get template folder\n   * Get information about a specific folder used to organize templates.\n   * @param {String} folderId The unique id for the template folder.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFolder}\n   */\n  this.get = function(folderId, opts) {\n    return this.getWithHttpInfo(folderId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update template folder\n   * Update a specific folder used to organize templates.\n   * @param {String} folderId The unique id for the template folder.\n   * @param {module:model/TemplateFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFolder} and HTTP response\n   */\n  this.updateWithHttpInfo = function(folderId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'folderId' is set\n    if (folderId === undefined || folderId === null) {\n      throw new Error(\"Missing the required parameter 'folderId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'folder_id': folderId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/template-folders/{folder_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update template folder\n   * Update a specific folder used to organize templates.\n   * @param {String} folderId The unique id for the template folder.\n   * @param {module:model/TemplateFolder2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFolder}\n   */\n  this.update = function(folderId, body) {\n    return this.updateWithHttpInfo(folderId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add template folder\n   * Create a new template folder.\n   * @param {module:model/TemplateFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateFolder} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/template-folders', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add template folder\n   * Create a new template folder.\n   * @param {module:model/TemplateFolder1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateFolder}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/TemplatesApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * Templates service.\n * @module api/TemplatesApi\n */\n\n/**\n * Constructs a new TemplatesApi. \n * @alias module:api/TemplatesApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Delete template\n   * Delete a specific template.\n   * @param {String} templateId The unique id for the template.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteTemplateWithHttpInfo = function(templateId) {\n    var postBody = null;\n\n    // verify the required parameter 'templateId' is set\n    if (templateId === undefined || templateId === null) {\n      throw new Error(\"Missing the required parameter 'templateId' when calling \");\n    }\n\n    var pathParams = {\n      'template_id': templateId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates/{template_id}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete template\n   * Delete a specific template.\n   * @param {String} templateId The unique id for the template.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteTemplate = function(templateId) {\n    return this.deleteTemplateWithHttpInfo(templateId)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List templates\n   * Get a list of an account's available templates.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.createdBy The Mailchimp account user who created the template.\n   * @param {String} opts.sinceDateCreated Restrict the response to templates created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeDateCreated Restrict the response to templates created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.type Limit results based on template type.\n   * @param {String} opts.category Limit results based on category.\n   * @param {String} opts.folderId The unique folder id.\n   * @param {module:model/String} opts.sortField Returns user templates sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Templates} and HTTP response\n   */\n  this.listWithHttpInfo = function(opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv'),\n      'count': ( opts['count'] ? opts['count'] : opts['count']),\n      'offset': ( opts['offset'] ? opts['offset'] : opts['offset']),\n      'created_by': ( opts['createdBy'] ? opts['createdBy'] : opts['created_by']),\n      'since_date_created': ( opts['sinceDateCreated'] ? opts['sinceDateCreated'] : opts['since_date_created']),\n      'before_date_created': ( opts['beforeDateCreated'] ? opts['beforeDateCreated'] : opts['before_date_created']),\n      'type': ( opts['type'] ? opts['type'] : opts['type']),\n      'category': ( opts['category'] ? opts['category'] : opts['category']),\n      'folder_id': ( opts['folderId'] ? opts['folderId'] : opts['folder_id']),\n      'sort_field': ( opts['sortField'] ? opts['sortField'] : opts['sort_field']),\n      'sort_dir': ( opts['sortDir'] ? opts['sortDir'] : opts['sort_dir'])\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List templates\n   * Get a list of an account's available templates.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @param {Number} opts.count The number of records to return. Default value is 10. Maximum value is 1000 (default to 10)\n   * @param {Number} opts.offset Used for [pagination](https://mailchimp.com/developer/marketing/docs/methods-parameters/#pagination), this it the number of records from a collection to skip. Default value is 0. (default to 0)\n   * @param {String} opts.createdBy The Mailchimp account user who created the template.\n   * @param {String} opts.sinceDateCreated Restrict the response to templates created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.beforeDateCreated Restrict the response to templates created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.\n   * @param {String} opts.type Limit results based on template type.\n   * @param {String} opts.category Limit results based on category.\n   * @param {String} opts.folderId The unique folder id.\n   * @param {module:model/String} opts.sortField Returns user templates sorted by the specified field.\n   * @param {module:model/String} opts.sortDir Determines the order direction for sorted results.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Templates}\n   */\n  this.list = function(opts) {\n    return this.listWithHttpInfo(opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get template info\n   * Get information about a specific template.\n   * @param {String} templateId The unique id for the template.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateInstance} and HTTP response\n   */\n  this.getTemplateWithHttpInfo = function(templateId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'templateId' is set\n    if (templateId === undefined || templateId === null) {\n      throw new Error(\"Missing the required parameter 'templateId' when calling \");\n    }\n\n    var pathParams = {\n      'template_id': templateId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates/{template_id}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get template info\n   * Get information about a specific template.\n   * @param {String} templateId The unique id for the template.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateInstance}\n   */\n  this.getTemplate = function(templateId, opts) {\n    return this.getTemplateWithHttpInfo(templateId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * View default content\n   * Get the sections that you can edit in a template, including each section's default content.\n   * @param {String} templateId The unique id for the template.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateDefaultContent} and HTTP response\n   */\n  this.getDefaultContentForTemplateWithHttpInfo = function(templateId, opts) {\n    opts = opts || {};\n    var postBody = null;\n\n    // verify the required parameter 'templateId' is set\n    if (templateId === undefined || templateId === null) {\n      throw new Error(\"Missing the required parameter 'templateId' when calling \");\n    }\n\n    var pathParams = {\n      'template_id': templateId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n      'fields': this.apiClient.buildCollectionParam(opts['fields'] ? opts['fields'] : opts['fields'], 'csv'),\n      'exclude_fields': this.apiClient.buildCollectionParam(opts['excludeFields'] ? opts['excludeFields'] : opts['exclude_fields'], 'csv')\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates/{template_id}/default-content', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * View default content\n   * Get the sections that you can edit in a template, including each section's default content.\n   * @param {String} templateId The unique id for the template.\n   * @param {Object} opts Optional parameters\n   * @param {Array.<String>} opts.fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.\n   * @param {Array.<String>} opts.excludeFields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateDefaultContent}\n   */\n  this.getDefaultContentForTemplate = function(templateId, opts) {\n    return this.getDefaultContentForTemplateWithHttpInfo(templateId, opts)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Update template\n   * Update the name, HTML, or `folder_id` of an existing template.\n   * @param {String} templateId The unique id for the template.\n   * @param {module:model/TemplateInstance2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateInstance} and HTTP response\n   */\n  this.updateTemplateWithHttpInfo = function(templateId, body) {\n    var postBody = body;\n\n    // verify the required parameter 'templateId' is set\n    if (templateId === undefined || templateId === null) {\n      throw new Error(\"Missing the required parameter 'templateId' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'template_id': templateId\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates/{template_id}', 'PATCH',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Update template\n   * Update the name, HTML, or `folder_id` of an existing template.\n   * @param {String} templateId The unique id for the template.\n   * @param {module:model/TemplateInstance2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateInstance}\n   */\n  this.updateTemplate = function(templateId, body) {\n    return this.updateTemplateWithHttpInfo(templateId, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Add template\n   * Create a new template for the account. Only Classic templates are supported.\n   * @param {module:model/TemplateInstance1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TemplateInstance} and HTTP response\n   */\n  this.createWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/templates', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add template\n   * Create a new template for the account. Only Classic templates are supported.\n   * @param {module:model/TemplateInstance1} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TemplateInstance}\n   */\n  this.create = function(body) {\n    return this.createWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/api/VerifiedDomainsApi.js",
    "content": "/*\n * Mailchimp Marketing API\n * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)\n *\n * OpenAPI spec version: 3.0.80\n * Contact: apihelp@mailchimp.com\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n *\n * Swagger Codegen version: 2.4.12\n *\n * Do not edit the class manually.\n *\n */\n\n\n\nvar ApiClient = require('../ApiClient');\n\n/**\n * VerifiedDomains service.\n * @module api/VerifiedDomainsApi\n */\n\n/**\n * Constructs a new VerifiedDomainsApi. \n * @alias module:api/VerifiedDomainsApi\n * @class\n * @param {module:ApiClient} apiClient Optional API client implementation to use,\n * default to {@link module:ApiClient#instance} if unspecified.\n */\nmodule.exports = function(apiClient) {\n  this.apiClient = apiClient || ApiClient.instance;\n\n  /**\n   * Add domain to account\n   * Add a domain to the account.\n   * @param {module:model/VerifiedDomains2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VerifiedDomains} and HTTP response\n   */\n  this.createVerifiedDomainWithHttpInfo = function(body) {\n    var postBody = body;\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/verified-domains', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Add domain to account\n   * Add a domain to the account.\n   * @param {module:model/VerifiedDomains2} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VerifiedDomains}\n   */\n  this.createVerifiedDomain = function(body) {\n    return this.createVerifiedDomainWithHttpInfo(body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Delete domain\n   * Delete a verified domain from the account.\n   * @param {String} domainName The domain name.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response\n   */\n  this.deleteDomainWithHttpInfo = function(domainName) {\n    var postBody = null;\n\n    // verify the required parameter 'domainName' is set\n    if (domainName === undefined || domainName === null) {\n      throw new Error(\"Missing the required parameter 'domainName' when calling \");\n    }\n\n    var pathParams = {\n      'domain_name': domainName\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/verified-domains/{domain_name}', 'DELETE',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Delete domain\n   * Delete a verified domain from the account.\n   * @param {String} domainName The domain name.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}\n   */\n  this.deleteDomain = function(domainName) {\n    return this.deleteDomainWithHttpInfo(domainName)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Get domain info\n   * Get the details for a single domain on the account.\n   * @param {String} domainName The domain name.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VerifiedDomains} and HTTP response\n   */\n  this.getDomainWithHttpInfo = function(domainName) {\n    var postBody = null;\n\n    // verify the required parameter 'domainName' is set\n    if (domainName === undefined || domainName === null) {\n      throw new Error(\"Missing the required parameter 'domainName' when calling \");\n    }\n\n    var pathParams = {\n      'domain_name': domainName\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/verified-domains/{domain_name}', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Get domain info\n   * Get the details for a single domain on the account.\n   * @param {String} domainName The domain name.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VerifiedDomains}\n   */\n  this.getDomain = function(domainName) {\n    return this.getDomainWithHttpInfo(domainName)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * List sending domains\n   * Get all of the sending domains on the account.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VerifiedDomains1} and HTTP response\n   */\n  this.getVerifiedDomainsAllWithHttpInfo = function() {\n    var postBody = null;\n\n    var pathParams = {\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/verified-domains', 'GET',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * List sending domains\n   * Get all of the sending domains on the account.\n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VerifiedDomains1}\n   */\n  this.getVerifiedDomainsAll = function() {\n    return this.getVerifiedDomainsAllWithHttpInfo()\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n\n  /**\n   * Verify domain\n   * Verify a domain for sending.\n   * @param {String} domainName The domain name.\n   * @param {module:model/VerifyADomainForSending_} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VerifiedDomains} and HTTP response\n   */\n  this.submitDomainVerificationWithHttpInfo = function(domainName, body) {\n    var postBody = body;\n\n    // verify the required parameter 'domainName' is set\n    if (domainName === undefined || domainName === null) {\n      throw new Error(\"Missing the required parameter 'domainName' when calling \");\n    }\n\n    // verify the required parameter 'body' is set\n    if (body === undefined || body === null) {\n      throw new Error(\"Missing the required parameter 'body' when calling \");\n    }\n\n    var pathParams = {\n      'domain_name': domainName\n    };\n    \n    /*\n     The following block building queryParams is going to look a little odd, we're going look for values in $opts with both\n     camelCase and snake_case format (which will be the same if singular word). This is because the API docs use snake_case\n     but early versions of these SDKs used camelCase. So to be backward compatible we'll use both. \n    */\n    var queryParams = {\n    };\n    var headerParams = {\n    };\n\n    var formParams = {\n    };\n\n    var authNames = ['basicAuth'];\n    var contentTypes = ['application/json'];\n    var accepts = ['application/json', 'application/problem+json'];\n    var returnType = 'application/json';\n\n    return this.apiClient.callApi(\n      '/verified-domains/{domain_name}/actions/verify', 'POST',\n      pathParams, queryParams, headerParams, formParams, postBody,\n      authNames, contentTypes, accepts, returnType\n    );\n  }\n  /**\n   * Verify domain\n   * Verify a domain for sending.\n   * @param {String} domainName The domain name.\n   * @param {module:model/VerifyADomainForSending_} body \n   * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VerifiedDomains}\n   */\n  this.submitDomainVerification = function(domainName, body) {\n    return this.submitDomainVerificationWithHttpInfo(domainName, body)\n      .then(function(response_and_data) {\n        return response_and_data.data;\n      });\n  }\n};\n"
  },
  {
    "path": "src/index.js",
    "content": "var ApiClient = require('./ApiClient');\n\nmodule.exports = ApiClient.instance;\n"
  }
]