From ae72b3921efe0f8708a62d96fbbdb1476413d8db Mon Sep 17 00:00:00 2001 From: ksvirkou-hubspot Date: Thu, 27 Jul 2023 15:01:51 +0300 Subject: [PATCH] Codegen Only --- .../Automation/Actions/Api/CallbacksApi.php | 10 - codegen/Cms/AuditLogs/Api/AuditLogsApi.php | 5 - .../Cms/Blogs/Authors/Api/BlogAuthorsApi.php | 70 --- .../Cms/Blogs/BlogPosts/Api/BlogPostsApi.php | 120 ---- codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php | 70 --- codegen/Cms/Domains/Api/DomainsApi.php | 10 - codegen/Cms/Hubdb/Api/RowsApi.php | 45 -- codegen/Cms/Hubdb/Api/RowsBatchApi.php | 35 -- codegen/Cms/Hubdb/Api/TablesApi.php | 70 --- codegen/Cms/Hubdb/Model/ImportResult.php | 74 +-- codegen/Cms/Hubdb/Model/StandardError.php | 6 +- .../Performance/Api/PublicPerformanceApi.php | 10 - codegen/Cms/SiteSearch/Api/PublicApi.php | 10 - codegen/Cms/SourceCode/Api/ContentApi.php | 20 - codegen/Cms/SourceCode/Api/ExtractApi.php | 5 - codegen/Cms/SourceCode/Api/MetadataApi.php | 5 - .../SourceCode/Api/SourceCodeExtractApi.php | 10 - codegen/Cms/SourceCode/Api/ValidationApi.php | 5 - codegen/Cms/UrlRedirects/Api/RedirectsApi.php | 25 - .../Api/DefinitionApi.php | 5 - .../Api/StatusApi.php | 15 - .../VisitorIdentification/Api/GenerateApi.php | 5 - codegen/Crm/Associations/Api/BatchApi.php | 15 - .../Crm/Associations/Schema/Api/TypesApi.php | 5 - codegen/Crm/Associations/V4/Api/BasicApi.php | 20 - codegen/Crm/Associations/V4/Api/BatchApi.php | 25 - .../V4/Model/AssociationSpecWithLabel.php | 96 +-- .../BatchReadInputSimplePublicObjectId.php | 76 +-- .../BatchResponseLabelsBetweenObjectPair.php | 180 +++--- ...ponseLabelsBetweenObjectPairWithErrors.php | 224 +++---- ...esponsePublicAssociationMultiWithLabel.php | 180 +++--- ...licAssociationMultiWithLabelWithErrors.php | 224 +++---- .../BatchResponsePublicDefaultAssociation.php | 224 +++---- .../Model/BatchResponseSimplePublicObject.php | 180 +++--- ...chResponseSimplePublicObjectWithErrors.php | 224 +++---- .../Model/CollectionResponseAssociatedId.php | 54 +- ...AssociatedObjectWithLabelForwardPaging.php | 54 +- ...licObjectWithAssociationsForwardPaging.php | 54 +- codegen/Crm/Associations/V4/Model/Error.php | 174 +++--- .../Associations/V4/Model/ErrorCategory.php | 76 +-- .../Crm/Associations/V4/Model/ErrorDetail.php | 122 ++-- .../V4/Model/LabelsBetweenObjectPair.php | 60 +- .../Model/MultiAssociatedObjectWithLabel.php | 60 +- .../Crm/Associations/V4/Model/NextPage.php | 54 +- ...blicAssociationDefinitionCreateRequest.php | 56 +- ...blicAssociationDefinitionUpdateRequest.php | 60 +- .../V4/Model/PublicAssociationMultiPost.php | 74 +-- .../Model/PublicAssociationMultiWithLabel.php | 54 +- .../V4/Model/PublicAssociationsForObject.php | 60 +- .../V4/Model/PublicDefaultAssociation.php | 74 +-- .../V4/Model/PublicGdprDeleteInput.php | 54 +- .../V4/Model/SimplePublicObject.php | 176 +++--- .../V4/Model/SimplePublicObjectBatchInput.php | 60 +- .../SimplePublicObjectInputForCreate.php | 60 +- .../SimplePublicObjectWithAssociations.php | 194 +++---- .../Associations/V4/Model/StandardError.php | 190 +++--- .../Associations/V4/Model/StandardError1.php | 548 ++++++++++++++++++ .../V4/Model/ValueWithTimestamp.php | 148 ++--- .../V4/Schema/Api/DefinitionsApi.php | 20 - codegen/Crm/Companies/Api/BasicApi.php | 25 - codegen/Crm/Companies/Api/BatchApi.php | 20 - codegen/Crm/Companies/Api/PublicObjectApi.php | 5 - codegen/Crm/Companies/Api/SearchApi.php | 5 - codegen/Crm/Companies/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Companies/Model/StandardError.php | 6 +- codegen/Crm/Contacts/Api/BasicApi.php | 25 - codegen/Crm/Contacts/Api/BatchApi.php | 20 - codegen/Crm/Contacts/Api/GDPRApi.php | 5 - codegen/Crm/Contacts/Api/PublicObjectApi.php | 5 - codegen/Crm/Contacts/Api/SearchApi.php | 5 - codegen/Crm/Contacts/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Contacts/Model/StandardError.php | 6 +- codegen/Crm/Deals/Api/BasicApi.php | 25 - codegen/Crm/Deals/Api/BatchApi.php | 20 - codegen/Crm/Deals/Api/PublicObjectApi.php | 5 - codegen/Crm/Deals/Api/SearchApi.php | 5 - codegen/Crm/Deals/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Deals/Model/StandardError.php | 6 +- .../Accounting/Api/CallbacksApi.php | 50 -- .../Extensions/Accounting/Api/InvoiceApi.php | 15 - .../Extensions/Accounting/Api/SettingsApi.php | 10 - .../Crm/Extensions/Accounting/Api/SyncApi.php | 10 - .../Accounting/Api/UserAccountsApi.php | 10 - .../Videoconferencing/Api/SettingsApi.php | 15 - codegen/Crm/Imports/Api/CoreApi.php | 20 - codegen/Crm/Imports/Api/PublicImportsApi.php | 5 - codegen/Crm/LineItems/Api/BasicApi.php | 25 - codegen/Crm/LineItems/Api/BatchApi.php | 20 - codegen/Crm/LineItems/Api/PublicObjectApi.php | 5 - codegen/Crm/LineItems/Api/SearchApi.php | 5 - codegen/Crm/LineItems/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/LineItems/Model/StandardError.php | 6 +- codegen/Crm/Objects/Api/AssociationsApi.php | 15 - codegen/Crm/Objects/Api/BasicApi.php | 25 - codegen/Crm/Objects/Api/BatchApi.php | 20 - codegen/Crm/Objects/Api/GDPRApi.php | 5 - codegen/Crm/Objects/Api/PublicObjectApi.php | 5 - codegen/Crm/Objects/Api/SearchApi.php | 5 - codegen/Crm/Objects/Calls/Api/BasicApi.php | 25 - codegen/Crm/Objects/Calls/Api/BatchApi.php | 20 - .../Crm/Objects/Calls/Api/PublicObjectApi.php | 5 - codegen/Crm/Objects/Calls/Api/SearchApi.php | 5 - .../Crm/Objects/Calls/Model/ErrorCategory.php | 510 ---------------- .../Crm/Objects/Calls/Model/StandardError.php | 6 +- .../Objects/Communications/Api/BasicApi.php | 25 - .../Objects/Communications/Api/BatchApi.php | 20 - .../Communications/Api/PublicObjectApi.php | 5 - .../Objects/Communications/Api/SearchApi.php | 5 - .../Communications/Model/ErrorCategory.php | 510 ---------------- .../Communications/Model/StandardError.php | 6 +- codegen/Crm/Objects/Emails/Api/BasicApi.php | 25 - codegen/Crm/Objects/Emails/Api/BatchApi.php | 20 - .../Objects/Emails/Api/PublicObjectApi.php | 5 - codegen/Crm/Objects/Emails/Api/SearchApi.php | 5 - .../Objects/Emails/Model/ErrorCategory.php | 510 ---------------- .../Objects/Emails/Model/StandardError.php | 6 +- .../FeedbackSubmissions/Api/BasicApi.php | 25 - .../FeedbackSubmissions/Api/BatchApi.php | 20 - .../Api/PublicObjectApi.php | 5 - .../FeedbackSubmissions/Api/SearchApi.php | 5 - .../Model/ErrorCategory.php | 510 ---------------- .../Model/StandardError.php | 6 +- codegen/Crm/Objects/Meetings/Api/BasicApi.php | 25 - codegen/Crm/Objects/Meetings/Api/BatchApi.php | 20 - .../Objects/Meetings/Api/PublicObjectApi.php | 5 - .../Crm/Objects/Meetings/Api/SearchApi.php | 5 - .../Objects/Meetings/Model/ErrorCategory.php | 510 ---------------- .../Objects/Meetings/Model/StandardError.php | 6 +- codegen/Crm/Objects/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Objects/Model/StandardError.php | 6 +- codegen/Crm/Objects/Notes/Api/BasicApi.php | 25 - codegen/Crm/Objects/Notes/Api/BatchApi.php | 20 - .../Crm/Objects/Notes/Api/PublicObjectApi.php | 5 - codegen/Crm/Objects/Notes/Api/SearchApi.php | 5 - .../Crm/Objects/Notes/Model/ErrorCategory.php | 510 ---------------- .../Crm/Objects/Notes/Model/StandardError.php | 6 +- .../Crm/Objects/PostalMail/Api/BasicApi.php | 25 - .../Crm/Objects/PostalMail/Api/BatchApi.php | 20 - .../PostalMail/Api/PublicObjectApi.php | 5 - .../Crm/Objects/PostalMail/Api/SearchApi.php | 5 - .../PostalMail/Model/ErrorCategory.php | 510 ---------------- .../PostalMail/Model/StandardError.php | 6 +- codegen/Crm/Objects/Tasks/Api/BasicApi.php | 25 - codegen/Crm/Objects/Tasks/Api/BatchApi.php | 20 - .../Crm/Objects/Tasks/Api/PublicObjectApi.php | 5 - codegen/Crm/Objects/Tasks/Api/SearchApi.php | 5 - .../Crm/Objects/Tasks/Model/ErrorCategory.php | 510 ---------------- .../Crm/Objects/Tasks/Model/StandardError.php | 6 +- codegen/Crm/Owners/Api/OwnersApi.php | 10 - .../Crm/Pipelines/Api/PipelineAuditsApi.php | 5 - .../Pipelines/Api/PipelineStageAuditsApi.php | 5 - .../Crm/Pipelines/Api/PipelineStagesApi.php | 30 - codegen/Crm/Pipelines/Api/PipelinesApi.php | 30 - codegen/Crm/Products/Api/BasicApi.php | 25 - codegen/Crm/Products/Api/BatchApi.php | 20 - codegen/Crm/Products/Api/PublicObjectApi.php | 5 - codegen/Crm/Products/Api/SearchApi.php | 5 - codegen/Crm/Products/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Products/Model/StandardError.php | 6 +- codegen/Crm/Properties/Api/BatchApi.php | 15 - codegen/Crm/Properties/Api/CoreApi.php | 25 - codegen/Crm/Properties/Api/GroupsApi.php | 25 - .../Crm/Properties/Model/ErrorCategory.php | 510 ---------------- .../Crm/Properties/Model/StandardError.php | 6 +- codegen/Crm/Quotes/Api/BasicApi.php | 25 - codegen/Crm/Quotes/Api/BatchApi.php | 20 - codegen/Crm/Quotes/Api/PublicObjectApi.php | 5 - codegen/Crm/Quotes/Api/SearchApi.php | 5 - codegen/Crm/Quotes/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Quotes/Model/StandardError.php | 6 +- codegen/Crm/Schemas/Api/CoreApi.php | 35 -- .../Schemas/Api/PublicObjectSchemasApi.php | 5 - codegen/Crm/Tickets/Api/BasicApi.php | 25 - codegen/Crm/Tickets/Api/BatchApi.php | 20 - codegen/Crm/Tickets/Api/PublicObjectApi.php | 5 - codegen/Crm/Tickets/Api/SearchApi.php | 5 - codegen/Crm/Tickets/Model/ErrorCategory.php | 510 ---------------- codegen/Crm/Tickets/Model/StandardError.php | 6 +- codegen/Events/Api/EventsApi.php | 5 - codegen/Files/Api/FilesApi.php | 50 -- codegen/Files/Api/FoldersApi.php | 40 -- .../Events/Api/SettingsExternalApi.php | 10 - .../Transactional/Api/SingleSendApi.php | 5 - codegen/Webhooks/Model/ErrorCategory.php | 510 ---------------- codegen/Webhooks/Model/StandardError.php | 6 +- 185 files changed, 2430 insertions(+), 13032 deletions(-) create mode 100644 codegen/Crm/Associations/V4/Model/StandardError1.php delete mode 100644 codegen/Crm/Companies/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Contacts/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Deals/Model/ErrorCategory.php delete mode 100644 codegen/Crm/LineItems/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Calls/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Communications/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Emails/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/FeedbackSubmissions/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Meetings/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Notes/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/PostalMail/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Objects/Tasks/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Products/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Properties/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Quotes/Model/ErrorCategory.php delete mode 100644 codegen/Crm/Tickets/Model/ErrorCategory.php delete mode 100644 codegen/Webhooks/Model/ErrorCategory.php diff --git a/codegen/Automation/Actions/Api/CallbacksApi.php b/codegen/Automation/Actions/Api/CallbacksApi.php index c161bafb6..44bc828d8 100644 --- a/codegen/Automation/Actions/Api/CallbacksApi.php +++ b/codegen/Automation/Actions/Api/CallbacksApi.php @@ -345,11 +345,6 @@ public function completeRequest($callback_id, $callback_completion_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -586,11 +581,6 @@ public function completeBatchRequest($batch_input_callback_completion_batch_requ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/AuditLogs/Api/AuditLogsApi.php b/codegen/Cms/AuditLogs/Api/AuditLogsApi.php index bfe9b45c0..c2db3666a 100644 --- a/codegen/Cms/AuditLogs/Api/AuditLogsApi.php +++ b/codegen/Cms/AuditLogs/Api/AuditLogsApi.php @@ -490,11 +490,6 @@ public function getPageRequest($object_id = null, $user_id = null, $after = null } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 cf40a9c75..7810d1cd4 100644 --- a/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php +++ b/codegen/Cms/Blogs/Authors/Api/BlogAuthorsApi.php @@ -342,11 +342,6 @@ public function archiveRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -583,11 +578,6 @@ public function archiveBatchRequest($batch_input_string) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -870,11 +860,6 @@ public function attachToLangGroupRequest($attach_to_lang_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1180,11 +1165,6 @@ public function createRequest($blog_author) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1513,11 +1493,6 @@ public function createBatchRequest($batch_input_blog_author) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1823,11 +1798,6 @@ public function createLangVariationRequest($blog_author_clone_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2110,11 +2080,6 @@ public function detachFromLangGroupRequest($detach_from_lang_group_request_v_nex } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2436,11 +2401,6 @@ public function getByIdRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2869,11 +2829,6 @@ public function getPageRequest($created_at = null, $created_after = null, $creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3216,11 +3171,6 @@ public function readBatchRequest($batch_input_string, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3457,11 +3407,6 @@ public function setLangPrimaryRequest($set_new_language_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3800,11 +3745,6 @@ public function updateRequest($object_id, $blog_author, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4147,11 +4087,6 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4434,11 +4369,6 @@ public function updateLangsRequest($update_languages_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 14b02ed68..2794556c6 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/BlogPostsApi.php @@ -342,11 +342,6 @@ public function archiveRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -583,11 +578,6 @@ public function archiveBatchRequest($batch_input_string) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -870,11 +860,6 @@ public function attachToLangGroupRequest($attach_to_lang_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1180,11 +1165,6 @@ public function callCloneRequest($content_clone_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1490,11 +1470,6 @@ public function createRequest($blog_post) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1823,11 +1798,6 @@ public function createBatchRequest($batch_input_blog_post) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2133,11 +2103,6 @@ public function createLangVariationRequest($blog_post_language_clone_request_v_n } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2420,11 +2385,6 @@ public function detachFromLangGroupRequest($detach_from_lang_group_request_v_nex } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2746,11 +2706,6 @@ public function getByIdRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3058,11 +3013,6 @@ public function getDraftByIdRequest($object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3491,11 +3441,6 @@ public function getPageRequest($created_at = null, $created_after = null, $creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3822,11 +3767,6 @@ public function getPreviousVersionRequest($object_id, $revision_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4176,11 +4116,6 @@ public function getPreviousVersionsRequest($object_id, $after = null, $before = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4419,11 +4354,6 @@ public function pushLiveRequest($object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4766,11 +4696,6 @@ public function readBatchRequest($batch_input_string, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -5009,11 +4934,6 @@ public function resetDraftRequest($object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -5340,11 +5260,6 @@ public function restorePreviousVersionRequest($object_id, $revision_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -5671,11 +5586,6 @@ public function restorePreviousVersionToDraftRequest($object_id, $revision_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -5912,11 +5822,6 @@ public function scheduleRequest($content_schedule_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -6153,11 +6058,6 @@ public function setLangPrimaryRequest($set_new_language_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -6496,11 +6396,6 @@ public function updateRequest($object_id, $blog_post, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -6843,11 +6738,6 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -7172,11 +7062,6 @@ public function updateDraftRequest($object_id, $blog_post) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -7459,11 +7344,6 @@ public function updateLangsRequest($update_languages_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 7fffc41b8..5edd5b989 100644 --- a/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php +++ b/codegen/Cms/Blogs/Tags/Api/BlogTagsApi.php @@ -342,11 +342,6 @@ public function archiveRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -583,11 +578,6 @@ public function archiveBatchRequest($batch_input_string) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -870,11 +860,6 @@ public function attachToLangGroupRequest($attach_to_lang_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1180,11 +1165,6 @@ public function createRequest($tag) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1513,11 +1493,6 @@ public function createBatchRequest($batch_input_tag) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1823,11 +1798,6 @@ public function createLangVariationRequest($tag_clone_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2110,11 +2080,6 @@ public function detachFromLangGroupRequest($detach_from_lang_group_request_v_nex } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2436,11 +2401,6 @@ public function getByIdRequest($object_id, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2869,11 +2829,6 @@ public function getPageRequest($created_at = null, $created_after = null, $creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3216,11 +3171,6 @@ public function readBatchRequest($batch_input_string, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3457,11 +3407,6 @@ public function setLangPrimaryRequest($set_new_language_primary_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3800,11 +3745,6 @@ public function updateRequest($object_id, $tag, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4147,11 +4087,6 @@ public function updateBatchRequest($batch_input_json_node, $archived = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4434,11 +4369,6 @@ public function updateLangsRequest($update_languages_request_v_next) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 73ce58881..8082f1a93 100644 --- a/codegen/Cms/Domains/Api/DomainsApi.php +++ b/codegen/Cms/Domains/Api/DomainsApi.php @@ -397,11 +397,6 @@ public function getByIdRequest($domain_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -830,11 +825,6 @@ public function getPageRequest($created_at = null, $created_after = null, $creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/Hubdb/Api/RowsApi.php b/codegen/Cms/Hubdb/Api/RowsApi.php index c8acfcbb7..f5f98cb8d 100644 --- a/codegen/Cms/Hubdb/Api/RowsApi.php +++ b/codegen/Cms/Hubdb/Api/RowsApi.php @@ -420,11 +420,6 @@ public function cloneDraftTableRowRequest($table_id_or_name, $row_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -749,11 +744,6 @@ public function createTableRowRequest($table_id_or_name, $hub_db_table_row_v3_re } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1084,11 +1074,6 @@ public function getDraftTableRowByIdRequest($table_id_or_name, $row_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1419,11 +1404,6 @@ public function getTableRowRequest($table_id_or_name, $row_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1787,11 +1767,6 @@ public function getTableRowsRequest($table_id_or_name, $sort = null, $after = nu } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2053,11 +2028,6 @@ public function purgeDraftTableRowRequest($table_id_or_name, $row_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2421,11 +2391,6 @@ public function readDraftTableRowsRequest($table_id_or_name, $sort = null, $afte } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2773,11 +2738,6 @@ public function replaceDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3125,11 +3085,6 @@ public function updateDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_t } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 4d3e6161f..62f421f63 100644 --- a/codegen/Cms/Hubdb/Api/RowsBatchApi.php +++ b/codegen/Cms/Hubdb/Api/RowsBatchApi.php @@ -414,11 +414,6 @@ public function cloneDraftTableRowsRequest($table_id_or_name, $batch_input_strin } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -766,11 +761,6 @@ public function createDraftTableRowsRequest($table_id_or_name, $batch_input_hub_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1026,11 +1016,6 @@ public function purgeDraftTableRowsRequest($table_id_or_name, $batch_input_strin } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1378,11 +1363,6 @@ public function readDraftTableRowsRequest($table_id_or_name, $batch_input_string } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1730,11 +1710,6 @@ public function readTableRowsRequest($table_id_or_name, $batch_input_string) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2082,11 +2057,6 @@ public function replaceDraftTableRowsRequest($table_id_or_name, $batch_input_hub } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2434,11 +2404,6 @@ public function updateDraftTableRowsRequest($table_id_or_name, $batch_input_hub_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 85082e328..6445f6383 100644 --- a/codegen/Cms/Hubdb/Api/TablesApi.php +++ b/codegen/Cms/Hubdb/Api/TablesApi.php @@ -328,11 +328,6 @@ public function archiveTableRequest($table_id_or_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -657,11 +652,6 @@ public function cloneDraftTableRequest($table_id_or_name, $hub_db_table_clone_re } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -967,11 +957,6 @@ public function createTableRequest($hub_db_table_v3_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1293,11 +1278,6 @@ public function exportDraftTableRequest($table_id_or_name, $format = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1619,11 +1599,6 @@ public function exportTableRequest($table_id_or_name, $format = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2052,11 +2027,6 @@ public function getAllDraftTablesRequest($sort = null, $after = null, $limit = n } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2485,11 +2455,6 @@ public function getAllTablesRequest($sort = null, $after = null, $limit = null, } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2825,11 +2790,6 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $include_fore } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3165,11 +3125,6 @@ public function getTableDetailsRequest($table_id_or_name, $include_foreign_ids = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3503,11 +3458,6 @@ public function importDraftTableRequest($table_id_or_name, $config = null, $file } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3829,11 +3779,6 @@ public function publishDraftTableRequest($table_id_or_name, $include_foreign_ids } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4155,11 +4100,6 @@ public function resetDraftTableRequest($table_id_or_name, $include_foreign_ids = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4481,11 +4421,6 @@ public function unpublishTableRequest($table_id_or_name, $include_foreign_ids = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -4838,11 +4773,6 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/Hubdb/Model/ImportResult.php b/codegen/Cms/Hubdb/Model/ImportResult.php index 22c24670f..615892e60 100644 --- a/codegen/Cms/Hubdb/Model/ImportResult.php +++ b/codegen/Cms/Hubdb/Model/ImportResult.php @@ -59,9 +59,9 @@ class ImportResult implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPITypes = [ 'errors' => '\HubSpot\Client\Cms\Hubdb\Model\Error[]', - 'rows_imported' => 'int', 'duplicate_rows' => 'int', - 'row_limit_exceeded' => 'bool' + 'row_limit_exceeded' => 'bool', + 'rows_imported' => 'int' ]; /** @@ -73,9 +73,9 @@ class ImportResult implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'errors' => null, - 'rows_imported' => 'int32', 'duplicate_rows' => 'int32', - 'row_limit_exceeded' => null + 'row_limit_exceeded' => null, + 'rows_imported' => 'int32' ]; /** @@ -106,9 +106,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'errors' => 'errors', - 'rows_imported' => 'rowsImported', 'duplicate_rows' => 'duplicateRows', - 'row_limit_exceeded' => 'rowLimitExceeded' + 'row_limit_exceeded' => 'rowLimitExceeded', + 'rows_imported' => 'rowsImported' ]; /** @@ -118,9 +118,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'errors' => 'setErrors', - 'rows_imported' => 'setRowsImported', 'duplicate_rows' => 'setDuplicateRows', - 'row_limit_exceeded' => 'setRowLimitExceeded' + 'row_limit_exceeded' => 'setRowLimitExceeded', + 'rows_imported' => 'setRowsImported' ]; /** @@ -130,9 +130,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'errors' => 'getErrors', - 'rows_imported' => 'getRowsImported', 'duplicate_rows' => 'getDuplicateRows', - 'row_limit_exceeded' => 'getRowLimitExceeded' + 'row_limit_exceeded' => 'getRowLimitExceeded', + 'rows_imported' => 'getRowsImported' ]; /** @@ -193,9 +193,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['errors'] = $data['errors'] ?? null; - $this->container['rows_imported'] = $data['rows_imported'] ?? null; $this->container['duplicate_rows'] = $data['duplicate_rows'] ?? null; $this->container['row_limit_exceeded'] = $data['row_limit_exceeded'] ?? null; + $this->container['rows_imported'] = $data['rows_imported'] ?? null; } /** @@ -210,15 +210,15 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['rows_imported'] === null) { - $invalidProperties[] = "'rows_imported' can't be null"; - } if ($this->container['duplicate_rows'] === null) { $invalidProperties[] = "'duplicate_rows' can't be null"; } if ($this->container['row_limit_exceeded'] === null) { $invalidProperties[] = "'row_limit_exceeded' can't be null"; } + if ($this->container['rows_imported'] === null) { + $invalidProperties[] = "'rows_imported' can't be null"; + } return $invalidProperties; } @@ -259,73 +259,73 @@ public function setErrors($errors) } /** - * Gets rows_imported + * Gets duplicate_rows * * @return int */ - public function getRowsImported() + public function getDuplicateRows() { - return $this->container['rows_imported']; + return $this->container['duplicate_rows']; } /** - * Sets rows_imported + * Sets duplicate_rows * - * @param int $rows_imported Specifies number of rows imported + * @param int $duplicate_rows Specifies number of duplicate rows * * @return self */ - public function setRowsImported($rows_imported) + public function setDuplicateRows($duplicate_rows) { - $this->container['rows_imported'] = $rows_imported; + $this->container['duplicate_rows'] = $duplicate_rows; return $this; } /** - * Gets duplicate_rows + * Gets row_limit_exceeded * - * @return int + * @return bool */ - public function getDuplicateRows() + public function getRowLimitExceeded() { - return $this->container['duplicate_rows']; + return $this->container['row_limit_exceeded']; } /** - * Sets duplicate_rows + * Sets row_limit_exceeded * - * @param int $duplicate_rows Specifies number of duplicate rows + * @param bool $row_limit_exceeded Specifies whether row limit exceeded during import * * @return self */ - public function setDuplicateRows($duplicate_rows) + public function setRowLimitExceeded($row_limit_exceeded) { - $this->container['duplicate_rows'] = $duplicate_rows; + $this->container['row_limit_exceeded'] = $row_limit_exceeded; return $this; } /** - * Gets row_limit_exceeded + * Gets rows_imported * - * @return bool + * @return int */ - public function getRowLimitExceeded() + public function getRowsImported() { - return $this->container['row_limit_exceeded']; + return $this->container['rows_imported']; } /** - * Sets row_limit_exceeded + * Sets rows_imported * - * @param bool $row_limit_exceeded Specifies whether row limit exceeded during import + * @param int $rows_imported Specifies number of rows imported * * @return self */ - public function setRowLimitExceeded($row_limit_exceeded) + public function setRowsImported($rows_imported) { - $this->container['row_limit_exceeded'] = $row_limit_exceeded; + $this->container['rows_imported'] = $rows_imported; return $this; } diff --git a/codegen/Cms/Hubdb/Model/StandardError.php b/codegen/Cms/Hubdb/Model/StandardError.php index 8a1d56da2..064c0c947 100644 --- a/codegen/Cms/Hubdb/Model/StandardError.php +++ b/codegen/Cms/Hubdb/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => 'object', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Cms\Hubdb\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return object + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param object $category category + * @param string $category category * * @return self */ diff --git a/codegen/Cms/Performance/Api/PublicPerformanceApi.php b/codegen/Cms/Performance/Api/PublicPerformanceApi.php index 27afd405f..18c00fca9 100644 --- a/codegen/Cms/Performance/Api/PublicPerformanceApi.php +++ b/codegen/Cms/Performance/Api/PublicPerformanceApi.php @@ -490,11 +490,6 @@ public function getPageRequest($domain = null, $path = null, $pad = null, $sum = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -895,11 +890,6 @@ public function getUptimeRequest($domain = null, $path = null, $pad = null, $sum } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SiteSearch/Api/PublicApi.php b/codegen/Cms/SiteSearch/Api/PublicApi.php index c853e283e..173edfb7c 100644 --- a/codegen/Cms/SiteSearch/Api/PublicApi.php +++ b/codegen/Cms/SiteSearch/Api/PublicApi.php @@ -415,11 +415,6 @@ public function getByIdRequest($content_id, $type = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -946,11 +941,6 @@ public function searchRequest($q = null, $limit = null, $offset = null, $languag } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SourceCode/Api/ContentApi.php b/codegen/Cms/SourceCode/Api/ContentApi.php index 917ff45d1..ba3fd61bf 100644 --- a/codegen/Cms/SourceCode/Api/ContentApi.php +++ b/codegen/Cms/SourceCode/Api/ContentApi.php @@ -351,11 +351,6 @@ public function archiveRequest($environment, $path) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -708,11 +703,6 @@ public function createRequest($environment, $path, $file = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getRequest($environment, $path) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1372,11 +1357,6 @@ public function replaceRequest($environment, $path, $file = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SourceCode/Api/ExtractApi.php b/codegen/Cms/SourceCode/Api/ExtractApi.php index bb561d80c..d535d9e65 100644 --- a/codegen/Cms/SourceCode/Api/ExtractApi.php +++ b/codegen/Cms/SourceCode/Api/ExtractApi.php @@ -337,11 +337,6 @@ public function extractByPathRequest($path) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SourceCode/Api/MetadataApi.php b/codegen/Cms/SourceCode/Api/MetadataApi.php index e6457c0ed..43941e23d 100644 --- a/codegen/Cms/SourceCode/Api/MetadataApi.php +++ b/codegen/Cms/SourceCode/Api/MetadataApi.php @@ -420,11 +420,6 @@ public function getRequest($environment, $path) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SourceCode/Api/SourceCodeExtractApi.php b/codegen/Cms/SourceCode/Api/SourceCodeExtractApi.php index f645afdfa..dc3430422 100644 --- a/codegen/Cms/SourceCode/Api/SourceCodeExtractApi.php +++ b/codegen/Cms/SourceCode/Api/SourceCodeExtractApi.php @@ -387,11 +387,6 @@ public function doAsyncRequest($file_extract_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -691,11 +686,6 @@ public function getAsyncStatusRequest($task_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Cms/SourceCode/Api/ValidationApi.php b/codegen/Cms/SourceCode/Api/ValidationApi.php index 22071426a..2ad2916d5 100644 --- a/codegen/Cms/SourceCode/Api/ValidationApi.php +++ b/codegen/Cms/SourceCode/Api/ValidationApi.php @@ -395,11 +395,6 @@ public function doValidateRequest($path, $file = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 6e300034a..ac8ad9ce3 100644 --- a/codegen/Cms/UrlRedirects/Api/RedirectsApi.php +++ b/codegen/Cms/UrlRedirects/Api/RedirectsApi.php @@ -328,11 +328,6 @@ public function archiveRequest($url_redirect_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($url_mapping_create_request_body) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -950,11 +940,6 @@ public function getByIdRequest($url_redirect_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1383,11 +1368,6 @@ public function getPageRequest($created_at = null, $created_after = null, $creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1712,11 +1692,6 @@ public function updateRequest($url_redirect_id, $url_mapping) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 0a3692fae..4f7020478 100644 --- a/codegen/CommunicationPreferences/Api/DefinitionApi.php +++ b/codegen/CommunicationPreferences/Api/DefinitionApi.php @@ -378,11 +378,6 @@ public function getPageRequest() } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 cc1f338e3..e6ad09f2a 100644 --- a/codegen/CommunicationPreferences/Api/StatusApi.php +++ b/codegen/CommunicationPreferences/Api/StatusApi.php @@ -397,11 +397,6 @@ public function getEmailStatusRequest($email_address) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -707,11 +702,6 @@ public function subscribeRequest($public_update_subscription_status_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1017,11 +1007,6 @@ public function unsubscribeRequest($public_update_subscription_status_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 6e7680e89..c95fbd967 100644 --- a/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php +++ b/codegen/Conversations/VisitorIdentification/Api/GenerateApi.php @@ -395,11 +395,6 @@ public function generateTokenRequest($identification_token_generation_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 43b6c7c8e..6b8f3db02 100644 --- a/codegen/Crm/Associations/Api/BatchApi.php +++ b/codegen/Crm/Associations/Api/BatchApi.php @@ -364,11 +364,6 @@ public function archiveRequest($from_object_type, $to_object_type, $batch_input_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -735,11 +730,6 @@ public function createRequest($from_object_type, $to_object_type, $batch_input_p } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1106,11 +1096,6 @@ public function readRequest($from_object_type, $to_object_type, $batch_input_pub } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Associations/Schema/Api/TypesApi.php b/codegen/Crm/Associations/Schema/Api/TypesApi.php index f599d76c4..3085004da 100644 --- a/codegen/Crm/Associations/Schema/Api/TypesApi.php +++ b/codegen/Crm/Associations/Schema/Api/TypesApi.php @@ -416,11 +416,6 @@ public function getAllRequest($from_object_type, $to_object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Associations/V4/Api/BasicApi.php b/codegen/Crm/Associations/V4/Api/BasicApi.php index 22dc4faed..93df5e097 100644 --- a/codegen/Crm/Associations/V4/Api/BasicApi.php +++ b/codegen/Crm/Associations/V4/Api/BasicApi.php @@ -385,11 +385,6 @@ public function archiveRequest($object_type, $object_id, $to_object_type, $to_ob } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -771,11 +766,6 @@ public function createRequest($object_type, $object_id, $to_object_type, $to_obj } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1140,11 +1130,6 @@ public function createDefaultRequest($from_object_type, $from_object_id, $to_obj } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1518,11 +1503,6 @@ public function getPageRequest($object_type, $object_id, $to_object_type, $after } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Associations/V4/Api/BatchApi.php b/codegen/Crm/Associations/V4/Api/BatchApi.php index d8c1d7323..235404d2f 100644 --- a/codegen/Crm/Associations/V4/Api/BatchApi.php +++ b/codegen/Crm/Associations/V4/Api/BatchApi.php @@ -364,11 +364,6 @@ public function archiveRequest($from_object_type, $to_object_type, $batch_input_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -643,11 +638,6 @@ public function archiveLabelsRequest($from_object_type, $to_object_type, $batch_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1014,11 +1004,6 @@ public function createRequest($from_object_type, $to_object_type, $batch_input_p } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1362,11 +1347,6 @@ public function createDefaultRequest($from_object_type, $to_object_type, $batch_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1733,11 +1713,6 @@ public function getPageRequest($from_object_type, $to_object_type, $batch_input_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Associations/V4/Model/AssociationSpecWithLabel.php b/codegen/Crm/Associations/V4/Model/AssociationSpecWithLabel.php index d529b1782..cbf0bb031 100644 --- a/codegen/Crm/Associations/V4/Model/AssociationSpecWithLabel.php +++ b/codegen/Crm/Associations/V4/Model/AssociationSpecWithLabel.php @@ -57,9 +57,9 @@ class AssociationSpecWithLabel implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'category' => 'string', 'type_id' => 'int', - 'label' => 'string' + 'label' => 'string', + 'category' => 'string' ]; /** @@ -70,9 +70,9 @@ class AssociationSpecWithLabel implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'category' => null, 'type_id' => 'int32', - 'label' => null + 'label' => null, + 'category' => null ]; /** @@ -102,9 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'category' => 'category', 'type_id' => 'typeId', - 'label' => 'label' + 'label' => 'label', + 'category' => 'category' ]; /** @@ -113,9 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'category' => 'setCategory', 'type_id' => 'setTypeId', - 'label' => 'setLabel' + 'label' => 'setLabel', + 'category' => 'setCategory' ]; /** @@ -124,9 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'category' => 'getCategory', 'type_id' => 'getTypeId', - 'label' => 'getLabel' + 'label' => 'getLabel', + 'category' => 'getCategory' ]; /** @@ -203,9 +203,9 @@ public function getCategoryAllowableValues() */ public function __construct(array $data = null) { - $this->container['category'] = $data['category'] ?? null; $this->container['type_id'] = $data['type_id'] ?? null; $this->container['label'] = $data['label'] ?? null; + $this->container['category'] = $data['category'] ?? null; } /** @@ -217,6 +217,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['type_id'] === null) { + $invalidProperties[] = "'type_id' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -229,9 +232,6 @@ public function listInvalidProperties() ); } - if ($this->container['type_id'] === null) { - $invalidProperties[] = "'type_id' can't be null"; - } return $invalidProperties; } @@ -247,40 +247,6 @@ public function valid() } - /** - * Gets category - * - * @return string - */ - public function getCategory() - { - return $this->container['category']; - } - - /** - * Sets category - * - * @param string $category category - * - * @return self - */ - public function setCategory($category) - { - $allowedValues = $this->getCategoryAllowableValues(); - if (!in_array($category, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'category', must be one of '%s'", - $category, - implode("', '", $allowedValues) - ) - ); - } - $this->container['category'] = $category; - - return $this; - } - /** * Gets type_id * @@ -328,6 +294,40 @@ public function setLabel($label) return $this; } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category category + * + * @return self + */ + public function setCategory($category) + { + $allowedValues = $this->getCategoryAllowableValues(); + if (!in_array($category, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'category', must be one of '%s'", + $category, + implode("', '", $allowedValues) + ) + ); + } + $this->container['category'] = $category; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Associations/V4/Model/BatchReadInputSimplePublicObjectId.php b/codegen/Crm/Associations/V4/Model/BatchReadInputSimplePublicObjectId.php index 03bae63e6..0eefe3115 100644 --- a/codegen/Crm/Associations/V4/Model/BatchReadInputSimplePublicObjectId.php +++ b/codegen/Crm/Associations/V4/Model/BatchReadInputSimplePublicObjectId.php @@ -57,10 +57,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'string[]', 'properties_with_history' => 'string[]', 'id_property' => 'string', - 'inputs' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectId[]' + 'inputs' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectId[]', + 'properties' => 'string[]' ]; /** @@ -71,10 +71,10 @@ class BatchReadInputSimplePublicObjectId implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, 'properties_with_history' => null, 'id_property' => null, - 'inputs' => null + 'inputs' => null, + 'properties' => null ]; /** @@ -104,10 +104,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', 'properties_with_history' => 'propertiesWithHistory', 'id_property' => 'idProperty', - 'inputs' => 'inputs' + 'inputs' => 'inputs', + 'properties' => 'properties' ]; /** @@ -116,10 +116,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', 'properties_with_history' => 'setPropertiesWithHistory', 'id_property' => 'setIdProperty', - 'inputs' => 'setInputs' + 'inputs' => 'setInputs', + 'properties' => 'setProperties' ]; /** @@ -128,10 +128,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', 'properties_with_history' => 'getPropertiesWithHistory', 'id_property' => 'getIdProperty', - 'inputs' => 'getInputs' + 'inputs' => 'getInputs', + 'properties' => 'getProperties' ]; /** @@ -191,10 +191,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; $this->container['inputs'] = $data['inputs'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -206,15 +206,15 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['properties_with_history'] === null) { $invalidProperties[] = "'properties_with_history' can't be null"; } if ($this->container['inputs'] === null) { $invalidProperties[] = "'inputs' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -230,30 +230,6 @@ public function valid() } - /** - * Gets properties - * - * @return string[] - */ - public function getProperties() - { - return $this->container['properties']; - } - - /** - * Sets properties - * - * @param string[] $properties properties - * - * @return self - */ - public function setProperties($properties) - { - $this->container['properties'] = $properties; - - return $this; - } - /** * Gets properties_with_history * @@ -325,6 +301,30 @@ public function setInputs($inputs) return $this; } + + /** + * Gets properties + * + * @return string[] + */ + public function getProperties() + { + return $this->container['properties']; + } + + /** + * Sets properties + * + * @param string[] $properties properties + * + * @return self + */ + public function setProperties($properties) + { + $this->container['properties'] = $properties; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPair.php b/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPair.php index baeed7839..3ee4d441e 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPair.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPair.php @@ -57,12 +57,12 @@ class BatchResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAcces * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseLabelsBetweenObjectPair implements ModelInterface, ArrayAcces * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links links + * @param \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPairWithErrors.php b/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPairWithErrors.php index 71bfc2e8a..2208f7782 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPairWithErrors.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponseLabelsBetweenObjectPairWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseLabelsBetweenObjectPairWithErrors implements ModelInterface, * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[]', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseLabelsBetweenObjectPairWithErrors implements ModelInterface, * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at requested_at + * @param array|null $links links * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\LabelsBetweenObjectPair[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabel.php b/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabel.php index 3e36e16f7..9d898ab45 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabel.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabel.php @@ -57,12 +57,12 @@ class BatchResponsePublicAssociationMultiWithLabel implements ModelInterface, Ar * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponsePublicAssociationMultiWithLabel implements ModelInterface, Ar * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links links + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabelWithErrors.php b/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabelWithErrors.php index 7e081bc2b..342c6829b 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabelWithErrors.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponsePublicAssociationMultiWithLabelWithErrors.php @@ -57,14 +57,14 @@ class BatchResponsePublicAssociationMultiWithLabelWithErrors implements ModelInt * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[]', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponsePublicAssociationMultiWithLabelWithErrors implements ModelInt * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at requested_at + * @param array|null $links links * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationMultiWithLabel[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponsePublicDefaultAssociation.php b/codegen/Crm/Associations/V4/Model/BatchResponsePublicDefaultAssociation.php index 4fccc966a..0f865a514 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponsePublicDefaultAssociation.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponsePublicDefaultAssociation.php @@ -57,14 +57,14 @@ class BatchResponsePublicDefaultAssociation implements ModelInterface, ArrayAcce * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[]', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponsePublicDefaultAssociation implements ModelInterface, ArrayAcce * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at requested_at + * @param array|null $links links * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicDefaultAssociation[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObject.php b/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObject.php index 60d0e141f..5444cede1 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObject.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObject.php @@ -57,12 +57,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[]', + 'status' => 'string' ]; /** @@ -73,12 +73,12 @@ class BatchResponseSimplePublicObject implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'status' => null ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'status' => 'status' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'status' => 'setStatus' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'status' => 'getStatus' ]; /** @@ -220,12 +220,12 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -237,6 +237,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -249,15 +258,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -274,59 +274,25 @@ public function valid() /** - * Gets status - * - * @return string - */ - public function getStatus() - { - return $this->container['status']; - } - - /** - * Sets status - * - * @param string $status status - * - * @return self - */ - public function setStatus($status) - { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; - - return $this; - } - - /** - * Gets results + * Gets completed_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] + * @return \DateTime */ - public function getResults() + public function getCompletedAt() { - return $this->container['results']; + return $this->container['completed_at']; } /** - * Sets results + * Sets completed_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] $results results + * @param \DateTime $completed_at completed_at * * @return self */ - public function setResults($results) + public function setCompletedAt($completed_at) { - $this->container['results'] = $results; + $this->container['completed_at'] = $completed_at; return $this; } @@ -380,49 +346,83 @@ public function setStartedAt($started_at) } /** - * Gets completed_at + * Gets links * - * @return \DateTime + * @return array|null */ - public function getCompletedAt() + public function getLinks() { - return $this->container['completed_at']; + return $this->container['links']; } /** - * Sets completed_at + * Sets links * - * @param \DateTime $completed_at completed_at + * @param array|null $links links * * @return self */ - public function setCompletedAt($completed_at) + public function setLinks($links) { - $this->container['completed_at'] = $completed_at; + $this->container['links'] = $links; return $this; } /** - * Gets links + * Gets results * - * @return array|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] */ - public function getLinks() + public function getResults() { - return $this->container['links']; + return $this->container['results']; } /** - * Sets links + * Sets results * - * @param array|null $links links + * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] $results results * * @return self */ - public function setLinks($links) + public function setResults($results) { - $this->container['links'] = $links; + $this->container['results'] = $results; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObjectWithErrors.php b/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObjectWithErrors.php index da51d409d..fda333a94 100644 --- a/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObjectWithErrors.php +++ b/codegen/Crm/Associations/V4/Model/BatchResponseSimplePublicObjectWithErrors.php @@ -57,14 +57,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[]', + 'completed_at' => '\DateTime', 'num_errors' => 'int', - 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError[]', 'requested_at' => '\DateTime', 'started_at' => '\DateTime', - 'completed_at' => '\DateTime', - 'links' => 'array' + 'links' => 'array', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[]', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]', + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class BatchResponseSimplePublicObjectWithErrors implements ModelInterface, Array * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, - 'results' => null, + 'completed_at' => 'date-time', 'num_errors' => 'int32', - 'errors' => null, 'requested_at' => 'date-time', 'started_at' => 'date-time', - 'completed_at' => 'date-time', - 'links' => null + 'links' => null, + 'results' => null, + 'errors' => null, + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', - 'results' => 'results', + 'completed_at' => 'completedAt', 'num_errors' => 'numErrors', - 'errors' => 'errors', 'requested_at' => 'requestedAt', 'started_at' => 'startedAt', - 'completed_at' => 'completedAt', - 'links' => 'links' + 'links' => 'links', + 'results' => 'results', + 'errors' => 'errors', + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', - 'results' => 'setResults', + 'completed_at' => 'setCompletedAt', 'num_errors' => 'setNumErrors', - 'errors' => 'setErrors', 'requested_at' => 'setRequestedAt', 'started_at' => 'setStartedAt', - 'completed_at' => 'setCompletedAt', - 'links' => 'setLinks' + 'links' => 'setLinks', + 'results' => 'setResults', + 'errors' => 'setErrors', + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', - 'results' => 'getResults', + 'completed_at' => 'getCompletedAt', 'num_errors' => 'getNumErrors', - 'errors' => 'getErrors', 'requested_at' => 'getRequestedAt', 'started_at' => 'getStartedAt', - 'completed_at' => 'getCompletedAt', - 'links' => 'getLinks' + 'links' => 'getLinks', + 'results' => 'getResults', + 'errors' => 'getErrors', + 'status' => 'getStatus' ]; /** @@ -230,14 +230,14 @@ public function getStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; - $this->container['results'] = $data['results'] ?? null; + $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['num_errors'] = $data['num_errors'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['requested_at'] = $data['requested_at'] ?? null; $this->container['started_at'] = $data['started_at'] ?? null; - $this->container['completed_at'] = $data['completed_at'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['results'] = $data['results'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -249,6 +249,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } + if ($this->container['started_at'] === null) { + $invalidProperties[] = "'started_at' can't be null"; + } + if ($this->container['results'] === null) { + $invalidProperties[] = "'results' can't be null"; + } if ($this->container['status'] === null) { $invalidProperties[] = "'status' can't be null"; } @@ -261,15 +270,6 @@ public function listInvalidProperties() ); } - if ($this->container['results'] === null) { - $invalidProperties[] = "'results' can't be null"; - } - if ($this->container['started_at'] === null) { - $invalidProperties[] = "'started_at' can't be null"; - } - if ($this->container['completed_at'] === null) { - $invalidProperties[] = "'completed_at' can't be null"; - } return $invalidProperties; } @@ -286,203 +286,203 @@ public function valid() /** - * Gets status + * Gets completed_at * - * @return string + * @return \DateTime */ - public function getStatus() + public function getCompletedAt() { - return $this->container['status']; + return $this->container['completed_at']; } /** - * Sets status + * Sets completed_at * - * @param string $status status + * @param \DateTime $completed_at completed_at * * @return self */ - public function setStatus($status) + public function setCompletedAt($completed_at) { - $allowedValues = $this->getStatusAllowableValues(); - if (!in_array($status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'status', must be one of '%s'", - $status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['status'] = $status; + $this->container['completed_at'] = $completed_at; return $this; } /** - * Gets results + * Gets num_errors * - * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] + * @return int|null */ - public function getResults() + public function getNumErrors() { - return $this->container['results']; + return $this->container['num_errors']; } /** - * Sets results + * Sets num_errors * - * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] $results results + * @param int|null $num_errors num_errors * * @return self */ - public function setResults($results) + public function setNumErrors($num_errors) { - $this->container['results'] = $results; + $this->container['num_errors'] = $num_errors; return $this; } /** - * Gets num_errors + * Gets requested_at * - * @return int|null + * @return \DateTime|null */ - public function getNumErrors() + public function getRequestedAt() { - return $this->container['num_errors']; + return $this->container['requested_at']; } /** - * Sets num_errors + * Sets requested_at * - * @param int|null $num_errors num_errors + * @param \DateTime|null $requested_at requested_at * * @return self */ - public function setNumErrors($num_errors) + public function setRequestedAt($requested_at) { - $this->container['num_errors'] = $num_errors; + $this->container['requested_at'] = $requested_at; return $this; } /** - * Gets errors + * Gets started_at * - * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null + * @return \DateTime */ - public function getErrors() + public function getStartedAt() { - return $this->container['errors']; + return $this->container['started_at']; } /** - * Sets errors + * Sets started_at * - * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError[]|null $errors errors + * @param \DateTime $started_at started_at * * @return self */ - public function setErrors($errors) + public function setStartedAt($started_at) { - $this->container['errors'] = $errors; + $this->container['started_at'] = $started_at; return $this; } /** - * Gets requested_at + * Gets links * - * @return \DateTime|null + * @return array|null */ - public function getRequestedAt() + public function getLinks() { - return $this->container['requested_at']; + return $this->container['links']; } /** - * Sets requested_at + * Sets links * - * @param \DateTime|null $requested_at requested_at + * @param array|null $links links * * @return self */ - public function setRequestedAt($requested_at) + public function setLinks($links) { - $this->container['requested_at'] = $requested_at; + $this->container['links'] = $links; return $this; } /** - * Gets started_at + * Gets results * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] */ - public function getStartedAt() + public function getResults() { - return $this->container['started_at']; + return $this->container['results']; } /** - * Sets started_at + * Sets results * - * @param \DateTime $started_at started_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObject[] $results results * * @return self */ - public function setStartedAt($started_at) + public function setResults($results) { - $this->container['started_at'] = $started_at; + $this->container['results'] = $results; return $this; } /** - * Gets completed_at + * Gets errors * - * @return \DateTime + * @return \HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]|null */ - public function getCompletedAt() + public function getErrors() { - return $this->container['completed_at']; + return $this->container['errors']; } /** - * Sets completed_at + * Sets errors * - * @param \DateTime $completed_at completed_at + * @param \HubSpot\Client\Crm\Associations\V4\Model\StandardError1[]|null $errors errors * * @return self */ - public function setCompletedAt($completed_at) + public function setErrors($errors) { - $this->container['completed_at'] = $completed_at; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array|null + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array|null $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $allowedValues = $this->getStatusAllowableValues(); + if (!in_array($status, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'status', must be one of '%s'", + $status, + implode("', '", $allowedValues) + ) + ); + } + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/CollectionResponseAssociatedId.php b/codegen/Crm/Associations/V4/Model/CollectionResponseAssociatedId.php index ed9c359e7..3badcab7a 100644 --- a/codegen/Crm/Associations/V4/Model/CollectionResponseAssociatedId.php +++ b/codegen/Crm/Associations/V4/Model/CollectionResponseAssociatedId.php @@ -57,8 +57,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[]', - 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\Paging', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseAssociatedId implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\Paging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[] $results results + * @param \HubSpot\Client\Crm\Associations\V4\Model\Paging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Associations\V4\Model\Paging|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Associations\V4\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociatedId[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabelForwardPaging.php b/codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabelForwardPaging.php index 9fee75878..9d545a705 100644 --- a/codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabelForwardPaging.php +++ b/codegen/Crm/Associations/V4/Model/CollectionResponseMultiAssociatedObjectWithLabelForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseMultiAssociatedObjectWithLabelForwardPaging implements M * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[]', - 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseMultiAssociatedObjectWithLabelForwardPaging implements M * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] $results results + * @param \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php b/codegen/Crm/Associations/V4/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php index 340d8c7d7..4550c2f41 100644 --- a/codegen/Crm/Associations/V4/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php +++ b/codegen/Crm/Associations/V4/Model/CollectionResponseSimplePublicObjectWithAssociationsForwardPaging.php @@ -57,8 +57,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @var string[] */ protected static $openAPITypes = [ - 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[]', - 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging' + 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging', + 'results' => '\HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[]' ]; /** @@ -69,8 +69,8 @@ class CollectionResponseSimplePublicObjectWithAssociationsForwardPaging implemen * @psalm-var array */ protected static $openAPIFormats = [ - 'results' => null, - 'paging' => null + 'paging' => null, + 'results' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'results' => 'results', - 'paging' => 'paging' + 'paging' => 'paging', + 'results' => 'results' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'results' => 'setResults', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'results' => 'setResults' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'results' => 'getResults', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'results' => 'getResults' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['results'] = $data['results'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['results'] = $data['results'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets results + * Gets paging * - * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null */ - public function getResults() + public function getPaging() { - return $this->container['results']; + return $this->container['paging']; } /** - * Sets results + * Sets paging * - * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[] $results results + * @param \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null $paging paging * * @return self */ - public function setResults($results) + public function setPaging($paging) { - $this->container['results'] = $results; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets results * - * @return \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[] */ - public function getPaging() + public function getResults() { - return $this->container['paging']; + return $this->container['results']; } /** - * Sets paging + * Sets results * - * @param \HubSpot\Client\Crm\Associations\V4\Model\ForwardPaging|null $paging paging + * @param \HubSpot\Client\Crm\Associations\V4\Model\SimplePublicObjectWithAssociations[] $results results * * @return self */ - public function setPaging($paging) + public function setResults($results) { - $this->container['paging'] = $paging; + $this->container['results'] = $results; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/Error.php b/codegen/Crm/Associations/V4/Model/Error.php index ba5aba2dc..d5c7bd02a 100644 --- a/codegen/Crm/Associations/V4/Model/Error.php +++ b/codegen/Crm/Associations/V4/Model/Error.php @@ -57,13 +57,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'correlation_id' => 'string', - 'category' => 'string', 'sub_category' => 'string', - 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]', 'context' => 'array', - 'links' => 'array' + 'correlation_id' => 'string', + 'links' => 'array', + 'message' => 'string', + 'category' => 'string', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]' ]; /** @@ -74,13 +74,13 @@ class Error implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'correlation_id' => 'uuid', - 'category' => null, 'sub_category' => null, - 'errors' => null, 'context' => null, - 'links' => null + 'correlation_id' => 'uuid', + 'links' => null, + 'message' => null, + 'category' => null, + 'errors' => null ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'correlation_id' => 'correlationId', - 'category' => 'category', 'sub_category' => 'subCategory', - 'errors' => 'errors', 'context' => 'context', - 'links' => 'links' + 'correlation_id' => 'correlationId', + 'links' => 'links', + 'message' => 'message', + 'category' => 'category', + 'errors' => 'errors' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'correlation_id' => 'setCorrelationId', - 'category' => 'setCategory', 'sub_category' => 'setSubCategory', - 'errors' => 'setErrors', 'context' => 'setContext', - 'links' => 'setLinks' + 'correlation_id' => 'setCorrelationId', + 'links' => 'setLinks', + 'message' => 'setMessage', + 'category' => 'setCategory', + 'errors' => 'setErrors' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'correlation_id' => 'getCorrelationId', - 'category' => 'getCategory', 'sub_category' => 'getSubCategory', - 'errors' => 'getErrors', 'context' => 'getContext', - 'links' => 'getLinks' + 'correlation_id' => 'getCorrelationId', + 'links' => 'getLinks', + 'message' => 'getMessage', + 'category' => 'getCategory', + 'errors' => 'getErrors' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['correlation_id'] = $data['correlation_id'] ?? null; - $this->container['category'] = $data['category'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; - $this->container['errors'] = $data['errors'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['correlation_id'] = $data['correlation_id'] ?? null; $this->container['links'] = $data['links'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; } /** @@ -224,12 +224,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } if ($this->container['correlation_id'] === null) { $invalidProperties[] = "'correlation_id' can't be null"; } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; } @@ -249,169 +249,169 @@ public function valid() /** - * Gets message + * Gets sub_category * - * @return string + * @return string|null */ - public function getMessage() + public function getSubCategory() { - return $this->container['message']; + return $this->container['sub_category']; } /** - * Sets message + * Sets sub_category * - * @param string $message A human readable message describing the error along with remediation steps where appropriate + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setMessage($message) + public function setSubCategory($sub_category) { - $this->container['message'] = $message; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets correlation_id + * Gets context * - * @return string + * @return array|null */ - public function getCorrelationId() + public function getContext() { - return $this->container['correlation_id']; + return $this->container['context']; } /** - * Sets correlation_id + * Sets context * - * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets + * @param array|null $context Context about the error condition * * @return self */ - public function setCorrelationId($correlation_id) + public function setContext($context) { - $this->container['correlation_id'] = $correlation_id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets correlation_id * * @return string */ - public function getCategory() + public function getCorrelationId() { - return $this->container['category']; + return $this->container['correlation_id']; } /** - * Sets category + * Sets correlation_id * - * @param string $category The error category + * @param string $correlation_id A unique identifier for the request. Include this value with any error reports or support tickets * * @return self */ - public function setCategory($category) + public function setCorrelationId($correlation_id) { - $this->container['category'] = $category; + $this->container['correlation_id'] = $correlation_id; return $this; } /** - * Gets sub_category + * Gets links * - * @return string|null + * @return array|null */ - public function getSubCategory() + public function getLinks() { - return $this->container['sub_category']; + return $this->container['links']; } /** - * Sets sub_category + * Sets links * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps * * @return self */ - public function setSubCategory($sub_category) + public function setLinks($links) { - $this->container['sub_category'] = $sub_category; + $this->container['links'] = $links; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]|null + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]|null $errors further information about the error + * @param string $message A human readable message describing the error along with remediation steps where appropriate * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets category * - * @return array|null + * @return string */ - public function getContext() + public function getCategory() { - return $this->container['context']; + return $this->container['category']; } /** - * Sets context + * Sets category * - * @param array|null $context Context about the error condition + * @param string $category The error category * * @return self */ - public function setContext($context) + public function setCategory($category) { - $this->container['context'] = $context; + $this->container['category'] = $category; return $this; } /** - * Gets links + * Gets errors * - * @return array|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]|null */ - public function getLinks() + public function getErrors() { - return $this->container['links']; + return $this->container['errors']; } /** - * Sets links + * Sets errors * - * @param array|null $links A map of link names to associated URIs containing documentation about the error or recommended remediation steps + * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]|null $errors further information about the error * * @return self */ - public function setLinks($links) + public function setErrors($errors) { - $this->container['links'] = $links; + $this->container['errors'] = $errors; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/ErrorCategory.php b/codegen/Crm/Associations/V4/Model/ErrorCategory.php index e58fbc624..5f69f285a 100644 --- a/codegen/Crm/Associations/V4/Model/ErrorCategory.php +++ b/codegen/Crm/Associations/V4/Model/ErrorCategory.php @@ -57,8 +57,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' + 'http_status' => 'string', + 'name' => 'string' ]; /** @@ -69,8 +69,8 @@ class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null + 'http_status' => null, + 'name' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' + 'http_status' => 'httpStatus', + 'name' => 'name' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' + 'http_status' => 'setHttpStatus', + 'name' => 'setName' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' + 'http_status' => 'getHttpStatus', + 'name' => 'getName' ]; /** @@ -316,8 +316,8 @@ public function getHttpStatusAllowableValues() */ public function __construct(array $data = null) { - $this->container['name'] = $data['name'] ?? null; $this->container['http_status'] = $data['http_status'] ?? null; + $this->container['name'] = $data['name'] ?? null; } /** @@ -329,9 +329,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } if ($this->container['http_status'] === null) { $invalidProperties[] = "'http_status' can't be null"; } @@ -344,6 +341,9 @@ public function listInvalidProperties() ); } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } return $invalidProperties; } @@ -359,30 +359,6 @@ public function valid() } - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - /** * Gets http_status * @@ -416,6 +392,30 @@ public function setHttpStatus($http_status) return $this; } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name name + * + * @return self + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Associations/V4/Model/ErrorDetail.php b/codegen/Crm/Associations/V4/Model/ErrorDetail.php index 469ca04f3..d693e3db3 100644 --- a/codegen/Crm/Associations/V4/Model/ErrorDetail.php +++ b/codegen/Crm/Associations/V4/Model/ErrorDetail.php @@ -57,11 +57,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'message' => 'string', - 'in' => 'string', - 'code' => 'string', 'sub_category' => 'string', - 'context' => 'array' + 'code' => 'string', + 'in' => 'string', + 'context' => 'array', + 'message' => 'string' ]; /** @@ -72,11 +72,11 @@ class ErrorDetail implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'message' => null, - 'in' => null, - 'code' => null, 'sub_category' => null, - 'context' => null + 'code' => null, + 'in' => null, + 'context' => null, + 'message' => null ]; /** @@ -106,11 +106,11 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'message' => 'message', - 'in' => 'in', - 'code' => 'code', 'sub_category' => 'subCategory', - 'context' => 'context' + 'code' => 'code', + 'in' => 'in', + 'context' => 'context', + 'message' => 'message' ]; /** @@ -119,11 +119,11 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'message' => 'setMessage', - 'in' => 'setIn', - 'code' => 'setCode', 'sub_category' => 'setSubCategory', - 'context' => 'setContext' + 'code' => 'setCode', + 'in' => 'setIn', + 'context' => 'setContext', + 'message' => 'setMessage' ]; /** @@ -132,11 +132,11 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'message' => 'getMessage', - 'in' => 'getIn', - 'code' => 'getCode', 'sub_category' => 'getSubCategory', - 'context' => 'getContext' + 'code' => 'getCode', + 'in' => 'getIn', + 'context' => 'getContext', + 'message' => 'getMessage' ]; /** @@ -196,11 +196,11 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['message'] = $data['message'] ?? null; - $this->container['in'] = $data['in'] ?? null; - $this->container['code'] = $data['code'] ?? null; $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['code'] = $data['code'] ?? null; + $this->container['in'] = $data['in'] ?? null; $this->container['context'] = $data['context'] ?? null; + $this->container['message'] = $data['message'] ?? null; } /** @@ -231,49 +231,25 @@ public function valid() /** - * Gets message - * - * @return string - */ - public function getMessage() - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param string $message A human readable message describing the error along with remediation steps where appropriate - * - * @return self - */ - public function setMessage($message) - { - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets in + * Gets sub_category * * @return string|null */ - public function getIn() + public function getSubCategory() { - return $this->container['in']; + return $this->container['sub_category']; } /** - * Sets in + * Sets sub_category * - * @param string|null $in The name of the field or parameter in which the error was found. + * @param string|null $sub_category A specific category that contains more specific detail about the error * * @return self */ - public function setIn($in) + public function setSubCategory($sub_category) { - $this->container['in'] = $in; + $this->container['sub_category'] = $sub_category; return $this; } @@ -303,25 +279,25 @@ public function setCode($code) } /** - * Gets sub_category + * Gets in * * @return string|null */ - public function getSubCategory() + public function getIn() { - return $this->container['sub_category']; + return $this->container['in']; } /** - * Sets sub_category + * Sets in * - * @param string|null $sub_category A specific category that contains more specific detail about the error + * @param string|null $in The name of the field or parameter in which the error was found. * * @return self */ - public function setSubCategory($sub_category) + public function setIn($in) { - $this->container['sub_category'] = $sub_category; + $this->container['in'] = $in; return $this; } @@ -349,6 +325,30 @@ public function setContext($context) return $this; } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message A human readable message describing the error along with remediation steps where appropriate + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/codegen/Crm/Associations/V4/Model/LabelsBetweenObjectPair.php b/codegen/Crm/Associations/V4/Model/LabelsBetweenObjectPair.php index 291901cbf..effff2acf 100644 --- a/codegen/Crm/Associations/V4/Model/LabelsBetweenObjectPair.php +++ b/codegen/Crm/Associations/V4/Model/LabelsBetweenObjectPair.php @@ -58,9 +58,9 @@ class LabelsBetweenObjectPair implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPITypes = [ 'from_object_type_id' => 'string', - 'from_object_id' => 'int', - 'to_object_type_id' => 'string', 'to_object_id' => 'int', + 'to_object_type_id' => 'string', + 'from_object_id' => 'int', 'labels' => 'string[]' ]; @@ -73,9 +73,9 @@ class LabelsBetweenObjectPair implements ModelInterface, ArrayAccess, \JsonSeria */ protected static $openAPIFormats = [ 'from_object_type_id' => null, - 'from_object_id' => 'int32', - 'to_object_type_id' => null, 'to_object_id' => 'int32', + 'to_object_type_id' => null, + 'from_object_id' => 'int32', 'labels' => null ]; @@ -107,9 +107,9 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'from_object_type_id' => 'fromObjectTypeId', - 'from_object_id' => 'fromObjectId', - 'to_object_type_id' => 'toObjectTypeId', 'to_object_id' => 'toObjectId', + 'to_object_type_id' => 'toObjectTypeId', + 'from_object_id' => 'fromObjectId', 'labels' => 'labels' ]; @@ -120,9 +120,9 @@ public static function openAPIFormats() */ protected static $setters = [ 'from_object_type_id' => 'setFromObjectTypeId', - 'from_object_id' => 'setFromObjectId', - 'to_object_type_id' => 'setToObjectTypeId', 'to_object_id' => 'setToObjectId', + 'to_object_type_id' => 'setToObjectTypeId', + 'from_object_id' => 'setFromObjectId', 'labels' => 'setLabels' ]; @@ -133,9 +133,9 @@ public static function openAPIFormats() */ protected static $getters = [ 'from_object_type_id' => 'getFromObjectTypeId', - 'from_object_id' => 'getFromObjectId', - 'to_object_type_id' => 'getToObjectTypeId', 'to_object_id' => 'getToObjectId', + 'to_object_type_id' => 'getToObjectTypeId', + 'from_object_id' => 'getFromObjectId', 'labels' => 'getLabels' ]; @@ -197,9 +197,9 @@ public function getModelName() public function __construct(array $data = null) { $this->container['from_object_type_id'] = $data['from_object_type_id'] ?? null; - $this->container['from_object_id'] = $data['from_object_id'] ?? null; - $this->container['to_object_type_id'] = $data['to_object_type_id'] ?? null; $this->container['to_object_id'] = $data['to_object_id'] ?? null; + $this->container['to_object_type_id'] = $data['to_object_type_id'] ?? null; + $this->container['from_object_id'] = $data['from_object_id'] ?? null; $this->container['labels'] = $data['labels'] ?? null; } @@ -215,14 +215,14 @@ public function listInvalidProperties() if ($this->container['from_object_type_id'] === null) { $invalidProperties[] = "'from_object_type_id' can't be null"; } - if ($this->container['from_object_id'] === null) { - $invalidProperties[] = "'from_object_id' can't be null"; + if ($this->container['to_object_id'] === null) { + $invalidProperties[] = "'to_object_id' can't be null"; } if ($this->container['to_object_type_id'] === null) { $invalidProperties[] = "'to_object_type_id' can't be null"; } - if ($this->container['to_object_id'] === null) { - $invalidProperties[] = "'to_object_id' can't be null"; + if ($this->container['from_object_id'] === null) { + $invalidProperties[] = "'from_object_id' can't be null"; } if ($this->container['labels'] === null) { $invalidProperties[] = "'labels' can't be null"; @@ -267,25 +267,25 @@ public function setFromObjectTypeId($from_object_type_id) } /** - * Gets from_object_id + * Gets to_object_id * * @return int */ - public function getFromObjectId() + public function getToObjectId() { - return $this->container['from_object_id']; + return $this->container['to_object_id']; } /** - * Sets from_object_id + * Sets to_object_id * - * @param int $from_object_id from_object_id + * @param int $to_object_id to_object_id * * @return self */ - public function setFromObjectId($from_object_id) + public function setToObjectId($to_object_id) { - $this->container['from_object_id'] = $from_object_id; + $this->container['to_object_id'] = $to_object_id; return $this; } @@ -315,25 +315,25 @@ public function setToObjectTypeId($to_object_type_id) } /** - * Gets to_object_id + * Gets from_object_id * * @return int */ - public function getToObjectId() + public function getFromObjectId() { - return $this->container['to_object_id']; + return $this->container['from_object_id']; } /** - * Sets to_object_id + * Sets from_object_id * - * @param int $to_object_id to_object_id + * @param int $from_object_id from_object_id * * @return self */ - public function setToObjectId($to_object_id) + public function setFromObjectId($from_object_id) { - $this->container['to_object_id'] = $to_object_id; + $this->container['from_object_id'] = $from_object_id; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/MultiAssociatedObjectWithLabel.php b/codegen/Crm/Associations/V4/Model/MultiAssociatedObjectWithLabel.php index edf2e60e5..4810ad719 100644 --- a/codegen/Crm/Associations/V4/Model/MultiAssociatedObjectWithLabel.php +++ b/codegen/Crm/Associations/V4/Model/MultiAssociatedObjectWithLabel.php @@ -57,8 +57,8 @@ class MultiAssociatedObjectWithLabel implements ModelInterface, ArrayAccess, \Js * @var string[] */ protected static $openAPITypes = [ - 'to_object_id' => 'int', - 'association_types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[]' + 'association_types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[]', + 'to_object_id' => 'int' ]; /** @@ -69,8 +69,8 @@ class MultiAssociatedObjectWithLabel implements ModelInterface, ArrayAccess, \Js * @psalm-var array */ protected static $openAPIFormats = [ - 'to_object_id' => 'int32', - 'association_types' => null + 'association_types' => null, + 'to_object_id' => 'int32' ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to_object_id' => 'toObjectId', - 'association_types' => 'associationTypes' + 'association_types' => 'associationTypes', + 'to_object_id' => 'toObjectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to_object_id' => 'setToObjectId', - 'association_types' => 'setAssociationTypes' + 'association_types' => 'setAssociationTypes', + 'to_object_id' => 'setToObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to_object_id' => 'getToObjectId', - 'association_types' => 'getAssociationTypes' + 'association_types' => 'getAssociationTypes', + 'to_object_id' => 'getToObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to_object_id'] = $data['to_object_id'] ?? null; $this->container['association_types'] = $data['association_types'] ?? null; + $this->container['to_object_id'] = $data['to_object_id'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to_object_id'] === null) { - $invalidProperties[] = "'to_object_id' can't be null"; - } if ($this->container['association_types'] === null) { $invalidProperties[] = "'association_types' can't be null"; } + if ($this->container['to_object_id'] === null) { + $invalidProperties[] = "'to_object_id' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to_object_id + * Gets association_types * - * @return int + * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[] */ - public function getToObjectId() + public function getAssociationTypes() { - return $this->container['to_object_id']; + return $this->container['association_types']; } /** - * Sets to_object_id + * Sets association_types * - * @param int $to_object_id to_object_id + * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[] $association_types association_types * * @return self */ - public function setToObjectId($to_object_id) + public function setAssociationTypes($association_types) { - $this->container['to_object_id'] = $to_object_id; + $this->container['association_types'] = $association_types; return $this; } /** - * Gets association_types + * Gets to_object_id * - * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[] + * @return int */ - public function getAssociationTypes() + public function getToObjectId() { - return $this->container['association_types']; + return $this->container['to_object_id']; } /** - * Sets association_types + * Sets to_object_id * - * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpecWithLabel[] $association_types association_types + * @param int $to_object_id to_object_id * * @return self */ - public function setAssociationTypes($association_types) + public function setToObjectId($to_object_id) { - $this->container['association_types'] = $association_types; + $this->container['to_object_id'] = $to_object_id; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/NextPage.php b/codegen/Crm/Associations/V4/Model/NextPage.php index 6747df6ad..ad2bef7b8 100644 --- a/codegen/Crm/Associations/V4/Model/NextPage.php +++ b/codegen/Crm/Associations/V4/Model/NextPage.php @@ -57,8 +57,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'after' => 'string', - 'link' => 'string' + 'link' => 'string', + 'after' => 'string' ]; /** @@ -69,8 +69,8 @@ class NextPage implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'after' => null, - 'link' => null + 'link' => null, + 'after' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'after' => 'after', - 'link' => 'link' + 'link' => 'link', + 'after' => 'after' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'after' => 'setAfter', - 'link' => 'setLink' + 'link' => 'setLink', + 'after' => 'setAfter' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'after' => 'getAfter', - 'link' => 'getLink' + 'link' => 'getLink', + 'after' => 'getAfter' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['after'] = $data['after'] ?? null; $this->container['link'] = $data['link'] ?? null; + $this->container['after'] = $data['after'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets after + * Gets link * - * @return string + * @return string|null */ - public function getAfter() + public function getLink() { - return $this->container['after']; + return $this->container['link']; } /** - * Sets after + * Sets link * - * @param string $after after + * @param string|null $link link * * @return self */ - public function setAfter($after) + public function setLink($link) { - $this->container['after'] = $after; + $this->container['link'] = $link; return $this; } /** - * Gets link + * Gets after * - * @return string|null + * @return string */ - public function getLink() + public function getAfter() { - return $this->container['link']; + return $this->container['after']; } /** - * Sets link + * Sets after * - * @param string|null $link link + * @param string $after after * * @return self */ - public function setLink($link) + public function setAfter($after) { - $this->container['link'] = $link; + $this->container['after'] = $after; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionCreateRequest.php b/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionCreateRequest.php index 2df04d93d..a5ee432e4 100644 --- a/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionCreateRequest.php +++ b/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionCreateRequest.php @@ -57,8 +57,8 @@ class PublicAssociationDefinitionCreateRequest implements ModelInterface, ArrayA * @var string[] */ protected static $openAPITypes = [ - 'label' => 'string', - 'name' => 'string' + 'name' => 'string', + 'label' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationDefinitionCreateRequest implements ModelInterface, ArrayA * @psalm-var array */ protected static $openAPIFormats = [ - 'label' => null, - 'name' => null + 'name' => null, + 'label' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'label' => 'label', - 'name' => 'name' + 'name' => 'name', + 'label' => 'label' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'label' => 'setLabel', - 'name' => 'setName' + 'name' => 'setName', + 'label' => 'setLabel' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'label' => 'getLabel', - 'name' => 'getName' + 'name' => 'getName', + 'label' => 'getLabel' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['label'] = $data['label'] ?? null; $this->container['name'] = $data['name'] ?? null; + $this->container['label'] = $data['label'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['label'] === null) { - $invalidProperties[] = "'label' can't be null"; - } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets label + * Gets name * * @return string */ - public function getLabel() + public function getName() { - return $this->container['label']; + return $this->container['name']; } /** - * Sets label + * Sets name * - * @param string $label label + * @param string $name name * * @return self */ - public function setLabel($label) + public function setName($name) { - $this->container['label'] = $label; + $this->container['name'] = $name; return $this; } /** - * Gets name + * Gets label * * @return string */ - public function getName() + public function getLabel() { - return $this->container['name']; + return $this->container['label']; } /** - * Sets name + * Sets label * - * @param string $name name + * @param string $label label * * @return self */ - public function setName($name) + public function setLabel($label) { - $this->container['name'] = $name; + $this->container['label'] = $label; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionUpdateRequest.php b/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionUpdateRequest.php index bcfc2a6ea..cb29ee4a7 100644 --- a/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionUpdateRequest.php +++ b/codegen/Crm/Associations/V4/Model/PublicAssociationDefinitionUpdateRequest.php @@ -57,8 +57,8 @@ class PublicAssociationDefinitionUpdateRequest implements ModelInterface, ArrayA * @var string[] */ protected static $openAPITypes = [ - 'label' => 'string', - 'association_type_id' => 'int' + 'association_type_id' => 'int', + 'label' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationDefinitionUpdateRequest implements ModelInterface, ArrayA * @psalm-var array */ protected static $openAPIFormats = [ - 'label' => null, - 'association_type_id' => 'int32' + 'association_type_id' => 'int32', + 'label' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'label' => 'label', - 'association_type_id' => 'associationTypeId' + 'association_type_id' => 'associationTypeId', + 'label' => 'label' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'label' => 'setLabel', - 'association_type_id' => 'setAssociationTypeId' + 'association_type_id' => 'setAssociationTypeId', + 'label' => 'setLabel' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'label' => 'getLabel', - 'association_type_id' => 'getAssociationTypeId' + 'association_type_id' => 'getAssociationTypeId', + 'label' => 'getLabel' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['label'] = $data['label'] ?? null; $this->container['association_type_id'] = $data['association_type_id'] ?? null; + $this->container['label'] = $data['label'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['label'] === null) { - $invalidProperties[] = "'label' can't be null"; - } if ($this->container['association_type_id'] === null) { $invalidProperties[] = "'association_type_id' can't be null"; } + if ($this->container['label'] === null) { + $invalidProperties[] = "'label' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets label + * Gets association_type_id * - * @return string + * @return int */ - public function getLabel() + public function getAssociationTypeId() { - return $this->container['label']; + return $this->container['association_type_id']; } /** - * Sets label + * Sets association_type_id * - * @param string $label label + * @param int $association_type_id association_type_id * * @return self */ - public function setLabel($label) + public function setAssociationTypeId($association_type_id) { - $this->container['label'] = $label; + $this->container['association_type_id'] = $association_type_id; return $this; } /** - * Gets association_type_id + * Gets label * - * @return int + * @return string */ - public function getAssociationTypeId() + public function getLabel() { - return $this->container['association_type_id']; + return $this->container['label']; } /** - * Sets association_type_id + * Sets label * - * @param int $association_type_id association_type_id + * @param string $label label * * @return self */ - public function setAssociationTypeId($association_type_id) + public function setLabel($label) { - $this->container['association_type_id'] = $association_type_id; + $this->container['label'] = $label; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicAssociationMultiPost.php b/codegen/Crm/Associations/V4/Model/PublicAssociationMultiPost.php index cdb55eaa8..d5a035b0a 100644 --- a/codegen/Crm/Associations/V4/Model/PublicAssociationMultiPost.php +++ b/codegen/Crm/Associations/V4/Model/PublicAssociationMultiPost.php @@ -57,9 +57,9 @@ class PublicAssociationMultiPost implements ModelInterface, ArrayAccess, \JsonSe * @var string[] */ protected static $openAPITypes = [ + 'types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[]', 'from' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[]' + 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId' ]; /** @@ -70,9 +70,9 @@ class PublicAssociationMultiPost implements ModelInterface, ArrayAccess, \JsonSe * @psalm-var array */ protected static $openAPIFormats = [ + 'types' => null, 'from' => null, - 'to' => null, - 'types' => null + 'to' => null ]; /** @@ -102,9 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'types' => 'types', 'from' => 'from', - 'to' => 'to', - 'types' => 'types' + 'to' => 'to' ]; /** @@ -113,9 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'types' => 'setTypes', 'from' => 'setFrom', - 'to' => 'setTo', - 'types' => 'setTypes' + 'to' => 'setTo' ]; /** @@ -124,9 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'types' => 'getTypes', 'from' => 'getFrom', - 'to' => 'getTo', - 'types' => 'getTypes' + 'to' => 'getTo' ]; /** @@ -186,9 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['types'] = $data['types'] ?? null; $this->container['from'] = $data['from'] ?? null; $this->container['to'] = $data['to'] ?? null; - $this->container['types'] = $data['types'] ?? null; } /** @@ -200,15 +200,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['types'] === null) { + $invalidProperties[] = "'types' can't be null"; + } if ($this->container['from'] === null) { $invalidProperties[] = "'from' can't be null"; } if ($this->container['to'] === null) { $invalidProperties[] = "'to' can't be null"; } - if ($this->container['types'] === null) { - $invalidProperties[] = "'types' can't be null"; - } return $invalidProperties; } @@ -225,73 +225,73 @@ public function valid() /** - * Gets from + * Gets types * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] */ - public function getFrom() + public function getTypes() { - return $this->container['from']; + return $this->container['types']; } /** - * Sets from + * Sets types * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $from from + * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] $types types * * @return self */ - public function setFrom($from) + public function setTypes($types) { - $this->container['from'] = $from; + $this->container['types'] = $types; return $this; } /** - * Gets to + * Gets from * * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId */ - public function getTo() + public function getFrom() { - return $this->container['to']; + return $this->container['from']; } /** - * Sets to + * Sets from * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $from from * * @return self */ - public function setTo($to) + public function setFrom($from) { - $this->container['to'] = $to; + $this->container['from'] = $from; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicAssociationMultiWithLabel.php b/codegen/Crm/Associations/V4/Model/PublicAssociationMultiWithLabel.php index 14a262e34..d1fb3c2a7 100644 --- a/codegen/Crm/Associations/V4/Model/PublicAssociationMultiWithLabel.php +++ b/codegen/Crm/Associations/V4/Model/PublicAssociationMultiWithLabel.php @@ -58,8 +58,8 @@ class PublicAssociationMultiWithLabel implements ModelInterface, ArrayAccess, \J */ protected static $openAPITypes = [ 'from' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[]', - 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\Paging' + 'paging' => '\HubSpot\Client\Crm\Associations\V4\Model\Paging', + 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[]' ]; /** @@ -71,8 +71,8 @@ class PublicAssociationMultiWithLabel implements ModelInterface, ArrayAccess, \J */ protected static $openAPIFormats = [ 'from' => null, - 'to' => null, - 'paging' => null + 'paging' => null, + 'to' => null ]; /** @@ -103,8 +103,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'from' => 'from', - 'to' => 'to', - 'paging' => 'paging' + 'paging' => 'paging', + 'to' => 'to' ]; /** @@ -114,8 +114,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'from' => 'setFrom', - 'to' => 'setTo', - 'paging' => 'setPaging' + 'paging' => 'setPaging', + 'to' => 'setTo' ]; /** @@ -125,8 +125,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'from' => 'getFrom', - 'to' => 'getTo', - 'paging' => 'getPaging' + 'paging' => 'getPaging', + 'to' => 'getTo' ]; /** @@ -187,8 +187,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['from'] = $data['from'] ?? null; - $this->container['to'] = $data['to'] ?? null; $this->container['paging'] = $data['paging'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -246,49 +246,49 @@ public function setFrom($from) } /** - * Gets to + * Gets paging * - * @return \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\Paging|null */ - public function getTo() + public function getPaging() { - return $this->container['to']; + return $this->container['paging']; } /** - * Sets to + * Sets paging * - * @param \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] $to to + * @param \HubSpot\Client\Crm\Associations\V4\Model\Paging|null $paging paging * * @return self */ - public function setTo($to) + public function setPaging($paging) { - $this->container['to'] = $to; + $this->container['paging'] = $paging; return $this; } /** - * Gets paging + * Gets to * - * @return \HubSpot\Client\Crm\Associations\V4\Model\Paging|null + * @return \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] */ - public function getPaging() + public function getTo() { - return $this->container['paging']; + return $this->container['to']; } /** - * Sets paging + * Sets to * - * @param \HubSpot\Client\Crm\Associations\V4\Model\Paging|null $paging paging + * @param \HubSpot\Client\Crm\Associations\V4\Model\MultiAssociatedObjectWithLabel[] $to to * * @return self */ - public function setPaging($paging) + public function setTo($to) { - $this->container['paging'] = $paging; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicAssociationsForObject.php b/codegen/Crm/Associations/V4/Model/PublicAssociationsForObject.php index c698e8db4..522b9a364 100644 --- a/codegen/Crm/Associations/V4/Model/PublicAssociationsForObject.php +++ b/codegen/Crm/Associations/V4/Model/PublicAssociationsForObject.php @@ -57,8 +57,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @var string[] */ protected static $openAPITypes = [ - 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[]' + 'types' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[]', + 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId' ]; /** @@ -69,8 +69,8 @@ class PublicAssociationsForObject implements ModelInterface, ArrayAccess, \JsonS * @psalm-var array */ protected static $openAPIFormats = [ - 'to' => null, - 'types' => null + 'types' => null, + 'to' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'to' => 'to', - 'types' => 'types' + 'types' => 'types', + 'to' => 'to' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'to' => 'setTo', - 'types' => 'setTypes' + 'types' => 'setTypes', + 'to' => 'setTo' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'to' => 'getTo', - 'types' => 'getTypes' + 'types' => 'getTypes', + 'to' => 'getTo' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['to'] = $data['to'] ?? null; $this->container['types'] = $data['types'] ?? null; + $this->container['to'] = $data['to'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } if ($this->container['types'] === null) { $invalidProperties[] = "'types' can't be null"; } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets to + * Gets types * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] */ - public function getTo() + public function getTypes() { - return $this->container['to']; + return $this->container['types']; } /** - * Sets to + * Sets types * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] $types types * * @return self */ - public function setTo($to) + public function setTypes($types) { - $this->container['to'] = $to; + $this->container['types'] = $types; return $this; } /** - * Gets types + * Gets to * - * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId */ - public function getTypes() + public function getTo() { - return $this->container['types']; + return $this->container['to']; } /** - * Sets types + * Sets to * - * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec[] $types types + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to * * @return self */ - public function setTypes($types) + public function setTo($to) { - $this->container['types'] = $types; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicDefaultAssociation.php b/codegen/Crm/Associations/V4/Model/PublicDefaultAssociation.php index 6cd50f7cb..8179e3184 100644 --- a/codegen/Crm/Associations/V4/Model/PublicDefaultAssociation.php +++ b/codegen/Crm/Associations/V4/Model/PublicDefaultAssociation.php @@ -57,9 +57,9 @@ class PublicDefaultAssociation implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ + 'association_spec' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec', 'from' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId', - 'association_spec' => '\HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec' + 'to' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId' ]; /** @@ -70,9 +70,9 @@ class PublicDefaultAssociation implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ + 'association_spec' => null, 'from' => null, - 'to' => null, - 'association_spec' => null + 'to' => null ]; /** @@ -102,9 +102,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'association_spec' => 'associationSpec', 'from' => 'from', - 'to' => 'to', - 'association_spec' => 'associationSpec' + 'to' => 'to' ]; /** @@ -113,9 +113,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'association_spec' => 'setAssociationSpec', 'from' => 'setFrom', - 'to' => 'setTo', - 'association_spec' => 'setAssociationSpec' + 'to' => 'setTo' ]; /** @@ -124,9 +124,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'association_spec' => 'getAssociationSpec', 'from' => 'getFrom', - 'to' => 'getTo', - 'association_spec' => 'getAssociationSpec' + 'to' => 'getTo' ]; /** @@ -186,9 +186,9 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['association_spec'] = $data['association_spec'] ?? null; $this->container['from'] = $data['from'] ?? null; $this->container['to'] = $data['to'] ?? null; - $this->container['association_spec'] = $data['association_spec'] ?? null; } /** @@ -200,15 +200,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['association_spec'] === null) { + $invalidProperties[] = "'association_spec' can't be null"; + } if ($this->container['from'] === null) { $invalidProperties[] = "'from' can't be null"; } if ($this->container['to'] === null) { $invalidProperties[] = "'to' can't be null"; } - if ($this->container['association_spec'] === null) { - $invalidProperties[] = "'association_spec' can't be null"; - } return $invalidProperties; } @@ -225,73 +225,73 @@ public function valid() /** - * Gets from + * Gets association_spec * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId + * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec */ - public function getFrom() + public function getAssociationSpec() { - return $this->container['from']; + return $this->container['association_spec']; } /** - * Sets from + * Sets association_spec * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $from from + * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec $association_spec association_spec * * @return self */ - public function setFrom($from) + public function setAssociationSpec($association_spec) { - $this->container['from'] = $from; + $this->container['association_spec'] = $association_spec; return $this; } /** - * Gets to + * Gets from * * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId */ - public function getTo() + public function getFrom() { - return $this->container['to']; + return $this->container['from']; } /** - * Sets to + * Sets from * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $from from * * @return self */ - public function setTo($to) + public function setFrom($from) { - $this->container['to'] = $to; + $this->container['from'] = $from; return $this; } /** - * Gets association_spec + * Gets to * - * @return \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId */ - public function getAssociationSpec() + public function getTo() { - return $this->container['association_spec']; + return $this->container['to']; } /** - * Sets association_spec + * Sets to * - * @param \HubSpot\Client\Crm\Associations\V4\Model\AssociationSpec $association_spec association_spec + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicObjectId $to to * * @return self */ - public function setAssociationSpec($association_spec) + public function setTo($to) { - $this->container['association_spec'] = $association_spec; + $this->container['to'] = $to; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/PublicGdprDeleteInput.php b/codegen/Crm/Associations/V4/Model/PublicGdprDeleteInput.php index eeca09c81..401b50541 100644 --- a/codegen/Crm/Associations/V4/Model/PublicGdprDeleteInput.php +++ b/codegen/Crm/Associations/V4/Model/PublicGdprDeleteInput.php @@ -57,8 +57,8 @@ class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSeriali * @var string[] */ protected static $openAPITypes = [ - 'object_id' => 'string', - 'id_property' => 'string' + 'id_property' => 'string', + 'object_id' => 'string' ]; /** @@ -69,8 +69,8 @@ class PublicGdprDeleteInput implements ModelInterface, ArrayAccess, \JsonSeriali * @psalm-var array */ protected static $openAPIFormats = [ - 'object_id' => null, - 'id_property' => null + 'id_property' => null, + 'object_id' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'object_id' => 'objectId', - 'id_property' => 'idProperty' + 'id_property' => 'idProperty', + 'object_id' => 'objectId' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'object_id' => 'setObjectId', - 'id_property' => 'setIdProperty' + 'id_property' => 'setIdProperty', + 'object_id' => 'setObjectId' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'object_id' => 'getObjectId', - 'id_property' => 'getIdProperty' + 'id_property' => 'getIdProperty', + 'object_id' => 'getObjectId' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['object_id'] = $data['object_id'] ?? null; $this->container['id_property'] = $data['id_property'] ?? null; + $this->container['object_id'] = $data['object_id'] ?? null; } /** @@ -213,49 +213,49 @@ public function valid() /** - * Gets object_id + * Gets id_property * - * @return string + * @return string|null */ - public function getObjectId() + public function getIdProperty() { - return $this->container['object_id']; + return $this->container['id_property']; } /** - * Sets object_id + * Sets id_property * - * @param string $object_id object_id + * @param string|null $id_property id_property * * @return self */ - public function setObjectId($object_id) + public function setIdProperty($id_property) { - $this->container['object_id'] = $object_id; + $this->container['id_property'] = $id_property; return $this; } /** - * Gets id_property + * Gets object_id * - * @return string|null + * @return string */ - public function getIdProperty() + public function getObjectId() { - return $this->container['id_property']; + return $this->container['object_id']; } /** - * Sets id_property + * Sets object_id * - * @param string|null $id_property id_property + * @param string $object_id object_id * * @return self */ - public function setIdProperty($id_property) + public function setObjectId($object_id) { - $this->container['id_property'] = $id_property; + $this->container['object_id'] = $object_id; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/SimplePublicObject.php b/codegen/Crm/Associations/V4/Model/SimplePublicObject.php index 146ec0b7f..eb568908c 100644 --- a/codegen/Crm/Associations/V4/Model/SimplePublicObject.php +++ b/codegen/Crm/Associations/V4/Model/SimplePublicObject.php @@ -57,13 +57,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', - 'archived_at' => '\DateTime' + 'archived_at' => '\DateTime', + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -74,13 +74,13 @@ class SimplePublicObject implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, - 'archived_at' => 'date-time' + 'archived_at' => 'date-time', + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -110,13 +110,13 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', - 'archived_at' => 'archivedAt' + 'archived_at' => 'archivedAt', + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -125,13 +125,13 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', - 'archived_at' => 'setArchivedAt' + 'archived_at' => 'setArchivedAt', + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -140,13 +140,13 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', - 'archived_at' => 'getArchivedAt' + 'archived_at' => 'getArchivedAt', + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -206,13 +206,13 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -224,15 +224,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -252,169 +252,169 @@ public function valid() /** - * Gets id + * Gets created_at * - * @return string + * @return \DateTime */ - public function getId() + public function getCreatedAt() { - return $this->container['id']; + return $this->container['created_at']; } /** - * Sets id + * Sets created_at * - * @param string $id id + * @param \DateTime $created_at created_at * * @return self */ - public function setId($id) + public function setCreatedAt($created_at) { - $this->container['id'] = $id; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties + * Gets archived * - * @return array + * @return bool|null */ - public function getProperties() + public function getArchived() { - return $this->container['properties']; + return $this->container['archived']; } /** - * Sets properties + * Sets archived * - * @param array $properties properties + * @param bool|null $archived archived * * @return self */ - public function setProperties($properties) + public function setArchived($archived) { - $this->container['properties'] = $properties; + $this->container['archived'] = $archived; return $this; } /** - * Gets properties_with_history + * Gets archived_at * - * @return array|null + * @return \DateTime|null */ - public function getPropertiesWithHistory() + public function getArchivedAt() { - return $this->container['properties_with_history']; + return $this->container['archived_at']; } /** - * Sets properties_with_history + * Sets archived_at * - * @param array|null $properties_with_history properties_with_history + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchivedAt($archived_at) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets created_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getCreatedAt() + public function getPropertiesWithHistory() { - return $this->container['created_at']; + return $this->container['properties_with_history']; } /** - * Sets created_at + * Sets properties_with_history * - * @param \DateTime $created_at created_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setCreatedAt($created_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['created_at'] = $created_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets updated_at + * Gets id * - * @return \DateTime + * @return string */ - public function getUpdatedAt() + public function getId() { - return $this->container['updated_at']; + return $this->container['id']; } /** - * Sets updated_at + * Sets id * - * @param \DateTime $updated_at updated_at + * @param string $id id * * @return self */ - public function setUpdatedAt($updated_at) + public function setId($id) { - $this->container['updated_at'] = $updated_at; + $this->container['id'] = $id; return $this; } /** - * Gets archived + * Gets properties * - * @return bool|null + * @return array */ - public function getArchived() + public function getProperties() { - return $this->container['archived']; + return $this->container['properties']; } /** - * Sets archived + * Sets properties * - * @param bool|null $archived archived + * @param array $properties properties * * @return self */ - public function setArchived($archived) + public function setProperties($properties) { - $this->container['archived'] = $archived; + $this->container['properties'] = $properties; return $this; } /** - * Gets archived_at + * Gets updated_at * - * @return \DateTime|null + * @return \DateTime */ - public function getArchivedAt() + public function getUpdatedAt() { - return $this->container['archived_at']; + return $this->container['updated_at']; } /** - * Sets archived_at + * Sets updated_at * - * @param \DateTime|null $archived_at archived_at + * @param \DateTime $updated_at updated_at * * @return self */ - public function setArchivedAt($archived_at) + public function setUpdatedAt($updated_at) { - $this->container['archived_at'] = $archived_at; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/SimplePublicObjectBatchInput.php b/codegen/Crm/Associations/V4/Model/SimplePublicObjectBatchInput.php index f303bf680..7d165ed5a 100644 --- a/codegen/Crm/Associations/V4/Model/SimplePublicObjectBatchInput.php +++ b/codegen/Crm/Associations/V4/Model/SimplePublicObjectBatchInput.php @@ -57,8 +57,8 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'id' => 'string' + 'id' => 'string', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectBatchInput implements ModelInterface, ArrayAccess, \Json * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'id' => null + 'id' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'id' => 'id' + 'id' => 'id', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'id' => 'setId' + 'id' => 'setId', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'id' => 'getId' + 'id' => 'getId', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets id * - * @return array + * @return string */ - public function getProperties() + public function getId() { - return $this->container['properties']; + return $this->container['id']; } /** - * Sets properties + * Sets id * - * @param array $properties properties + * @param string $id id * * @return self */ - public function setProperties($properties) + public function setId($id) { - $this->container['properties'] = $properties; + $this->container['id'] = $id; return $this; } /** - * Gets id + * Gets properties * - * @return string + * @return array */ - public function getId() + public function getProperties() { - return $this->container['id']; + return $this->container['properties']; } /** - * Sets id + * Sets properties * - * @param string $id id + * @param array $properties properties * * @return self */ - public function setId($id) + public function setProperties($properties) { - $this->container['id'] = $id; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/SimplePublicObjectInputForCreate.php b/codegen/Crm/Associations/V4/Model/SimplePublicObjectInputForCreate.php index eb928cfb8..14ed437c3 100644 --- a/codegen/Crm/Associations/V4/Model/SimplePublicObjectInputForCreate.php +++ b/codegen/Crm/Associations/V4/Model/SimplePublicObjectInputForCreate.php @@ -57,8 +57,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @var string[] */ protected static $openAPITypes = [ - 'properties' => 'array', - 'associations' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[]' + 'associations' => '\HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[]', + 'properties' => 'array' ]; /** @@ -69,8 +69,8 @@ class SimplePublicObjectInputForCreate implements ModelInterface, ArrayAccess, \ * @psalm-var array */ protected static $openAPIFormats = [ - 'properties' => null, - 'associations' => null + 'associations' => null, + 'properties' => null ]; /** @@ -100,8 +100,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'properties' => 'properties', - 'associations' => 'associations' + 'associations' => 'associations', + 'properties' => 'properties' ]; /** @@ -110,8 +110,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'properties' => 'setProperties', - 'associations' => 'setAssociations' + 'associations' => 'setAssociations', + 'properties' => 'setProperties' ]; /** @@ -120,8 +120,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'properties' => 'getProperties', - 'associations' => 'getAssociations' + 'associations' => 'getAssociations', + 'properties' => 'getProperties' ]; /** @@ -181,8 +181,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['properties'] = $data['properties'] ?? null; $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; } /** @@ -194,12 +194,12 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['properties'] === null) { - $invalidProperties[] = "'properties' can't be null"; - } if ($this->container['associations'] === null) { $invalidProperties[] = "'associations' can't be null"; } + if ($this->container['properties'] === null) { + $invalidProperties[] = "'properties' can't be null"; + } return $invalidProperties; } @@ -216,49 +216,49 @@ public function valid() /** - * Gets properties + * Gets associations * - * @return array + * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[] */ - public function getProperties() + public function getAssociations() { - return $this->container['properties']; + return $this->container['associations']; } /** - * Sets properties + * Sets associations * - * @param array $properties properties + * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[] $associations associations * * @return self */ - public function setProperties($properties) + public function setAssociations($associations) { - $this->container['properties'] = $properties; + $this->container['associations'] = $associations; return $this; } /** - * Gets associations + * Gets properties * - * @return \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[] + * @return array */ - public function getAssociations() + public function getProperties() { - return $this->container['associations']; + return $this->container['properties']; } /** - * Sets associations + * Sets properties * - * @param \HubSpot\Client\Crm\Associations\V4\Model\PublicAssociationsForObject[] $associations associations + * @param array $properties properties * * @return self */ - public function setAssociations($associations) + public function setProperties($properties) { - $this->container['associations'] = $associations; + $this->container['properties'] = $properties; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/SimplePublicObjectWithAssociations.php b/codegen/Crm/Associations/V4/Model/SimplePublicObjectWithAssociations.php index eaf0a76d7..39ecdfe8d 100644 --- a/codegen/Crm/Associations/V4/Model/SimplePublicObjectWithAssociations.php +++ b/codegen/Crm/Associations/V4/Model/SimplePublicObjectWithAssociations.php @@ -57,14 +57,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @var string[] */ protected static $openAPITypes = [ - 'id' => 'string', - 'properties' => 'array', - 'properties_with_history' => 'array', + 'associations' => 'array', 'created_at' => '\DateTime', - 'updated_at' => '\DateTime', 'archived' => 'bool', 'archived_at' => '\DateTime', - 'associations' => 'array' + 'properties_with_history' => 'array', + 'id' => 'string', + 'properties' => 'array', + 'updated_at' => '\DateTime' ]; /** @@ -75,14 +75,14 @@ class SimplePublicObjectWithAssociations implements ModelInterface, ArrayAccess, * @psalm-var array */ protected static $openAPIFormats = [ - 'id' => null, - 'properties' => null, - 'properties_with_history' => null, + 'associations' => null, 'created_at' => 'date-time', - 'updated_at' => 'date-time', 'archived' => null, 'archived_at' => 'date-time', - 'associations' => null + 'properties_with_history' => null, + 'id' => null, + 'properties' => null, + 'updated_at' => 'date-time' ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'id' => 'id', - 'properties' => 'properties', - 'properties_with_history' => 'propertiesWithHistory', + 'associations' => 'associations', 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', 'archived' => 'archived', 'archived_at' => 'archivedAt', - 'associations' => 'associations' + 'properties_with_history' => 'propertiesWithHistory', + 'id' => 'id', + 'properties' => 'properties', + 'updated_at' => 'updatedAt' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'id' => 'setId', - 'properties' => 'setProperties', - 'properties_with_history' => 'setPropertiesWithHistory', + 'associations' => 'setAssociations', 'created_at' => 'setCreatedAt', - 'updated_at' => 'setUpdatedAt', 'archived' => 'setArchived', 'archived_at' => 'setArchivedAt', - 'associations' => 'setAssociations' + 'properties_with_history' => 'setPropertiesWithHistory', + 'id' => 'setId', + 'properties' => 'setProperties', + 'updated_at' => 'setUpdatedAt' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'id' => 'getId', - 'properties' => 'getProperties', - 'properties_with_history' => 'getPropertiesWithHistory', + 'associations' => 'getAssociations', 'created_at' => 'getCreatedAt', - 'updated_at' => 'getUpdatedAt', 'archived' => 'getArchived', 'archived_at' => 'getArchivedAt', - 'associations' => 'getAssociations' + 'properties_with_history' => 'getPropertiesWithHistory', + 'id' => 'getId', + 'properties' => 'getProperties', + 'updated_at' => 'getUpdatedAt' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['id'] = $data['id'] ?? null; - $this->container['properties'] = $data['properties'] ?? null; - $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['associations'] = $data['associations'] ?? null; $this->container['created_at'] = $data['created_at'] ?? null; - $this->container['updated_at'] = $data['updated_at'] ?? null; $this->container['archived'] = $data['archived'] ?? null; $this->container['archived_at'] = $data['archived_at'] ?? null; - $this->container['associations'] = $data['associations'] ?? null; + $this->container['properties_with_history'] = $data['properties_with_history'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['properties'] = $data['properties'] ?? null; + $this->container['updated_at'] = $data['updated_at'] ?? null; } /** @@ -230,15 +230,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['properties'] === null) { $invalidProperties[] = "'properties' can't be null"; } - if ($this->container['created_at'] === null) { - $invalidProperties[] = "'created_at' can't be null"; - } if ($this->container['updated_at'] === null) { $invalidProperties[] = "'updated_at' can't be null"; } @@ -258,193 +258,193 @@ public function valid() /** - * Gets id + * Gets associations * - * @return string + * @return array|null */ - public function getId() + public function getAssociations() { - return $this->container['id']; + return $this->container['associations']; } /** - * Sets id + * Sets associations * - * @param string $id id + * @param array|null $associations associations * * @return self */ - public function setId($id) + public function setAssociations($associations) { - $this->container['id'] = $id; + $this->container['associations'] = $associations; return $this; } /** - * Gets properties + * Gets created_at * - * @return array + * @return \DateTime */ - public function getProperties() + public function getCreatedAt() { - return $this->container['properties']; + return $this->container['created_at']; } /** - * Sets properties + * Sets created_at * - * @param array $properties properties + * @param \DateTime $created_at created_at * * @return self */ - public function setProperties($properties) + public function setCreatedAt($created_at) { - $this->container['properties'] = $properties; + $this->container['created_at'] = $created_at; return $this; } /** - * Gets properties_with_history + * Gets archived * - * @return array|null + * @return bool|null */ - public function getPropertiesWithHistory() + public function getArchived() { - return $this->container['properties_with_history']; + return $this->container['archived']; } /** - * Sets properties_with_history + * Sets archived * - * @param array|null $properties_with_history properties_with_history + * @param bool|null $archived archived * * @return self */ - public function setPropertiesWithHistory($properties_with_history) + public function setArchived($archived) { - $this->container['properties_with_history'] = $properties_with_history; + $this->container['archived'] = $archived; return $this; } /** - * Gets created_at + * Gets archived_at * - * @return \DateTime + * @return \DateTime|null */ - public function getCreatedAt() + public function getArchivedAt() { - return $this->container['created_at']; + return $this->container['archived_at']; } /** - * Sets created_at + * Sets archived_at * - * @param \DateTime $created_at created_at + * @param \DateTime|null $archived_at archived_at * * @return self */ - public function setCreatedAt($created_at) + public function setArchivedAt($archived_at) { - $this->container['created_at'] = $created_at; + $this->container['archived_at'] = $archived_at; return $this; } /** - * Gets updated_at + * Gets properties_with_history * - * @return \DateTime + * @return array|null */ - public function getUpdatedAt() + public function getPropertiesWithHistory() { - return $this->container['updated_at']; + return $this->container['properties_with_history']; } /** - * Sets updated_at + * Sets properties_with_history * - * @param \DateTime $updated_at updated_at + * @param array|null $properties_with_history properties_with_history * * @return self */ - public function setUpdatedAt($updated_at) + public function setPropertiesWithHistory($properties_with_history) { - $this->container['updated_at'] = $updated_at; + $this->container['properties_with_history'] = $properties_with_history; return $this; } /** - * Gets archived + * Gets id * - * @return bool|null + * @return string */ - public function getArchived() + public function getId() { - return $this->container['archived']; + return $this->container['id']; } /** - * Sets archived + * Sets id * - * @param bool|null $archived archived + * @param string $id id * * @return self */ - public function setArchived($archived) + public function setId($id) { - $this->container['archived'] = $archived; + $this->container['id'] = $id; return $this; } /** - * Gets archived_at + * Gets properties * - * @return \DateTime|null + * @return array */ - public function getArchivedAt() + public function getProperties() { - return $this->container['archived_at']; + return $this->container['properties']; } /** - * Sets archived_at + * Sets properties * - * @param \DateTime|null $archived_at archived_at + * @param array $properties properties * * @return self */ - public function setArchivedAt($archived_at) + public function setProperties($properties) { - $this->container['archived_at'] = $archived_at; + $this->container['properties'] = $properties; return $this; } /** - * Gets associations + * Gets updated_at * - * @return array|null + * @return \DateTime */ - public function getAssociations() + public function getUpdatedAt() { - return $this->container['associations']; + return $this->container['updated_at']; } /** - * Sets associations + * Sets updated_at * - * @param array|null $associations associations + * @param \DateTime $updated_at updated_at * * @return self */ - public function setAssociations($associations) + public function setUpdatedAt($updated_at) { - $this->container['associations'] = $associations; + $this->container['updated_at'] = $updated_at; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/StandardError.php b/codegen/Crm/Associations/V4/Model/StandardError.php index 3f14a2ebd..47cf29f57 100644 --- a/codegen/Crm/Associations/V4/Model/StandardError.php +++ b/codegen/Crm/Associations/V4/Model/StandardError.php @@ -57,14 +57,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ - 'status' => 'string', + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', 'id' => 'string', 'category' => '\HubSpot\Client\Crm\Associations\V4\Model\ErrorCategory', - 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]', - 'context' => 'array', - 'links' => 'array' + 'status' => 'string' ]; /** @@ -75,14 +75,14 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ - 'status' => null, + 'sub_category' => null, + 'context' => null, + 'links' => null, 'id' => null, 'category' => null, - 'sub_category' => null, 'message' => null, 'errors' => null, - 'context' => null, - 'links' => null + 'status' => null ]; /** @@ -112,14 +112,14 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'status' => 'status', + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', 'id' => 'id', 'category' => 'category', - 'sub_category' => 'subCategory', 'message' => 'message', 'errors' => 'errors', - 'context' => 'context', - 'links' => 'links' + 'status' => 'status' ]; /** @@ -128,14 +128,14 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'status' => 'setStatus', + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', 'id' => 'setId', 'category' => 'setCategory', - 'sub_category' => 'setSubCategory', 'message' => 'setMessage', 'errors' => 'setErrors', - 'context' => 'setContext', - 'links' => 'setLinks' + 'status' => 'setStatus' ]; /** @@ -144,14 +144,14 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'status' => 'getStatus', + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', 'id' => 'getId', 'category' => 'getCategory', - 'sub_category' => 'getSubCategory', 'message' => 'getMessage', 'errors' => 'getErrors', - 'context' => 'getContext', - 'links' => 'getLinks' + 'status' => 'getStatus' ]; /** @@ -211,14 +211,14 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['status'] = $data['status'] ?? null; + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; $this->container['id'] = $data['id'] ?? null; $this->container['category'] = $data['category'] ?? null; - $this->container['sub_category'] = $data['sub_category'] ?? null; $this->container['message'] = $data['message'] ?? null; $this->container['errors'] = $data['errors'] ?? null; - $this->container['context'] = $data['context'] ?? null; - $this->container['links'] = $data['links'] ?? null; + $this->container['status'] = $data['status'] ?? null; } /** @@ -230,8 +230,11 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['status'] === null) { - $invalidProperties[] = "'status' can't be null"; + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' can't be null"; + } + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; } if ($this->container['category'] === null) { $invalidProperties[] = "'category' can't be null"; @@ -242,11 +245,8 @@ public function listInvalidProperties() if ($this->container['errors'] === null) { $invalidProperties[] = "'errors' can't be null"; } - if ($this->container['context'] === null) { - $invalidProperties[] = "'context' can't be null"; - } - if ($this->container['links'] === null) { - $invalidProperties[] = "'links' can't be null"; + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; } return $invalidProperties; } @@ -264,193 +264,193 @@ public function valid() /** - * Gets status + * Gets sub_category * - * @return string + * @return object|null */ - public function getStatus() + public function getSubCategory() { - return $this->container['status']; + return $this->container['sub_category']; } /** - * Sets status + * Sets sub_category * - * @param string $status status + * @param object|null $sub_category sub_category * * @return self */ - public function setStatus($status) + public function setSubCategory($sub_category) { - $this->container['status'] = $status; + $this->container['sub_category'] = $sub_category; return $this; } /** - * Gets id + * Gets context * - * @return string|null + * @return array */ - public function getId() + public function getContext() { - return $this->container['id']; + return $this->container['context']; } /** - * Sets id + * Sets context * - * @param string|null $id id + * @param array $context context * * @return self */ - public function setId($id) + public function setContext($context) { - $this->container['id'] = $id; + $this->container['context'] = $context; return $this; } /** - * Gets category + * Gets links * - * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorCategory + * @return array */ - public function getCategory() + public function getLinks() { - return $this->container['category']; + return $this->container['links']; } /** - * Sets category + * Sets links * - * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorCategory $category category + * @param array $links links * * @return self */ - public function setCategory($category) + public function setLinks($links) { - $this->container['category'] = $category; + $this->container['links'] = $links; return $this; } /** - * Gets sub_category + * Gets id * - * @return object|null + * @return string|null */ - public function getSubCategory() + public function getId() { - return $this->container['sub_category']; + return $this->container['id']; } /** - * Sets sub_category + * Sets id * - * @param object|null $sub_category sub_category + * @param string|null $id id * * @return self */ - public function setSubCategory($sub_category) + public function setId($id) { - $this->container['sub_category'] = $sub_category; + $this->container['id'] = $id; return $this; } /** - * Gets message + * Gets category * - * @return string + * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorCategory */ - public function getMessage() + public function getCategory() { - return $this->container['message']; + return $this->container['category']; } /** - * Sets message + * Sets category * - * @param string $message message + * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorCategory $category category * * @return self */ - public function setMessage($message) + public function setCategory($category) { - $this->container['message'] = $message; + $this->container['category'] = $category; return $this; } /** - * Gets errors + * Gets message * - * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] + * @return string */ - public function getErrors() + public function getMessage() { - return $this->container['errors']; + return $this->container['message']; } /** - * Sets errors + * Sets message * - * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] $errors errors + * @param string $message message * * @return self */ - public function setErrors($errors) + public function setMessage($message) { - $this->container['errors'] = $errors; + $this->container['message'] = $message; return $this; } /** - * Gets context + * Gets errors * - * @return array + * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] */ - public function getContext() + public function getErrors() { - return $this->container['context']; + return $this->container['errors']; } /** - * Sets context + * Sets errors * - * @param array $context context + * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] $errors errors * * @return self */ - public function setContext($context) + public function setErrors($errors) { - $this->container['context'] = $context; + $this->container['errors'] = $errors; return $this; } /** - * Gets links + * Gets status * - * @return array + * @return string */ - public function getLinks() + public function getStatus() { - return $this->container['links']; + return $this->container['status']; } /** - * Sets links + * Sets status * - * @param array $links links + * @param string $status status * * @return self */ - public function setLinks($links) + public function setStatus($status) { - $this->container['links'] = $links; + $this->container['status'] = $status; return $this; } diff --git a/codegen/Crm/Associations/V4/Model/StandardError1.php b/codegen/Crm/Associations/V4/Model/StandardError1.php new file mode 100644 index 000000000..f37ff5fa2 --- /dev/null +++ b/codegen/Crm/Associations/V4/Model/StandardError1.php @@ -0,0 +1,548 @@ + + */ +class StandardError1 implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'StandardError_1'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'sub_category' => 'object', + 'context' => 'array', + 'links' => 'array', + 'id' => 'string', + 'category' => 'string', + 'message' => 'string', + 'errors' => '\HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[]', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'sub_category' => null, + 'context' => null, + 'links' => null, + 'id' => null, + 'category' => null, + 'message' => null, + 'errors' => null, + 'status' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'sub_category' => 'subCategory', + 'context' => 'context', + 'links' => 'links', + 'id' => 'id', + 'category' => 'category', + 'message' => 'message', + 'errors' => 'errors', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'sub_category' => 'setSubCategory', + 'context' => 'setContext', + 'links' => 'setLinks', + 'id' => 'setId', + 'category' => 'setCategory', + 'message' => 'setMessage', + 'errors' => 'setErrors', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'sub_category' => 'getSubCategory', + 'context' => 'getContext', + 'links' => 'getLinks', + 'id' => 'getId', + 'category' => 'getCategory', + 'message' => 'getMessage', + 'errors' => 'getErrors', + 'status' => 'getStatus' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['sub_category'] = $data['sub_category'] ?? null; + $this->container['context'] = $data['context'] ?? null; + $this->container['links'] = $data['links'] ?? null; + $this->container['id'] = $data['id'] ?? null; + $this->container['category'] = $data['category'] ?? null; + $this->container['message'] = $data['message'] ?? null; + $this->container['errors'] = $data['errors'] ?? null; + $this->container['status'] = $data['status'] ?? null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['context'] === null) { + $invalidProperties[] = "'context' can't be null"; + } + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + if ($this->container['category'] === null) { + $invalidProperties[] = "'category' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets sub_category + * + * @return object|null + */ + public function getSubCategory() + { + return $this->container['sub_category']; + } + + /** + * Sets sub_category + * + * @param object|null $sub_category sub_category + * + * @return self + */ + public function setSubCategory($sub_category) + { + $this->container['sub_category'] = $sub_category; + + return $this; + } + + /** + * Gets context + * + * @return array + */ + public function getContext() + { + return $this->container['context']; + } + + /** + * Sets context + * + * @param array $context context + * + * @return self + */ + public function setContext($context) + { + $this->container['context'] = $context; + + return $this; + } + + /** + * Gets links + * + * @return array + */ + public function getLinks() + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param array $links links + * + * @return self + */ + public function setLinks($links) + { + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return self + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets category + * + * @return string + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string $category category + * + * @return self + */ + public function setCategory($category) + { + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message message + * + * @return self + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets errors + * + * @return \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] + */ + public function getErrors() + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \HubSpot\Client\Crm\Associations\V4\Model\ErrorDetail[] $errors errors + * + * @return self + */ + public function setErrors($errors) + { + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets status + * + * @return string + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string $status status + * + * @return self + */ + public function setStatus($status) + { + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/codegen/Crm/Associations/V4/Model/ValueWithTimestamp.php b/codegen/Crm/Associations/V4/Model/ValueWithTimestamp.php index be9bf6b17..1e3e9a71f 100644 --- a/codegen/Crm/Associations/V4/Model/ValueWithTimestamp.php +++ b/codegen/Crm/Associations/V4/Model/ValueWithTimestamp.php @@ -57,12 +57,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @var string[] */ protected static $openAPITypes = [ - 'value' => 'string', - 'timestamp' => '\DateTime', - 'source_type' => 'string', 'source_id' => 'string', + 'source_type' => 'string', 'source_label' => 'string', - 'updated_by_user_id' => 'int' + 'updated_by_user_id' => 'int', + 'value' => 'string', + 'timestamp' => '\DateTime' ]; /** @@ -73,12 +73,12 @@ class ValueWithTimestamp implements ModelInterface, ArrayAccess, \JsonSerializab * @psalm-var array */ protected static $openAPIFormats = [ - 'value' => null, - 'timestamp' => 'date-time', - 'source_type' => null, 'source_id' => null, + 'source_type' => null, 'source_label' => null, - 'updated_by_user_id' => 'int32' + 'updated_by_user_id' => 'int32', + 'value' => null, + 'timestamp' => 'date-time' ]; /** @@ -108,12 +108,12 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'value' => 'value', - 'timestamp' => 'timestamp', - 'source_type' => 'sourceType', 'source_id' => 'sourceId', + 'source_type' => 'sourceType', 'source_label' => 'sourceLabel', - 'updated_by_user_id' => 'updatedByUserId' + 'updated_by_user_id' => 'updatedByUserId', + 'value' => 'value', + 'timestamp' => 'timestamp' ]; /** @@ -122,12 +122,12 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'value' => 'setValue', - 'timestamp' => 'setTimestamp', - 'source_type' => 'setSourceType', 'source_id' => 'setSourceId', + 'source_type' => 'setSourceType', 'source_label' => 'setSourceLabel', - 'updated_by_user_id' => 'setUpdatedByUserId' + 'updated_by_user_id' => 'setUpdatedByUserId', + 'value' => 'setValue', + 'timestamp' => 'setTimestamp' ]; /** @@ -136,12 +136,12 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'value' => 'getValue', - 'timestamp' => 'getTimestamp', - 'source_type' => 'getSourceType', 'source_id' => 'getSourceId', + 'source_type' => 'getSourceType', 'source_label' => 'getSourceLabel', - 'updated_by_user_id' => 'getUpdatedByUserId' + 'updated_by_user_id' => 'getUpdatedByUserId', + 'value' => 'getValue', + 'timestamp' => 'getTimestamp' ]; /** @@ -201,12 +201,12 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['value'] = $data['value'] ?? null; - $this->container['timestamp'] = $data['timestamp'] ?? null; - $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_id'] = $data['source_id'] ?? null; + $this->container['source_type'] = $data['source_type'] ?? null; $this->container['source_label'] = $data['source_label'] ?? null; $this->container['updated_by_user_id'] = $data['updated_by_user_id'] ?? null; + $this->container['value'] = $data['value'] ?? null; + $this->container['timestamp'] = $data['timestamp'] ?? null; } /** @@ -218,15 +218,15 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['source_type'] === null) { + $invalidProperties[] = "'source_type' can't be null"; + } if ($this->container['value'] === null) { $invalidProperties[] = "'value' can't be null"; } if ($this->container['timestamp'] === null) { $invalidProperties[] = "'timestamp' can't be null"; } - if ($this->container['source_type'] === null) { - $invalidProperties[] = "'source_type' can't be null"; - } return $invalidProperties; } @@ -243,145 +243,145 @@ public function valid() /** - * Gets value + * Gets source_id * - * @return string + * @return string|null */ - public function getValue() + public function getSourceId() { - return $this->container['value']; + return $this->container['source_id']; } /** - * Sets value + * Sets source_id * - * @param string $value value + * @param string|null $source_id source_id * * @return self */ - public function setValue($value) + public function setSourceId($source_id) { - $this->container['value'] = $value; + $this->container['source_id'] = $source_id; return $this; } /** - * Gets timestamp + * Gets source_type * - * @return \DateTime + * @return string */ - public function getTimestamp() + public function getSourceType() { - return $this->container['timestamp']; + return $this->container['source_type']; } /** - * Sets timestamp + * Sets source_type * - * @param \DateTime $timestamp timestamp + * @param string $source_type source_type * * @return self */ - public function setTimestamp($timestamp) + public function setSourceType($source_type) { - $this->container['timestamp'] = $timestamp; + $this->container['source_type'] = $source_type; return $this; } /** - * Gets source_type + * Gets source_label * - * @return string + * @return string|null */ - public function getSourceType() + public function getSourceLabel() { - return $this->container['source_type']; + return $this->container['source_label']; } /** - * Sets source_type + * Sets source_label * - * @param string $source_type source_type + * @param string|null $source_label source_label * * @return self */ - public function setSourceType($source_type) + public function setSourceLabel($source_label) { - $this->container['source_type'] = $source_type; + $this->container['source_label'] = $source_label; return $this; } /** - * Gets source_id + * Gets updated_by_user_id * - * @return string|null + * @return int|null */ - public function getSourceId() + public function getUpdatedByUserId() { - return $this->container['source_id']; + return $this->container['updated_by_user_id']; } /** - * Sets source_id + * Sets updated_by_user_id * - * @param string|null $source_id source_id + * @param int|null $updated_by_user_id updated_by_user_id * * @return self */ - public function setSourceId($source_id) + public function setUpdatedByUserId($updated_by_user_id) { - $this->container['source_id'] = $source_id; + $this->container['updated_by_user_id'] = $updated_by_user_id; return $this; } /** - * Gets source_label + * Gets value * - * @return string|null + * @return string */ - public function getSourceLabel() + public function getValue() { - return $this->container['source_label']; + return $this->container['value']; } /** - * Sets source_label + * Sets value * - * @param string|null $source_label source_label + * @param string $value value * * @return self */ - public function setSourceLabel($source_label) + public function setValue($value) { - $this->container['source_label'] = $source_label; + $this->container['value'] = $value; return $this; } /** - * Gets updated_by_user_id + * Gets timestamp * - * @return int|null + * @return \DateTime */ - public function getUpdatedByUserId() + public function getTimestamp() { - return $this->container['updated_by_user_id']; + return $this->container['timestamp']; } /** - * Sets updated_by_user_id + * Sets timestamp * - * @param int|null $updated_by_user_id updated_by_user_id + * @param \DateTime $timestamp timestamp * * @return self */ - public function setUpdatedByUserId($updated_by_user_id) + public function setTimestamp($timestamp) { - $this->container['updated_by_user_id'] = $updated_by_user_id; + $this->container['timestamp'] = $timestamp; return $this; } diff --git a/codegen/Crm/Associations/V4/Schema/Api/DefinitionsApi.php b/codegen/Crm/Associations/V4/Schema/Api/DefinitionsApi.php index 24136bf6b..37703c165 100644 --- a/codegen/Crm/Associations/V4/Schema/Api/DefinitionsApi.php +++ b/codegen/Crm/Associations/V4/Schema/Api/DefinitionsApi.php @@ -433,11 +433,6 @@ public function createRequest($from_object_type, $to_object_type, $public_associ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -714,11 +709,6 @@ public function deleteRequest($from_object_type, $to_object_type, $association_t } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1045,11 +1035,6 @@ public function getAllRequest($from_object_type, $to_object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1324,11 +1309,6 @@ public function updateRequest($from_object_type, $to_object_type, $public_associ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 80e316452..2d1facb9a 100644 --- a/codegen/Crm/Companies/Api/BasicApi.php +++ b/codegen/Crm/Companies/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($company_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($company_id, $properties = null, $properties_with } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($company_id, $simple_public_object_input, $id_prop } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 9b6fc241b..4ec0275b1 100644 --- a/codegen/Crm/Companies/Api/BatchApi.php +++ b/codegen/Crm/Companies/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Companies/Api/PublicObjectApi.php b/codegen/Crm/Companies/Api/PublicObjectApi.php index 2bbb9cfec..322a9a0ff 100644 --- a/codegen/Crm/Companies/Api/PublicObjectApi.php +++ b/codegen/Crm/Companies/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 e36a7e020..77e7e6763 100644 --- a/codegen/Crm/Companies/Api/SearchApi.php +++ b/codegen/Crm/Companies/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Companies/Model/ErrorCategory.php b/codegen/Crm/Companies/Model/ErrorCategory.php deleted file mode 100644 index 4bf5451e0..000000000 --- a/codegen/Crm/Companies/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Companies/Model/StandardError.php b/codegen/Crm/Companies/Model/StandardError.php index 833ed678d..03db44dbe 100644 --- a/codegen/Crm/Companies/Model/StandardError.php +++ b/codegen/Crm/Companies/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Companies\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Companies\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Companies\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Companies\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Contacts/Api/BasicApi.php b/codegen/Crm/Contacts/Api/BasicApi.php index bee995c39..f097d148b 100644 --- a/codegen/Crm/Contacts/Api/BasicApi.php +++ b/codegen/Crm/Contacts/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($contact_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($contact_id, $properties = null, $properties_with } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($contact_id, $simple_public_object_input, $id_prop } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 9f08aa324..145e57281 100644 --- a/codegen/Crm/Contacts/Api/BatchApi.php +++ b/codegen/Crm/Contacts/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 4d77537c9..b532d2e00 100644 --- a/codegen/Crm/Contacts/Api/GDPRApi.php +++ b/codegen/Crm/Contacts/Api/GDPRApi.php @@ -326,11 +326,6 @@ public function purgeRequest($public_gdpr_delete_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Contacts/Api/PublicObjectApi.php b/codegen/Crm/Contacts/Api/PublicObjectApi.php index 1993d3e78..d25e83a30 100644 --- a/codegen/Crm/Contacts/Api/PublicObjectApi.php +++ b/codegen/Crm/Contacts/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 445143b7c..23fd099d1 100644 --- a/codegen/Crm/Contacts/Api/SearchApi.php +++ b/codegen/Crm/Contacts/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Contacts/Model/ErrorCategory.php b/codegen/Crm/Contacts/Model/ErrorCategory.php deleted file mode 100644 index a7cb43243..000000000 --- a/codegen/Crm/Contacts/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Contacts/Model/StandardError.php b/codegen/Crm/Contacts/Model/StandardError.php index 93deff7b3..bb56edb68 100644 --- a/codegen/Crm/Contacts/Model/StandardError.php +++ b/codegen/Crm/Contacts/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Contacts\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Contacts\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Contacts\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Contacts\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Deals/Api/BasicApi.php b/codegen/Crm/Deals/Api/BasicApi.php index 13e430aa8..f2416b4f0 100644 --- a/codegen/Crm/Deals/Api/BasicApi.php +++ b/codegen/Crm/Deals/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($deal_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($deal_id, $properties = null, $properties_with_hi } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($deal_id, $simple_public_object_input, $id_propert } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 22476bf2b..3e41f66f4 100644 --- a/codegen/Crm/Deals/Api/BatchApi.php +++ b/codegen/Crm/Deals/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Deals/Api/PublicObjectApi.php b/codegen/Crm/Deals/Api/PublicObjectApi.php index 9767db410..d0612fe98 100644 --- a/codegen/Crm/Deals/Api/PublicObjectApi.php +++ b/codegen/Crm/Deals/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 b48784346..6281851d8 100644 --- a/codegen/Crm/Deals/Api/SearchApi.php +++ b/codegen/Crm/Deals/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Deals/Model/ErrorCategory.php b/codegen/Crm/Deals/Model/ErrorCategory.php deleted file mode 100644 index f20d7735b..000000000 --- a/codegen/Crm/Deals/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Deals/Model/StandardError.php b/codegen/Crm/Deals/Model/StandardError.php index 663a055a7..94a0e6b71 100644 --- a/codegen/Crm/Deals/Model/StandardError.php +++ b/codegen/Crm/Deals/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Deals\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Deals\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Deals\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Deals\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php b/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php index 670b2c2c1..6fcf2b8c7 100644 --- a/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/CallbacksApi.php @@ -345,11 +345,6 @@ public function createCustomerRequest($request_id, $result_id_accounting_respons } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -605,11 +600,6 @@ public function createExchangeRateRequest($request_id, $exchange_rate_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -865,11 +855,6 @@ public function createInvoiceRequest($request_id, $result_id_accounting_response } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1125,11 +1110,6 @@ public function createTermRequest($request_id, $terms_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1385,11 +1365,6 @@ public function doCustomerSearchRequest($request_id, $customer_search_response_e } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1645,11 +1620,6 @@ public function doInvoiceSearchRequest($request_id, $invoice_search_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1905,11 +1875,6 @@ public function doProductSearchRequest($request_id, $product_search_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2165,11 +2130,6 @@ public function doTaxSearchRequest($request_id, $tax_search_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2425,11 +2385,6 @@ public function getByIdRequest($request_id, $invoices_response_external) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2685,11 +2640,6 @@ public function invoicePdfRequest($request_id, $invoice_pdf_response) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 0dd0a98b2..b52edca0d 100644 --- a/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/InvoiceApi.php @@ -428,11 +428,6 @@ public function createPaymentRequest($invoice_id, $invoice_create_payment_reques } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -760,11 +755,6 @@ public function getByIdRequest($invoice_id, $account_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1109,11 +1099,6 @@ public function updateRequest($invoice_id, $account_id, $invoice_update_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Extensions/Accounting/Api/SettingsApi.php b/codegen/Crm/Extensions/Accounting/Api/SettingsApi.php index 3aca546a8..f7f206bef 100644 --- a/codegen/Crm/Extensions/Accounting/Api/SettingsApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/SettingsApi.php @@ -397,11 +397,6 @@ public function getByIdRequest($app_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -653,11 +648,6 @@ public function replaceRequest($app_id, $accounting_app_settings) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/codegen/Crm/Extensions/Accounting/Api/SyncApi.php b/codegen/Crm/Extensions/Accounting/Api/SyncApi.php index d1c3e0b69..30f584f10 100644 --- a/codegen/Crm/Extensions/Accounting/Api/SyncApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/SyncApi.php @@ -414,11 +414,6 @@ public function createContactRequest($app_id, $sync_contacts_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -743,11 +738,6 @@ public function createProductRequest($app_id, $sync_products_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 7372fdaeb..366f04ff9 100644 --- a/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php +++ b/codegen/Crm/Extensions/Accounting/Api/UserAccountsApi.php @@ -328,11 +328,6 @@ public function archiveRequest($account_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -569,11 +564,6 @@ public function replaceRequest($create_user_account_request_external) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Extensions/Videoconferencing/Api/SettingsApi.php b/codegen/Crm/Extensions/Videoconferencing/Api/SettingsApi.php index 1e5c76a61..68f79d4c1 100644 --- a/codegen/Crm/Extensions/Videoconferencing/Api/SettingsApi.php +++ b/codegen/Crm/Extensions/Videoconferencing/Api/SettingsApi.php @@ -328,11 +328,6 @@ public function archiveRequest($app_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -636,11 +631,6 @@ public function getByIdRequest($app_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -961,11 +951,6 @@ public function replaceRequest($app_id, $external_settings) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/codegen/Crm/Imports/Api/CoreApi.php b/codegen/Crm/Imports/Api/CoreApi.php index cba0ef62b..6af4f912b 100644 --- a/codegen/Crm/Imports/Api/CoreApi.php +++ b/codegen/Crm/Imports/Api/CoreApi.php @@ -397,11 +397,6 @@ public function cancelRequest($import_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -716,11 +711,6 @@ public function createRequest($files = null, $import_request = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1028,11 +1018,6 @@ public function getByIdRequest($import_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1363,11 +1348,6 @@ public function getPageRequest($after = null, $before = null, $limit = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Imports/Api/PublicImportsApi.php b/codegen/Crm/Imports/Api/PublicImportsApi.php index db635c3b7..f749ca277 100644 --- a/codegen/Crm/Imports/Api/PublicImportsApi.php +++ b/codegen/Crm/Imports/Api/PublicImportsApi.php @@ -417,11 +417,6 @@ public function getErrorsRequest($import_id, $after = null, $limit = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 cb40fd34c..7ccb4e0b9 100644 --- a/codegen/Crm/LineItems/Api/BasicApi.php +++ b/codegen/Crm/LineItems/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($line_item_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($line_item_id, $properties = null, $properties_wi } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($line_item_id, $simple_public_object_input, $id_pr } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 ac242e0fd..7ba214368 100644 --- a/codegen/Crm/LineItems/Api/BatchApi.php +++ b/codegen/Crm/LineItems/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/LineItems/Api/PublicObjectApi.php b/codegen/Crm/LineItems/Api/PublicObjectApi.php index 34871890a..fe1c05140 100644 --- a/codegen/Crm/LineItems/Api/PublicObjectApi.php +++ b/codegen/Crm/LineItems/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 89f5305d8..fe69875cc 100644 --- a/codegen/Crm/LineItems/Api/SearchApi.php +++ b/codegen/Crm/LineItems/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/LineItems/Model/ErrorCategory.php b/codegen/Crm/LineItems/Model/ErrorCategory.php deleted file mode 100644 index 6de14307f..000000000 --- a/codegen/Crm/LineItems/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/LineItems/Model/StandardError.php b/codegen/Crm/LineItems/Model/StandardError.php index b37a36ac1..25234d3bf 100644 --- a/codegen/Crm/LineItems/Model/StandardError.php +++ b/codegen/Crm/LineItems/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\LineItems\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\LineItems\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\LineItems\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\LineItems\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Api/AssociationsApi.php b/codegen/Crm/Objects/Api/AssociationsApi.php index 64f0755ba..583207b26 100644 --- a/codegen/Crm/Objects/Api/AssociationsApi.php +++ b/codegen/Crm/Objects/Api/AssociationsApi.php @@ -404,11 +404,6 @@ public function archiveRequest($object_type, $object_id, $to_object_type, $to_ob } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -792,11 +787,6 @@ public function createRequest($object_type, $object_id, $to_object_type, $to_obj } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1170,11 +1160,6 @@ public function getAllRequest($object_type, $object_id, $to_object_type, $after } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 43c736abd..f61e6c6c9 100644 --- a/codegen/Crm/Objects/Api/BasicApi.php +++ b/codegen/Crm/Objects/Api/BasicApi.php @@ -347,11 +347,6 @@ public function archiveRequest($object_type, $object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -676,11 +671,6 @@ public function createRequest($object_type, $simple_public_object_input_for_crea } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1077,11 +1067,6 @@ public function getByIdRequest($object_type, $object_id, $properties = null, $pr } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1473,11 +1458,6 @@ public function getPageRequest($object_type, $limit = 10, $after = null, $proper } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1835,11 +1815,6 @@ public function updateRequest($object_type, $object_id, $simple_public_object_in } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 025562615..8b4fd78e3 100644 --- a/codegen/Crm/Objects/Api/BatchApi.php +++ b/codegen/Crm/Objects/Api/BatchApi.php @@ -345,11 +345,6 @@ public function archiveRequest($object_type, $batch_input_simple_public_object_i } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -697,11 +692,6 @@ public function createRequest($object_type, $batch_input_simple_public_object_in } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1063,11 +1053,6 @@ public function readRequest($object_type, $batch_read_input_simple_public_object } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1415,11 +1400,6 @@ public function updateRequest($object_type, $batch_input_simple_public_object_ba } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 6b77a113a..a48ab11e2 100644 --- a/codegen/Crm/Objects/Api/GDPRApi.php +++ b/codegen/Crm/Objects/Api/GDPRApi.php @@ -345,11 +345,6 @@ public function purgeRequest($object_type, $public_gdpr_delete_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Api/PublicObjectApi.php b/codegen/Crm/Objects/Api/PublicObjectApi.php index 2fb0dd6e6..4f37b3385 100644 --- a/codegen/Crm/Objects/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Api/PublicObjectApi.php @@ -414,11 +414,6 @@ public function mergeRequest($object_type, $public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 e3d8fcf5d..743d6c975 100644 --- a/codegen/Crm/Objects/Api/SearchApi.php +++ b/codegen/Crm/Objects/Api/SearchApi.php @@ -406,11 +406,6 @@ public function doSearchRequest($object_type, $public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Calls/Api/BasicApi.php b/codegen/Crm/Objects/Calls/Api/BasicApi.php index f6b22a5ef..df4168d75 100644 --- a/codegen/Crm/Objects/Calls/Api/BasicApi.php +++ b/codegen/Crm/Objects/Calls/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($call_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($call_id, $properties = null, $properties_with_hi } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($call_id, $simple_public_object_input, $id_propert } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Calls/Api/BatchApi.php b/codegen/Crm/Objects/Calls/Api/BatchApi.php index a83aea1e8..56b56254a 100644 --- a/codegen/Crm/Objects/Calls/Api/BatchApi.php +++ b/codegen/Crm/Objects/Calls/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Calls/Api/PublicObjectApi.php b/codegen/Crm/Objects/Calls/Api/PublicObjectApi.php index cdc4f3e47..28c131344 100644 --- a/codegen/Crm/Objects/Calls/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Calls/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Calls/Api/SearchApi.php b/codegen/Crm/Objects/Calls/Api/SearchApi.php index d610b9296..4d10f0bea 100644 --- a/codegen/Crm/Objects/Calls/Api/SearchApi.php +++ b/codegen/Crm/Objects/Calls/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Calls/Model/ErrorCategory.php b/codegen/Crm/Objects/Calls/Model/ErrorCategory.php deleted file mode 100644 index 258a0914b..000000000 --- a/codegen/Crm/Objects/Calls/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Calls/Model/StandardError.php b/codegen/Crm/Objects/Calls/Model/StandardError.php index 8388457c7..d1c2e31a2 100644 --- a/codegen/Crm/Objects/Calls/Model/StandardError.php +++ b/codegen/Crm/Objects/Calls/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Calls\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Calls\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Calls\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Calls\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Communications/Api/BasicApi.php b/codegen/Crm/Objects/Communications/Api/BasicApi.php index 7724a2d2d..4e711d756 100644 --- a/codegen/Crm/Objects/Communications/Api/BasicApi.php +++ b/codegen/Crm/Objects/Communications/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($communication_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($communication_id, $properties = null, $propertie } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($communication_id, $simple_public_object_input, $i } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Communications/Api/BatchApi.php b/codegen/Crm/Objects/Communications/Api/BatchApi.php index 352aa2926..f16186f4e 100644 --- a/codegen/Crm/Objects/Communications/Api/BatchApi.php +++ b/codegen/Crm/Objects/Communications/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Communications/Api/PublicObjectApi.php b/codegen/Crm/Objects/Communications/Api/PublicObjectApi.php index 471b13d30..5b11d75a6 100644 --- a/codegen/Crm/Objects/Communications/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Communications/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Communications/Api/SearchApi.php b/codegen/Crm/Objects/Communications/Api/SearchApi.php index 9410da7c3..6f6ed4b32 100644 --- a/codegen/Crm/Objects/Communications/Api/SearchApi.php +++ b/codegen/Crm/Objects/Communications/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Communications/Model/ErrorCategory.php b/codegen/Crm/Objects/Communications/Model/ErrorCategory.php deleted file mode 100644 index 39bddd58d..000000000 --- a/codegen/Crm/Objects/Communications/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Communications/Model/StandardError.php b/codegen/Crm/Objects/Communications/Model/StandardError.php index 3f57a3213..47cccb2c3 100644 --- a/codegen/Crm/Objects/Communications/Model/StandardError.php +++ b/codegen/Crm/Objects/Communications/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Communications\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Communications\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Communications\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Communications\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Emails/Api/BasicApi.php b/codegen/Crm/Objects/Emails/Api/BasicApi.php index 448933b00..7964f066c 100644 --- a/codegen/Crm/Objects/Emails/Api/BasicApi.php +++ b/codegen/Crm/Objects/Emails/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($email_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($email_id, $properties = null, $properties_with_h } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($email_id, $simple_public_object_input, $id_proper } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Emails/Api/BatchApi.php b/codegen/Crm/Objects/Emails/Api/BatchApi.php index 5ad2e09c1..d50cc2dfd 100644 --- a/codegen/Crm/Objects/Emails/Api/BatchApi.php +++ b/codegen/Crm/Objects/Emails/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Emails/Api/PublicObjectApi.php b/codegen/Crm/Objects/Emails/Api/PublicObjectApi.php index 17a72e2f3..429a83ad6 100644 --- a/codegen/Crm/Objects/Emails/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Emails/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Emails/Api/SearchApi.php b/codegen/Crm/Objects/Emails/Api/SearchApi.php index ff9d645fb..ed14eff29 100644 --- a/codegen/Crm/Objects/Emails/Api/SearchApi.php +++ b/codegen/Crm/Objects/Emails/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Emails/Model/ErrorCategory.php b/codegen/Crm/Objects/Emails/Model/ErrorCategory.php deleted file mode 100644 index a85f6c712..000000000 --- a/codegen/Crm/Objects/Emails/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Emails/Model/StandardError.php b/codegen/Crm/Objects/Emails/Model/StandardError.php index 2e3d4636b..d4025532f 100644 --- a/codegen/Crm/Objects/Emails/Model/StandardError.php +++ b/codegen/Crm/Objects/Emails/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Emails\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Emails\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Emails\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Emails\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php index 4aea38c9d..551ac8e5b 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($feedback_submission_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($feedback_submission_id, $properties = null, $pro } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($feedback_submission_id, $simple_public_object_inp } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php index 3a8ac8bcb..0f6256e83 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/PublicObjectApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/PublicObjectApi.php index bb9c57d28..bd02896db 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/SearchApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/SearchApi.php index 3b6c2b587..46f92b43f 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/SearchApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Model/ErrorCategory.php b/codegen/Crm/Objects/FeedbackSubmissions/Model/ErrorCategory.php deleted file mode 100644 index 54b47db47..000000000 --- a/codegen/Crm/Objects/FeedbackSubmissions/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Model/StandardError.php b/codegen/Crm/Objects/FeedbackSubmissions/Model/StandardError.php index 5f2db50fb..37c7234c4 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Model/StandardError.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Meetings/Api/BasicApi.php b/codegen/Crm/Objects/Meetings/Api/BasicApi.php index 187c9e5bb..645027af6 100644 --- a/codegen/Crm/Objects/Meetings/Api/BasicApi.php +++ b/codegen/Crm/Objects/Meetings/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($meeting_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($meeting_id, $properties = null, $properties_with } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($meeting_id, $simple_public_object_input, $id_prop } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Meetings/Api/BatchApi.php b/codegen/Crm/Objects/Meetings/Api/BatchApi.php index 1c596ef07..5e2c63661 100644 --- a/codegen/Crm/Objects/Meetings/Api/BatchApi.php +++ b/codegen/Crm/Objects/Meetings/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Meetings/Api/PublicObjectApi.php b/codegen/Crm/Objects/Meetings/Api/PublicObjectApi.php index 478c3aac3..914c94ae1 100644 --- a/codegen/Crm/Objects/Meetings/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Meetings/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Meetings/Api/SearchApi.php b/codegen/Crm/Objects/Meetings/Api/SearchApi.php index e4610b8ab..a24174b38 100644 --- a/codegen/Crm/Objects/Meetings/Api/SearchApi.php +++ b/codegen/Crm/Objects/Meetings/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Meetings/Model/ErrorCategory.php b/codegen/Crm/Objects/Meetings/Model/ErrorCategory.php deleted file mode 100644 index faf01dac4..000000000 --- a/codegen/Crm/Objects/Meetings/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Meetings/Model/StandardError.php b/codegen/Crm/Objects/Meetings/Model/StandardError.php index 35dbb9cae..3eacfd980 100644 --- a/codegen/Crm/Objects/Meetings/Model/StandardError.php +++ b/codegen/Crm/Objects/Meetings/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Meetings\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Meetings\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Model/ErrorCategory.php b/codegen/Crm/Objects/Model/ErrorCategory.php deleted file mode 100644 index f1859c420..000000000 --- a/codegen/Crm/Objects/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Model/StandardError.php b/codegen/Crm/Objects/Model/StandardError.php index 51ce7cf70..1a5b2b72a 100644 --- a/codegen/Crm/Objects/Model/StandardError.php +++ b/codegen/Crm/Objects/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Notes/Api/BasicApi.php b/codegen/Crm/Objects/Notes/Api/BasicApi.php index bff45e817..039585329 100644 --- a/codegen/Crm/Objects/Notes/Api/BasicApi.php +++ b/codegen/Crm/Objects/Notes/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($note_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($note_id, $properties = null, $properties_with_hi } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($note_id, $simple_public_object_input, $id_propert } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Notes/Api/BatchApi.php b/codegen/Crm/Objects/Notes/Api/BatchApi.php index 196cee818..dba5f312f 100644 --- a/codegen/Crm/Objects/Notes/Api/BatchApi.php +++ b/codegen/Crm/Objects/Notes/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Notes/Api/PublicObjectApi.php b/codegen/Crm/Objects/Notes/Api/PublicObjectApi.php index dc3551ec3..d028a3d23 100644 --- a/codegen/Crm/Objects/Notes/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Notes/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Notes/Api/SearchApi.php b/codegen/Crm/Objects/Notes/Api/SearchApi.php index 292ac74e1..643462864 100644 --- a/codegen/Crm/Objects/Notes/Api/SearchApi.php +++ b/codegen/Crm/Objects/Notes/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Notes/Model/ErrorCategory.php b/codegen/Crm/Objects/Notes/Model/ErrorCategory.php deleted file mode 100644 index ff0761f69..000000000 --- a/codegen/Crm/Objects/Notes/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Notes/Model/StandardError.php b/codegen/Crm/Objects/Notes/Model/StandardError.php index 7f2b598e1..9817b924a 100644 --- a/codegen/Crm/Objects/Notes/Model/StandardError.php +++ b/codegen/Crm/Objects/Notes/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Notes\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Notes\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Notes\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Notes\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php index fe6468401..bf19a0af8 100644 --- a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($postal_mail) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($postal_mail, $properties = null, $properties_wit } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($postal_mail, $simple_public_object_input, $id_pro } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/PostalMail/Api/BatchApi.php b/codegen/Crm/Objects/PostalMail/Api/BatchApi.php index 4d071d2be..dad30c8bd 100644 --- a/codegen/Crm/Objects/PostalMail/Api/BatchApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/PostalMail/Api/PublicObjectApi.php b/codegen/Crm/Objects/PostalMail/Api/PublicObjectApi.php index 64580f1d9..933312cae 100644 --- a/codegen/Crm/Objects/PostalMail/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/PostalMail/Api/SearchApi.php b/codegen/Crm/Objects/PostalMail/Api/SearchApi.php index 7f01cab10..3d3abedc1 100644 --- a/codegen/Crm/Objects/PostalMail/Api/SearchApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/PostalMail/Model/ErrorCategory.php b/codegen/Crm/Objects/PostalMail/Model/ErrorCategory.php deleted file mode 100644 index 2da0ebf87..000000000 --- a/codegen/Crm/Objects/PostalMail/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/PostalMail/Model/StandardError.php b/codegen/Crm/Objects/PostalMail/Model/StandardError.php index 5428df45a..a7e08d671 100644 --- a/codegen/Crm/Objects/PostalMail/Model/StandardError.php +++ b/codegen/Crm/Objects/PostalMail/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\PostalMail\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Objects/Tasks/Api/BasicApi.php b/codegen/Crm/Objects/Tasks/Api/BasicApi.php index 1ae3629a7..725fdaeba 100644 --- a/codegen/Crm/Objects/Tasks/Api/BasicApi.php +++ b/codegen/Crm/Objects/Tasks/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($task_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($task_id, $properties = null, $properties_with_hi } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($task_id, $simple_public_object_input, $id_propert } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Tasks/Api/BatchApi.php b/codegen/Crm/Objects/Tasks/Api/BatchApi.php index 9b825ee9c..99cfe1b0c 100644 --- a/codegen/Crm/Objects/Tasks/Api/BatchApi.php +++ b/codegen/Crm/Objects/Tasks/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Tasks/Api/PublicObjectApi.php b/codegen/Crm/Objects/Tasks/Api/PublicObjectApi.php index 1133f66f7..b74b087d4 100644 --- a/codegen/Crm/Objects/Tasks/Api/PublicObjectApi.php +++ b/codegen/Crm/Objects/Tasks/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Tasks/Api/SearchApi.php b/codegen/Crm/Objects/Tasks/Api/SearchApi.php index 88992f585..f25bb6cc8 100644 --- a/codegen/Crm/Objects/Tasks/Api/SearchApi.php +++ b/codegen/Crm/Objects/Tasks/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Objects/Tasks/Model/ErrorCategory.php b/codegen/Crm/Objects/Tasks/Model/ErrorCategory.php deleted file mode 100644 index 1e3b8f9db..000000000 --- a/codegen/Crm/Objects/Tasks/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Objects/Tasks/Model/StandardError.php b/codegen/Crm/Objects/Tasks/Model/StandardError.php index 3f8388ed9..d4f672197 100644 --- a/codegen/Crm/Objects/Tasks/Model/StandardError.php +++ b/codegen/Crm/Objects/Tasks/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Objects\Tasks\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Objects\Tasks\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Owners/Api/OwnersApi.php b/codegen/Crm/Owners/Api/OwnersApi.php index 0c3ec77a6..1238e09ad 100644 --- a/codegen/Crm/Owners/Api/OwnersApi.php +++ b/codegen/Crm/Owners/Api/OwnersApi.php @@ -425,11 +425,6 @@ public function getByIdRequest($owner_id, $id_property = 'id', $archived = false } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -774,11 +769,6 @@ public function getPageRequest($email = null, $after = null, $limit = 100, $arch } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 e1e91f4cb..e725fc688 100644 --- a/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineAuditsApi.php @@ -416,11 +416,6 @@ public function getAuditRequest($object_type, $pipeline_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 a08a4558f..a92fa1f7d 100644 --- a/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineStageAuditsApi.php @@ -416,11 +416,6 @@ public function getAuditRequest($object_type, $stage_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 8b14384cd..69adee42a 100644 --- a/codegen/Crm/Pipelines/Api/PipelineStagesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelineStagesApi.php @@ -366,11 +366,6 @@ public function archiveRequest($object_type, $pipeline_id, $stage_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -714,11 +709,6 @@ public function createRequest($object_type, $pipeline_id, $pipeline_stage_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1045,11 +1035,6 @@ public function getAllRequest($object_type, $pipeline_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1395,11 +1380,6 @@ public function getByIdRequest($object_type, $pipeline_id, $stage_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1762,11 +1742,6 @@ public function replaceRequest($object_type, $pipeline_id, $stage_id, $pipeline_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2129,11 +2104,6 @@ public function updateRequest($object_type, $pipeline_id, $stage_id, $pipeline_s } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 174e343aa..bd2e516b1 100644 --- a/codegen/Crm/Pipelines/Api/PipelinesApi.php +++ b/codegen/Crm/Pipelines/Api/PipelinesApi.php @@ -361,11 +361,6 @@ public function archiveRequest($object_type, $pipeline_id, $validate_references_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -690,11 +685,6 @@ public function createRequest($object_type, $pipeline_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1002,11 +992,6 @@ public function getAllRequest($object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1333,11 +1318,6 @@ public function getByIdRequest($object_type, $pipeline_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1695,11 +1675,6 @@ public function replaceRequest($object_type, $pipeline_id, $pipeline_input, $val } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2057,11 +2032,6 @@ public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 4dee75fa8..a8994a032 100644 --- a/codegen/Crm/Products/Api/BasicApi.php +++ b/codegen/Crm/Products/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($product_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($product_id, $properties = null, $properties_with } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($product_id, $simple_public_object_input, $id_prop } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 32e6bf4b6..1ed6ec324 100644 --- a/codegen/Crm/Products/Api/BatchApi.php +++ b/codegen/Crm/Products/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Products/Api/PublicObjectApi.php b/codegen/Crm/Products/Api/PublicObjectApi.php index d8fdd8b47..1339cc79d 100644 --- a/codegen/Crm/Products/Api/PublicObjectApi.php +++ b/codegen/Crm/Products/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 2edb49b74..f2f63fdd7 100644 --- a/codegen/Crm/Products/Api/SearchApi.php +++ b/codegen/Crm/Products/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Products/Model/ErrorCategory.php b/codegen/Crm/Products/Model/ErrorCategory.php deleted file mode 100644 index 79ed643ca..000000000 --- a/codegen/Crm/Products/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Products/Model/StandardError.php b/codegen/Crm/Products/Model/StandardError.php index 33f857281..d04778819 100644 --- a/codegen/Crm/Products/Model/StandardError.php +++ b/codegen/Crm/Products/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Products\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Products\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Products\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Products\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Properties/Api/BatchApi.php b/codegen/Crm/Properties/Api/BatchApi.php index 2c004f1f7..cecdc1095 100644 --- a/codegen/Crm/Properties/Api/BatchApi.php +++ b/codegen/Crm/Properties/Api/BatchApi.php @@ -345,11 +345,6 @@ public function archiveRequest($object_type, $batch_input_property_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -697,11 +692,6 @@ public function createRequest($object_type, $batch_input_property_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1049,11 +1039,6 @@ public function readRequest($object_type, $batch_read_input_property_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 c34a8cc9e..12ad2f4e4 100644 --- a/codegen/Crm/Properties/Api/CoreApi.php +++ b/codegen/Crm/Properties/Api/CoreApi.php @@ -347,11 +347,6 @@ public function archiveRequest($object_type, $property_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -676,11 +671,6 @@ public function createRequest($object_type, $property_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1016,11 +1006,6 @@ public function getAllRequest($object_type, $archived = false, $properties = nul } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1375,11 +1360,6 @@ public function getByNameRequest($object_type, $property_name, $archived = false } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1723,11 +1703,6 @@ public function updateRequest($object_type, $property_name, $property_update) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 1cfb2492f..fc96876f9 100644 --- a/codegen/Crm/Properties/Api/GroupsApi.php +++ b/codegen/Crm/Properties/Api/GroupsApi.php @@ -347,11 +347,6 @@ public function archiveRequest($object_type, $group_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -676,11 +671,6 @@ public function createRequest($object_type, $property_group_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -988,11 +978,6 @@ public function getAllRequest($object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1319,11 +1304,6 @@ public function getByNameRequest($object_type, $group_name) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1667,11 +1647,6 @@ public function updateRequest($object_type, $group_name, $property_group_update) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Properties/Model/ErrorCategory.php b/codegen/Crm/Properties/Model/ErrorCategory.php deleted file mode 100644 index c8713eab2..000000000 --- a/codegen/Crm/Properties/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Properties/Model/StandardError.php b/codegen/Crm/Properties/Model/StandardError.php index 8d04240f1..21a07540f 100644 --- a/codegen/Crm/Properties/Model/StandardError.php +++ b/codegen/Crm/Properties/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Properties\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Properties\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Properties\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Properties\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Quotes/Api/BasicApi.php b/codegen/Crm/Quotes/Api/BasicApi.php index b32e3eac8..52d5ac1ad 100644 --- a/codegen/Crm/Quotes/Api/BasicApi.php +++ b/codegen/Crm/Quotes/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($quote_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($quote_id, $properties = null, $properties_with_h } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($quote_id, $simple_public_object_input, $id_proper } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Quotes/Api/BatchApi.php b/codegen/Crm/Quotes/Api/BatchApi.php index cff953963..65092af76 100644 --- a/codegen/Crm/Quotes/Api/BatchApi.php +++ b/codegen/Crm/Quotes/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Quotes/Api/PublicObjectApi.php b/codegen/Crm/Quotes/Api/PublicObjectApi.php index c85cec826..dcd45b1c5 100644 --- a/codegen/Crm/Quotes/Api/PublicObjectApi.php +++ b/codegen/Crm/Quotes/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Quotes/Api/SearchApi.php b/codegen/Crm/Quotes/Api/SearchApi.php index b7fc15c7a..7113e10cb 100644 --- a/codegen/Crm/Quotes/Api/SearchApi.php +++ b/codegen/Crm/Quotes/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Quotes/Model/ErrorCategory.php b/codegen/Crm/Quotes/Model/ErrorCategory.php deleted file mode 100644 index b9ecaf934..000000000 --- a/codegen/Crm/Quotes/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Quotes/Model/StandardError.php b/codegen/Crm/Quotes/Model/StandardError.php index 53da6415d..3dbe77408 100644 --- a/codegen/Crm/Quotes/Model/StandardError.php +++ b/codegen/Crm/Quotes/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Quotes\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Quotes\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Quotes\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Quotes\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Crm/Schemas/Api/CoreApi.php b/codegen/Crm/Schemas/Api/CoreApi.php index 7cde6125b..40a55c7b6 100644 --- a/codegen/Crm/Schemas/Api/CoreApi.php +++ b/codegen/Crm/Schemas/Api/CoreApi.php @@ -342,11 +342,6 @@ public function archiveRequest($object_type, $archived = false) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -604,11 +599,6 @@ public function archiveAssociationRequest($object_type, $association_identifier) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -914,11 +904,6 @@ public function createRequest($object_schema_egg) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1243,11 +1228,6 @@ public function createAssociationRequest($object_type, $association_definition_e } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1550,11 +1530,6 @@ public function getAllRequest($archived = false) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1862,11 +1837,6 @@ public function getByIdRequest($object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2191,11 +2161,6 @@ public function updateRequest($object_type, $object_type_definition_patch) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Schemas/Api/PublicObjectSchemasApi.php b/codegen/Crm/Schemas/Api/PublicObjectSchemasApi.php index 393ab4a79..c6bc642bd 100644 --- a/codegen/Crm/Schemas/Api/PublicObjectSchemasApi.php +++ b/codegen/Crm/Schemas/Api/PublicObjectSchemasApi.php @@ -325,11 +325,6 @@ public function purgeRequest($object_type) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 8e198076e..3601c3f5e 100644 --- a/codegen/Crm/Tickets/Api/BasicApi.php +++ b/codegen/Crm/Tickets/Api/BasicApi.php @@ -328,11 +328,6 @@ public function archiveRequest($ticket_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -638,11 +633,6 @@ public function createRequest($simple_public_object_input_for_create) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1020,11 +1010,6 @@ public function getByIdRequest($ticket_id, $properties = null, $properties_with_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1397,11 +1382,6 @@ public function getPageRequest($limit = 10, $after = null, $properties = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1740,11 +1720,6 @@ public function updateRequest($ticket_id, $simple_public_object_input, $id_prope } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 fe4fee564..e9cf7eb97 100644 --- a/codegen/Crm/Tickets/Api/BatchApi.php +++ b/codegen/Crm/Tickets/Api/BatchApi.php @@ -326,11 +326,6 @@ public function archiveRequest($batch_input_simple_public_object_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -659,11 +654,6 @@ public function createRequest($batch_input_simple_public_object_input_for_create } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1006,11 +996,6 @@ public function readRequest($batch_read_input_simple_public_object_id, $archived } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1339,11 +1324,6 @@ public function updateRequest($batch_input_simple_public_object_batch_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Tickets/Api/PublicObjectApi.php b/codegen/Crm/Tickets/Api/PublicObjectApi.php index 9a0da4a67..3c17abeb6 100644 --- a/codegen/Crm/Tickets/Api/PublicObjectApi.php +++ b/codegen/Crm/Tickets/Api/PublicObjectApi.php @@ -395,11 +395,6 @@ public function mergeRequest($public_merge_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 5b201542c..991717d78 100644 --- a/codegen/Crm/Tickets/Api/SearchApi.php +++ b/codegen/Crm/Tickets/Api/SearchApi.php @@ -387,11 +387,6 @@ public function doSearchRequest($public_object_search_request) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Crm/Tickets/Model/ErrorCategory.php b/codegen/Crm/Tickets/Model/ErrorCategory.php deleted file mode 100644 index 7edb933ce..000000000 --- a/codegen/Crm/Tickets/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Crm/Tickets/Model/StandardError.php b/codegen/Crm/Tickets/Model/StandardError.php index 499d4902c..abe613cf5 100644 --- a/codegen/Crm/Tickets/Model/StandardError.php +++ b/codegen/Crm/Tickets/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Crm\Tickets\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Crm\Tickets\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Crm\Tickets\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Crm\Tickets\Model\ErrorCategory $category category + * @param string $category category * * @return self */ diff --git a/codegen/Events/Api/EventsApi.php b/codegen/Events/Api/EventsApi.php index 445a66e9f..7a33d0626 100644 --- a/codegen/Events/Api/EventsApi.php +++ b/codegen/Events/Api/EventsApi.php @@ -504,11 +504,6 @@ public function getPageRequest($occurred_after = null, $occurred_before = null, } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 0b26d2b03..8e8d9f228 100644 --- a/codegen/Files/Api/FilesApi.php +++ b/codegen/Files/Api/FilesApi.php @@ -332,11 +332,6 @@ public function archiveRequest($file_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -579,11 +574,6 @@ public function archiveGDPRRequest($file_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -891,11 +881,6 @@ public function checkImportRequest($task_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1520,11 +1505,6 @@ public function doSearchRequest($properties = null, $after = null, $before = nul } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1850,11 +1830,6 @@ public function getByIdRequest($file_id, $properties = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2208,11 +2183,6 @@ public function getSignedUrlRequest($file_id, $size = null, $expiration_seconds } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2518,11 +2488,6 @@ public function importFromUrlRequest($import_from_url_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2869,11 +2834,6 @@ public function replaceRequest($file_id, $file = null, $charset_hunch = null, $o } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3202,11 +3162,6 @@ public function updatePropertiesRequest($file_id, $file_update_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -3557,11 +3512,6 @@ public function uploadRequest($file = null, $folder_id = null, $folder_path = nu } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) 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 fbefe5c3e..296319945 100644 --- a/codegen/Files/Api/FoldersApi.php +++ b/codegen/Files/Api/FoldersApi.php @@ -332,11 +332,6 @@ public function archiveRequest($folder_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -579,11 +574,6 @@ public function archiveByPathRequest($folder_path) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -891,11 +881,6 @@ public function checkUpdateStatusRequest($task_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1201,11 +1186,6 @@ public function createRequest($folder_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -1704,11 +1684,6 @@ public function doSearchRequest($properties = null, $after = null, $before = nul } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2034,11 +2009,6 @@ public function getByIdRequest($folder_id, $properties = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2364,11 +2334,6 @@ public function getByPathRequest($folder_path, $properties = null) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); @@ -2674,11 +2639,6 @@ public function updatePropertiesRequest($folder_update_input) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Marketing/Events/Api/SettingsExternalApi.php b/codegen/Marketing/Events/Api/SettingsExternalApi.php index cad5e8fe5..3a134d1de 100644 --- a/codegen/Marketing/Events/Api/SettingsExternalApi.php +++ b/codegen/Marketing/Events/Api/SettingsExternalApi.php @@ -406,11 +406,6 @@ public function createRequest($app_id, $event_detail_settings_url) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); if ($apiKey !== null) { @@ -711,11 +706,6 @@ public function getAllRequest($app_id) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); if ($apiKey !== null) { diff --git a/codegen/Marketing/Transactional/Api/SingleSendApi.php b/codegen/Marketing/Transactional/Api/SingleSendApi.php index 83c45cc10..6a2fe2090 100644 --- a/codegen/Marketing/Transactional/Api/SingleSendApi.php +++ b/codegen/Marketing/Transactional/Api/SingleSendApi.php @@ -395,11 +395,6 @@ public function sendEmailRequest($public_single_send_request_egg) } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); diff --git a/codegen/Webhooks/Model/ErrorCategory.php b/codegen/Webhooks/Model/ErrorCategory.php deleted file mode 100644 index 54051644d..000000000 --- a/codegen/Webhooks/Model/ErrorCategory.php +++ /dev/null @@ -1,510 +0,0 @@ - - */ -class ErrorCategory implements ModelInterface, ArrayAccess, \JsonSerializable -{ - public const DISCRIMINATOR = null; - - /** - * The original name of the model. - * - * @var string - */ - protected static $openAPIModelName = 'ErrorCategory'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var string[] - */ - protected static $openAPITypes = [ - 'name' => 'string', - 'http_status' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var string[] - * @phpstan-var array - * @psalm-var array - */ - protected static $openAPIFormats = [ - 'name' => null, - 'http_status' => null - ]; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPITypes() - { - return self::$openAPITypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @return array - */ - public static function openAPIFormats() - { - return self::$openAPIFormats; - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var string[] - */ - protected static $attributeMap = [ - 'name' => 'name', - 'http_status' => 'httpStatus' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var string[] - */ - protected static $setters = [ - 'name' => 'setName', - 'http_status' => 'setHttpStatus' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var string[] - */ - protected static $getters = [ - 'name' => 'getName', - 'http_status' => 'getHttpStatus' - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * The original name of the model. - * - * @return string - */ - public function getModelName() - { - return self::$openAPIModelName; - } - - public const HTTP_STATUS__CONTINUE = 'CONTINUE'; - public const HTTP_STATUS_SWITCHING_PROTOCOLS = 'SWITCHING_PROTOCOLS'; - public const HTTP_STATUS_PROCESSING = 'PROCESSING'; - public const HTTP_STATUS_OK = 'OK'; - public const HTTP_STATUS_CREATED = 'CREATED'; - public const HTTP_STATUS_ACCEPTED = 'ACCEPTED'; - public const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 'NON_AUTHORITATIVE_INFORMATION'; - public const HTTP_STATUS_NO_CONTENT = 'NO_CONTENT'; - public const HTTP_STATUS_RESET_CONTENT = 'RESET_CONTENT'; - public const HTTP_STATUS_PARTIAL_CONTENT = 'PARTIAL_CONTENT'; - public const HTTP_STATUS_MULTI_STATUS = 'MULTI_STATUS'; - public const HTTP_STATUS_ALREADY_REPORTED = 'ALREADY_REPORTED'; - public const HTTP_STATUS_IM_USED = 'IM_USED'; - public const HTTP_STATUS_MULTIPLE_CHOICES = 'MULTIPLE_CHOICES'; - public const HTTP_STATUS_MOVED_PERMANENTLY = 'MOVED_PERMANENTLY'; - public const HTTP_STATUS_FOUND = 'FOUND'; - public const HTTP_STATUS_SEE_OTHER = 'SEE_OTHER'; - public const HTTP_STATUS_NOT_MODIFIED = 'NOT_MODIFIED'; - public const HTTP_STATUS_USE_PROXY = 'USE_PROXY'; - public const HTTP_STATUS_TEMPORARY_REDIRECT = 'TEMPORARY_REDIRECT'; - public const HTTP_STATUS_PERMANENT_REDIRECT = 'PERMANENT_REDIRECT'; - public const HTTP_STATUS_BAD_REQUEST = 'BAD_REQUEST'; - public const HTTP_STATUS_UNAUTHORIZED = 'UNAUTHORIZED'; - public const HTTP_STATUS_PAYMENT_REQUIRED = 'PAYMENT_REQUIRED'; - public const HTTP_STATUS_FORBIDDEN = 'FORBIDDEN'; - public const HTTP_STATUS_NOT_FOUND = 'NOT_FOUND'; - public const HTTP_STATUS_METHOD_NOT_ALLOWED = 'METHOD_NOT_ALLOWED'; - public const HTTP_STATUS_NOT_ACCEPTABLE = 'NOT_ACCEPTABLE'; - public const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 'PROXY_AUTHENTICATION_REQUIRED'; - public const HTTP_STATUS_REQUEST_TIMEOUT = 'REQUEST_TIMEOUT'; - public const HTTP_STATUS_CONFLICT = 'CONFLICT'; - public const HTTP_STATUS_GONE = 'GONE'; - public const HTTP_STATUS_LENGTH_REQUIRED = 'LENGTH_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_FAILED = 'PRECONDITION_FAILED'; - public const HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 'REQUEST_ENTITY_TOO_LARGE'; - public const HTTP_STATUS_REQUEST_URI_TOO_LONG = 'REQUEST_URI_TOO_LONG'; - public const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 'UNSUPPORTED_MEDIA_TYPE'; - public const HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 'REQUESTED_RANGE_NOT_SATISFIABLE'; - public const HTTP_STATUS_EXPECTATION_FAILED = 'EXPECTATION_FAILED'; - public const HTTP_STATUS_IM_A_TEAPOT = 'IM_A_TEAPOT'; - public const HTTP_STATUS_MISDIRECTED_REQUEST = 'MISDIRECTED_REQUEST'; - public const HTTP_STATUS_UNPROCESSABLE_ENTITY = 'UNPROCESSABLE_ENTITY'; - public const HTTP_STATUS_LOCKED = 'LOCKED'; - public const HTTP_STATUS_FAILED_DEPENDENCY = 'FAILED_DEPENDENCY'; - public const HTTP_STATUS_UPGRADE_REQUIRED = 'UPGRADE_REQUIRED'; - public const HTTP_STATUS_PRECONDITION_REQUIRED = 'PRECONDITION_REQUIRED'; - public const HTTP_STATUS_TOO_MANY_REQUESTS = 'TOO_MANY_REQUESTS'; - public const HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE = 'REQUEST_HEADERS_FIELDS_TOO_LARGE'; - public const HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY = 'INTERNAL_STALE_SERVICE_DISCOVERY'; - public const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS = 'UNAVAILABLE_FOR_LEGAL_REASONS'; - public const HTTP_STATUS_MIGRATION_IN_PROGRESS = 'MIGRATION_IN_PROGRESS'; - public const HTTP_STATUS_INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR'; - public const HTTP_STATUS_NOT_IMPLEMENTED = 'NOT_IMPLEMENTED'; - public const HTTP_STATUS_BAD_GATEWAY = 'BAD_GATEWAY'; - public const HTTP_STATUS_SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; - public const HTTP_STATUS_GATEWAY_TIMEOUT = 'GATEWAY_TIMEOUT'; - public const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED = 'HTTP_VERSION_NOT_SUPPORTED'; - public const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 'VARIANT_ALSO_NEGOTIATES'; - public const HTTP_STATUS_INSUFFICIENT_STORAGE = 'INSUFFICIENT_STORAGE'; - public const HTTP_STATUS_LOOP_DETECTED = 'LOOP_DETECTED'; - public const HTTP_STATUS_NOT_EXTENDED = 'NOT_EXTENDED'; - public const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 'NETWORK_AUTHENTICATION_REQUIRED'; - - /** - * Gets allowable values of the enum - * - * @return string[] - */ - public function getHttpStatusAllowableValues() - { - return [ - self::HTTP_STATUS__CONTINUE, - self::HTTP_STATUS_SWITCHING_PROTOCOLS, - self::HTTP_STATUS_PROCESSING, - self::HTTP_STATUS_OK, - self::HTTP_STATUS_CREATED, - self::HTTP_STATUS_ACCEPTED, - self::HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION, - self::HTTP_STATUS_NO_CONTENT, - self::HTTP_STATUS_RESET_CONTENT, - self::HTTP_STATUS_PARTIAL_CONTENT, - self::HTTP_STATUS_MULTI_STATUS, - self::HTTP_STATUS_ALREADY_REPORTED, - self::HTTP_STATUS_IM_USED, - self::HTTP_STATUS_MULTIPLE_CHOICES, - self::HTTP_STATUS_MOVED_PERMANENTLY, - self::HTTP_STATUS_FOUND, - self::HTTP_STATUS_SEE_OTHER, - self::HTTP_STATUS_NOT_MODIFIED, - self::HTTP_STATUS_USE_PROXY, - self::HTTP_STATUS_TEMPORARY_REDIRECT, - self::HTTP_STATUS_PERMANENT_REDIRECT, - self::HTTP_STATUS_BAD_REQUEST, - self::HTTP_STATUS_UNAUTHORIZED, - self::HTTP_STATUS_PAYMENT_REQUIRED, - self::HTTP_STATUS_FORBIDDEN, - self::HTTP_STATUS_NOT_FOUND, - self::HTTP_STATUS_METHOD_NOT_ALLOWED, - self::HTTP_STATUS_NOT_ACCEPTABLE, - self::HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED, - self::HTTP_STATUS_REQUEST_TIMEOUT, - self::HTTP_STATUS_CONFLICT, - self::HTTP_STATUS_GONE, - self::HTTP_STATUS_LENGTH_REQUIRED, - self::HTTP_STATUS_PRECONDITION_FAILED, - self::HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE, - self::HTTP_STATUS_REQUEST_URI_TOO_LONG, - self::HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE, - self::HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE, - self::HTTP_STATUS_EXPECTATION_FAILED, - self::HTTP_STATUS_IM_A_TEAPOT, - self::HTTP_STATUS_MISDIRECTED_REQUEST, - self::HTTP_STATUS_UNPROCESSABLE_ENTITY, - self::HTTP_STATUS_LOCKED, - self::HTTP_STATUS_FAILED_DEPENDENCY, - self::HTTP_STATUS_UPGRADE_REQUIRED, - self::HTTP_STATUS_PRECONDITION_REQUIRED, - self::HTTP_STATUS_TOO_MANY_REQUESTS, - self::HTTP_STATUS_REQUEST_HEADERS_FIELDS_TOO_LARGE, - self::HTTP_STATUS_INTERNAL_STALE_SERVICE_DISCOVERY, - self::HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS, - self::HTTP_STATUS_MIGRATION_IN_PROGRESS, - self::HTTP_STATUS_INTERNAL_SERVER_ERROR, - self::HTTP_STATUS_NOT_IMPLEMENTED, - self::HTTP_STATUS_BAD_GATEWAY, - self::HTTP_STATUS_SERVICE_UNAVAILABLE, - self::HTTP_STATUS_GATEWAY_TIMEOUT, - self::HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED, - self::HTTP_STATUS_VARIANT_ALSO_NEGOTIATES, - self::HTTP_STATUS_INSUFFICIENT_STORAGE, - self::HTTP_STATUS_LOOP_DETECTED, - self::HTTP_STATUS_NOT_EXTENDED, - self::HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED, - ]; - } - - /** - * Associative array for storing property values - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor - * - * @param mixed[] $data Associated array of property values - * initializing the model - */ - public function __construct(array $data = null) - { - $this->container['name'] = $data['name'] ?? null; - $this->container['http_status'] = $data['http_status'] ?? null; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ($this->container['http_status'] === null) { - $invalidProperties[] = "'http_status' can't be null"; - } - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!is_null($this->container['http_status']) && !in_array($this->container['http_status'], $allowedValues, true)) { - $invalidProperties[] = sprintf( - "invalid value '%s' for 'http_status', must be one of '%s'", - $this->container['http_status'], - implode("', '", $allowedValues) - ); - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed - * - * @return bool True if all properties are valid - */ - public function valid() - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets name - * - * @return string - */ - public function getName() - { - return $this->container['name']; - } - - /** - * Sets name - * - * @param string $name name - * - * @return self - */ - public function setName($name) - { - $this->container['name'] = $name; - - return $this; - } - - /** - * Gets http_status - * - * @return string - */ - public function getHttpStatus() - { - return $this->container['http_status']; - } - - /** - * Sets http_status - * - * @param string $http_status http_status - * - * @return self - */ - public function setHttpStatus($http_status) - { - $allowedValues = $this->getHttpStatusAllowableValues(); - if (!in_array($http_status, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for 'http_status', must be one of '%s'", - $http_status, - implode("', '", $allowedValues) - ) - ); - } - $this->container['http_status'] = $http_status; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param integer $offset Offset - * - * @return boolean - */ - public function offsetExists($offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param integer $offset Offset - * - * @return mixed|null - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet($offset, $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param integer $offset Offset - * - * @return void - */ - public function offsetUnset($offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString() - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue() - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); - } -} - - diff --git a/codegen/Webhooks/Model/StandardError.php b/codegen/Webhooks/Model/StandardError.php index 2a0a29c10..6c4cd5ed1 100644 --- a/codegen/Webhooks/Model/StandardError.php +++ b/codegen/Webhooks/Model/StandardError.php @@ -59,7 +59,7 @@ class StandardError implements ModelInterface, ArrayAccess, \JsonSerializable protected static $openAPITypes = [ 'status' => 'string', 'id' => 'string', - 'category' => '\HubSpot\Client\Webhooks\Model\ErrorCategory', + 'category' => 'string', 'sub_category' => 'object', 'message' => 'string', 'errors' => '\HubSpot\Client\Webhooks\Model\ErrorDetail[]', @@ -314,7 +314,7 @@ public function setId($id) /** * Gets category * - * @return \HubSpot\Client\Webhooks\Model\ErrorCategory + * @return string */ public function getCategory() { @@ -324,7 +324,7 @@ public function getCategory() /** * Sets category * - * @param \HubSpot\Client\Webhooks\Model\ErrorCategory $category category + * @param string $category category * * @return self */