diff --git a/README.md b/README.md index 0d39a66..5a55579 100644 --- a/README.md +++ b/README.md @@ -154,12 +154,6 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0* | **conversations.getConversationMessages** | /conversations/{conversation_id}/messages | | **conversations.getConversationMessage** | /conversations/{conversation_id}/messages/{message_id} | | **conversations.createConversationMessage** | /conversations/{conversation_id}/messages | -| **dashboard.ads** | /dashboard/ads | -| **dashboard.audiences** | /dashboard/audiences | -| **dashboard.charts** | /dashboard/charts | -| **dashboard.ecommerce** | /dashboard/ecommerce | -| **dashboard.engagement** | /dashboard/engagement | -| **dashboard.homepage** | /dashboard/homepage | | **ecommerce.deleteStore** | /ecommerce/stores/{store_id} | | **ecommerce.deleteStoreCart** | /ecommerce/stores/{store_id}/carts/{cart_id} | | **ecommerce.deleteCartLineItem** | /ecommerce/stores/{store_id}/carts/{cart_id}/lines/{line_id} | @@ -219,9 +213,6 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0* | **ecommerce.addPromoRules** | /ecommerce/stores/{store_id}/promo-rules | | **ecommerce.setStoreCustomer** | /ecommerce/stores/{store_id}/customers/{customer_id} | | **ecommerce.addProductVariant** | /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id} | -| **externalAuths.get** | /external-auths/{system_id} | -| **externalAuths.getCollection** | /external-auths | -| **externalAuths.create** | /external-auths | | **facebookAds.list** | /facebook-ads | | **facebookAds.getAd** | /facebook-ads/{outreach_id} | | **fileManager.deleteFile** | /file-manager/files/{file_id} | @@ -259,7 +250,6 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0* | **lists.getListAbuseReportDetails** | /lists/{list_id}/abuse-reports/{report_id} | | **lists.getListRecentActivity** | /lists/{list_id}/activity | | **lists.getListClients** | /lists/{list_id}/clients | -| **lists.getListExternalIds** | /lists/{list_id}/external-ids | | **lists.getListGrowthHistory** | /lists/{list_id}/growth-history | | **lists.getListGrowthHistoryByMonth** | /lists/{list_id}/growth-history/{month} | | **lists.getListInterestCategories** | /lists/{list_id}/interest-categories | @@ -294,7 +284,6 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0* | **lists.updateListMemberTags** | /lists/{list_id}/members/{subscriber_hash}/tags | | **lists.createList** | /lists | | **lists.batchListMembers** | /lists/{list_id} | -| **lists.createListExternalId** | /lists/{list_id}/external-ids | | **lists.createListInterestCategory** | /lists/{list_id}/interest-categories | | **lists.createInterestCategoryInterest** | /lists/{list_id}/interest-categories/{interest_category_id}/interests | | **lists.addListMember** | /lists/{list_id}/members | @@ -310,7 +299,6 @@ All URIs are relative to *https://server.api.mailchimp.com/3.0* | **lists.previewSegment** | /lists/{list_id}/preview-segment | | **lists.setListMember** | /lists/{list_id}/members/{subscriber_hash} | | **ping.get** | /ping | -| **postcards.getAll** | /postcards | | **reporting.info** | /reporting | | **reporting.getFacebookAdsReportAll** | /reporting/facebook-ads | | **reporting.getFacebookAdReport** | /reporting/facebook-ads/{outreach_id} | diff --git a/composer.json b/composer.json index 76623c0..4557b49 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mailchimp/marketing", - "version": "3.0.19", + "version": "3.0.21", "description": "", "keywords": [ "swagger", diff --git a/lib/Api/ActivityFeedApi.php b/lib/Api/ActivityFeedApi.php index 904ce2d..d4967c5 100644 --- a/lib/Api/ActivityFeedApi.php +++ b/lib/Api/ActivityFeedApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/AuthorizedAppsApi.php b/lib/Api/AuthorizedAppsApi.php index 4718b24..b96a80d 100644 --- a/lib/Api/AuthorizedAppsApi.php +++ b/lib/Api/AuthorizedAppsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/AutomationsApi.php b/lib/Api/AutomationsApi.php index 80b0f38..9376b72 100644 --- a/lib/Api/AutomationsApi.php +++ b/lib/Api/AutomationsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 @@ -364,15 +364,15 @@ protected function deleteWorkflowEmailRequest($workflow_id, $workflow_email_id) ); } - public function list($fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) + public function list($count = '10', $offset = '0', $fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) { - $response = $this->listWithHttpInfo($fields, $exclude_fields, $before_create_time, $since_create_time, $before_send_time, $since_send_time, $status); + $response = $this->listWithHttpInfo($count, $offset, $fields, $exclude_fields, $before_create_time, $since_create_time, $before_send_time, $since_send_time, $status); return $response; } - public function listWithHttpInfo($fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) + public function listWithHttpInfo($count = '10', $offset = '0', $fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) { - $request = $this->listRequest($fields, $exclude_fields, $before_create_time, $since_create_time, $before_send_time, $since_send_time, $status); + $request = $this->listRequest($count, $offset, $fields, $exclude_fields, $before_create_time, $since_create_time, $before_send_time, $since_send_time, $status); try { $options = $this->createHttpClientOption(); @@ -408,8 +408,12 @@ public function listWithHttpInfo($fields = null, $exclude_fields = null, $before } } - protected function listRequest($fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) + protected function listRequest($count = '10', $offset = '0', $fields = null, $exclude_fields = null, $before_create_time = null, $since_create_time = null, $before_send_time = null, $since_send_time = null, $status = null) { + if ($count !== null && $count > 1000) { + throw new \InvalidArgumentException('invalid value for "$count" when calling AutomationsApi., must be smaller than or equal to 1000.'); + } + $resourcePath = '/automations'; $formParams = []; @@ -418,6 +422,14 @@ protected function listRequest($fields = null, $exclude_fields = null, $before_c $httpBody = ''; $multipart = false; // query params + if ($count !== null) { + $queryParams['count'] = ObjectSerializer::toQueryValue($count); + } + // query params + if ($offset !== null) { + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); + } + // query params if (is_array($fields)) { $queryParams['fields'] = $fields; } else diff --git a/lib/Api/BatchWebhooksApi.php b/lib/Api/BatchWebhooksApi.php index 81cf732..cf3eaf9 100644 --- a/lib/Api/BatchWebhooksApi.php +++ b/lib/Api/BatchWebhooksApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/BatchesApi.php b/lib/Api/BatchesApi.php index a40e9c2..cb233c7 100644 --- a/lib/Api/BatchesApi.php +++ b/lib/Api/BatchesApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/CampaignFoldersApi.php b/lib/Api/CampaignFoldersApi.php index 4968a53..87c0e67 100644 --- a/lib/Api/CampaignFoldersApi.php +++ b/lib/Api/CampaignFoldersApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/CampaignsApi.php b/lib/Api/CampaignsApi.php index fda3cf9..a161099 100644 --- a/lib/Api/CampaignsApi.php +++ b/lib/Api/CampaignsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/ConnectedSitesApi.php b/lib/Api/ConnectedSitesApi.php index b86b4b7..0a29699 100644 --- a/lib/Api/ConnectedSitesApi.php +++ b/lib/Api/ConnectedSitesApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/ConversationsApi.php b/lib/Api/ConversationsApi.php index 5a8d638..7fa5978 100644 --- a/lib/Api/ConversationsApi.php +++ b/lib/Api/ConversationsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/DashboardApi.php b/lib/Api/DashboardApi.php deleted file mode 100644 index 71ceb35..0000000 --- a/lib/Api/DashboardApi.php +++ /dev/null @@ -1,955 +0,0 @@ -client = new Client([ - 'defaults' => [ - 'timeout' => 120.0 - ] - ]); - $this->headerSelector = new HeaderSelector(); - $this->config = $config ?: new Configuration(); - } - - public function getConfig() - { - return $this->config; - } - - public function ads($fields = null, $exclude_fields = null, $platform = null, $num = null) - { - $response = $this->adsWithHttpInfo($fields, $exclude_fields, $platform, $num); - return $response; - } - - public function adsWithHttpInfo($fields = null, $exclude_fields = null, $platform = null, $num = null) - { - $request = $this->adsRequest($fields, $exclude_fields, $platform, $num); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function adsRequest($fields = null, $exclude_fields = null, $platform = null, $num = null) - { - - $resourcePath = '/dashboard/ads'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - // query params - if ($platform !== null) { - $queryParams['platform'] = ObjectSerializer::toQueryValue($platform); - } - // query params - if ($num !== null) { - $queryParams['num'] = ObjectSerializer::toQueryValue($num); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function audiences($fields = null, $exclude_fields = null) - { - $response = $this->audiencesWithHttpInfo($fields, $exclude_fields); - return $response; - } - - public function audiencesWithHttpInfo($fields = null, $exclude_fields = null) - { - $request = $this->audiencesRequest($fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function audiencesRequest($fields = null, $exclude_fields = null) - { - - $resourcePath = '/dashboard/audiences'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function charts($fields = null, $exclude_fields = null) - { - $response = $this->chartsWithHttpInfo($fields, $exclude_fields); - return $response; - } - - public function chartsWithHttpInfo($fields = null, $exclude_fields = null) - { - $request = $this->chartsRequest($fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function chartsRequest($fields = null, $exclude_fields = null) - { - - $resourcePath = '/dashboard/charts'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function ecommerce($fields = null, $exclude_fields = null) - { - $response = $this->ecommerceWithHttpInfo($fields, $exclude_fields); - return $response; - } - - public function ecommerceWithHttpInfo($fields = null, $exclude_fields = null) - { - $request = $this->ecommerceRequest($fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function ecommerceRequest($fields = null, $exclude_fields = null) - { - - $resourcePath = '/dashboard/ecommerce'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function engagement($fields = null, $exclude_fields = null) - { - $response = $this->engagementWithHttpInfo($fields, $exclude_fields); - return $response; - } - - public function engagementWithHttpInfo($fields = null, $exclude_fields = null) - { - $request = $this->engagementRequest($fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function engagementRequest($fields = null, $exclude_fields = null) - { - - $resourcePath = '/dashboard/engagement'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function homepage($fields = null, $exclude_fields = null) - { - $response = $this->homepageWithHttpInfo($fields, $exclude_fields); - return $response; - } - - public function homepageWithHttpInfo($fields = null, $exclude_fields = null) - { - $request = $this->homepageRequest($fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function homepageRequest($fields = null, $exclude_fields = null) - { - - $resourcePath = '/dashboard/homepage'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/EcommerceApi.php b/lib/Api/EcommerceApi.php index a941678..0591df4 100644 --- a/lib/Api/EcommerceApi.php +++ b/lib/Api/EcommerceApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 @@ -64,7 +64,8 @@ public function getConfig() public function deleteStore($store_id) { - $this->deleteStoreWithHttpInfo($store_id); + $response = $this->deleteStoreWithHttpInfo($store_id); + return $response; } public function deleteStoreWithHttpInfo($store_id) @@ -4272,15 +4273,15 @@ protected function getOrderLineItemRequest($store_id, $order_id, $line_id, $fiel ); } - public function getAllStoreProducts($store_id, $fields = null, $exclude_fields = null, $sort_field = null, $count = '10', $offset = '0') + public function getAllStoreProducts($store_id, $fields = null, $exclude_fields = null, $count = '10', $offset = '0') { - $response = $this->getAllStoreProductsWithHttpInfo($store_id, $fields, $exclude_fields, $sort_field, $count, $offset); + $response = $this->getAllStoreProductsWithHttpInfo($store_id, $fields, $exclude_fields, $count, $offset); return $response; } - public function getAllStoreProductsWithHttpInfo($store_id, $fields = null, $exclude_fields = null, $sort_field = null, $count = '10', $offset = '0') + public function getAllStoreProductsWithHttpInfo($store_id, $fields = null, $exclude_fields = null, $count = '10', $offset = '0') { - $request = $this->getAllStoreProductsRequest($store_id, $fields, $exclude_fields, $sort_field, $count, $offset); + $request = $this->getAllStoreProductsRequest($store_id, $fields, $exclude_fields, $count, $offset); try { $options = $this->createHttpClientOption(); @@ -4316,7 +4317,7 @@ public function getAllStoreProductsWithHttpInfo($store_id, $fields = null, $excl } } - protected function getAllStoreProductsRequest($store_id, $fields = null, $exclude_fields = null, $sort_field = null, $count = '10', $offset = '0') + protected function getAllStoreProductsRequest($store_id, $fields = null, $exclude_fields = null, $count = '10', $offset = '0') { // verify the required parameter 'store_id' is set if ($store_id === null || (is_array($store_id) && count($store_id) === 0)) { @@ -4350,10 +4351,6 @@ protected function getAllStoreProductsRequest($store_id, $fields = null, $exclud $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); } // query params - if ($sort_field !== null) { - $queryParams['sort_field'] = ObjectSerializer::toQueryValue($sort_field); - } - // query params if ($count !== null) { $queryParams['count'] = ObjectSerializer::toQueryValue($count); } diff --git a/lib/Api/ExternalAuthsApi.php b/lib/Api/ExternalAuthsApi.php deleted file mode 100644 index 84aadc1..0000000 --- a/lib/Api/ExternalAuthsApi.php +++ /dev/null @@ -1,533 +0,0 @@ -client = new Client([ - 'defaults' => [ - 'timeout' => 120.0 - ] - ]); - $this->headerSelector = new HeaderSelector(); - $this->config = $config ?: new Configuration(); - } - - public function getConfig() - { - return $this->config; - } - - public function get($system_id, $fields = null, $exclude_fields = null) - { - $response = $this->getWithHttpInfo($system_id, $fields, $exclude_fields); - return $response; - } - - public function getWithHttpInfo($system_id, $fields = null, $exclude_fields = null) - { - $request = $this->getRequest($system_id, $fields, $exclude_fields); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function getRequest($system_id, $fields = null, $exclude_fields = null) - { - // verify the required parameter 'system_id' is set - if ($system_id === null || (is_array($system_id) && count($system_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $system_id when calling ' - ); - } - - $resourcePath = '/external-auths/{system_id}'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - - // path params - if ($system_id !== null) { - $resourcePath = str_replace( - '{' . 'system_id' . '}', - ObjectSerializer::toPathValue($system_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function getCollection($fields = null, $exclude_fields = null, $count = '10', $offset = '0') - { - $response = $this->getCollectionWithHttpInfo($fields, $exclude_fields, $count, $offset); - return $response; - } - - public function getCollectionWithHttpInfo($fields = null, $exclude_fields = null, $count = '10', $offset = '0') - { - $request = $this->getCollectionRequest($fields, $exclude_fields, $count, $offset); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function getCollectionRequest($fields = null, $exclude_fields = null, $count = '10', $offset = '0') - { - if ($count !== null && $count > 1000) { - throw new \InvalidArgumentException('invalid value for "$count" when calling ExternalAuthsApi., must be smaller than or equal to 1000.'); - } - - - $resourcePath = '/external-auths'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - // query params - if ($count !== null) { - $queryParams['count'] = ObjectSerializer::toQueryValue($count); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - public function create($body) - { - $response = $this->createWithHttpInfo($body); - return $response; - } - - public function createWithHttpInfo($body) - { - $request = $this->createRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function createRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling ' - ); - } - - $resourcePath = '/external-auths'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/FacebookAdsApi.php b/lib/Api/FacebookAdsApi.php index 463f48a..2183737 100644 --- a/lib/Api/FacebookAdsApi.php +++ b/lib/Api/FacebookAdsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/FileManagerApi.php b/lib/Api/FileManagerApi.php index ccd85ea..76ec110 100644 --- a/lib/Api/FileManagerApi.php +++ b/lib/Api/FileManagerApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/LandingPagesApi.php b/lib/Api/LandingPagesApi.php index b550cc6..4a00d29 100644 --- a/lib/Api/LandingPagesApi.php +++ b/lib/Api/LandingPagesApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 @@ -839,15 +839,15 @@ protected function updatePageRequest($page_id, $body) ); } - public function create($body) + public function create($body, $use_default_list = null) { - $response = $this->createWithHttpInfo($body); + $response = $this->createWithHttpInfo($body, $use_default_list); return $response; } - public function createWithHttpInfo($body) + public function createWithHttpInfo($body, $use_default_list = null) { - $request = $this->createRequest($body); + $request = $this->createRequest($body, $use_default_list); try { $options = $this->createHttpClientOption(); @@ -883,7 +883,7 @@ public function createWithHttpInfo($body) } } - protected function createRequest($body) + protected function createRequest($body, $use_default_list = null) { // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { @@ -898,6 +898,10 @@ protected function createRequest($body) $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if ($use_default_list !== null) { + $queryParams['use_default_list'] = ObjectSerializer::toQueryValue($use_default_list); + } // body params @@ -981,7 +985,8 @@ protected function createRequest($body) public function publishPage($page_id) { - $this->publishPageWithHttpInfo($page_id); + $response = $this->publishPageWithHttpInfo($page_id); + return $response; } public function publishPageWithHttpInfo($page_id) diff --git a/lib/Api/ListsApi.php b/lib/Api/ListsApi.php index 61822da..1369d9e 100644 --- a/lib/Api/ListsApi.php +++ b/lib/Api/ListsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 @@ -1697,15 +1697,15 @@ protected function getListMemberTagsRequest($list_id, $subscriber_hash, $fields ); } - public function getAllLists($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null) + public function getAllLists($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null, $has_ecommerce_store = null) { - $response = $this->getAllListsWithHttpInfo($fields, $exclude_fields, $count, $offset, $before_date_created, $since_date_created, $before_campaign_last_sent, $since_campaign_last_sent, $email, $sort_field, $sort_dir); + $response = $this->getAllListsWithHttpInfo($fields, $exclude_fields, $count, $offset, $before_date_created, $since_date_created, $before_campaign_last_sent, $since_campaign_last_sent, $email, $sort_field, $sort_dir, $has_ecommerce_store); return $response; } - public function getAllListsWithHttpInfo($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null) + public function getAllListsWithHttpInfo($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null, $has_ecommerce_store = null) { - $request = $this->getAllListsRequest($fields, $exclude_fields, $count, $offset, $before_date_created, $since_date_created, $before_campaign_last_sent, $since_campaign_last_sent, $email, $sort_field, $sort_dir); + $request = $this->getAllListsRequest($fields, $exclude_fields, $count, $offset, $before_date_created, $since_date_created, $before_campaign_last_sent, $since_campaign_last_sent, $email, $sort_field, $sort_dir, $has_ecommerce_store); try { $options = $this->createHttpClientOption(); @@ -1741,7 +1741,7 @@ public function getAllListsWithHttpInfo($fields = null, $exclude_fields = null, } } - protected function getAllListsRequest($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null) + protected function getAllListsRequest($fields = null, $exclude_fields = null, $count = '10', $offset = '0', $before_date_created = null, $since_date_created = null, $before_campaign_last_sent = null, $since_campaign_last_sent = null, $email = null, $sort_field = null, $sort_dir = null, $has_ecommerce_store = null) { if ($count !== null && $count > 1000) { throw new \InvalidArgumentException('invalid value for "$count" when calling ListsApi., must be smaller than or equal to 1000.'); @@ -1804,6 +1804,10 @@ protected function getAllListsRequest($fields = null, $exclude_fields = null, $c if ($sort_dir !== null) { $queryParams['sort_dir'] = ObjectSerializer::toQueryValue($sort_dir); } + // query params + if ($has_ecommerce_store !== null) { + $queryParams['has_ecommerce_store'] = ObjectSerializer::toQueryValue($has_ecommerce_store); + } // body params @@ -2715,163 +2719,6 @@ protected function getListClientsRequest($list_id, $fields = null, $exclude_fiel ); } - public function getListExternalIds($list_id, $count = '10', $offset = '0') - { - $response = $this->getListExternalIdsWithHttpInfo($list_id, $count, $offset); - return $response; - } - - public function getListExternalIdsWithHttpInfo($list_id, $count = '10', $offset = '0') - { - $request = $this->getListExternalIdsRequest($list_id, $count, $offset); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function getListExternalIdsRequest($list_id, $count = '10', $offset = '0') - { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling ' - ); - } - if ($count !== null && $count > 1000) { - throw new \InvalidArgumentException('invalid value for "$count" when calling ListsApi., must be smaller than or equal to 1000.'); - } - - - $resourcePath = '/lists/{list_id}/external-ids'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if ($count !== null) { - $queryParams['count'] = ObjectSerializer::toQueryValue($count); - } - // query params - if ($offset !== null) { - $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); - } - - // path params - if ($list_id !== null) { - $resourcePath = str_replace( - '{' . 'list_id' . '}', - ObjectSerializer::toPathValue($list_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - public function getListGrowthHistory($list_id, $fields = null, $exclude_fields = null, $count = '10', $offset = '0', $sort_field = null, $sort_dir = null) { $response = $this->getListGrowthHistoryWithHttpInfo($list_id, $fields, $exclude_fields, $count, $offset, $sort_field, $sort_dir); @@ -8780,154 +8627,6 @@ protected function batchListMembersRequest($list_id, $body, $skip_merge_validati ); } - public function createListExternalId($list_id, $body = null) - { - $response = $this->createListExternalIdWithHttpInfo($list_id, $body); - return $response; - } - - public function createListExternalIdWithHttpInfo($list_id, $body = null) - { - $request = $this->createListExternalIdRequest($list_id, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function createListExternalIdRequest($list_id, $body = null) - { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling ' - ); - } - - $resourcePath = '/lists/{list_id}/external-ids'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // path params - if ($list_id !== null) { - $resourcePath = str_replace( - '{' . 'list_id' . '}', - ObjectSerializer::toPathValue($list_id), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - public function createListInterestCategory($list_id, $body) { $response = $this->createListInterestCategoryWithHttpInfo($list_id, $body); diff --git a/lib/Api/PingApi.php b/lib/Api/PingApi.php index 153f0c5..c1790ae 100644 --- a/lib/Api/PingApi.php +++ b/lib/Api/PingApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/PostcardsApi.php b/lib/Api/PostcardsApi.php deleted file mode 100644 index 19fbde8..0000000 --- a/lib/Api/PostcardsApi.php +++ /dev/null @@ -1,234 +0,0 @@ -client = new Client([ - 'defaults' => [ - 'timeout' => 120.0 - ] - ]); - $this->headerSelector = new HeaderSelector(); - $this->config = $config ?: new Configuration(); - } - - public function getConfig() - { - return $this->config; - } - - public function getAll($sort_dir = null, $fields = null, $exclude_fields = null, $count = '10') - { - $response = $this->getAllWithHttpInfo($sort_dir, $fields, $exclude_fields, $count); - return $response; - } - - public function getAllWithHttpInfo($sort_dir = null, $fields = null, $exclude_fields = null, $count = '10') - { - $request = $this->getAllRequest($sort_dir, $fields, $exclude_fields, $count); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw $e; - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - $content = $responseBody->getContents(); - $content = json_decode($content); - - return $content; - - } catch (ApiException $e) { - throw $e->getResponseBody(); - } - } - - protected function getAllRequest($sort_dir = null, $fields = null, $exclude_fields = null, $count = '10') - { - if ($count !== null && $count > 1000) { - throw new \InvalidArgumentException('invalid value for "$count" when calling PostcardsApi., must be smaller than or equal to 1000.'); - } - - - $resourcePath = '/postcards'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - // query params - if ($sort_dir !== null) { - $queryParams['sort_dir'] = ObjectSerializer::toQueryValue($sort_dir); - } - // query params - if (is_array($fields)) { - $queryParams['fields'] = $fields; - } else - if ($fields !== null) { - $queryParams['fields'] = ObjectSerializer::toQueryValue($fields); - } - // query params - if (is_array($exclude_fields)) { - $queryParams['exclude_fields'] = $exclude_fields; - } else - if ($exclude_fields !== null) { - $queryParams['exclude_fields'] = ObjectSerializer::toQueryValue($exclude_fields); - } - // query params - if ($count !== null) { - $queryParams['count'] = ObjectSerializer::toQueryValue($count); - } - - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json', 'application/problem+json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json', 'application/problem+json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; - - if($headers['Content-Type'] === 'application/json') { - if ($httpBody instanceof \stdClass) { - $httpBody = \GuzzleHttp\json_encode($httpBody); - } - if (is_array($httpBody)) { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody)); - } - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); - } - } - - - // Basic Authentication - if (!empty($this->config->getUsername()) && !empty($this->config->getPassword())) { - $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); - } - - // OAuth Authentication - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = \GuzzleHttp\Psr7\build_query($queryParams); - return new Request( - 'GET', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - protected function createHttpClientOption() - { - $options = []; - if ($this->config->getDebug()) { - $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); - if (!$options[RequestOptions::DEBUG]) { - throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); - } - } - - return $options; - } -} diff --git a/lib/Api/ReportingApi.php b/lib/Api/ReportingApi.php index 0e5375d..c76ee94 100644 --- a/lib/Api/ReportingApi.php +++ b/lib/Api/ReportingApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/ReportsApi.php b/lib/Api/ReportsApi.php index 6a560c5..7279727 100644 --- a/lib/Api/ReportsApi.php +++ b/lib/Api/ReportsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/RootApi.php b/lib/Api/RootApi.php index 790ad99..0f75286 100644 --- a/lib/Api/RootApi.php +++ b/lib/Api/RootApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/SearchCampaignsApi.php b/lib/Api/SearchCampaignsApi.php index 7659698..387e41f 100644 --- a/lib/Api/SearchCampaignsApi.php +++ b/lib/Api/SearchCampaignsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/SearchMembersApi.php b/lib/Api/SearchMembersApi.php index b8153da..36c1184 100644 --- a/lib/Api/SearchMembersApi.php +++ b/lib/Api/SearchMembersApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/TemplateFoldersApi.php b/lib/Api/TemplateFoldersApi.php index b9fe08c..8918156 100644 --- a/lib/Api/TemplateFoldersApi.php +++ b/lib/Api/TemplateFoldersApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/TemplatesApi.php b/lib/Api/TemplatesApi.php index f29c895..a238410 100644 --- a/lib/Api/TemplatesApi.php +++ b/lib/Api/TemplatesApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Api/VerifiedDomainsApi.php b/lib/Api/VerifiedDomainsApi.php index 1c0d519..c703d1b 100644 --- a/lib/Api/VerifiedDomainsApi.php +++ b/lib/Api/VerifiedDomainsApi.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/ApiException.php b/lib/ApiException.php index 452cc2e..3d26e93 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/Configuration.php b/lib/Configuration.php index 3c05262..f4207fe 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -5,7 +5,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 @@ -28,15 +28,12 @@ use MailchimpMarketing\Api\CampaignsApi; use MailchimpMarketing\Api\ConnectedSitesApi; use MailchimpMarketing\Api\ConversationsApi; -use MailchimpMarketing\Api\DashboardApi; use MailchimpMarketing\Api\EcommerceApi; -use MailchimpMarketing\Api\ExternalAuthsApi; use MailchimpMarketing\Api\FacebookAdsApi; use MailchimpMarketing\Api\FileManagerApi; use MailchimpMarketing\Api\LandingPagesApi; use MailchimpMarketing\Api\ListsApi; use MailchimpMarketing\Api\PingApi; -use MailchimpMarketing\Api\PostcardsApi; use MailchimpMarketing\Api\ReportingApi; use MailchimpMarketing\Api\ReportsApi; use MailchimpMarketing\Api\RootApi; @@ -56,7 +53,7 @@ class Configuration protected $username = ''; protected $password = ''; protected $host = 'https://server.api.mailchimp.com/3.0'; - protected $userAgent = 'Swagger-Codegen/3.0.19/php'; + protected $userAgent = 'Swagger-Codegen/3.0.21/php'; protected $debug = false; protected $debugFile = 'php://output'; protected $tempFolderPath; @@ -74,15 +71,12 @@ public function __construct() $this->campaigns = new CampaignsApi($this); $this->connectedSites = new ConnectedSitesApi($this); $this->conversations = new ConversationsApi($this); - $this->dashboard = new DashboardApi($this); $this->ecommerce = new EcommerceApi($this); - $this->externalAuths = new ExternalAuthsApi($this); $this->facebookAds = new FacebookAdsApi($this); $this->fileManager = new FileManagerApi($this); $this->landingPages = new LandingPagesApi($this); $this->lists = new ListsApi($this); $this->ping = new PingApi($this); - $this->postcards = new PostcardsApi($this); $this->reporting = new ReportingApi($this); $this->reports = new ReportsApi($this); $this->root = new RootApi($this); @@ -249,8 +243,8 @@ public static function toDebugReport() $report = 'PHP SDK (MailchimpMarketing) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' OpenAPI Spec Version: 3.0.19' . PHP_EOL; - $report .= ' SDK Package Version: 3.0.19' . PHP_EOL; + $report .= ' OpenAPI Spec Version: 3.0.21' . PHP_EOL; + $report .= ' SDK Package Version: 3.0.21' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index dac57e6..f8f791d 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -14,7 +14,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12 diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 4f5c925..06f88e9 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -15,7 +15,7 @@ * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * - * OpenAPI spec version: 3.0.19 + * OpenAPI spec version: 3.0.21 * Contact: apihelp@mailchimp.com * Generated by: https://github.com/swagger-api/swagger-codegen.git * Swagger Codegen version: 2.4.12