From 115a8f0b05686d3d9dc185612d838909be3b9a0d Mon Sep 17 00:00:00 2001 From: ksvirkou Date: Wed, 9 Mar 2022 18:44:31 +0300 Subject: [PATCH] fix archived --- .../Automation/Actions/Api/CallbacksApi.php | 4 +- .../Automation/Actions/Api/DefinitionsApi.php | 16 +- .../Automation/Actions/Api/RevisionsApi.php | 8 +- codegen/Cms/AuditLogs/Api/AuditLogsApi.php | 34 ++-- .../Cms/Blogs/Authors/Api/BlogAuthorsApi.php | 88 +++++----- .../Cms/Blogs/BlogPosts/Api/BlogPostsApi.php | 120 +++++++------- codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php | 88 +++++----- codegen/Cms/Domains/Api/DomainsApi.php | 52 +++--- codegen/Cms/Hubdb/Api/RowsApi.php | 50 +++--- codegen/Cms/Hubdb/Api/RowsBatchApi.php | 14 +- codegen/Cms/Hubdb/Api/TablesApi.php | 152 +++++++++--------- .../Performance/Api/PublicPerformanceApi.php | 64 ++++---- codegen/Cms/SiteSearch/Api/PublicApi.php | 80 ++++----- codegen/Cms/UrlRedirects/Api/RedirectsApi.php | 58 +++---- .../Api/DefinitionApi.php | 2 +- .../Api/StatusApi.php | 6 +- .../VisitorIdentification/Api/GenerateApi.php | 2 +- codegen/Crm/Associations/Api/BatchApi.php | 6 +- codegen/Crm/Associations/Api/TypesApi.php | 2 +- codegen/Crm/Companies/Api/AssociationsApi.php | 14 +- codegen/Crm/Companies/Api/BasicApi.php | 58 +++---- codegen/Crm/Companies/Api/BatchApi.php | 12 +- codegen/Crm/Companies/Api/SearchApi.php | 2 +- codegen/Crm/Contacts/Api/AssociationsApi.php | 14 +- codegen/Crm/Contacts/Api/BasicApi.php | 50 +++--- codegen/Crm/Contacts/Api/BatchApi.php | 12 +- codegen/Crm/Contacts/Api/GDPRApi.php | 2 +- codegen/Crm/Contacts/Api/SearchApi.php | 2 +- codegen/Crm/Deals/Api/AssociationsApi.php | 14 +- codegen/Crm/Deals/Api/BasicApi.php | 58 +++---- codegen/Crm/Deals/Api/BatchApi.php | 12 +- codegen/Crm/Deals/Api/SearchApi.php | 2 +- .../Accounting/Api/CallbacksApi.php | 20 +-- .../Extensions/Accounting/Api/InvoiceApi.php | 18 +-- .../Crm/Extensions/Accounting/Api/SyncApi.php | 4 +- .../Accounting/Api/UserAccountsApi.php | 4 +- codegen/Crm/Imports/Api/CoreApi.php | 16 +- codegen/Crm/Imports/Api/PublicImportsApi.php | 8 +- codegen/Crm/LineItems/Api/AssociationsApi.php | 14 +- codegen/Crm/LineItems/Api/BasicApi.php | 58 +++---- codegen/Crm/LineItems/Api/BatchApi.php | 12 +- codegen/Crm/LineItems/Api/SearchApi.php | 2 +- codegen/Crm/Objects/Api/AssociationsApi.php | 14 +- codegen/Crm/Objects/Api/BasicApi.php | 58 +++---- codegen/Crm/Objects/Api/BatchApi.php | 12 +- codegen/Crm/Objects/Api/GDPRApi.php | 2 +- codegen/Crm/Objects/Api/SearchApi.php | 2 +- .../Api/AssociationsApi.php | 8 +- .../FeedbackSubmissions/Api/BasicApi.php | 44 ++--- .../FeedbackSubmissions/Api/BatchApi.php | 4 +- codegen/Crm/Owners/Api/OwnersApi.php | 28 ++-- .../Crm/Pipelines/Api/PipelineAuditsApi.php | 2 +- .../Pipelines/Api/PipelineStageAuditsApi.php | 2 +- .../Crm/Pipelines/Api/PipelineStagesApi.php | 24 +-- codegen/Crm/Pipelines/Api/PipelinesApi.php | 36 ++--- codegen/Crm/Products/Api/AssociationsApi.php | 14 +- codegen/Crm/Products/Api/BasicApi.php | 58 +++---- codegen/Crm/Products/Api/BatchApi.php | 12 +- codegen/Crm/Products/Api/SearchApi.php | 2 +- codegen/Crm/Properties/Api/BatchApi.php | 6 +- codegen/Crm/Properties/Api/CoreApi.php | 18 +-- codegen/Crm/Properties/Api/GroupsApi.php | 10 +- codegen/Crm/Quotes/Api/AssociationsApi.php | 8 +- codegen/Crm/Quotes/Api/BasicApi.php | 44 ++--- codegen/Crm/Quotes/Api/BatchApi.php | 4 +- codegen/Crm/Schemas/Api/CoreApi.php | 12 +- codegen/Crm/Tickets/Api/AssociationsApi.php | 14 +- codegen/Crm/Tickets/Api/BasicApi.php | 58 +++---- codegen/Crm/Tickets/Api/BatchApi.php | 12 +- codegen/Crm/Tickets/Api/SearchApi.php | 2 +- codegen/Crm/Timeline/Api/EventsApi.php | 14 +- codegen/Events/Api/EventsApi.php | 38 ++--- codegen/Files/Api/FilesApi.php | 132 +++++++-------- codegen/Files/Api/FoldersApi.php | 84 +++++----- .../Transactional/Api/PublicSmtpTokensApi.php | 16 +- .../Transactional/Api/SingleSendApi.php | 2 +- 76 files changed, 1025 insertions(+), 1025 deletions(-) diff --git a/codegen/Automation/Actions/Api/CallbacksApi.php b/codegen/Automation/Actions/Api/CallbacksApi.php index 674237f8..b80981b0 100644 --- a/codegen/Automation/Actions/Api/CallbacksApi.php +++ b/codegen/Automation/Actions/Api/CallbacksApi.php @@ -351,7 +351,7 @@ public function completeRequest($callback_id, $callback_completion_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -592,7 +592,7 @@ public function completeBatchRequest($batch_input_callback_completion_batch_requ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Automation/Actions/Api/DefinitionsApi.php b/codegen/Automation/Actions/Api/DefinitionsApi.php index 80729788..448e3a62 100644 --- a/codegen/Automation/Actions/Api/DefinitionsApi.php +++ b/codegen/Automation/Actions/Api/DefinitionsApi.php @@ -928,11 +928,11 @@ public function getByIdRequest($definition_id, $app_id, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1258,33 +1258,33 @@ public function getPageRequest($app_id, $limit = null, $after = null, $archived if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Automation/Actions/Api/RevisionsApi.php b/codegen/Automation/Actions/Api/RevisionsApi.php index ea6a9a41..2d1e6b04 100644 --- a/codegen/Automation/Actions/Api/RevisionsApi.php +++ b/codegen/Automation/Actions/Api/RevisionsApi.php @@ -696,22 +696,22 @@ public function getPageRequest($definition_id, $app_id, $limit = null, $after = if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } diff --git a/codegen/Cms/AuditLogs/Api/AuditLogsApi.php b/codegen/Cms/AuditLogs/Api/AuditLogsApi.php index 5f94ae68..bc078778 100644 --- a/codegen/Cms/AuditLogs/Api/AuditLogsApi.php +++ b/codegen/Cms/AuditLogs/Api/AuditLogsApi.php @@ -370,88 +370,88 @@ public function getPageRequest($object_id = null, $user_id = null, $after = null if ($object_id !== null) { if('form' === 'form' && is_array($object_id)) { foreach($object_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['objectId'] = $object_id; + $queryParams['objectId'] = ObjectSerializer::toQueryValue($object_id); } } // query params if ($user_id !== null) { if('form' === 'form' && is_array($user_id)) { foreach($user_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['userId'] = $user_id; + $queryParams['userId'] = ObjectSerializer::toQueryValue($user_id); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($event_type !== null) { if('form' === 'form' && is_array($event_type)) { foreach($event_type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['eventType'] = $event_type; + $queryParams['eventType'] = ObjectSerializer::toQueryValue($event_type); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($object_type !== null) { if('form' === 'form' && is_array($object_type)) { foreach($object_type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['objectType'] = $object_type; + $queryParams['objectType'] = ObjectSerializer::toQueryValue($object_type); } } @@ -500,7 +500,7 @@ public function getPageRequest($object_id = null, $user_id = null, $after = null $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php b/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php index 6e4fd33c..ddd57f30 100644 --- a/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php +++ b/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php @@ -289,11 +289,11 @@ public function archiveRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -350,7 +350,7 @@ public function archiveRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -591,7 +591,7 @@ public function archiveBatchRequest($batch_input_string) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -889,7 +889,7 @@ public function createRequest($blog_author) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1207,7 +1207,7 @@ public function createBatchRequest($batch_input_blog_author) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1462,11 +1462,11 @@ public function getByIdRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1523,7 +1523,7 @@ public function getByIdRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1812,110 +1812,110 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1964,7 +1964,7 @@ public function getPageRequest($created_at = null, $created_after = null, $creat $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2242,7 +2242,7 @@ public function postCmsV3BlogsAuthorsMultiLanguageAttachToLangGroupRequest($atta $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2540,7 +2540,7 @@ public function postCmsV3BlogsAuthorsMultiLanguageCreateLanguageVariationRequest $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2818,7 +2818,7 @@ public function postCmsV3BlogsAuthorsMultiLanguageDetachFromLangGroupRequest($de $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3096,7 +3096,7 @@ public function postCmsV3BlogsAuthorsMultiLanguageUpdateLanguagesRequest($update $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3337,7 +3337,7 @@ public function putCmsV3BlogsAuthorsMultiLanguageSetNewLangPrimaryRequest($set_n $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3612,11 +3612,11 @@ public function readBatchRequest($batch_input_string, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -3671,7 +3671,7 @@ public function readBatchRequest($batch_input_string, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3937,11 +3937,11 @@ public function updateRequest($object_id, $blog_author, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -4004,7 +4004,7 @@ public function updateRequest($object_id, $blog_author, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4279,11 +4279,11 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -4338,7 +4338,7 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php b/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php index 701565f6..905870d5 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php @@ -289,11 +289,11 @@ public function archiveRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -350,7 +350,7 @@ public function archiveRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -591,7 +591,7 @@ public function archiveBatchRequest($batch_input_string) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -889,7 +889,7 @@ public function callCloneRequest($content_clone_request_v_next) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1187,7 +1187,7 @@ public function createRequest($blog_post) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1505,7 +1505,7 @@ public function createBatchRequest($batch_input_blog_post) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1760,11 +1760,11 @@ public function getByIdRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1821,7 +1821,7 @@ public function getByIdRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2121,7 +2121,7 @@ public function getDraftByIdRequest($object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2410,110 +2410,110 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -2562,7 +2562,7 @@ public function getPageRequest($created_at = null, $created_after = null, $creat $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2881,7 +2881,7 @@ public function getPreviousVersionRequest($object_id, $revision_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3146,33 +3146,33 @@ public function getPreviousVersionsRequest($object_id, $after = null, $before = if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -3229,7 +3229,7 @@ public function getPreviousVersionsRequest($object_id, $after = null, $before = $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3507,7 +3507,7 @@ public function postCmsV3BlogsPostsMultiLanguageAttachToLangGroupRequest($attach $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3805,7 +3805,7 @@ public function postCmsV3BlogsPostsMultiLanguageCreateLanguageVariationRequest($ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4083,7 +4083,7 @@ public function postCmsV3BlogsPostsMultiLanguageDetachFromLangGroupRequest($deta $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4361,7 +4361,7 @@ public function postCmsV3BlogsPostsMultiLanguageUpdateLanguagesRequest($update_l $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4604,7 +4604,7 @@ public function pushLiveRequest($object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4845,7 +4845,7 @@ public function putCmsV3BlogsPostsMultiLanguageSetNewLangPrimaryRequest($set_new $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -5120,11 +5120,11 @@ public function readBatchRequest($batch_input_string, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -5179,7 +5179,7 @@ public function readBatchRequest($batch_input_string, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -5422,7 +5422,7 @@ public function resetDraftRequest($object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -5741,7 +5741,7 @@ public function restorePreviousVersionRequest($object_id, $revision_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -6060,7 +6060,7 @@ public function restorePreviousVersionToDraftRequest($object_id, $revision_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -6301,7 +6301,7 @@ public function scheduleRequest($content_schedule_request_v_next) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -6567,11 +6567,11 @@ public function updateRequest($object_id, $blog_post, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -6634,7 +6634,7 @@ public function updateRequest($object_id, $blog_post, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -6909,11 +6909,11 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -6968,7 +6968,7 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -7285,7 +7285,7 @@ public function updateDraftRequest($object_id, $blog_post) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php b/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php index d87d1070..f6203e7d 100644 --- a/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php +++ b/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php @@ -289,11 +289,11 @@ public function archiveRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -350,7 +350,7 @@ public function archiveRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -591,7 +591,7 @@ public function archiveBatchRequest($batch_input_string) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -889,7 +889,7 @@ public function createRequest($tag) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1207,7 +1207,7 @@ public function createBatchRequest($batch_input_tag) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1462,11 +1462,11 @@ public function getByIdRequest($object_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1523,7 +1523,7 @@ public function getByIdRequest($object_id, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1812,110 +1812,110 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1964,7 +1964,7 @@ public function getPageRequest($created_at = null, $created_after = null, $creat $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2242,7 +2242,7 @@ public function postCmsV3BlogsTagsMultiLanguageAttachToLangGroupRequest($attach_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2540,7 +2540,7 @@ public function postCmsV3BlogsTagsMultiLanguageCreateLanguageVariationRequest($t $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2818,7 +2818,7 @@ public function postCmsV3BlogsTagsMultiLanguageDetachFromLangGroupRequest($detac $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3096,7 +3096,7 @@ public function postCmsV3BlogsTagsMultiLanguageUpdateLanguagesRequest($update_la $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3337,7 +3337,7 @@ public function putCmsV3BlogsTagsMultiLanguageSetNewLangPrimaryRequest($set_new_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3612,11 +3612,11 @@ public function readBatchRequest($batch_input_string, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -3671,7 +3671,7 @@ public function readBatchRequest($batch_input_string, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3937,11 +3937,11 @@ public function updateRequest($object_id, $tag, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -4004,7 +4004,7 @@ public function updateRequest($object_id, $tag, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4279,11 +4279,11 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -4338,7 +4338,7 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Domains/Api/DomainsApi.php b/codegen/Cms/Domains/Api/DomainsApi.php index 0081fa80..a1538025 100644 --- a/codegen/Cms/Domains/Api/DomainsApi.php +++ b/codegen/Cms/Domains/Api/DomainsApi.php @@ -346,11 +346,11 @@ public function getByIdRequest($domain_id, $archived = null) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -702,132 +702,132 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Cms/Hubdb/Api/RowsApi.php b/codegen/Cms/Hubdb/Api/RowsApi.php index 3179a477..829cf4aa 100644 --- a/codegen/Cms/Hubdb/Api/RowsApi.php +++ b/codegen/Cms/Hubdb/Api/RowsApi.php @@ -414,7 +414,7 @@ public function cloneDraftTableRowRequest($table_id_or_name, $row_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -731,7 +731,7 @@ public function createTableRowRequest($table_id_or_name, $hub_db_table_row_v3_re $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1054,7 +1054,7 @@ public function getDraftTableRowByIdRequest($table_id_or_name, $row_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1377,7 +1377,7 @@ public function getTableRowRequest($table_id_or_name, $row_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1647,44 +1647,44 @@ public function getTableRowsRequest($table_id_or_name, $sort = null, $after = nu if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } @@ -1741,7 +1741,7 @@ public function getTableRowsRequest($table_id_or_name, $sort = null, $after = nu $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2007,7 +2007,7 @@ public function purgeDraftTableRowRequest($table_id_or_name, $row_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2277,44 +2277,44 @@ public function readDraftTableRowsRequest($table_id_or_name, $sort = null, $afte if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } @@ -2371,7 +2371,7 @@ public function readDraftTableRowsRequest($table_id_or_name, $sort = null, $afte $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2711,7 +2711,7 @@ public function replaceDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3051,7 +3051,7 @@ public function updateDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_t $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Hubdb/Api/RowsBatchApi.php b/codegen/Cms/Hubdb/Api/RowsBatchApi.php index c299f17d..5cf57a38 100644 --- a/codegen/Cms/Hubdb/Api/RowsBatchApi.php +++ b/codegen/Cms/Hubdb/Api/RowsBatchApi.php @@ -408,7 +408,7 @@ public function batchCloneDraftTableRowsRequest($table_id_or_name, $batch_input_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -745,7 +745,7 @@ public function batchCreateDraftTableRowsRequest($table_id_or_name, $batch_input $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1005,7 +1005,7 @@ public function batchPurgeDraftTableRowsRequest($table_id_or_name, $batch_input_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1342,7 +1342,7 @@ public function batchReadDraftTableRowsRequest($table_id_or_name, $batch_input_s $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1679,7 +1679,7 @@ public function batchReadTableRowsRequest($table_id_or_name, $batch_input_string $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2016,7 +2016,7 @@ public function batchReplaceDraftTableRowsRequest($table_id_or_name, $batch_inpu $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2353,7 +2353,7 @@ public function batchUpdateDraftTableRowsRequest($table_id_or_name, $batch_input $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Hubdb/Api/TablesApi.php b/codegen/Cms/Hubdb/Api/TablesApi.php index 94cde999..3f1ba96b 100644 --- a/codegen/Cms/Hubdb/Api/TablesApi.php +++ b/codegen/Cms/Hubdb/Api/TablesApi.php @@ -334,7 +334,7 @@ public function archiveTableRequest($table_id_or_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -651,7 +651,7 @@ public function cloneDraftTableRequest($table_id_or_name, $hub_db_table_clone_re $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -949,7 +949,7 @@ public function createTableRequest($hub_db_table_v3_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1204,11 +1204,11 @@ public function exportDraftTableRequest($table_id_or_name, $format = null) if ($format !== null) { if('form' === 'form' && is_array($format)) { foreach($format as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['format'] = $format; + $queryParams['format'] = ObjectSerializer::toQueryValue($format); } } @@ -1265,7 +1265,7 @@ public function exportDraftTableRequest($table_id_or_name, $format = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1520,11 +1520,11 @@ public function exportTableRequest($table_id_or_name, $format = null) if ($format !== null) { if('form' === 'form' && is_array($format)) { foreach($format as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['format'] = $format; + $queryParams['format'] = ObjectSerializer::toQueryValue($format); } } @@ -1581,7 +1581,7 @@ public function exportTableRequest($table_id_or_name, $format = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1870,110 +1870,110 @@ public function getAllDraftTablesRequest($sort = null, $after = null, $limit = n if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -2022,7 +2022,7 @@ public function getAllDraftTablesRequest($sort = null, $after = null, $limit = n $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2311,110 +2311,110 @@ public function getAllTablesRequest($sort = null, $after = null, $limit = null, if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -2463,7 +2463,7 @@ public function getAllTablesRequest($sort = null, $after = null, $limit = null, $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2723,22 +2723,22 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -2795,7 +2795,7 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3055,22 +3055,22 @@ public function getTableDetailsRequest($table_id_or_name, $archived = null, $inc if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -3127,7 +3127,7 @@ public function getTableDetailsRequest($table_id_or_name, $archived = null, $inc $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3453,7 +3453,7 @@ public function importDraftTableRequest($table_id_or_name, $config = null, $file $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3708,11 +3708,11 @@ public function publishDraftTableRequest($table_id_or_name, $include_foreign_ids if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -3769,7 +3769,7 @@ public function publishDraftTableRequest($table_id_or_name, $include_foreign_ids $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4024,11 +4024,11 @@ public function resetDraftTableRequest($table_id_or_name, $include_foreign_ids = if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -4085,7 +4085,7 @@ public function resetDraftTableRequest($table_id_or_name, $include_foreign_ids = $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4340,11 +4340,11 @@ public function unpublishTableRequest($table_id_or_name, $include_foreign_ids = if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -4401,7 +4401,7 @@ public function unpublishTableRequest($table_id_or_name, $include_foreign_ids = $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -4672,22 +4672,22 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($include_foreign_ids !== null) { if('form' === 'form' && is_array($include_foreign_ids)) { foreach($include_foreign_ids as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['includeForeignIds'] = $include_foreign_ids; + $queryParams['includeForeignIds'] = ObjectSerializer::toQueryValue($include_foreign_ids); } } @@ -4750,7 +4750,7 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/Performance/Api/PublicPerformanceApi.php b/codegen/Cms/Performance/Api/PublicPerformanceApi.php index 7297a7a2..e9594bf0 100644 --- a/codegen/Cms/Performance/Api/PublicPerformanceApi.php +++ b/codegen/Cms/Performance/Api/PublicPerformanceApi.php @@ -370,88 +370,88 @@ public function getPageRequest($domain = null, $path = null, $pad = null, $sum = if ($domain !== null) { if('form' === 'form' && is_array($domain)) { foreach($domain as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['domain'] = $domain; + $queryParams['domain'] = ObjectSerializer::toQueryValue($domain); } } // query params if ($path !== null) { if('form' === 'form' && is_array($path)) { foreach($path as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['path'] = $path; + $queryParams['path'] = ObjectSerializer::toQueryValue($path); } } // query params if ($pad !== null) { if('form' === 'form' && is_array($pad)) { foreach($pad as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['pad'] = $pad; + $queryParams['pad'] = ObjectSerializer::toQueryValue($pad); } } // query params if ($sum !== null) { if('form' === 'form' && is_array($sum)) { foreach($sum as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sum'] = $sum; + $queryParams['sum'] = ObjectSerializer::toQueryValue($sum); } } // query params if ($period !== null) { if('form' === 'form' && is_array($period)) { foreach($period as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['period'] = $period; + $queryParams['period'] = ObjectSerializer::toQueryValue($period); } } // query params if ($interval !== null) { if('form' === 'form' && is_array($interval)) { foreach($interval as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['interval'] = $interval; + $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); } } // query params if ($start !== null) { if('form' === 'form' && is_array($start)) { foreach($start as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['start'] = $start; + $queryParams['start'] = ObjectSerializer::toQueryValue($start); } } // query params if ($end !== null) { if('form' === 'form' && is_array($end)) { foreach($end as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['end'] = $end; + $queryParams['end'] = ObjectSerializer::toQueryValue($end); } } @@ -775,88 +775,88 @@ public function getUptimeRequest($domain = null, $path = null, $pad = null, $sum if ($domain !== null) { if('form' === 'form' && is_array($domain)) { foreach($domain as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['domain'] = $domain; + $queryParams['domain'] = ObjectSerializer::toQueryValue($domain); } } // query params if ($path !== null) { if('form' === 'form' && is_array($path)) { foreach($path as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['path'] = $path; + $queryParams['path'] = ObjectSerializer::toQueryValue($path); } } // query params if ($pad !== null) { if('form' === 'form' && is_array($pad)) { foreach($pad as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['pad'] = $pad; + $queryParams['pad'] = ObjectSerializer::toQueryValue($pad); } } // query params if ($sum !== null) { if('form' === 'form' && is_array($sum)) { foreach($sum as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sum'] = $sum; + $queryParams['sum'] = ObjectSerializer::toQueryValue($sum); } } // query params if ($period !== null) { if('form' === 'form' && is_array($period)) { foreach($period as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['period'] = $period; + $queryParams['period'] = ObjectSerializer::toQueryValue($period); } } // query params if ($interval !== null) { if('form' === 'form' && is_array($interval)) { foreach($interval as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['interval'] = $interval; + $queryParams['interval'] = ObjectSerializer::toQueryValue($interval); } } // query params if ($start !== null) { if('form' === 'form' && is_array($start)) { foreach($start as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['start'] = $start; + $queryParams['start'] = ObjectSerializer::toQueryValue($start); } } // query params if ($end !== null) { if('form' === 'form' && is_array($end)) { foreach($end as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['end'] = $end; + $queryParams['end'] = ObjectSerializer::toQueryValue($end); } } diff --git a/codegen/Cms/SiteSearch/Api/PublicApi.php b/codegen/Cms/SiteSearch/Api/PublicApi.php index 95789786..dfdc7c93 100644 --- a/codegen/Cms/SiteSearch/Api/PublicApi.php +++ b/codegen/Cms/SiteSearch/Api/PublicApi.php @@ -350,11 +350,11 @@ public function getByIdRequest($content_id, $type = null) if ($type !== null) { if('form' === 'form' && is_array($type)) { foreach($type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['type'] = $type; + $queryParams['type'] = ObjectSerializer::toQueryValue($type); } } @@ -411,7 +411,7 @@ public function getByIdRequest($content_id, $type = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -740,198 +740,198 @@ public function searchRequest($q = null, $limit = null, $offset = null, $languag if ($q !== null) { if('form' === 'form' && is_array($q)) { foreach($q as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['q'] = $q; + $queryParams['q'] = ObjectSerializer::toQueryValue($q); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($offset !== null) { if('form' === 'form' && is_array($offset)) { foreach($offset as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['offset'] = $offset; + $queryParams['offset'] = ObjectSerializer::toQueryValue($offset); } } // query params if ($language !== null) { if('form' === 'form' && is_array($language)) { foreach($language as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['language'] = $language; + $queryParams['language'] = ObjectSerializer::toQueryValue($language); } } // query params if ($match_prefix !== null) { if('form' === 'form' && is_array($match_prefix)) { foreach($match_prefix as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['matchPrefix'] = $match_prefix; + $queryParams['matchPrefix'] = ObjectSerializer::toQueryValue($match_prefix); } } // query params if ($autocomplete !== null) { if('form' === 'form' && is_array($autocomplete)) { foreach($autocomplete as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['autocomplete'] = $autocomplete; + $queryParams['autocomplete'] = ObjectSerializer::toQueryValue($autocomplete); } } // query params if ($popularity_boost !== null) { if('form' === 'form' && is_array($popularity_boost)) { foreach($popularity_boost as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['popularityBoost'] = $popularity_boost; + $queryParams['popularityBoost'] = ObjectSerializer::toQueryValue($popularity_boost); } } // query params if ($boost_limit !== null) { if('form' === 'form' && is_array($boost_limit)) { foreach($boost_limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['boostLimit'] = $boost_limit; + $queryParams['boostLimit'] = ObjectSerializer::toQueryValue($boost_limit); } } // query params if ($min_score !== null) { if('form' === 'form' && is_array($min_score)) { foreach($min_score as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['minScore'] = $min_score; + $queryParams['minScore'] = ObjectSerializer::toQueryValue($min_score); } } // query params if ($boost_recent !== null) { if('form' === 'form' && is_array($boost_recent)) { foreach($boost_recent as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['boostRecent'] = $boost_recent; + $queryParams['boostRecent'] = ObjectSerializer::toQueryValue($boost_recent); } } // query params if ($table_id !== null) { if('form' === 'form' && is_array($table_id)) { foreach($table_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['tableId'] = $table_id; + $queryParams['tableId'] = ObjectSerializer::toQueryValue($table_id); } } // query params if ($hubdb_query !== null) { if('form' === 'form' && is_array($hubdb_query)) { foreach($hubdb_query as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['hubdbQuery'] = $hubdb_query; + $queryParams['hubdbQuery'] = ObjectSerializer::toQueryValue($hubdb_query); } } // query params if ($domain !== null) { if('form' === 'form' && is_array($domain)) { foreach($domain as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['domain'] = $domain; + $queryParams['domain'] = ObjectSerializer::toQueryValue($domain); } } // query params if ($type !== null) { if('form' === 'form' && is_array($type)) { foreach($type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['type'] = $type; + $queryParams['type'] = ObjectSerializer::toQueryValue($type); } } // query params if ($path_prefix !== null) { if('form' === 'form' && is_array($path_prefix)) { foreach($path_prefix as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['pathPrefix'] = $path_prefix; + $queryParams['pathPrefix'] = ObjectSerializer::toQueryValue($path_prefix); } } // query params if ($property !== null) { if('form' === 'form' && is_array($property)) { foreach($property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['property'] = $property; + $queryParams['property'] = ObjectSerializer::toQueryValue($property); } } // query params if ($length !== null) { if('form' === 'form' && is_array($length)) { foreach($length as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['length'] = $length; + $queryParams['length'] = ObjectSerializer::toQueryValue($length); } } // query params if ($group_id !== null) { if('form' === 'form' && is_array($group_id)) { foreach($group_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['groupId'] = $group_id; + $queryParams['groupId'] = ObjectSerializer::toQueryValue($group_id); } } @@ -980,7 +980,7 @@ public function searchRequest($q = null, $limit = null, $offset = null, $languag $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Cms/UrlRedirects/Api/RedirectsApi.php b/codegen/Cms/UrlRedirects/Api/RedirectsApi.php index ee48fcf8..87ef119f 100644 --- a/codegen/Cms/UrlRedirects/Api/RedirectsApi.php +++ b/codegen/Cms/UrlRedirects/Api/RedirectsApi.php @@ -334,7 +334,7 @@ public function archiveRequest($url_redirect_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -626,7 +626,7 @@ public function createRequest($url_mapping_create_request_body = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -926,7 +926,7 @@ public function getByIdRequest($url_redirect_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1225,132 +1225,132 @@ public function getPageRequest($created_at = null, $created_after = null, $creat if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_after !== null) { if('form' === 'form' && is_array($created_after)) { foreach($created_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAfter'] = $created_after; + $queryParams['createdAfter'] = ObjectSerializer::toQueryValue($created_after); } } // query params if ($created_before !== null) { if('form' === 'form' && is_array($created_before)) { foreach($created_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdBefore'] = $created_before; + $queryParams['createdBefore'] = ObjectSerializer::toQueryValue($created_before); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_after !== null) { if('form' === 'form' && is_array($updated_after)) { foreach($updated_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAfter'] = $updated_after; + $queryParams['updatedAfter'] = ObjectSerializer::toQueryValue($updated_after); } } // query params if ($updated_before !== null) { if('form' === 'form' && is_array($updated_before)) { foreach($updated_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedBefore'] = $updated_before; + $queryParams['updatedBefore'] = ObjectSerializer::toQueryValue($updated_before); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1399,7 +1399,7 @@ public function getPageRequest($created_at = null, $created_after = null, $creat $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1710,7 +1710,7 @@ public function updateRequest($url_redirect_id, $url_mapping = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/CommunicationPreferences/Api/DefinitionApi.php b/codegen/CommunicationPreferences/Api/DefinitionApi.php index 018f5817..7f9cf661 100644 --- a/codegen/CommunicationPreferences/Api/DefinitionApi.php +++ b/codegen/CommunicationPreferences/Api/DefinitionApi.php @@ -372,7 +372,7 @@ public function getPageRequest() $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/CommunicationPreferences/Api/StatusApi.php b/codegen/CommunicationPreferences/Api/StatusApi.php index 293329a2..1bc092f6 100644 --- a/codegen/CommunicationPreferences/Api/StatusApi.php +++ b/codegen/CommunicationPreferences/Api/StatusApi.php @@ -391,7 +391,7 @@ public function getEmailStatusRequest($email_address) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -689,7 +689,7 @@ public function subscribeRequest($public_update_subscription_status_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -987,7 +987,7 @@ public function unsubscribeRequest($public_update_subscription_status_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php b/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php index 7b751b6e..092026a2 100644 --- a/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php +++ b/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php @@ -389,7 +389,7 @@ public function generateTokenRequest($identification_token_generation_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Associations/Api/BatchApi.php b/codegen/Crm/Associations/Api/BatchApi.php index f45f2677..ed8a6c76 100644 --- a/codegen/Crm/Associations/Api/BatchApi.php +++ b/codegen/Crm/Associations/Api/BatchApi.php @@ -364,7 +364,7 @@ public function archiveRequest($from_object_type, $to_object_type, $batch_input_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -714,7 +714,7 @@ public function createRequest($from_object_type, $to_object_type, $batch_input_p $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1064,7 +1064,7 @@ public function readRequest($from_object_type, $to_object_type, $batch_input_pub $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Associations/Api/TypesApi.php b/codegen/Crm/Associations/Api/TypesApi.php index be5f2d19..28ffe52b 100644 --- a/codegen/Crm/Associations/Api/TypesApi.php +++ b/codegen/Crm/Associations/Api/TypesApi.php @@ -410,7 +410,7 @@ public function getAllRequest($from_object_type, $to_object_type) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Companies/Api/AssociationsApi.php b/codegen/Crm/Companies/Api/AssociationsApi.php index d9a5422c..360118b8 100644 --- a/codegen/Crm/Companies/Api/AssociationsApi.php +++ b/codegen/Crm/Companies/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($company_id, $to_object_type, $to_object_id, $ass $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($company_id, $to_object_type, $to_object_id, $asso $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($company_id, $to_object_type, $after = null, $limi if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($company_id, $to_object_type, $after = null, $limi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Companies/Api/BasicApi.php b/codegen/Crm/Companies/Api/BasicApi.php index 728e8d90..6ed11503 100644 --- a/codegen/Crm/Companies/Api/BasicApi.php +++ b/codegen/Crm/Companies/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($company_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -907,55 +907,55 @@ public function getByIdRequest($company_id, $properties = null, $properties_with if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1012,7 +1012,7 @@ public function getByIdRequest($company_id, $properties = null, $properties_with $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1281,66 +1281,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1389,7 +1389,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1655,11 +1655,11 @@ public function updateRequest($company_id, $simple_public_object_input, $id_prop if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1722,7 +1722,7 @@ public function updateRequest($company_id, $simple_public_object_input, $id_prop $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Companies/Api/BatchApi.php b/codegen/Crm/Companies/Api/BatchApi.php index 3011cc08..f6f8bfb6 100644 --- a/codegen/Crm/Companies/Api/BatchApi.php +++ b/codegen/Crm/Companies/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Companies/Api/SearchApi.php b/codegen/Crm/Companies/Api/SearchApi.php index d7f16cb2..a8f15275 100644 --- a/codegen/Crm/Companies/Api/SearchApi.php +++ b/codegen/Crm/Companies/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Contacts/Api/AssociationsApi.php b/codegen/Crm/Contacts/Api/AssociationsApi.php index bd58662b..4fd0503c 100644 --- a/codegen/Crm/Contacts/Api/AssociationsApi.php +++ b/codegen/Crm/Contacts/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($contact_id, $to_object_type, $to_object_id, $ass $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($contact_id, $to_object_type, $to_object_id, $asso $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($contact_id, $to_object_type, $after = null, $limi if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($contact_id, $to_object_type, $after = null, $limi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Contacts/Api/BasicApi.php b/codegen/Crm/Contacts/Api/BasicApi.php index 5191b994..a2cac8d5 100644 --- a/codegen/Crm/Contacts/Api/BasicApi.php +++ b/codegen/Crm/Contacts/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($contact_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -902,44 +902,44 @@ public function getByIdRequest($contact_id, $properties = null, $properties_with if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -996,7 +996,7 @@ public function getByIdRequest($contact_id, $properties = null, $properties_with $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1265,66 +1265,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1373,7 +1373,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1690,7 +1690,7 @@ public function updateRequest($contact_id, $simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Contacts/Api/BatchApi.php b/codegen/Crm/Contacts/Api/BatchApi.php index 70a21f0a..901f65df 100644 --- a/codegen/Crm/Contacts/Api/BatchApi.php +++ b/codegen/Crm/Contacts/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Contacts/Api/GDPRApi.php b/codegen/Crm/Contacts/Api/GDPRApi.php index 3bbfbcc6..d7dbfc31 100644 --- a/codegen/Crm/Contacts/Api/GDPRApi.php +++ b/codegen/Crm/Contacts/Api/GDPRApi.php @@ -332,7 +332,7 @@ public function postCrmV3ObjectsContactsGdprDeleteRequest($public_gdpr_delete_in $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Contacts/Api/SearchApi.php b/codegen/Crm/Contacts/Api/SearchApi.php index 5e874e28..c0e2b24e 100644 --- a/codegen/Crm/Contacts/Api/SearchApi.php +++ b/codegen/Crm/Contacts/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Deals/Api/AssociationsApi.php b/codegen/Crm/Deals/Api/AssociationsApi.php index 9c0bc43e..4a3475ef 100644 --- a/codegen/Crm/Deals/Api/AssociationsApi.php +++ b/codegen/Crm/Deals/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($deal_id, $to_object_type, $to_object_id, $associ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($deal_id, $to_object_type, $to_object_id, $associa $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($deal_id, $to_object_type, $after = null, $limit = if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($deal_id, $to_object_type, $after = null, $limit = $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Deals/Api/BasicApi.php b/codegen/Crm/Deals/Api/BasicApi.php index 8387d5f3..8a79f6a1 100644 --- a/codegen/Crm/Deals/Api/BasicApi.php +++ b/codegen/Crm/Deals/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($deal_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -907,55 +907,55 @@ public function getByIdRequest($deal_id, $properties = null, $properties_with_hi if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1012,7 +1012,7 @@ public function getByIdRequest($deal_id, $properties = null, $properties_with_hi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1281,66 +1281,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1389,7 +1389,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1655,11 +1655,11 @@ public function updateRequest($deal_id, $simple_public_object_input, $id_propert if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1722,7 +1722,7 @@ public function updateRequest($deal_id, $simple_public_object_input, $id_propert $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Deals/Api/BatchApi.php b/codegen/Crm/Deals/Api/BatchApi.php index 8ce5b478..a8ce4767 100644 --- a/codegen/Crm/Deals/Api/BatchApi.php +++ b/codegen/Crm/Deals/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Deals/Api/SearchApi.php b/codegen/Crm/Deals/Api/SearchApi.php index 67bd15b8..7157b4db 100644 --- a/codegen/Crm/Deals/Api/SearchApi.php +++ b/codegen/Crm/Deals/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php b/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php index 38e8e1f2..6fe14db6 100644 --- a/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php @@ -351,7 +351,7 @@ public function createCustomerRequest($request_id, $result_id_accounting_respons $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -611,7 +611,7 @@ public function createExchangeRateRequest($request_id, $exchange_rate_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -871,7 +871,7 @@ public function createInvoiceRequest($request_id, $result_id_accounting_response $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1131,7 +1131,7 @@ public function createTermRequest($request_id, $terms_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1391,7 +1391,7 @@ public function doCustomerSearchRequest($request_id, $customer_search_response_e $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1651,7 +1651,7 @@ public function doInvoiceSearchRequest($request_id, $invoice_search_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1911,7 +1911,7 @@ public function doProductSearchRequest($request_id, $product_search_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2171,7 +2171,7 @@ public function doTaxSearchRequest($request_id, $tax_search_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2431,7 +2431,7 @@ public function getByIdRequest($request_id, $invoices_response_external) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2691,7 +2691,7 @@ public function invoicePdfRequest($request_id, $invoice_pdf_response) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php b/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php index 6507c59a..7cb8e328 100644 --- a/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php @@ -357,11 +357,11 @@ public function createPaymentRequest($invoice_id, $invoice_create_payment_reques if ($account_id !== null) { if('form' === 'form' && is_array($account_id)) { foreach($account_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['accountId'] = $account_id; + $queryParams['accountId'] = ObjectSerializer::toQueryValue($account_id); } } @@ -424,7 +424,7 @@ public function createPaymentRequest($invoice_id, $invoice_create_payment_reques $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -685,11 +685,11 @@ public function getByIdRequest($invoice_id, $account_id) if ($account_id !== null) { if('form' === 'form' && is_array($account_id)) { foreach($account_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['accountId'] = $account_id; + $queryParams['accountId'] = ObjectSerializer::toQueryValue($account_id); } } @@ -746,7 +746,7 @@ public function getByIdRequest($invoice_id, $account_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1018,11 +1018,11 @@ public function updateRequest($invoice_id, $account_id, $invoice_update_request) if ($account_id !== null) { if('form' === 'form' && is_array($account_id)) { foreach($account_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['accountId'] = $account_id; + $queryParams['accountId'] = ObjectSerializer::toQueryValue($account_id); } } @@ -1085,7 +1085,7 @@ public function updateRequest($invoice_id, $account_id, $invoice_update_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Extensions/Accounting/Api/SyncApi.php b/codegen/Crm/Extensions/Accounting/Api/SyncApi.php index a7622b68..662d923c 100644 --- a/codegen/Crm/Extensions/Accounting/Api/SyncApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/SyncApi.php @@ -408,7 +408,7 @@ public function createContactRequest($app_id, $sync_contacts_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -725,7 +725,7 @@ public function createProductRequest($app_id, $sync_products_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php b/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php index 0c05476f..2391436b 100644 --- a/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php @@ -334,7 +334,7 @@ public function archiveRequest($account_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -575,7 +575,7 @@ public function replaceRequest($create_user_account_request_external) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Imports/Api/CoreApi.php b/codegen/Crm/Imports/Api/CoreApi.php index f26674c4..077121f0 100644 --- a/codegen/Crm/Imports/Api/CoreApi.php +++ b/codegen/Crm/Imports/Api/CoreApi.php @@ -391,7 +391,7 @@ public function cancelRequest($import_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -698,7 +698,7 @@ public function createRequest($files = null, $import_request = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1248,33 +1248,33 @@ public function getPageRequest($after = null, $before = null, $limit = null) if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } diff --git a/codegen/Crm/Imports/Api/PublicImportsApi.php b/codegen/Crm/Imports/Api/PublicImportsApi.php index 9c9f1e70..b559a086 100644 --- a/codegen/Crm/Imports/Api/PublicImportsApi.php +++ b/codegen/Crm/Imports/Api/PublicImportsApi.php @@ -343,22 +343,22 @@ public function getErrorsRequest($import_id, $after = null, $limit = null) if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } diff --git a/codegen/Crm/LineItems/Api/AssociationsApi.php b/codegen/Crm/LineItems/Api/AssociationsApi.php index 7bed8a35..6a3f026d 100644 --- a/codegen/Crm/LineItems/Api/AssociationsApi.php +++ b/codegen/Crm/LineItems/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($line_item_id, $to_object_type, $to_object_id, $a $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($line_item_id, $to_object_type, $to_object_id, $as $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($line_item_id, $to_object_type, $after = null, $li if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($line_item_id, $to_object_type, $after = null, $li $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/LineItems/Api/BasicApi.php b/codegen/Crm/LineItems/Api/BasicApi.php index f4eaa999..9f2625bf 100644 --- a/codegen/Crm/LineItems/Api/BasicApi.php +++ b/codegen/Crm/LineItems/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($line_item_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -907,55 +907,55 @@ public function getByIdRequest($line_item_id, $properties = null, $properties_wi if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1012,7 +1012,7 @@ public function getByIdRequest($line_item_id, $properties = null, $properties_wi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1281,66 +1281,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1389,7 +1389,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1655,11 +1655,11 @@ public function updateRequest($line_item_id, $simple_public_object_input, $id_pr if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1722,7 +1722,7 @@ public function updateRequest($line_item_id, $simple_public_object_input, $id_pr $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/LineItems/Api/BatchApi.php b/codegen/Crm/LineItems/Api/BatchApi.php index d1fc5b3f..eff7b879 100644 --- a/codegen/Crm/LineItems/Api/BatchApi.php +++ b/codegen/Crm/LineItems/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/LineItems/Api/SearchApi.php b/codegen/Crm/LineItems/Api/SearchApi.php index ac6b0b36..0c933355 100644 --- a/codegen/Crm/LineItems/Api/SearchApi.php +++ b/codegen/Crm/LineItems/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/Api/AssociationsApi.php b/codegen/Crm/Objects/Api/AssociationsApi.php index 115d4e7e..4703bf03 100644 --- a/codegen/Crm/Objects/Api/AssociationsApi.php +++ b/codegen/Crm/Objects/Api/AssociationsApi.php @@ -410,7 +410,7 @@ public function archiveRequest($object_type, $object_id, $to_object_type, $to_ob $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -786,7 +786,7 @@ public function createRequest($object_type, $object_id, $to_object_type, $to_obj $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1068,22 +1068,22 @@ public function getAllRequest($object_type, $object_id, $to_object_type, $after if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1156,7 +1156,7 @@ public function getAllRequest($object_type, $object_id, $to_object_type, $after $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/Api/BasicApi.php b/codegen/Crm/Objects/Api/BasicApi.php index ac79c3a8..9e278744 100644 --- a/codegen/Crm/Objects/Api/BasicApi.php +++ b/codegen/Crm/Objects/Api/BasicApi.php @@ -353,7 +353,7 @@ public function archiveRequest($object_type, $object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -670,7 +670,7 @@ public function createRequest($object_type, $simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -956,55 +956,55 @@ public function getByIdRequest($object_type, $object_id, $properties = null, $pr if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1069,7 +1069,7 @@ public function getByIdRequest($object_type, $object_id, $properties = null, $pr $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1349,66 +1349,66 @@ public function getPageRequest($object_type, $limit = 10, $after = null, $proper if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1465,7 +1465,7 @@ public function getPageRequest($object_type, $limit = 10, $after = null, $proper $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1742,11 +1742,11 @@ public function updateRequest($object_type, $object_id, $simple_public_object_in if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1817,7 +1817,7 @@ public function updateRequest($object_type, $object_id, $simple_public_object_in $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/Api/BatchApi.php b/codegen/Crm/Objects/Api/BatchApi.php index 6f3b0b08..b7755ef6 100644 --- a/codegen/Crm/Objects/Api/BatchApi.php +++ b/codegen/Crm/Objects/Api/BatchApi.php @@ -351,7 +351,7 @@ public function archiveRequest($object_type, $batch_input_simple_public_object_i $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -688,7 +688,7 @@ public function createRequest($object_type, $batch_input_simple_public_object_in $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -974,11 +974,11 @@ public function readRequest($object_type, $batch_read_input_simple_public_object if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1041,7 +1041,7 @@ public function readRequest($object_type, $batch_read_input_simple_public_object $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1378,7 +1378,7 @@ public function updateRequest($object_type, $batch_input_simple_public_object_ba $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/Api/GDPRApi.php b/codegen/Crm/Objects/Api/GDPRApi.php index cd1b9207..e53d30bf 100644 --- a/codegen/Crm/Objects/Api/GDPRApi.php +++ b/codegen/Crm/Objects/Api/GDPRApi.php @@ -351,7 +351,7 @@ public function postCrmV3ObjectsObjectTypeGdprDeleteRequest($object_type, $publi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/Api/SearchApi.php b/codegen/Crm/Objects/Api/SearchApi.php index 419bcb0c..c3d88e4e 100644 --- a/codegen/Crm/Objects/Api/SearchApi.php +++ b/codegen/Crm/Objects/Api/SearchApi.php @@ -400,7 +400,7 @@ public function doSearchRequest($object_type, $public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/AssociationsApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/AssociationsApi.php index afca6c64..cda0f6b9 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/AssociationsApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/AssociationsApi.php @@ -362,22 +362,22 @@ public function getAllRequest($feedback_submission_id, $to_object_type, $after = if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php index 6f766faa..bcf79309 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php @@ -366,55 +366,55 @@ public function getByIdRequest($feedback_submission_id, $properties = null, $pro if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -736,66 +736,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php index fe804913..9bf5d9e9 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php @@ -366,11 +366,11 @@ public function readBatchRequest($batch_read_input_simple_public_object_id, $arc if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Crm/Owners/Api/OwnersApi.php b/codegen/Crm/Owners/Api/OwnersApi.php index ae7b6217..85254be6 100644 --- a/codegen/Crm/Owners/Api/OwnersApi.php +++ b/codegen/Crm/Owners/Api/OwnersApi.php @@ -351,22 +351,22 @@ public function getByIdRequest($owner_id, $id_property = 'id', $archived = false if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -423,7 +423,7 @@ public function getByIdRequest($owner_id, $id_property = 'id', $archived = false $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -682,44 +682,44 @@ public function getPageRequest($email = null, $after = null, $limit = 100, $arch if ($email !== null) { if('form' === 'form' && is_array($email)) { foreach($email as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['email'] = $email; + $queryParams['email'] = ObjectSerializer::toQueryValue($email); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -768,7 +768,7 @@ public function getPageRequest($email = null, $after = null, $limit = 100, $arch $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php b/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php index e2dabdd3..7a4d2321 100644 --- a/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php @@ -410,7 +410,7 @@ public function getCrmV3PipelinesObjectTypePipelineIdAuditRequest($object_type, $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php b/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php index a2a103f7..74ca7038 100644 --- a/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php @@ -410,7 +410,7 @@ public function getCrmV3PipelinesObjectTypePipelineIdStagesStageIdAuditRequest($ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Pipelines/Api/PipelineStagesApi.php b/codegen/Crm/Pipelines/Api/PipelineStagesApi.php index a2e0ef53..04f957db 100644 --- a/codegen/Crm/Pipelines/Api/PipelineStagesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineStagesApi.php @@ -372,7 +372,7 @@ public function archiveRequest($object_type, $pipeline_id, $stage_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -708,7 +708,7 @@ public function createRequest($object_type, $pipeline_id, $pipeline_stage_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -974,11 +974,11 @@ public function getAllRequest($object_type, $pipeline_id, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1043,7 +1043,7 @@ public function getAllRequest($object_type, $pipeline_id, $archived = false) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1320,11 +1320,11 @@ public function getByIdRequest($object_type, $pipeline_id, $stage_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1397,7 +1397,7 @@ public function getByIdRequest($object_type, $pipeline_id, $stage_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1752,7 +1752,7 @@ public function replaceRequest($object_type, $pipeline_id, $stage_id, $pipeline_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2040,11 +2040,11 @@ public function updateRequest($object_type, $pipeline_id, $stage_id, $pipeline_s if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -2123,7 +2123,7 @@ public function updateRequest($object_type, $pipeline_id, $stage_id, $pipeline_s $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Pipelines/Api/PipelinesApi.php b/codegen/Crm/Pipelines/Api/PipelinesApi.php index a5fbbba9..e4769b76 100644 --- a/codegen/Crm/Pipelines/Api/PipelinesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelinesApi.php @@ -300,11 +300,11 @@ public function archiveRequest($object_type, $pipeline_id, $validate_references_ if ($validate_references_before_delete !== null) { if('form' === 'form' && is_array($validate_references_before_delete)) { foreach($validate_references_before_delete as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['validateReferencesBeforeDelete'] = $validate_references_before_delete; + $queryParams['validateReferencesBeforeDelete'] = ObjectSerializer::toQueryValue($validate_references_before_delete); } } @@ -369,7 +369,7 @@ public function archiveRequest($object_type, $pipeline_id, $validate_references_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -686,7 +686,7 @@ public function createRequest($object_type, $pipeline_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -941,11 +941,11 @@ public function getAllRequest($object_type, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1002,7 +1002,7 @@ public function getAllRequest($object_type, $archived = false) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1268,11 +1268,11 @@ public function getByIdRequest($object_type, $pipeline_id, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1337,7 +1337,7 @@ public function getByIdRequest($object_type, $pipeline_id, $archived = false) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1614,11 +1614,11 @@ public function replaceRequest($object_type, $pipeline_id, $pipeline_input, $val if ($validate_references_before_delete !== null) { if('form' === 'form' && is_array($validate_references_before_delete)) { foreach($validate_references_before_delete as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['validateReferencesBeforeDelete'] = $validate_references_before_delete; + $queryParams['validateReferencesBeforeDelete'] = ObjectSerializer::toQueryValue($validate_references_before_delete); } } @@ -1689,7 +1689,7 @@ public function replaceRequest($object_type, $pipeline_id, $pipeline_input, $val $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1971,22 +1971,22 @@ public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($validate_references_before_delete !== null) { if('form' === 'form' && is_array($validate_references_before_delete)) { foreach($validate_references_before_delete as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['validateReferencesBeforeDelete'] = $validate_references_before_delete; + $queryParams['validateReferencesBeforeDelete'] = ObjectSerializer::toQueryValue($validate_references_before_delete); } } @@ -2057,7 +2057,7 @@ public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Products/Api/AssociationsApi.php b/codegen/Crm/Products/Api/AssociationsApi.php index 583db9ee..c58c678d 100644 --- a/codegen/Crm/Products/Api/AssociationsApi.php +++ b/codegen/Crm/Products/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($product_id, $to_object_type, $to_object_id, $ass $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($product_id, $to_object_type, $to_object_id, $asso $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($product_id, $to_object_type, $after = null, $limi if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($product_id, $to_object_type, $after = null, $limi $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Products/Api/BasicApi.php b/codegen/Crm/Products/Api/BasicApi.php index b405d2a9..c6d9f762 100644 --- a/codegen/Crm/Products/Api/BasicApi.php +++ b/codegen/Crm/Products/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($product_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -907,55 +907,55 @@ public function getByIdRequest($product_id, $properties = null, $properties_with if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1012,7 +1012,7 @@ public function getByIdRequest($product_id, $properties = null, $properties_with $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1281,66 +1281,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1389,7 +1389,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1655,11 +1655,11 @@ public function updateRequest($product_id, $simple_public_object_input, $id_prop if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1722,7 +1722,7 @@ public function updateRequest($product_id, $simple_public_object_input, $id_prop $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Products/Api/BatchApi.php b/codegen/Crm/Products/Api/BatchApi.php index 4c56fc85..a85c48db 100644 --- a/codegen/Crm/Products/Api/BatchApi.php +++ b/codegen/Crm/Products/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Products/Api/SearchApi.php b/codegen/Crm/Products/Api/SearchApi.php index fe4f1402..de6d9844 100644 --- a/codegen/Crm/Products/Api/SearchApi.php +++ b/codegen/Crm/Products/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Properties/Api/BatchApi.php b/codegen/Crm/Properties/Api/BatchApi.php index bb2f0cb4..65346e71 100644 --- a/codegen/Crm/Properties/Api/BatchApi.php +++ b/codegen/Crm/Properties/Api/BatchApi.php @@ -351,7 +351,7 @@ public function archiveRequest($object_type, $batch_input_property_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -688,7 +688,7 @@ public function createRequest($object_type, $batch_input_property_create) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1025,7 +1025,7 @@ public function readRequest($object_type, $batch_read_input_property_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Properties/Api/CoreApi.php b/codegen/Crm/Properties/Api/CoreApi.php index 7c71f1cf..4762bc77 100644 --- a/codegen/Crm/Properties/Api/CoreApi.php +++ b/codegen/Crm/Properties/Api/CoreApi.php @@ -353,7 +353,7 @@ public function archiveRequest($object_type, $property_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -670,7 +670,7 @@ public function createRequest($object_type, $property_create) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function getAllRequest($object_type, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -986,7 +986,7 @@ public function getAllRequest($object_type, $archived = false) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1252,11 +1252,11 @@ public function getByNameRequest($object_type, $property_name, $archived = false if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1321,7 +1321,7 @@ public function getByNameRequest($object_type, $property_name, $archived = false $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1657,7 +1657,7 @@ public function updateRequest($object_type, $property_name, $property_update) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Properties/Api/GroupsApi.php b/codegen/Crm/Properties/Api/GroupsApi.php index f550f45b..1c86b789 100644 --- a/codegen/Crm/Properties/Api/GroupsApi.php +++ b/codegen/Crm/Properties/Api/GroupsApi.php @@ -353,7 +353,7 @@ public function archiveRequest($object_type, $group_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -670,7 +670,7 @@ public function createRequest($object_type, $property_group_create) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -970,7 +970,7 @@ public function getAllRequest($object_type) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1289,7 +1289,7 @@ public function getByNameRequest($object_type, $group_name) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1625,7 +1625,7 @@ public function updateRequest($object_type, $group_name, $property_group_update) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Quotes/Api/AssociationsApi.php b/codegen/Crm/Quotes/Api/AssociationsApi.php index a26908a6..d9166538 100644 --- a/codegen/Crm/Quotes/Api/AssociationsApi.php +++ b/codegen/Crm/Quotes/Api/AssociationsApi.php @@ -362,22 +362,22 @@ public function getAllRequest($quote_id, $to_object_type, $after = null, $limit if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } diff --git a/codegen/Crm/Quotes/Api/BasicApi.php b/codegen/Crm/Quotes/Api/BasicApi.php index 90b298e8..0a9d2bca 100644 --- a/codegen/Crm/Quotes/Api/BasicApi.php +++ b/codegen/Crm/Quotes/Api/BasicApi.php @@ -366,55 +366,55 @@ public function getByIdRequest($quote_id, $properties = null, $properties_with_h if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -736,66 +736,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Crm/Quotes/Api/BatchApi.php b/codegen/Crm/Quotes/Api/BatchApi.php index 2e41816a..2b8656f0 100644 --- a/codegen/Crm/Quotes/Api/BatchApi.php +++ b/codegen/Crm/Quotes/Api/BatchApi.php @@ -366,11 +366,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } diff --git a/codegen/Crm/Schemas/Api/CoreApi.php b/codegen/Crm/Schemas/Api/CoreApi.php index bef1e96b..7f036521 100644 --- a/codegen/Crm/Schemas/Api/CoreApi.php +++ b/codegen/Crm/Schemas/Api/CoreApi.php @@ -289,11 +289,11 @@ public function archiveRequest($object_type, $archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1455,11 +1455,11 @@ public function getAllRequest($archived = false) if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1508,7 +1508,7 @@ public function getAllRequest($archived = false) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1808,7 +1808,7 @@ public function getByIdRequest($object_type) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Tickets/Api/AssociationsApi.php b/codegen/Crm/Tickets/Api/AssociationsApi.php index 7917e5d3..be7879cc 100644 --- a/codegen/Crm/Tickets/Api/AssociationsApi.php +++ b/codegen/Crm/Tickets/Api/AssociationsApi.php @@ -391,7 +391,7 @@ public function archiveRequest($ticket_id, $to_object_type, $to_object_id, $asso $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -748,7 +748,7 @@ public function createRequest($ticket_id, $to_object_type, $to_object_id, $assoc $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1019,22 +1019,22 @@ public function getAllRequest($ticket_id, $to_object_type, $after = null, $limit if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } @@ -1099,7 +1099,7 @@ public function getAllRequest($ticket_id, $to_object_type, $after = null, $limit $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Tickets/Api/BasicApi.php b/codegen/Crm/Tickets/Api/BasicApi.php index 51f8f0cb..ecf5c2cd 100644 --- a/codegen/Crm/Tickets/Api/BasicApi.php +++ b/codegen/Crm/Tickets/Api/BasicApi.php @@ -334,7 +334,7 @@ public function archiveRequest($ticket_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -632,7 +632,7 @@ public function createRequest($simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -907,55 +907,55 @@ public function getByIdRequest($ticket_id, $properties = null, $properties_with_ if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } // query params if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1012,7 +1012,7 @@ public function getByIdRequest($ticket_id, $properties = null, $properties_with_ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1281,66 +1281,66 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($properties_with_history !== null) { if('form' === 'form' && is_array($properties_with_history)) { foreach($properties_with_history as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['propertiesWithHistory'] = $properties_with_history; + $queryParams['propertiesWithHistory'] = ObjectSerializer::toQueryValue($properties_with_history); } } // query params if ($associations !== null) { if('form' === 'form' && is_array($associations)) { foreach($associations as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['associations'] = $associations; + $queryParams['associations'] = ObjectSerializer::toQueryValue($associations); } } // query params if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -1389,7 +1389,7 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1655,11 +1655,11 @@ public function updateRequest($ticket_id, $simple_public_object_input, $id_prope if ($id_property !== null) { if('form' === 'form' && is_array($id_property)) { foreach($id_property as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['idProperty'] = $id_property; + $queryParams['idProperty'] = ObjectSerializer::toQueryValue($id_property); } } @@ -1722,7 +1722,7 @@ public function updateRequest($ticket_id, $simple_public_object_input, $id_prope $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Tickets/Api/BatchApi.php b/codegen/Crm/Tickets/Api/BatchApi.php index 1c5ae576..a5c12285 100644 --- a/codegen/Crm/Tickets/Api/BatchApi.php +++ b/codegen/Crm/Tickets/Api/BatchApi.php @@ -332,7 +332,7 @@ public function archiveRequest($batch_input_simple_public_object_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -650,7 +650,7 @@ public function createRequest($batch_input_simple_public_object_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -925,11 +925,11 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived if ($archived !== null) { if('form' === 'form' && is_array($archived)) { foreach($archived as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['archived'] = $archived; + $queryParams['archived'] = ObjectSerializer::toQueryValue($archived); } } @@ -984,7 +984,7 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1302,7 +1302,7 @@ public function updateRequest($batch_input_simple_public_object_batch_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Tickets/Api/SearchApi.php b/codegen/Crm/Tickets/Api/SearchApi.php index b44c8fda..b654469b 100644 --- a/codegen/Crm/Tickets/Api/SearchApi.php +++ b/codegen/Crm/Tickets/Api/SearchApi.php @@ -381,7 +381,7 @@ public function doSearchRequest($public_object_search_request) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Crm/Timeline/Api/EventsApi.php b/codegen/Crm/Timeline/Api/EventsApi.php index 3d45f3bf..dd919edc 100644 --- a/codegen/Crm/Timeline/Api/EventsApi.php +++ b/codegen/Crm/Timeline/Api/EventsApi.php @@ -384,7 +384,7 @@ public function createRequest($timeline_event) } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -697,7 +697,7 @@ public function createBatchRequest($batch_input_timeline_event) } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1011,7 +1011,7 @@ public function getByIdRequest($event_template_id, $event_id) } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1325,7 +1325,7 @@ public function getDetailByIdRequest($event_template_id, $event_id) } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1591,11 +1591,11 @@ public function getRenderByIdRequest($event_template_id, $event_id, $detail = nu if ($detail !== null) { if('form' === 'form' && is_array($detail)) { foreach($detail as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['detail'] = $detail; + $queryParams['detail'] = ObjectSerializer::toQueryValue($detail); } } @@ -1655,7 +1655,7 @@ public function getRenderByIdRequest($event_template_id, $event_id, $detail = nu } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Events/Api/EventsApi.php b/codegen/Events/Api/EventsApi.php index c9754c71..faad3992 100644 --- a/codegen/Events/Api/EventsApi.php +++ b/codegen/Events/Api/EventsApi.php @@ -375,99 +375,99 @@ public function getPageRequest($occurred_after = null, $occurred_before = null, if ($occurred_after !== null) { if('form' === 'form' && is_array($occurred_after)) { foreach($occurred_after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['occurredAfter'] = $occurred_after; + $queryParams['occurredAfter'] = ObjectSerializer::toQueryValue($occurred_after); } } // query params if ($occurred_before !== null) { if('form' === 'form' && is_array($occurred_before)) { foreach($occurred_before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['occurredBefore'] = $occurred_before; + $queryParams['occurredBefore'] = ObjectSerializer::toQueryValue($occurred_before); } } // query params if ($object_type !== null) { if('form' === 'form' && is_array($object_type)) { foreach($object_type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['objectType'] = $object_type; + $queryParams['objectType'] = ObjectSerializer::toQueryValue($object_type); } } // query params if ($object_id !== null) { if('form' === 'form' && is_array($object_id)) { foreach($object_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['objectId'] = $object_id; + $queryParams['objectId'] = ObjectSerializer::toQueryValue($object_id); } } // query params if ($event_type !== null) { if('form' === 'form' && is_array($event_type)) { foreach($event_type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['eventType'] = $event_type; + $queryParams['eventType'] = ObjectSerializer::toQueryValue($event_type); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } @@ -516,7 +516,7 @@ public function getPageRequest($occurred_after = null, $occurred_before = null, $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Files/Api/FilesApi.php b/codegen/Files/Api/FilesApi.php index 70260588..8c94d299 100644 --- a/codegen/Files/Api/FilesApi.php +++ b/codegen/Files/Api/FilesApi.php @@ -338,7 +338,7 @@ public function archiveRequest($file_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -585,7 +585,7 @@ public function archiveGDPRRequest($file_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -885,7 +885,7 @@ public function checkImportRequest($task_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1244,264 +1244,264 @@ public function doSearchRequest($properties = null, $after = null, $before = nul if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($id !== null) { if('form' === 'form' && is_array($id)) { foreach($id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['id'] = $id; + $queryParams['id'] = ObjectSerializer::toQueryValue($id); } } // query params if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_at_lte !== null) { if('form' === 'form' && is_array($created_at_lte)) { foreach($created_at_lte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAtLte'] = $created_at_lte; + $queryParams['createdAtLte'] = ObjectSerializer::toQueryValue($created_at_lte); } } // query params if ($created_at_gte !== null) { if('form' === 'form' && is_array($created_at_gte)) { foreach($created_at_gte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAtGte'] = $created_at_gte; + $queryParams['createdAtGte'] = ObjectSerializer::toQueryValue($created_at_gte); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_at_lte !== null) { if('form' === 'form' && is_array($updated_at_lte)) { foreach($updated_at_lte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAtLte'] = $updated_at_lte; + $queryParams['updatedAtLte'] = ObjectSerializer::toQueryValue($updated_at_lte); } } // query params if ($updated_at_gte !== null) { if('form' === 'form' && is_array($updated_at_gte)) { foreach($updated_at_gte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAtGte'] = $updated_at_gte; + $queryParams['updatedAtGte'] = ObjectSerializer::toQueryValue($updated_at_gte); } } // query params if ($name !== null) { if('form' === 'form' && is_array($name)) { foreach($name as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['name'] = $name; + $queryParams['name'] = ObjectSerializer::toQueryValue($name); } } // query params if ($path !== null) { if('form' === 'form' && is_array($path)) { foreach($path as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['path'] = $path; + $queryParams['path'] = ObjectSerializer::toQueryValue($path); } } // query params if ($parent_folder_id !== null) { if('form' === 'form' && is_array($parent_folder_id)) { foreach($parent_folder_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['parentFolderId'] = $parent_folder_id; + $queryParams['parentFolderId'] = ObjectSerializer::toQueryValue($parent_folder_id); } } // query params if ($size !== null) { if('form' === 'form' && is_array($size)) { foreach($size as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['size'] = $size; + $queryParams['size'] = ObjectSerializer::toQueryValue($size); } } // query params if ($height !== null) { if('form' === 'form' && is_array($height)) { foreach($height as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['height'] = $height; + $queryParams['height'] = ObjectSerializer::toQueryValue($height); } } // query params if ($width !== null) { if('form' === 'form' && is_array($width)) { foreach($width as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['width'] = $width; + $queryParams['width'] = ObjectSerializer::toQueryValue($width); } } // query params if ($encoding !== null) { if('form' === 'form' && is_array($encoding)) { foreach($encoding as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['encoding'] = $encoding; + $queryParams['encoding'] = ObjectSerializer::toQueryValue($encoding); } } // query params if ($type !== null) { if('form' === 'form' && is_array($type)) { foreach($type as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['type'] = $type; + $queryParams['type'] = ObjectSerializer::toQueryValue($type); } } // query params if ($extension !== null) { if('form' === 'form' && is_array($extension)) { foreach($extension as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['extension'] = $extension; + $queryParams['extension'] = ObjectSerializer::toQueryValue($extension); } } // query params if ($url !== null) { if('form' === 'form' && is_array($url)) { foreach($url as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['url'] = $url; + $queryParams['url'] = ObjectSerializer::toQueryValue($url); } } // query params if ($is_usable_in_content !== null) { if('form' === 'form' && is_array($is_usable_in_content)) { foreach($is_usable_in_content as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['isUsableInContent'] = $is_usable_in_content; + $queryParams['isUsableInContent'] = ObjectSerializer::toQueryValue($is_usable_in_content); } } // query params if ($allows_anonymous_access !== null) { if('form' === 'form' && is_array($allows_anonymous_access)) { foreach($allows_anonymous_access as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['allowsAnonymousAccess'] = $allows_anonymous_access; + $queryParams['allowsAnonymousAccess'] = ObjectSerializer::toQueryValue($allows_anonymous_access); } } @@ -1550,7 +1550,7 @@ public function doSearchRequest($properties = null, $after = null, $before = nul $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1809,11 +1809,11 @@ public function getByIdRequest($file_id, $properties = null) if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } @@ -1870,7 +1870,7 @@ public function getByIdRequest($file_id, $properties = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2139,33 +2139,33 @@ public function getSignedUrlRequest($file_id, $size = null, $expiration_seconds if ($size !== null) { if('form' === 'form' && is_array($size)) { foreach($size as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['size'] = $size; + $queryParams['size'] = ObjectSerializer::toQueryValue($size); } } // query params if ($expiration_seconds !== null) { if('form' === 'form' && is_array($expiration_seconds)) { foreach($expiration_seconds as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['expirationSeconds'] = $expiration_seconds; + $queryParams['expirationSeconds'] = ObjectSerializer::toQueryValue($expiration_seconds); } } // query params if ($upscale !== null) { if('form' === 'form' && is_array($upscale)) { foreach($upscale as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['upscale'] = $upscale; + $queryParams['upscale'] = ObjectSerializer::toQueryValue($upscale); } } @@ -2222,7 +2222,7 @@ public function getSignedUrlRequest($file_id, $size = null, $expiration_seconds $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2520,7 +2520,7 @@ public function importFromUrlRequest($import_from_url_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2859,7 +2859,7 @@ public function replaceRequest($file_id, $file = null, $charset_hunch = null, $o $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3180,7 +3180,7 @@ public function updatePropertiesRequest($file_id, $file_update_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -3523,7 +3523,7 @@ public function uploadRequest($file = null, $folder_id = null, $folder_path = nu $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Files/Api/FoldersApi.php b/codegen/Files/Api/FoldersApi.php index 07ce36b4..3825a9f8 100644 --- a/codegen/Files/Api/FoldersApi.php +++ b/codegen/Files/Api/FoldersApi.php @@ -338,7 +338,7 @@ public function archiveRequest($folder_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -585,7 +585,7 @@ public function archiveByPathRequest($folder_path) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -885,7 +885,7 @@ public function checkUpdateStatusRequest($task_id) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1183,7 +1183,7 @@ public function createRequest($folder_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1497,165 +1497,165 @@ public function doSearchRequest($properties = null, $after = null, $before = nul if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($before !== null) { if('form' === 'form' && is_array($before)) { foreach($before as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['before'] = $before; + $queryParams['before'] = ObjectSerializer::toQueryValue($before); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } // query params if ($sort !== null) { if('form' === 'form' && is_array($sort)) { foreach($sort as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['sort'] = $sort; + $queryParams['sort'] = ObjectSerializer::toQueryValue($sort); } } // query params if ($id !== null) { if('form' === 'form' && is_array($id)) { foreach($id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['id'] = $id; + $queryParams['id'] = ObjectSerializer::toQueryValue($id); } } // query params if ($created_at !== null) { if('form' === 'form' && is_array($created_at)) { foreach($created_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAt'] = $created_at; + $queryParams['createdAt'] = ObjectSerializer::toQueryValue($created_at); } } // query params if ($created_at_lte !== null) { if('form' === 'form' && is_array($created_at_lte)) { foreach($created_at_lte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAtLte'] = $created_at_lte; + $queryParams['createdAtLte'] = ObjectSerializer::toQueryValue($created_at_lte); } } // query params if ($created_at_gte !== null) { if('form' === 'form' && is_array($created_at_gte)) { foreach($created_at_gte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['createdAtGte'] = $created_at_gte; + $queryParams['createdAtGte'] = ObjectSerializer::toQueryValue($created_at_gte); } } // query params if ($updated_at !== null) { if('form' === 'form' && is_array($updated_at)) { foreach($updated_at as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAt'] = $updated_at; + $queryParams['updatedAt'] = ObjectSerializer::toQueryValue($updated_at); } } // query params if ($updated_at_lte !== null) { if('form' === 'form' && is_array($updated_at_lte)) { foreach($updated_at_lte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAtLte'] = $updated_at_lte; + $queryParams['updatedAtLte'] = ObjectSerializer::toQueryValue($updated_at_lte); } } // query params if ($updated_at_gte !== null) { if('form' === 'form' && is_array($updated_at_gte)) { foreach($updated_at_gte as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['updatedAtGte'] = $updated_at_gte; + $queryParams['updatedAtGte'] = ObjectSerializer::toQueryValue($updated_at_gte); } } // query params if ($name !== null) { if('form' === 'form' && is_array($name)) { foreach($name as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['name'] = $name; + $queryParams['name'] = ObjectSerializer::toQueryValue($name); } } // query params if ($path !== null) { if('form' === 'form' && is_array($path)) { foreach($path as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['path'] = $path; + $queryParams['path'] = ObjectSerializer::toQueryValue($path); } } // query params if ($parent_folder_id !== null) { if('form' === 'form' && is_array($parent_folder_id)) { foreach($parent_folder_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['parentFolderId'] = $parent_folder_id; + $queryParams['parentFolderId'] = ObjectSerializer::toQueryValue($parent_folder_id); } } @@ -1704,7 +1704,7 @@ public function doSearchRequest($properties = null, $after = null, $before = nul $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -1963,11 +1963,11 @@ public function getByIdRequest($folder_id, $properties = null) if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } @@ -2024,7 +2024,7 @@ public function getByIdRequest($folder_id, $properties = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2283,11 +2283,11 @@ public function getByPathRequest($folder_path, $properties = null) if ($properties !== null) { if('form' === 'form' && is_array($properties)) { foreach($properties as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['properties'] = $properties; + $queryParams['properties'] = ObjectSerializer::toQueryValue($properties); } } @@ -2344,7 +2344,7 @@ public function getByPathRequest($folder_path, $properties = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } @@ -2642,7 +2642,7 @@ public function updatePropertiesRequest($folder_update_input) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } diff --git a/codegen/Marketing/Transactional/Api/PublicSmtpTokensApi.php b/codegen/Marketing/Transactional/Api/PublicSmtpTokensApi.php index ddc903da..8e43bee0 100644 --- a/codegen/Marketing/Transactional/Api/PublicSmtpTokensApi.php +++ b/codegen/Marketing/Transactional/Api/PublicSmtpTokensApi.php @@ -1173,44 +1173,44 @@ public function getTokensPageRequest($campaign_name = null, $email_campaign_id = if ($campaign_name !== null) { if('form' === 'form' && is_array($campaign_name)) { foreach($campaign_name as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['campaignName'] = $campaign_name; + $queryParams['campaignName'] = ObjectSerializer::toQueryValue($campaign_name); } } // query params if ($email_campaign_id !== null) { if('form' === 'form' && is_array($email_campaign_id)) { foreach($email_campaign_id as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['emailCampaignId'] = $email_campaign_id; + $queryParams['emailCampaignId'] = ObjectSerializer::toQueryValue($email_campaign_id); } } // query params if ($after !== null) { if('form' === 'form' && is_array($after)) { foreach($after as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['after'] = $after; + $queryParams['after'] = ObjectSerializer::toQueryValue($after); } } // query params if ($limit !== null) { if('form' === 'form' && is_array($limit)) { foreach($limit as $key => $value) { - $queryParams[$key] = $value; + $queryParams[$key] = ObjectSerializer::toQueryValue($value); } } else { - $queryParams['limit'] = $limit; + $queryParams['limit'] = ObjectSerializer::toQueryValue($limit); } } diff --git a/codegen/Marketing/Transactional/Api/SingleSendApi.php b/codegen/Marketing/Transactional/Api/SingleSendApi.php index 47f44a4c..137246a4 100644 --- a/codegen/Marketing/Transactional/Api/SingleSendApi.php +++ b/codegen/Marketing/Transactional/Api/SingleSendApi.php @@ -383,7 +383,7 @@ public function sendEmailRequest($public_single_send_request_egg = null) $queryParams['hapikey'] = $apiKey; } // this endpoint requires OAuth (access token) - if ($this->config->getAccessToken() !== null) { + if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); }