From e31c9d8285bcaf6eac66f06f05d23d8a65da4a56 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 4 Sep 2024 01:13:27 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.1 --- .speakeasy/gen.lock | 137 ++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 18 +- RELEASES.md | 10 +- codeSamples.yaml | 132 ++++---- composer.json | 8 +- ...{SalesBrowsers.md => AnalyticsBrowsers.md} | 6 +- docs/Models/Components/AnalyticsCities.md | 13 + ...esCountry.md => AnalyticsCitiesCountry.md} | 2 +- docs/Models/Components/AnalyticsCount.md | 11 + ...alesCountries.md => AnalyticsCountries.md} | 9 +- .../{SalesDevices.md => AnalyticsDevices.md} | 6 +- .../Components/{SalesOS.md => AnalyticsOS.md} | 6 +- ...{SalesReferers.md => AnalyticsReferers.md} | 6 +- ...esTimeseries.md => AnalyticsTimeseries.md} | 6 +- ...{SalesTopLinks.md => AnalyticsTopLinks.md} | 6 +- .../{SalesTopUrls.md => AnalyticsTopUrls.md} | 6 +- docs/Models/Components/City.md | 8 + docs/Models/Components/ClickEvent.md | 23 ++ docs/Models/Components/ClickEvents.md | 22 -- docs/Models/Components/ClicksBrowsers.md | 9 - docs/Models/Components/ClicksCities.md | 10 - docs/Models/Components/ClicksCitiesCountry.md | 259 ---------------- docs/Models/Components/ClicksCount.md | 8 - docs/Models/Components/ClicksCountries.md | 9 - docs/Models/Components/ClicksDevices.md | 9 - docs/Models/Components/ClicksOS.md | 9 - docs/Models/Components/ClicksReferers.md | 9 - docs/Models/Components/ClicksTimeseries.md | 9 - docs/Models/Components/ClicksTopLinks.md | 15 - docs/Models/Components/ClicksTopUrls.md | 9 - docs/Models/Components/Event.md | 8 + docs/Models/Components/LeadsBrowsers.md | 9 - docs/Models/Components/LeadsCities.md | 10 - docs/Models/Components/LeadsCitiesCountry.md | 259 ---------------- docs/Models/Components/LeadsCount.md | 8 - docs/Models/Components/LeadsCountries.md | 9 - .../Components/LeadsCountriesCountry.md | 259 ---------------- docs/Models/Components/LeadsDevices.md | 9 - docs/Models/Components/LeadsOS.md | 9 - docs/Models/Components/LeadsReferers.md | 9 - docs/Models/Components/LeadsTimeseries.md | 9 - docs/Models/Components/LeadsTopLinks.md | 15 - docs/Models/Components/LeadsTopUrls.md | 9 - docs/Models/Components/SalesCities.md | 11 - docs/Models/Components/SalesCount.md | 9 - .../Components/SalesCountriesCountry.md | 259 ---------------- .../Operations/BulkDeleteLinksRequest.md | 8 + .../Operations/BulkDeleteLinksResponse.md | 11 + .../Operations/BulkDeleteLinksResponseBody.md | 10 + docs/Models/Operations/Click.md | 8 + docs/Models/Operations/Customer.md | 11 + docs/Models/Operations/ListEventsResponse.md | 2 +- .../Operations/RetrieveAnalyticsResponse.md | 12 +- .../RetrieveAnalyticsResponseBody.md | 124 +------- docs/Models/Operations/Sale.md | 12 + docs/Models/Operations/SortBy.md | 3 +- .../Operations/TrackLeadResponseBody.md | 13 +- docs/Models/Operations/TrackSaleCustomer.md | 11 + .../Operations/TrackSaleResponseBody.md | 14 +- docs/sdks/events/README.md | 2 +- docs/sdks/links/README.md | 58 ++++ src/Analytics.php | 20 +- src/Domains.php | 72 ++--- src/Events.php | 20 +- src/Links.php | 283 +++++++++++++----- ...alesBrowsers.php => AnalyticsBrowsers.php} | 34 ++- src/Models/Components/AnalyticsCities.php | 80 +++++ ...Country.php => AnalyticsCitiesCountry.php} | 2 +- src/Models/Components/AnalyticsCount.php | 59 ++++ src/Models/Components/AnalyticsCountries.php | 80 +++++ src/Models/Components/AnalyticsDevices.php | 69 +++++ src/Models/Components/AnalyticsOS.php | 69 +++++ ...alesReferers.php => AnalyticsReferers.php} | 34 ++- src/Models/Components/AnalyticsTimeseries.php | 69 +++++ ...alesTopLinks.php => AnalyticsTopLinks.php} | 34 ++- src/Models/Components/AnalyticsTopUrls.php | 69 +++++ src/Models/Components/City.php | 15 + .../{ClickEvents.php => ClickEvent.php} | 14 +- src/Models/Components/ClicksBrowsers.php | 39 --- src/Models/Components/ClicksCities.php | 50 ---- src/Models/Components/ClicksCitiesCountry.php | 265 ---------------- src/Models/Components/ClicksCount.php | 29 -- src/Models/Components/ClicksCountries.php | 40 --- src/Models/Components/ClicksDevices.php | 39 --- src/Models/Components/ClicksOS.php | 39 --- src/Models/Components/ClicksReferers.php | 39 --- src/Models/Components/ClicksTimeseries.php | 39 --- src/Models/Components/ClicksTopLinks.php | 100 ------- src/Models/Components/ClicksTopUrls.php | 39 --- src/Models/Components/Event.php | 15 + src/Models/Components/LeadsBrowsers.php | 39 --- src/Models/Components/LeadsCities.php | 50 ---- src/Models/Components/LeadsCitiesCountry.php | 265 ---------------- src/Models/Components/LeadsCount.php | 29 -- src/Models/Components/LeadsCountries.php | 40 --- .../Components/LeadsCountriesCountry.php | 265 ---------------- src/Models/Components/LeadsDevices.php | 39 --- src/Models/Components/LeadsOS.php | 39 --- src/Models/Components/LeadsReferers.php | 39 --- src/Models/Components/LeadsTimeseries.php | 39 --- src/Models/Components/LeadsTopLinks.php | 100 ------- src/Models/Components/LeadsTopUrls.php | 39 --- src/Models/Components/SalesCities.php | 60 ---- src/Models/Components/SalesCount.php | 39 --- src/Models/Components/SalesCountries.php | 50 ---- .../Components/SalesCountriesCountry.php | 265 ---------------- src/Models/Components/SalesDevices.php | 49 --- src/Models/Components/SalesOS.php | 49 --- src/Models/Components/SalesTimeseries.php | 49 --- src/Models/Components/SalesTopUrls.php | 49 --- src/Models/Components/WorkspaceSchema.php | 2 +- src/Models/Errors/BadRequest.php | 10 + src/Models/Errors/BadRequestThrowable.php | 20 ++ src/Models/Errors/Conflict.php | 10 + src/Models/Errors/ConflictThrowable.php | 20 ++ src/Models/Errors/Forbidden.php | 10 + src/Models/Errors/ForbiddenThrowable.php | 20 ++ src/Models/Errors/InternalServerError.php | 10 + .../Errors/InternalServerErrorThrowable.php | 20 ++ src/Models/Errors/InviteExpired.php | 10 + src/Models/Errors/InviteExpiredThrowable.php | 20 ++ src/Models/Errors/NotFound.php | 10 + src/Models/Errors/NotFoundThrowable.php | 20 ++ src/Models/Errors/RateLimitExceeded.php | 10 + .../Errors/RateLimitExceededThrowable.php | 20 ++ src/Models/Errors/Unauthorized.php | 10 + src/Models/Errors/UnauthorizedThrowable.php | 20 ++ src/Models/Errors/UnprocessableEntity.php | 10 + .../Errors/UnprocessableEntityThrowable.php | 20 ++ .../Operations/BulkDeleteLinksRequest.php | 29 ++ .../Operations/BulkDeleteLinksResponse.php | 55 ++++ .../BulkDeleteLinksResponseBody.php | 30 ++ src/Models/Operations/Click.php | 28 ++ .../Operations/CreateLinkRequestBody.php | 6 +- .../Operations/CreateTagRequestBody.php | 2 +- src/Models/Operations/Customer.php | 55 ++++ src/Models/Operations/Data.php | 6 +- src/Models/Operations/ListEventsResponse.php | 4 +- src/Models/Operations/RequestBody.php | 6 +- .../Operations/RetrieveAnalyticsResponse.php | 8 +- src/Models/Operations/Sale.php | 66 ++++ src/Models/Operations/SortBy.php | 1 - .../Operations/TrackLeadRequestBody.php | 2 +- .../Operations/TrackLeadResponseBody.php | 72 +---- src/Models/Operations/TrackSaleCustomer.php | 55 ++++ .../Operations/TrackSaleRequestBody.php | 2 +- .../Operations/TrackSaleResponseBody.php | 62 +--- .../Operations/UpdateLinkRequestBody.php | 6 +- .../Operations/UpdateTagRequestBody.php | 2 +- .../Operations/UpsertLinkRequestBody.php | 6 +- src/QRCodes.php | 18 +- src/SDKConfiguration.php | 6 +- src/Tags.php | 54 ++-- src/Track.php | 54 ++-- src/Utils/PhpDocTypeParser.php | 6 + src/Utils/UnionHandler.php | 137 +++++---- src/Workspaces.php | 36 +-- 159 files changed, 2095 insertions(+), 4344 deletions(-) rename docs/Models/Components/{SalesBrowsers.md => AnalyticsBrowsers.md} (65%) create mode 100644 docs/Models/Components/AnalyticsCities.md rename docs/Models/Components/{SalesCitiesCountry.md => AnalyticsCitiesCountry.md} (99%) create mode 100644 docs/Models/Components/AnalyticsCount.md rename docs/Models/Components/{SalesCountries.md => AnalyticsCountries.md} (57%) rename docs/Models/Components/{SalesDevices.md => AnalyticsDevices.md} (65%) rename docs/Models/Components/{SalesOS.md => AnalyticsOS.md} (65%) rename docs/Models/Components/{SalesReferers.md => AnalyticsReferers.md} (67%) rename docs/Models/Components/{SalesTimeseries.md => AnalyticsTimeseries.md} (65%) rename docs/Models/Components/{SalesTopLinks.md => AnalyticsTopLinks.md} (83%) rename docs/Models/Components/{SalesTopUrls.md => AnalyticsTopUrls.md} (65%) create mode 100644 docs/Models/Components/City.md create mode 100644 docs/Models/Components/ClickEvent.md delete mode 100644 docs/Models/Components/ClickEvents.md delete mode 100644 docs/Models/Components/ClicksBrowsers.md delete mode 100644 docs/Models/Components/ClicksCities.md delete mode 100644 docs/Models/Components/ClicksCitiesCountry.md delete mode 100644 docs/Models/Components/ClicksCount.md delete mode 100644 docs/Models/Components/ClicksCountries.md delete mode 100644 docs/Models/Components/ClicksDevices.md delete mode 100644 docs/Models/Components/ClicksOS.md delete mode 100644 docs/Models/Components/ClicksReferers.md delete mode 100644 docs/Models/Components/ClicksTimeseries.md delete mode 100644 docs/Models/Components/ClicksTopLinks.md delete mode 100644 docs/Models/Components/ClicksTopUrls.md create mode 100644 docs/Models/Components/Event.md delete mode 100644 docs/Models/Components/LeadsBrowsers.md delete mode 100644 docs/Models/Components/LeadsCities.md delete mode 100644 docs/Models/Components/LeadsCitiesCountry.md delete mode 100644 docs/Models/Components/LeadsCount.md delete mode 100644 docs/Models/Components/LeadsCountries.md delete mode 100644 docs/Models/Components/LeadsCountriesCountry.md delete mode 100644 docs/Models/Components/LeadsDevices.md delete mode 100644 docs/Models/Components/LeadsOS.md delete mode 100644 docs/Models/Components/LeadsReferers.md delete mode 100644 docs/Models/Components/LeadsTimeseries.md delete mode 100644 docs/Models/Components/LeadsTopLinks.md delete mode 100644 docs/Models/Components/LeadsTopUrls.md delete mode 100644 docs/Models/Components/SalesCities.md delete mode 100644 docs/Models/Components/SalesCount.md delete mode 100644 docs/Models/Components/SalesCountriesCountry.md create mode 100644 docs/Models/Operations/BulkDeleteLinksRequest.md create mode 100644 docs/Models/Operations/BulkDeleteLinksResponse.md create mode 100644 docs/Models/Operations/BulkDeleteLinksResponseBody.md create mode 100644 docs/Models/Operations/Click.md create mode 100644 docs/Models/Operations/Customer.md create mode 100644 docs/Models/Operations/Sale.md create mode 100644 docs/Models/Operations/TrackSaleCustomer.md rename src/Models/Components/{SalesBrowsers.php => AnalyticsBrowsers.php} (50%) create mode 100644 src/Models/Components/AnalyticsCities.php rename src/Models/Components/{SalesCitiesCountry.php => AnalyticsCitiesCountry.php} (99%) create mode 100644 src/Models/Components/AnalyticsCount.php create mode 100644 src/Models/Components/AnalyticsCountries.php create mode 100644 src/Models/Components/AnalyticsDevices.php create mode 100644 src/Models/Components/AnalyticsOS.php rename src/Models/Components/{SalesReferers.php => AnalyticsReferers.php} (51%) create mode 100644 src/Models/Components/AnalyticsTimeseries.php rename src/Models/Components/{SalesTopLinks.php => AnalyticsTopLinks.php} (75%) create mode 100644 src/Models/Components/AnalyticsTopUrls.php create mode 100644 src/Models/Components/City.php rename src/Models/Components/{ClickEvents.php => ClickEvent.php} (82%) delete mode 100644 src/Models/Components/ClicksBrowsers.php delete mode 100644 src/Models/Components/ClicksCities.php delete mode 100644 src/Models/Components/ClicksCitiesCountry.php delete mode 100644 src/Models/Components/ClicksCount.php delete mode 100644 src/Models/Components/ClicksCountries.php delete mode 100644 src/Models/Components/ClicksDevices.php delete mode 100644 src/Models/Components/ClicksOS.php delete mode 100644 src/Models/Components/ClicksReferers.php delete mode 100644 src/Models/Components/ClicksTimeseries.php delete mode 100644 src/Models/Components/ClicksTopLinks.php delete mode 100644 src/Models/Components/ClicksTopUrls.php create mode 100644 src/Models/Components/Event.php delete mode 100644 src/Models/Components/LeadsBrowsers.php delete mode 100644 src/Models/Components/LeadsCities.php delete mode 100644 src/Models/Components/LeadsCitiesCountry.php delete mode 100644 src/Models/Components/LeadsCount.php delete mode 100644 src/Models/Components/LeadsCountries.php delete mode 100644 src/Models/Components/LeadsCountriesCountry.php delete mode 100644 src/Models/Components/LeadsDevices.php delete mode 100644 src/Models/Components/LeadsOS.php delete mode 100644 src/Models/Components/LeadsReferers.php delete mode 100644 src/Models/Components/LeadsTimeseries.php delete mode 100644 src/Models/Components/LeadsTopLinks.php delete mode 100644 src/Models/Components/LeadsTopUrls.php delete mode 100644 src/Models/Components/SalesCities.php delete mode 100644 src/Models/Components/SalesCount.php delete mode 100644 src/Models/Components/SalesCountries.php delete mode 100644 src/Models/Components/SalesCountriesCountry.php delete mode 100644 src/Models/Components/SalesDevices.php delete mode 100644 src/Models/Components/SalesOS.php delete mode 100644 src/Models/Components/SalesTimeseries.php delete mode 100644 src/Models/Components/SalesTopUrls.php create mode 100644 src/Models/Errors/BadRequestThrowable.php create mode 100644 src/Models/Errors/ConflictThrowable.php create mode 100644 src/Models/Errors/ForbiddenThrowable.php create mode 100644 src/Models/Errors/InternalServerErrorThrowable.php create mode 100644 src/Models/Errors/InviteExpiredThrowable.php create mode 100644 src/Models/Errors/NotFoundThrowable.php create mode 100644 src/Models/Errors/RateLimitExceededThrowable.php create mode 100644 src/Models/Errors/UnauthorizedThrowable.php create mode 100644 src/Models/Errors/UnprocessableEntityThrowable.php create mode 100644 src/Models/Operations/BulkDeleteLinksRequest.php create mode 100644 src/Models/Operations/BulkDeleteLinksResponse.php create mode 100644 src/Models/Operations/BulkDeleteLinksResponseBody.php create mode 100644 src/Models/Operations/Click.php create mode 100644 src/Models/Operations/Customer.php create mode 100644 src/Models/Operations/Sale.php create mode 100644 src/Models/Operations/TrackSaleCustomer.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8412660..3db3b10 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: eed7a2ad5cc93c07aac35e5c6d536a9a + docChecksum: e79768bd6535cef0d8d78eefb5ac63e1 docVersion: 0.0.1 - speakeasyVersion: 1.379.0 - generationVersion: 2.404.3 - releaseVersion: 0.3.2 - configChecksum: e5cb27fb8142c1c93f18ef02c5c9300f + speakeasyVersion: 1.390.1 + generationVersion: 2.409.0 + releaseVersion: 0.4.0 + configChecksum: 1cdd31105538033d340fb1f6857007c6 repoURL: https://github.com/dubinc/dub-php.git installationURL: https://github.com/dubinc/dub-php features: php: - core: 3.3.11 + core: 3.4.0 deprecations: 2.81.1 - errors: 0.1.1 + errors: 0.1.2 examples: 2.81.3 flattening: 2.81.1 globalSecurity: 2.81.7 @@ -83,6 +83,9 @@ generatedFiles: - src/Models/Operations/UpdateLinkResponse.php - src/Models/Operations/RequestBody.php - src/Models/Operations/BulkCreateLinksResponse.php + - src/Models/Operations/BulkDeleteLinksRequest.php + - src/Models/Operations/BulkDeleteLinksResponseBody.php + - src/Models/Operations/BulkDeleteLinksResponse.php - src/Models/Operations/Data.php - src/Models/Operations/BulkUpdateLinksRequestBody.php - src/Models/Operations/BulkUpdateLinksResponse.php @@ -126,10 +129,14 @@ generatedFiles: - src/Models/Operations/UpdateDomainRequest.php - src/Models/Operations/UpdateDomainResponse.php - src/Models/Operations/TrackLeadRequestBody.php + - src/Models/Operations/Click.php + - src/Models/Operations/Customer.php - src/Models/Operations/TrackLeadResponseBody.php - src/Models/Operations/TrackLeadResponse.php - src/Models/Operations/PaymentProcessor.php - src/Models/Operations/TrackSaleRequestBody.php + - src/Models/Operations/TrackSaleCustomer.php + - src/Models/Operations/Sale.php - src/Models/Operations/TrackSaleResponseBody.php - src/Models/Operations/TrackSaleResponse.php - src/Models/Operations/TrackCustomerRequestBody.php @@ -143,45 +150,23 @@ generatedFiles: - src/Models/Components/Color.php - src/Models/Components/TagSchema.php - src/Models/Components/LinkGeoTargeting.php - - src/Models/Components/ClicksCount.php - - src/Models/Components/ClicksTimeseries.php + - src/Models/Components/AnalyticsCount.php + - src/Models/Components/AnalyticsTimeseries.php - src/Models/Components/Country.php - - src/Models/Components/ClicksCountries.php - - src/Models/Components/ClicksCitiesCountry.php - - src/Models/Components/ClicksCities.php - - src/Models/Components/ClicksDevices.php - - src/Models/Components/ClicksBrowsers.php - - src/Models/Components/ClicksOS.php - - src/Models/Components/ClicksReferers.php - - src/Models/Components/ClicksTopLinks.php - - src/Models/Components/ClicksTopUrls.php - - src/Models/Components/LeadsCount.php - - src/Models/Components/LeadsTimeseries.php - - src/Models/Components/LeadsCountriesCountry.php - - src/Models/Components/LeadsCountries.php - - src/Models/Components/LeadsCitiesCountry.php - - src/Models/Components/LeadsCities.php - - src/Models/Components/LeadsDevices.php - - src/Models/Components/LeadsBrowsers.php - - src/Models/Components/LeadsOS.php - - src/Models/Components/LeadsReferers.php - - src/Models/Components/LeadsTopLinks.php - - src/Models/Components/LeadsTopUrls.php - - src/Models/Components/SalesCount.php - - src/Models/Components/SalesTimeseries.php - - src/Models/Components/SalesCountriesCountry.php - - src/Models/Components/SalesCountries.php - - src/Models/Components/SalesCitiesCountry.php - - src/Models/Components/SalesCities.php - - src/Models/Components/SalesDevices.php - - src/Models/Components/SalesBrowsers.php - - src/Models/Components/SalesOS.php - - src/Models/Components/SalesReferers.php - - src/Models/Components/SalesTopLinks.php - - src/Models/Components/SalesTopUrls.php + - src/Models/Components/City.php + - src/Models/Components/AnalyticsCountries.php + - src/Models/Components/AnalyticsCitiesCountry.php + - src/Models/Components/AnalyticsCities.php + - src/Models/Components/AnalyticsDevices.php + - src/Models/Components/AnalyticsBrowsers.php + - src/Models/Components/AnalyticsOS.php + - src/Models/Components/AnalyticsReferers.php + - src/Models/Components/AnalyticsTopLinks.php + - src/Models/Components/AnalyticsTopUrls.php - src/Models/Components/CountryCode.php - src/Models/Components/ContinentCode.php - - src/Models/Components/ClickEvents.php + - src/Models/Components/Event.php + - src/Models/Components/ClickEvent.php - src/Models/Components/Plan.php - src/Models/Components/Role.php - src/Models/Components/Users.php @@ -191,30 +176,39 @@ generatedFiles: - src/Models/Components/Security.php - src/Models/Errors/Code.php - src/Models/Errors/Error.php + - src/Models/Errors/BadRequestThrowable.php - src/Models/Errors/BadRequest.php - src/Models/Errors/UnauthorizedCode.php - src/Models/Errors/UnauthorizedError.php + - src/Models/Errors/UnauthorizedThrowable.php - src/Models/Errors/Unauthorized.php - src/Models/Errors/ForbiddenCode.php - src/Models/Errors/ForbiddenError.php + - src/Models/Errors/ForbiddenThrowable.php - src/Models/Errors/Forbidden.php - src/Models/Errors/NotFoundCode.php - src/Models/Errors/NotFoundError.php + - src/Models/Errors/NotFoundThrowable.php - src/Models/Errors/NotFound.php - src/Models/Errors/ConflictCode.php - src/Models/Errors/ConflictError.php + - src/Models/Errors/ConflictThrowable.php - src/Models/Errors/Conflict.php - src/Models/Errors/InviteExpiredCode.php - src/Models/Errors/InviteExpiredError.php + - src/Models/Errors/InviteExpiredThrowable.php - src/Models/Errors/InviteExpired.php - src/Models/Errors/UnprocessableEntityCode.php - src/Models/Errors/UnprocessableEntityError.php + - src/Models/Errors/UnprocessableEntityThrowable.php - src/Models/Errors/UnprocessableEntity.php - src/Models/Errors/RateLimitExceededCode.php - src/Models/Errors/RateLimitExceededError.php + - src/Models/Errors/RateLimitExceededThrowable.php - src/Models/Errors/RateLimitExceeded.php - src/Models/Errors/InternalServerErrorCode.php - src/Models/Errors/InternalServerErrorError.php + - src/Models/Errors/InternalServerErrorThrowable.php - src/Models/Errors/InternalServerError.php - docs/Models/Operations/QueryParamTagIds.md - docs/Models/Operations/QueryParamTagNames.md @@ -247,6 +241,9 @@ generatedFiles: - docs/Models/Operations/BulkCreateLinksTagNames.md - docs/Models/Operations/RequestBody.md - docs/Models/Operations/BulkCreateLinksResponse.md + - docs/Models/Operations/BulkDeleteLinksRequest.md + - docs/Models/Operations/BulkDeleteLinksResponseBody.md + - docs/Models/Operations/BulkDeleteLinksResponse.md - docs/Models/Operations/BulkUpdateLinksTagIds.md - docs/Models/Operations/BulkUpdateLinksTagNames.md - docs/Models/Operations/Data.md @@ -295,10 +292,14 @@ generatedFiles: - docs/Models/Operations/UpdateDomainRequest.md - docs/Models/Operations/UpdateDomainResponse.md - docs/Models/Operations/TrackLeadRequestBody.md + - docs/Models/Operations/Click.md + - docs/Models/Operations/Customer.md - docs/Models/Operations/TrackLeadResponseBody.md - docs/Models/Operations/TrackLeadResponse.md - docs/Models/Operations/PaymentProcessor.md - docs/Models/Operations/TrackSaleRequestBody.md + - docs/Models/Operations/TrackSaleCustomer.md + - docs/Models/Operations/Sale.md - docs/Models/Operations/TrackSaleResponseBody.md - docs/Models/Operations/TrackSaleResponse.md - docs/Models/Operations/TrackCustomerRequestBody.md @@ -312,45 +313,23 @@ generatedFiles: - docs/Models/Components/Color.md - docs/Models/Components/TagSchema.md - docs/Models/Components/LinkGeoTargeting.md - - docs/Models/Components/ClicksCount.md - - docs/Models/Components/ClicksTimeseries.md + - docs/Models/Components/AnalyticsCount.md + - docs/Models/Components/AnalyticsTimeseries.md - docs/Models/Components/Country.md - - docs/Models/Components/ClicksCountries.md - - docs/Models/Components/ClicksCitiesCountry.md - - docs/Models/Components/ClicksCities.md - - docs/Models/Components/ClicksDevices.md - - docs/Models/Components/ClicksBrowsers.md - - docs/Models/Components/ClicksOS.md - - docs/Models/Components/ClicksReferers.md - - docs/Models/Components/ClicksTopLinks.md - - docs/Models/Components/ClicksTopUrls.md - - docs/Models/Components/LeadsCount.md - - docs/Models/Components/LeadsTimeseries.md - - docs/Models/Components/LeadsCountriesCountry.md - - docs/Models/Components/LeadsCountries.md - - docs/Models/Components/LeadsCitiesCountry.md - - docs/Models/Components/LeadsCities.md - - docs/Models/Components/LeadsDevices.md - - docs/Models/Components/LeadsBrowsers.md - - docs/Models/Components/LeadsOS.md - - docs/Models/Components/LeadsReferers.md - - docs/Models/Components/LeadsTopLinks.md - - docs/Models/Components/LeadsTopUrls.md - - docs/Models/Components/SalesCount.md - - docs/Models/Components/SalesTimeseries.md - - docs/Models/Components/SalesCountriesCountry.md - - docs/Models/Components/SalesCountries.md - - docs/Models/Components/SalesCitiesCountry.md - - docs/Models/Components/SalesCities.md - - docs/Models/Components/SalesDevices.md - - docs/Models/Components/SalesBrowsers.md - - docs/Models/Components/SalesOS.md - - docs/Models/Components/SalesReferers.md - - docs/Models/Components/SalesTopLinks.md - - docs/Models/Components/SalesTopUrls.md + - docs/Models/Components/City.md + - docs/Models/Components/AnalyticsCountries.md + - docs/Models/Components/AnalyticsCitiesCountry.md + - docs/Models/Components/AnalyticsCities.md + - docs/Models/Components/AnalyticsDevices.md + - docs/Models/Components/AnalyticsBrowsers.md + - docs/Models/Components/AnalyticsOS.md + - docs/Models/Components/AnalyticsReferers.md + - docs/Models/Components/AnalyticsTopLinks.md + - docs/Models/Components/AnalyticsTopUrls.md - docs/Models/Components/CountryCode.md - docs/Models/Components/ContinentCode.md - - docs/Models/Components/ClickEvents.md + - docs/Models/Components/Event.md + - docs/Models/Components/ClickEvent.md - docs/Models/Components/Plan.md - docs/Models/Components/Role.md - docs/Models/Components/Users.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0fb5767..f197f49 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true php: - version: 0.3.2 + version: 0.4.0 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5c5abda..524700b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.379.0 +speakeasyVersion: 1.390.1 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:c694712d716bf08dd8f09bd94658a4e6af254d1abfedff9315d2888ea157b2b7 - sourceBlobDigest: sha256:60c8fb4ef34c80869c5b32ce1fe353138ae7ec1785ca158577f0f934460e5e9d + sourceRevisionDigest: sha256:3e1606c84268b79ec241ffca2410bf0fc6fb2def685eb62e28cf07f333e39d80 + sourceBlobDigest: sha256:0610a3a3d2096fc72cdfd1c92b1be59f41530f7b48dc93566bc297baefcf3882 tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:c694712d716bf08dd8f09bd94658a4e6af254d1abfedff9315d2888ea157b2b7 - sourceBlobDigest: sha256:60c8fb4ef34c80869c5b32ce1fe353138ae7ec1785ca158577f0f934460e5e9d + sourceRevisionDigest: sha256:3e1606c84268b79ec241ffca2410bf0fc6fb2def685eb62e28cf07f333e39d80 + sourceBlobDigest: sha256:0610a3a3d2096fc72cdfd1c92b1be59f41530f7b48dc93566bc297baefcf3882 codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:7369bc0064f7828e4547bdc23ad5aae826e6da9d034c528385e36dbcc84a267c + codeSamplesRevisionDigest: sha256:e3c92bf8602d9ca18e356bbf494a95a1d18ca37240678b10f0f3a10a049e7850 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index d3cdd76..e4727bb 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,25 @@ It has been generated successfully based on your OpenAPI spec. However, it is no - [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasyapi.dev/docs/advanced-setup/publish-sdks) - [ ] ✨ When ready to productionize, delete this section from the README + +## Summary + +Dub.co API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs. + + + +## Table of Contents + +* [SDK Installation](#sdk-installation) +* [SDK Example Usage](#sdk-example-usage) +* [Available Resources and Operations](#available-resources-and-operations) +* [Server Selection](#server-selection) + + ## SDK Installation -### Composer +The SDK relies on [Composer](https://getcomposer.org/) to manage its dependencies. To install the SDK first add the below to your `composer.json` file: @@ -684,6 +699,7 @@ try { * [delete](docs/sdks/links/README.md#delete) - Delete a link * [update](docs/sdks/links/README.md#update) - Update a link * [createMany](docs/sdks/links/README.md#createmany) - Bulk create links +* [deleteMany](docs/sdks/links/README.md#deletemany) - Bulk delete links * [updateMany](docs/sdks/links/README.md#updatemany) - Bulk update links * [upsert](docs/sdks/links/README.md#upsert) - Upsert a link diff --git a/RELEASES.md b/RELEASES.md index 67e4fd1..b77ba54 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -134,4 +134,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.379.0 (2.404.3) https://github.com/speakeasy-api/speakeasy ### Generated -- [php v0.3.2] . \ No newline at end of file +- [php v0.3.2] . + +## 2024-09-04 01:12:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.390.1 (2.409.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.4.0] . \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index 3a63dc7..c4f9a9a 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,132 +3,102 @@ info: title: CodeSamples overlay for php target version: 0.0.0 actions: - - target: $["paths"]["/links/count"]["get"] - update: - "x-codeSamples": - - "lang": "php" - "label": "getLinksCount" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksCountRequest(\n domain: 'false-epauliere.info',\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: [\n '',\n ],\n search: '',\n userId: '',\n showArchived: false,\n withTags: false,\n groupBy: Operations\\Two::TagId,\n );\n $response = $sdk->links->count($request);\n\n if ($response->number !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] - update: - "x-codeSamples": - - "lang": "php" - "label": "getWorkspace" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->workspaces->get('');\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/tags"]["post"] + - target: $["paths"]["/domains"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "createTag" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateTagRequestBody(\n name: '',\n color: Operations\\Color::Blue,\n tag: '',\n );\n $response = $sdk->tags->create($request);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + "label": "listDomains" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->list(false, '', 1, 50);\n\n if ($response->domainSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "php" "label": "deleteDomain" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->delete('acme.com');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/domains/{slug}"]["patch"] - update: - "x-codeSamples": - - "lang": "php" - "label": "updateDomain" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->update('acme.com', $requestBody);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "php" "label": "trackLead" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackLeadRequestBody(\n clickId: '',\n eventName: 'Sign up',\n customerId: '',\n customerName: '',\n customerEmail: 'Katelin24@hotmail.com',\n customerAvatar: '',\n metadata: [\n 'Assistant' => '',\n ],\n );\n $response = $sdk->track->lead($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/track/customer"]["post"] - update: - "x-codeSamples": - - "lang": "php" - "label": "trackCustomer" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackCustomerRequestBody(\n customerId: '',\n customerName: '',\n customerEmail: 'Wilson.Smith@gmail.com',\n customerAvatar: '',\n );\n $response = $sdk->track->customer($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/links"]["post"] + - target: $["paths"]["/links/{linkId}"]["delete"] update: "x-codeSamples": - "lang": "php" - "label": "createLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateLinkRequestBody(\n url: 'https://google.com',\n domain: 'lighthearted-kilogram.name',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'klDuL1dlrnUXohO',\n proxy: false,\n title: '',\n description: 'User-friendly multi-state frame',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->create($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/links/bulk"]["post"] + "label": "deleteLink" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/bulk"]["delete"] update: "x-codeSamples": - "lang": "php" - "label": "bulkCreateLinks" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = [\n new Operations\\RequestBody,\n ];\n $response = $sdk->links->createMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + "label": "bulkDeleteLinks" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->deleteMany('clux0rgak00011...,clux0rgak00022...');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/analytics"]["get"] update: "x-codeSamples": - "lang": "php" "label": "retrieveAnalytics" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\RetrieveAnalyticsRequest(\n event: Operations\\Event::Leads,\n groupBy: Operations\\QueryParamGroupBy::Trigger,\n domain: 'vacant-platter.biz',\n key: '',\n linkId: '',\n externalId: '',\n interval: Operations\\Interval::Ninetyd,\n start: '',\n end: '',\n timezone: 'America/New_York',\n continent: Components\\ContinentCode::As,\n country: Components\\CountryCode::Nz,\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n url: 'http://ajar-mall.com',\n tagId: '',\n qr: false,\n root: false,\n );\n $response = $sdk->analytics->retrieve($request);\n\n if ($response->oneOf !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/tags"]["get"] + update: + "x-codeSamples": + - "lang": "php" + "label": "getTags" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $response = $sdk->tags->list();\n\n if ($response->tagSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/tags/{id}"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "updateTag" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateTagRequestBody(\n name: '',\n color: Operations\\UpdateTagColor::Brown,\n tag: '',\n );\n $response = $sdk->tags->update('', $requestBody);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/domains"]["get"] + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "php" - "label": "listDomains" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->domains->list(false, '', 1, 50);\n\n if ($response->domainSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/links/{linkId}"]["delete"] + "label": "createLink" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateLinkRequestBody(\n url: 'https://google.com',\n domain: 'lighthearted-kilogram.name',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'klDuL1dlrnUXohO',\n proxy: false,\n title: '',\n description: 'User-friendly multi-state frame',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->create($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "php" - "label": "deleteLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->delete('');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/links/{linkId}"]["patch"] + "label": "upsertLink" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\UpsertLinkRequestBody(\n url: 'https://google.com',\n domain: 'monthly-hometown.info',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'Ng7iwZDcrQrPcHB',\n proxy: false,\n title: '',\n description: 'Organic asynchronous firmware',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->upsert($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/events"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "updateLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n domain: 'tidy-amazon.name',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: '[\"clux0rgak00011...\"]',\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'daOKvPKDk8CkuAM',\n proxy: false,\n title: '',\n description: 'Mandatory real-time migration',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->update('', $requestBody);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/events"]["get"] + "label": "listEvents" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\ListEventsRequest(\n event: Operations\\QueryParamEvent::Composite,\n domain: 'burly-math.biz',\n key: '',\n linkId: '',\n externalId: '',\n interval: Operations\\QueryParamInterval::Oney,\n start: '',\n end: '',\n timezone: 'America/New_York',\n continent: Components\\ContinentCode::As,\n country: Components\\CountryCode::Cx,\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n url: 'https://elliptical-auditorium.com',\n tagId: '',\n qr: false,\n root: false,\n page: 9174.16,\n limit: 6355.32,\n order: Operations\\Order::Desc,\n sortBy: Operations\\SortBy::Timestamp,\n );\n $response = $sdk->events->list($request);\n\n if ($response->clickEvents !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/workspaces/{idOrSlug}"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "listEvents" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\ListEventsRequest(\n event: Operations\\QueryParamEvent::Composite,\n domain: 'burly-math.biz',\n key: '',\n linkId: '',\n externalId: '',\n interval: Operations\\QueryParamInterval::Oney,\n start: '',\n end: '',\n timezone: 'America/New_York',\n continent: Components\\ContinentCode::As,\n country: Components\\CountryCode::Cx,\n city: 'New York',\n device: 'Desktop',\n browser: 'Chrome',\n os: 'Windows',\n referer: 'google.com',\n url: 'https://elliptical-auditorium.com',\n tagId: '',\n qr: false,\n root: false,\n page: 9174.16,\n limit: 6355.32,\n order: Operations\\Order::Desc,\n sortBy: Operations\\SortBy::Amount,\n );\n $response = $sdk->events->list($request);\n\n if ($response->clickEvents !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + "label": "getWorkspace" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->workspaces->get('');\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/domains"]["post"] update: "x-codeSamples": - "lang": "php" "label": "createDomain" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->create($request);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/track/sale"]["post"] - update: - "x-codeSamples": - - "lang": "php" - "label": "trackSale" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackSaleRequestBody(\n customerId: '',\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Shopify,\n eventName: 'Purchase',\n invoiceId: '',\n currency: 'European Unit of Account 17(E.U.A.-17)',\n metadata: [\n 'Stage' => '',\n ],\n );\n $response = $sdk->track->sale($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + - target: $["paths"]["/domains/{slug}"]["patch"] update: "x-codeSamples": - "lang": "php" - "label": "updateWorkspace" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateWorkspaceRequestBody(\n name: '',\n slug: '',\n );\n $response = $sdk->workspaces->update('', $requestBody);\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/tags"]["get"] + "label": "updateDomain" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateDomainRequestBody(\n slug: 'acme.com',\n expiredUrl: 'https://acme.com/expired',\n archived: false,\n placeholder: 'https://dub.co/help/article/what-is-dub',\n );\n $response = $sdk->domains->update('acme.com', $requestBody);\n\n if ($response->domainSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/track/sale"]["post"] update: "x-codeSamples": - "lang": "php" - "label": "getTags" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $response = $sdk->tags->list();\n\n if ($response->tagSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + "label": "trackSale" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackSaleRequestBody(\n customerId: '',\n amount: 996500,\n paymentProcessor: Operations\\PaymentProcessor::Shopify,\n eventName: 'Purchase',\n invoiceId: '',\n currency: 'European Unit of Account 17(E.U.A.-17)',\n metadata: [\n 'Stage' => '',\n ],\n );\n $response = $sdk->track->sale($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getMetatags" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->metatags->get('https://dub.co');\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/links/upsert"]["put"] - update: - "x-codeSamples": - - "lang": "php" - "label": "upsertLink" - "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\UpsertLinkRequestBody(\n url: 'https://google.com',\n domain: 'monthly-hometown.info',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'Ng7iwZDcrQrPcHB',\n proxy: false,\n title: '',\n description: 'Organic asynchronous firmware',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->upsert($request);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/links"]["get"] update: "x-codeSamples": @@ -141,15 +111,51 @@ actions: - "lang": "php" "label": "getLinkInfo" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n\n $response = $sdk->links->get('', '', 'clux0rgak00011...', 'ext_123456');\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/{linkId}"]["patch"] + update: + "x-codeSamples": + - "lang": "php" + "label": "updateLink" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateLinkRequestBody(\n url: 'https://google.com',\n domain: 'tidy-amazon.name',\n key: '',\n externalId: '123456',\n prefix: '',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: '[\"clux0rgak00011...\"]',\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'daOKvPKDk8CkuAM',\n proxy: false,\n title: '',\n description: 'Mandatory real-time migration',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n );\n $response = $sdk->links->update('', $requestBody);\n\n if ($response->linkSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/links/bulk"]["patch"] update: "x-codeSamples": - "lang": "php" "label": "bulkUpdateLinks" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\BulkUpdateLinksRequestBody(\n linkIds: [\n '',\n ],\n data: new Operations\\Data(\n url: 'https://google.com',\n trackConversion: false,\n archived: false,\n publicStats: false,\n tagId: '',\n tagIds: '[\"clux0rgak00011...\"]',\n tagNames: '',\n comments: '',\n expiresAt: '',\n expiredUrl: '',\n password: 'WDSvXDvs2q1hzWy',\n proxy: false,\n title: '',\n description: 'Diverse holistic internet solution',\n image: 'https://loremflickr.com/640/480',\n video: '',\n rewrite: false,\n ios: '',\n android: '',\n geo: new Components\\LinkGeoTargeting(\n af: '',\n al: '',\n dz: '',\n as: '',\n ad: '',\n ao: '',\n ai: '',\n aq: '',\n ag: '',\n ar: '',\n am: '',\n aw: '',\n au: '',\n at: '',\n az: '',\n bs: '',\n bh: '',\n bd: '',\n bb: '',\n by: '',\n be: '',\n bz: '',\n bj: '',\n bm: '',\n bt: '',\n bo: '',\n ba: '',\n bw: '',\n bv: '',\n br: '',\n io: '',\n bn: '',\n bg: '',\n bf: '',\n bi: '',\n kh: '',\n cm: '',\n ca: '',\n cv: '',\n ky: '',\n cf: '',\n td: '',\n cl: '',\n cn: '',\n cx: '',\n cc: '',\n co: '',\n km: '',\n cg: '',\n cd: '',\n ck: '',\n cr: '',\n ci: '',\n hr: '',\n cu: '',\n cy: '',\n cz: '',\n dk: '',\n dj: '',\n dm: '',\n do: '',\n ec: '',\n eg: '',\n sv: '',\n gq: '',\n er: '',\n ee: '',\n et: '',\n fk: '',\n fo: '',\n fj: '',\n fi: '',\n fr: '',\n gf: '',\n pf: '',\n tf: '',\n ga: '',\n gm: '',\n ge: '',\n de: '',\n gh: '',\n gi: '',\n gr: '',\n gl: '',\n gd: '',\n gp: '',\n gu: '',\n gt: '',\n gn: '',\n gw: '',\n gy: '',\n ht: '',\n hm: '',\n va: '',\n hn: '',\n hk: '',\n hu: '',\n is: '',\n in: '',\n id: '',\n ir: '',\n iq: '',\n ie: '',\n il: '',\n it: '',\n jm: '',\n jp: '',\n jo: '',\n kz: '',\n ke: '',\n ki: '',\n kp: '',\n kr: '',\n kw: '',\n kg: '',\n la: '',\n lv: '',\n lb: '',\n ls: '',\n lr: '',\n ly: '',\n li: '',\n lt: '',\n lu: '',\n mo: '',\n mg: '',\n mw: '',\n my: '',\n mv: '',\n ml: '',\n mt: '',\n mh: '',\n mq: '',\n mr: '',\n mu: '',\n yt: '',\n mx: '',\n fm: '',\n md: '',\n mc: '',\n mn: '',\n ms: '',\n ma: '',\n mz: '',\n mm: '',\n na: '',\n nr: '',\n np: '',\n nl: '',\n nc: '',\n nz: '',\n ni: '',\n ne: '',\n ng: '',\n nu: '',\n nf: '',\n mk: '',\n mp: '',\n no: '',\n om: '',\n pk: '',\n pw: '',\n ps: '',\n pa: '',\n pg: '',\n py: '',\n pe: '',\n ph: '',\n pn: '',\n pl: '',\n pt: '',\n pr: '',\n qa: '',\n re: '',\n ro: '',\n ru: '',\n rw: '',\n sh: '',\n kn: '',\n lc: '',\n pm: '',\n vc: '',\n ws: '',\n sm: '',\n st: '',\n sa: '',\n sn: '',\n sc: '',\n sl: '',\n sg: '',\n sk: '',\n si: '',\n sb: '',\n so: '',\n za: '',\n gs: '',\n es: '',\n lk: '',\n sd: '',\n sr: '',\n sj: '',\n sz: '',\n se: '',\n ch: '',\n sy: '',\n tw: '',\n tj: '',\n tz: '',\n th: '',\n tl: '',\n tg: '',\n tk: '',\n to: '',\n tt: '',\n tn: '',\n tr: '',\n tm: '',\n tc: '',\n tv: '',\n ug: '',\n ua: '',\n ae: '',\n gb: '',\n us: '',\n um: '',\n uy: '',\n uz: '',\n vu: '',\n ve: '',\n vn: '',\n vg: '',\n vi: '',\n wf: '',\n eh: '',\n ye: '',\n zm: '',\n zw: '',\n ax: '',\n bq: '',\n cw: '',\n gg: '',\n im: '',\n je: '',\n me: '',\n bl: '',\n mf: '',\n rs: '',\n sx: '',\n ss: '',\n xk: '',\n ),\n doIndex: false,\n utmSource: '',\n utmMedium: '',\n utmCampaign: '',\n utmTerm: '',\n utmContent: '',\n ),\n );\n $response = $sdk->links->updateMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/tags"]["post"] + update: + "x-codeSamples": + - "lang": "php" + "label": "createTag" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateTagRequestBody(\n name: '',\n color: Operations\\Color::Blue,\n tag: '',\n );\n $response = $sdk->tags->create($request);\n\n if ($response->tagSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/count"]["get"] + update: + "x-codeSamples": + - "lang": "php" + "label": "getLinksCount" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksCountRequest(\n domain: 'false-epauliere.info',\n tagId: '',\n tagIds: [\n '',\n ],\n tagNames: [\n '',\n ],\n search: '',\n userId: '',\n showArchived: false,\n withTags: false,\n groupBy: Operations\\Two::TagId,\n );\n $response = $sdk->links->count($request);\n\n if ($response->number !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/bulk"]["post"] + update: + "x-codeSamples": + - "lang": "php" + "label": "bulkCreateLinks" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = [\n new Operations\\RequestBody,\n ];\n $response = $sdk->links->createMany($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - target: $["paths"]["/qr"]["get"] update: "x-codeSamples": - "lang": "php" "label": "getQRCode" "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetQRCodeRequest(\n url: 'https://brief-micronutrient.org',\n size: 5442.21,\n level: Operations\\Level::H,\n fgColor: '',\n bgColor: '',\n includeMargin: false,\n );\n $response = $sdk->qrCodes->get($request);\n\n if ($response->res !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/workspaces/{idOrSlug}"]["patch"] + update: + "x-codeSamples": + - "lang": "php" + "label": "updateWorkspace" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateWorkspaceRequestBody(\n name: '',\n slug: '',\n );\n $response = $sdk->workspaces->update('', $requestBody);\n\n if ($response->workspaceSchema !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/track/customer"]["post"] + update: + "x-codeSamples": + - "lang": "php" + "label": "trackCustomer" + "source": "declare(strict_types=1);\n\nrequire 'vendor/autoload.php';\n\nuse Dub;\nuse Dub\\Models\\Components;\nuse Dub\\Models\\Operations;\n\n$security = new Components\\Security();\n$security->token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackCustomerRequestBody(\n customerId: '',\n customerName: '',\n customerEmail: 'Wilson.Smith@gmail.com',\n customerAvatar: '',\n );\n $response = $sdk->track->customer($request);\n\n if ($response->object !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" diff --git a/composer.json b/composer.json index 9af4891..8de3f19 100644 --- a/composer.json +++ b/composer.json @@ -7,16 +7,10 @@ } }, "license": "MIT", - "repositories": [ - { - "type": "git", - "url": "https://github.com/idbentley/serializer" - } - ], "require": { "php": "^8.1", "guzzlehttp/guzzle": "^7.0", - "jms/serializer": "dev-deserialize-unions", + "speakeasy/serializer": "^3.40.0", "brick/date-time": "^0.7.0", "phpdocumentor/type-resolver": "^1.8" }, diff --git a/docs/Models/Components/SalesBrowsers.md b/docs/Models/Components/AnalyticsBrowsers.md similarity index 65% rename from docs/Models/Components/SalesBrowsers.md rename to docs/Models/Components/AnalyticsBrowsers.md index a9553a0..44347ef 100644 --- a/docs/Models/Components/SalesBrowsers.md +++ b/docs/Models/Components/AnalyticsBrowsers.md @@ -1,4 +1,4 @@ -# SalesBrowsers +# AnalyticsBrowsers ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | | `browser` | *string* | :heavy_check_mark: | The name of the browser | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this browser | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this browser | | `sales` | *float* | :heavy_check_mark: | The number of sales from this browser | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this browser | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this browser | \ No newline at end of file diff --git a/docs/Models/Components/AnalyticsCities.md b/docs/Models/Components/AnalyticsCities.md new file mode 100644 index 0000000..4ab272c --- /dev/null +++ b/docs/Models/Components/AnalyticsCities.md @@ -0,0 +1,13 @@ +# AnalyticsCities + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `city` | *string* | :heavy_check_mark: | The name of the city | +| `country` | [Components\AnalyticsCitiesCountry](../../Models/Components/AnalyticsCitiesCountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this city | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this city | +| `sales` | *float* | :heavy_check_mark: | The number of sales from this city | +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this city | \ No newline at end of file diff --git a/docs/Models/Components/SalesCitiesCountry.md b/docs/Models/Components/AnalyticsCitiesCountry.md similarity index 99% rename from docs/Models/Components/SalesCitiesCountry.md rename to docs/Models/Components/AnalyticsCitiesCountry.md index ba8a4fe..77accd3 100644 --- a/docs/Models/Components/SalesCitiesCountry.md +++ b/docs/Models/Components/AnalyticsCitiesCountry.md @@ -1,4 +1,4 @@ -# SalesCitiesCountry +# AnalyticsCitiesCountry The 2-letter country code of the city: https://d.to/geo diff --git a/docs/Models/Components/AnalyticsCount.md b/docs/Models/Components/AnalyticsCount.md new file mode 100644 index 0000000..3fa9e46 --- /dev/null +++ b/docs/Models/Components/AnalyticsCount.md @@ -0,0 +1,11 @@ +# AnalyticsCount + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `clicks` | *float* | :heavy_check_mark: | The total number of clicks | +| `leads` | *float* | :heavy_check_mark: | The total number of leads | +| `sales` | *float* | :heavy_check_mark: | The total number of sales | +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales | \ No newline at end of file diff --git a/docs/Models/Components/SalesCountries.md b/docs/Models/Components/AnalyticsCountries.md similarity index 57% rename from docs/Models/Components/SalesCountries.md rename to docs/Models/Components/AnalyticsCountries.md index 40ded01..508ddb8 100644 --- a/docs/Models/Components/SalesCountries.md +++ b/docs/Models/Components/AnalyticsCountries.md @@ -1,10 +1,13 @@ -# SalesCountries +# AnalyticsCountries ## Fields | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [Components\SalesCountriesCountry](../../Models/Components/SalesCountriesCountry.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | +| `country` | [Components\Country](../../Models/Components/Country.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | +| `city` | [Components\City](../../Models/Components/City.md) | :heavy_check_mark: | N/A | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this country | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this country | | `sales` | *float* | :heavy_check_mark: | The number of sales from this country | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this country | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this country | \ No newline at end of file diff --git a/docs/Models/Components/SalesDevices.md b/docs/Models/Components/AnalyticsDevices.md similarity index 65% rename from docs/Models/Components/SalesDevices.md rename to docs/Models/Components/AnalyticsDevices.md index f712eb0..aeb9cde 100644 --- a/docs/Models/Components/SalesDevices.md +++ b/docs/Models/Components/AnalyticsDevices.md @@ -1,4 +1,4 @@ -# SalesDevices +# AnalyticsDevices ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | | `device` | *string* | :heavy_check_mark: | The name of the device | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this device | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this device | | `sales` | *float* | :heavy_check_mark: | The number of sales from this device | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this device | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this device | \ No newline at end of file diff --git a/docs/Models/Components/SalesOS.md b/docs/Models/Components/AnalyticsOS.md similarity index 65% rename from docs/Models/Components/SalesOS.md rename to docs/Models/Components/AnalyticsOS.md index e71dbec..cc0f6a2 100644 --- a/docs/Models/Components/SalesOS.md +++ b/docs/Models/Components/AnalyticsOS.md @@ -1,4 +1,4 @@ -# SalesOS +# AnalyticsOS ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | | `os` | *string* | :heavy_check_mark: | The name of the OS | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this OS | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this OS | | `sales` | *float* | :heavy_check_mark: | The number of sales from this OS | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this OS | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this OS | \ No newline at end of file diff --git a/docs/Models/Components/SalesReferers.md b/docs/Models/Components/AnalyticsReferers.md similarity index 67% rename from docs/Models/Components/SalesReferers.md rename to docs/Models/Components/AnalyticsReferers.md index 24318cf..2bc6fd9 100644 --- a/docs/Models/Components/SalesReferers.md +++ b/docs/Models/Components/AnalyticsReferers.md @@ -1,4 +1,4 @@ -# SalesReferers +# AnalyticsReferers ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | | `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this referer | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this referer | | `sales` | *float* | :heavy_check_mark: | The number of sales from this referer | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this referer | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this referer | \ No newline at end of file diff --git a/docs/Models/Components/SalesTimeseries.md b/docs/Models/Components/AnalyticsTimeseries.md similarity index 65% rename from docs/Models/Components/SalesTimeseries.md rename to docs/Models/Components/AnalyticsTimeseries.md index 84e0feb..bac7562 100644 --- a/docs/Models/Components/SalesTimeseries.md +++ b/docs/Models/Components/AnalyticsTimeseries.md @@ -1,4 +1,4 @@ -# SalesTimeseries +# AnalyticsTimeseries ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | | `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks in the interval | +| `leads` | *float* | :heavy_check_mark: | The number of leads in the interval | | `sales` | *float* | :heavy_check_mark: | The number of sales in the interval | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales in the interval | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales in the interval | \ No newline at end of file diff --git a/docs/Models/Components/SalesTopLinks.md b/docs/Models/Components/AnalyticsTopLinks.md similarity index 83% rename from docs/Models/Components/SalesTopLinks.md rename to docs/Models/Components/AnalyticsTopLinks.md index 427b9aa..e6e9e94 100644 --- a/docs/Models/Components/SalesTopLinks.md +++ b/docs/Models/Components/AnalyticsTopLinks.md @@ -1,4 +1,4 @@ -# SalesTopLinks +# AnalyticsTopLinks ## Fields @@ -12,5 +12,7 @@ | `shortLink` | *string* | :heavy_check_mark: | The short link URL | | `url` | *string* | :heavy_check_mark: | The destination URL of the short link | | `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this link | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this link | | `sales` | *float* | :heavy_check_mark: | The number of sales from this link | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this link | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this link | \ No newline at end of file diff --git a/docs/Models/Components/SalesTopUrls.md b/docs/Models/Components/AnalyticsTopUrls.md similarity index 65% rename from docs/Models/Components/SalesTopUrls.md rename to docs/Models/Components/AnalyticsTopUrls.md index cb9730a..6c2490d 100644 --- a/docs/Models/Components/SalesTopUrls.md +++ b/docs/Models/Components/AnalyticsTopUrls.md @@ -1,4 +1,4 @@ -# SalesTopUrls +# AnalyticsTopUrls ## Fields @@ -6,5 +6,7 @@ | Field | Type | Required | Description | | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | | `url` | *string* | :heavy_check_mark: | The destination URL | +| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this URL | +| `leads` | *float* | :heavy_check_mark: | The number of leads from this URL | | `sales` | *float* | :heavy_check_mark: | The number of sales from this URL | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this URL | \ No newline at end of file +| `saleAmount` | *float* | :heavy_check_mark: | The total amount of sales from this URL | \ No newline at end of file diff --git a/docs/Models/Components/City.md b/docs/Models/Components/City.md new file mode 100644 index 0000000..5ce6b0a --- /dev/null +++ b/docs/Models/Components/City.md @@ -0,0 +1,8 @@ +# City + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Wildcard` | * | \ No newline at end of file diff --git a/docs/Models/Components/ClickEvent.md b/docs/Models/Components/ClickEvent.md new file mode 100644 index 0000000..f8fc852 --- /dev/null +++ b/docs/Models/Components/ClickEvent.md @@ -0,0 +1,23 @@ +# ClickEvent + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `event` | [Components\Event](../../Models/Components/Event.md) | :heavy_check_mark: | N/A | +| `timestamp` | *string* | :heavy_check_mark: | N/A | +| `clickId` | *string* | :heavy_check_mark: | N/A | +| `linkId` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `key` | *string* | :heavy_check_mark: | N/A | +| `url` | *string* | :heavy_check_mark: | N/A | +| `continent` | *string* | :heavy_check_mark: | N/A | +| `country` | *string* | :heavy_check_mark: | N/A | +| `city` | *string* | :heavy_check_mark: | N/A | +| `device` | *string* | :heavy_check_mark: | N/A | +| `browser` | *string* | :heavy_check_mark: | N/A | +| `os` | *string* | :heavy_check_mark: | N/A | +| `referer` | *string* | :heavy_check_mark: | N/A | +| `ip` | *string* | :heavy_check_mark: | N/A | +| `qr` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/ClickEvents.md b/docs/Models/Components/ClickEvents.md deleted file mode 100644 index 21401a4..0000000 --- a/docs/Models/Components/ClickEvents.md +++ /dev/null @@ -1,22 +0,0 @@ -# ClickEvents - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `timestamp` | *string* | :heavy_check_mark: | N/A | -| `clickId` | *string* | :heavy_check_mark: | N/A | -| `linkId` | *string* | :heavy_check_mark: | N/A | -| `domain` | *string* | :heavy_check_mark: | N/A | -| `key` | *string* | :heavy_check_mark: | N/A | -| `url` | *string* | :heavy_check_mark: | N/A | -| `continent` | *string* | :heavy_check_mark: | N/A | -| `country` | *string* | :heavy_check_mark: | N/A | -| `city` | *string* | :heavy_check_mark: | N/A | -| `device` | *string* | :heavy_check_mark: | N/A | -| `browser` | *string* | :heavy_check_mark: | N/A | -| `os` | *string* | :heavy_check_mark: | N/A | -| `referer` | *string* | :heavy_check_mark: | N/A | -| `ip` | *string* | :heavy_check_mark: | N/A | -| `qr` | *float* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/ClicksBrowsers.md b/docs/Models/Components/ClicksBrowsers.md deleted file mode 100644 index 3b3ade5..0000000 --- a/docs/Models/Components/ClicksBrowsers.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksBrowsers - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `browser` | *string* | :heavy_check_mark: | The name of the browser | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this browser | \ No newline at end of file diff --git a/docs/Models/Components/ClicksCities.md b/docs/Models/Components/ClicksCities.md deleted file mode 100644 index 89a659e..0000000 --- a/docs/Models/Components/ClicksCities.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClicksCities - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `city` | *string* | :heavy_check_mark: | The name of the city | -| `country` | [Components\ClicksCitiesCountry](../../Models/Components/ClicksCitiesCountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this city | \ No newline at end of file diff --git a/docs/Models/Components/ClicksCitiesCountry.md b/docs/Models/Components/ClicksCitiesCountry.md deleted file mode 100644 index 75d95ce..0000000 --- a/docs/Models/Components/ClicksCitiesCountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# ClicksCitiesCountry - -The 2-letter country code of the city: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `Af` | AF | -| `Al` | AL | -| `Dz` | DZ | -| `As` | AS | -| `Ad` | AD | -| `Ao` | AO | -| `Ai` | AI | -| `Aq` | AQ | -| `Ag` | AG | -| `Ar` | AR | -| `Am` | AM | -| `Aw` | AW | -| `Au` | AU | -| `At` | AT | -| `Az` | AZ | -| `Bs` | BS | -| `Bh` | BH | -| `Bd` | BD | -| `Bb` | BB | -| `By` | BY | -| `Be` | BE | -| `Bz` | BZ | -| `Bj` | BJ | -| `Bm` | BM | -| `Bt` | BT | -| `Bo` | BO | -| `Ba` | BA | -| `Bw` | BW | -| `Bv` | BV | -| `Br` | BR | -| `Io` | IO | -| `Bn` | BN | -| `Bg` | BG | -| `Bf` | BF | -| `Bi` | BI | -| `Kh` | KH | -| `Cm` | CM | -| `Ca` | CA | -| `Cv` | CV | -| `Ky` | KY | -| `Cf` | CF | -| `Td` | TD | -| `Cl` | CL | -| `Cn` | CN | -| `Cx` | CX | -| `Cc` | CC | -| `Co` | CO | -| `Km` | KM | -| `Cg` | CG | -| `Cd` | CD | -| `Ck` | CK | -| `Cr` | CR | -| `Ci` | CI | -| `Hr` | HR | -| `Cu` | CU | -| `Cy` | CY | -| `Cz` | CZ | -| `Dk` | DK | -| `Dj` | DJ | -| `Dm` | DM | -| `Do` | DO | -| `Ec` | EC | -| `Eg` | EG | -| `Sv` | SV | -| `Gq` | GQ | -| `Er` | ER | -| `Ee` | EE | -| `Et` | ET | -| `Fk` | FK | -| `Fo` | FO | -| `Fj` | FJ | -| `Fi` | FI | -| `Fr` | FR | -| `Gf` | GF | -| `Pf` | PF | -| `Tf` | TF | -| `Ga` | GA | -| `Gm` | GM | -| `Ge` | GE | -| `De` | DE | -| `Gh` | GH | -| `Gi` | GI | -| `Gr` | GR | -| `Gl` | GL | -| `Gd` | GD | -| `Gp` | GP | -| `Gu` | GU | -| `Gt` | GT | -| `Gn` | GN | -| `Gw` | GW | -| `Gy` | GY | -| `Ht` | HT | -| `Hm` | HM | -| `Va` | VA | -| `Hn` | HN | -| `Hk` | HK | -| `Hu` | HU | -| `Is` | IS | -| `In` | IN | -| `Id` | ID | -| `Ir` | IR | -| `Iq` | IQ | -| `Ie` | IE | -| `Il` | IL | -| `It` | IT | -| `Jm` | JM | -| `Jp` | JP | -| `Jo` | JO | -| `Kz` | KZ | -| `Ke` | KE | -| `Ki` | KI | -| `Kp` | KP | -| `Kr` | KR | -| `Kw` | KW | -| `Kg` | KG | -| `La` | LA | -| `Lv` | LV | -| `Lb` | LB | -| `Ls` | LS | -| `Lr` | LR | -| `Ly` | LY | -| `Li` | LI | -| `Lt` | LT | -| `Lu` | LU | -| `Mo` | MO | -| `Mg` | MG | -| `Mw` | MW | -| `My` | MY | -| `Mv` | MV | -| `Ml` | ML | -| `Mt` | MT | -| `Mh` | MH | -| `Mq` | MQ | -| `Mr` | MR | -| `Mu` | MU | -| `Yt` | YT | -| `Mx` | MX | -| `Fm` | FM | -| `Md` | MD | -| `Mc` | MC | -| `Mn` | MN | -| `Ms` | MS | -| `Ma` | MA | -| `Mz` | MZ | -| `Mm` | MM | -| `Na` | NA | -| `Nr` | NR | -| `Np` | NP | -| `Nl` | NL | -| `Nc` | NC | -| `Nz` | NZ | -| `Ni` | NI | -| `Ne` | NE | -| `Ng` | NG | -| `Nu` | NU | -| `Nf` | NF | -| `Mk` | MK | -| `Mp` | MP | -| `No` | NO | -| `Om` | OM | -| `Pk` | PK | -| `Pw` | PW | -| `Ps` | PS | -| `Pa` | PA | -| `Pg` | PG | -| `Py` | PY | -| `Pe` | PE | -| `Ph` | PH | -| `Pn` | PN | -| `Pl` | PL | -| `Pt` | PT | -| `Pr` | PR | -| `Qa` | QA | -| `Re` | RE | -| `Ro` | RO | -| `Ru` | RU | -| `Rw` | RW | -| `Sh` | SH | -| `Kn` | KN | -| `Lc` | LC | -| `Pm` | PM | -| `Vc` | VC | -| `Ws` | WS | -| `Sm` | SM | -| `St` | ST | -| `Sa` | SA | -| `Sn` | SN | -| `Sc` | SC | -| `Sl` | SL | -| `Sg` | SG | -| `Sk` | SK | -| `Si` | SI | -| `Sb` | SB | -| `So` | SO | -| `Za` | ZA | -| `Gs` | GS | -| `Es` | ES | -| `Lk` | LK | -| `Sd` | SD | -| `Sr` | SR | -| `Sj` | SJ | -| `Sz` | SZ | -| `Se` | SE | -| `Ch` | CH | -| `Sy` | SY | -| `Tw` | TW | -| `Tj` | TJ | -| `Tz` | TZ | -| `Th` | TH | -| `Tl` | TL | -| `Tg` | TG | -| `Tk` | TK | -| `To` | TO | -| `Tt` | TT | -| `Tn` | TN | -| `Tr` | TR | -| `Tm` | TM | -| `Tc` | TC | -| `Tv` | TV | -| `Ug` | UG | -| `Ua` | UA | -| `Ae` | AE | -| `Gb` | GB | -| `Us` | US | -| `Um` | UM | -| `Uy` | UY | -| `Uz` | UZ | -| `Vu` | VU | -| `Ve` | VE | -| `Vn` | VN | -| `Vg` | VG | -| `Vi` | VI | -| `Wf` | WF | -| `Eh` | EH | -| `Ye` | YE | -| `Zm` | ZM | -| `Zw` | ZW | -| `Ax` | AX | -| `Bq` | BQ | -| `Cw` | CW | -| `Gg` | GG | -| `Im` | IM | -| `Je` | JE | -| `Me` | ME | -| `Bl` | BL | -| `Mf` | MF | -| `Rs` | RS | -| `Sx` | SX | -| `Ss` | SS | -| `Xk` | XK | \ No newline at end of file diff --git a/docs/Models/Components/ClicksCount.md b/docs/Models/Components/ClicksCount.md deleted file mode 100644 index cd59d59..0000000 --- a/docs/Models/Components/ClicksCount.md +++ /dev/null @@ -1,8 +0,0 @@ -# ClicksCount - - -## Fields - -| Field | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `clicks` | *float* | :heavy_check_mark: | The total number of clicks | \ No newline at end of file diff --git a/docs/Models/Components/ClicksCountries.md b/docs/Models/Components/ClicksCountries.md deleted file mode 100644 index a5c1d01..0000000 --- a/docs/Models/Components/ClicksCountries.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksCountries - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [Components\Country](../../Models/Components/Country.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this country | \ No newline at end of file diff --git a/docs/Models/Components/ClicksDevices.md b/docs/Models/Components/ClicksDevices.md deleted file mode 100644 index 88acfc3..0000000 --- a/docs/Models/Components/ClicksDevices.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksDevices - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `device` | *string* | :heavy_check_mark: | The name of the device | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this device | \ No newline at end of file diff --git a/docs/Models/Components/ClicksOS.md b/docs/Models/Components/ClicksOS.md deleted file mode 100644 index 6fd3005..0000000 --- a/docs/Models/Components/ClicksOS.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksOS - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `os` | *string* | :heavy_check_mark: | The name of the OS | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this OS | \ No newline at end of file diff --git a/docs/Models/Components/ClicksReferers.md b/docs/Models/Components/ClicksReferers.md deleted file mode 100644 index 21e5b54..0000000 --- a/docs/Models/Components/ClicksReferers.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksReferers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this referer | \ No newline at end of file diff --git a/docs/Models/Components/ClicksTimeseries.md b/docs/Models/Components/ClicksTimeseries.md deleted file mode 100644 index c866ed5..0000000 --- a/docs/Models/Components/ClicksTimeseries.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksTimeseries - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks in the interval | \ No newline at end of file diff --git a/docs/Models/Components/ClicksTopLinks.md b/docs/Models/Components/ClicksTopLinks.md deleted file mode 100644 index b6153e1..0000000 --- a/docs/Models/Components/ClicksTopLinks.md +++ /dev/null @@ -1,15 +0,0 @@ -# ClicksTopLinks - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`link`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the short link | -| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | -| `domain` | *string* | :heavy_check_mark: | The domain of the short link | -| `key` | *string* | :heavy_check_mark: | The key of the short link | -| `shortLink` | *string* | :heavy_check_mark: | The short link URL | -| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | -| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this link | \ No newline at end of file diff --git a/docs/Models/Components/ClicksTopUrls.md b/docs/Models/Components/ClicksTopUrls.md deleted file mode 100644 index 96205d8..0000000 --- a/docs/Models/Components/ClicksTopUrls.md +++ /dev/null @@ -1,9 +0,0 @@ -# ClicksTopUrls - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `url` | *string* | :heavy_check_mark: | The destination URL | -| `clicks` | *float* | :heavy_check_mark: | The number of clicks from this URL | \ No newline at end of file diff --git a/docs/Models/Components/Event.md b/docs/Models/Components/Event.md new file mode 100644 index 0000000..3bb2277 --- /dev/null +++ b/docs/Models/Components/Event.md @@ -0,0 +1,8 @@ +# Event + + +## Values + +| Name | Value | +| ------- | ------- | +| `Click` | click | \ No newline at end of file diff --git a/docs/Models/Components/LeadsBrowsers.md b/docs/Models/Components/LeadsBrowsers.md deleted file mode 100644 index 16cb450..0000000 --- a/docs/Models/Components/LeadsBrowsers.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsBrowsers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | -| `browser` | *string* | :heavy_check_mark: | The name of the browser | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this browser | \ No newline at end of file diff --git a/docs/Models/Components/LeadsCities.md b/docs/Models/Components/LeadsCities.md deleted file mode 100644 index b7031d8..0000000 --- a/docs/Models/Components/LeadsCities.md +++ /dev/null @@ -1,10 +0,0 @@ -# LeadsCities - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `city` | *string* | :heavy_check_mark: | The name of the city | -| `country` | [Components\LeadsCitiesCountry](../../Models/Components/LeadsCitiesCountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this city | \ No newline at end of file diff --git a/docs/Models/Components/LeadsCitiesCountry.md b/docs/Models/Components/LeadsCitiesCountry.md deleted file mode 100644 index 84af83c..0000000 --- a/docs/Models/Components/LeadsCitiesCountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# LeadsCitiesCountry - -The 2-letter country code of the city: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `Af` | AF | -| `Al` | AL | -| `Dz` | DZ | -| `As` | AS | -| `Ad` | AD | -| `Ao` | AO | -| `Ai` | AI | -| `Aq` | AQ | -| `Ag` | AG | -| `Ar` | AR | -| `Am` | AM | -| `Aw` | AW | -| `Au` | AU | -| `At` | AT | -| `Az` | AZ | -| `Bs` | BS | -| `Bh` | BH | -| `Bd` | BD | -| `Bb` | BB | -| `By` | BY | -| `Be` | BE | -| `Bz` | BZ | -| `Bj` | BJ | -| `Bm` | BM | -| `Bt` | BT | -| `Bo` | BO | -| `Ba` | BA | -| `Bw` | BW | -| `Bv` | BV | -| `Br` | BR | -| `Io` | IO | -| `Bn` | BN | -| `Bg` | BG | -| `Bf` | BF | -| `Bi` | BI | -| `Kh` | KH | -| `Cm` | CM | -| `Ca` | CA | -| `Cv` | CV | -| `Ky` | KY | -| `Cf` | CF | -| `Td` | TD | -| `Cl` | CL | -| `Cn` | CN | -| `Cx` | CX | -| `Cc` | CC | -| `Co` | CO | -| `Km` | KM | -| `Cg` | CG | -| `Cd` | CD | -| `Ck` | CK | -| `Cr` | CR | -| `Ci` | CI | -| `Hr` | HR | -| `Cu` | CU | -| `Cy` | CY | -| `Cz` | CZ | -| `Dk` | DK | -| `Dj` | DJ | -| `Dm` | DM | -| `Do` | DO | -| `Ec` | EC | -| `Eg` | EG | -| `Sv` | SV | -| `Gq` | GQ | -| `Er` | ER | -| `Ee` | EE | -| `Et` | ET | -| `Fk` | FK | -| `Fo` | FO | -| `Fj` | FJ | -| `Fi` | FI | -| `Fr` | FR | -| `Gf` | GF | -| `Pf` | PF | -| `Tf` | TF | -| `Ga` | GA | -| `Gm` | GM | -| `Ge` | GE | -| `De` | DE | -| `Gh` | GH | -| `Gi` | GI | -| `Gr` | GR | -| `Gl` | GL | -| `Gd` | GD | -| `Gp` | GP | -| `Gu` | GU | -| `Gt` | GT | -| `Gn` | GN | -| `Gw` | GW | -| `Gy` | GY | -| `Ht` | HT | -| `Hm` | HM | -| `Va` | VA | -| `Hn` | HN | -| `Hk` | HK | -| `Hu` | HU | -| `Is` | IS | -| `In` | IN | -| `Id` | ID | -| `Ir` | IR | -| `Iq` | IQ | -| `Ie` | IE | -| `Il` | IL | -| `It` | IT | -| `Jm` | JM | -| `Jp` | JP | -| `Jo` | JO | -| `Kz` | KZ | -| `Ke` | KE | -| `Ki` | KI | -| `Kp` | KP | -| `Kr` | KR | -| `Kw` | KW | -| `Kg` | KG | -| `La` | LA | -| `Lv` | LV | -| `Lb` | LB | -| `Ls` | LS | -| `Lr` | LR | -| `Ly` | LY | -| `Li` | LI | -| `Lt` | LT | -| `Lu` | LU | -| `Mo` | MO | -| `Mg` | MG | -| `Mw` | MW | -| `My` | MY | -| `Mv` | MV | -| `Ml` | ML | -| `Mt` | MT | -| `Mh` | MH | -| `Mq` | MQ | -| `Mr` | MR | -| `Mu` | MU | -| `Yt` | YT | -| `Mx` | MX | -| `Fm` | FM | -| `Md` | MD | -| `Mc` | MC | -| `Mn` | MN | -| `Ms` | MS | -| `Ma` | MA | -| `Mz` | MZ | -| `Mm` | MM | -| `Na` | NA | -| `Nr` | NR | -| `Np` | NP | -| `Nl` | NL | -| `Nc` | NC | -| `Nz` | NZ | -| `Ni` | NI | -| `Ne` | NE | -| `Ng` | NG | -| `Nu` | NU | -| `Nf` | NF | -| `Mk` | MK | -| `Mp` | MP | -| `No` | NO | -| `Om` | OM | -| `Pk` | PK | -| `Pw` | PW | -| `Ps` | PS | -| `Pa` | PA | -| `Pg` | PG | -| `Py` | PY | -| `Pe` | PE | -| `Ph` | PH | -| `Pn` | PN | -| `Pl` | PL | -| `Pt` | PT | -| `Pr` | PR | -| `Qa` | QA | -| `Re` | RE | -| `Ro` | RO | -| `Ru` | RU | -| `Rw` | RW | -| `Sh` | SH | -| `Kn` | KN | -| `Lc` | LC | -| `Pm` | PM | -| `Vc` | VC | -| `Ws` | WS | -| `Sm` | SM | -| `St` | ST | -| `Sa` | SA | -| `Sn` | SN | -| `Sc` | SC | -| `Sl` | SL | -| `Sg` | SG | -| `Sk` | SK | -| `Si` | SI | -| `Sb` | SB | -| `So` | SO | -| `Za` | ZA | -| `Gs` | GS | -| `Es` | ES | -| `Lk` | LK | -| `Sd` | SD | -| `Sr` | SR | -| `Sj` | SJ | -| `Sz` | SZ | -| `Se` | SE | -| `Ch` | CH | -| `Sy` | SY | -| `Tw` | TW | -| `Tj` | TJ | -| `Tz` | TZ | -| `Th` | TH | -| `Tl` | TL | -| `Tg` | TG | -| `Tk` | TK | -| `To` | TO | -| `Tt` | TT | -| `Tn` | TN | -| `Tr` | TR | -| `Tm` | TM | -| `Tc` | TC | -| `Tv` | TV | -| `Ug` | UG | -| `Ua` | UA | -| `Ae` | AE | -| `Gb` | GB | -| `Us` | US | -| `Um` | UM | -| `Uy` | UY | -| `Uz` | UZ | -| `Vu` | VU | -| `Ve` | VE | -| `Vn` | VN | -| `Vg` | VG | -| `Vi` | VI | -| `Wf` | WF | -| `Eh` | EH | -| `Ye` | YE | -| `Zm` | ZM | -| `Zw` | ZW | -| `Ax` | AX | -| `Bq` | BQ | -| `Cw` | CW | -| `Gg` | GG | -| `Im` | IM | -| `Je` | JE | -| `Me` | ME | -| `Bl` | BL | -| `Mf` | MF | -| `Rs` | RS | -| `Sx` | SX | -| `Ss` | SS | -| `Xk` | XK | \ No newline at end of file diff --git a/docs/Models/Components/LeadsCount.md b/docs/Models/Components/LeadsCount.md deleted file mode 100644 index 1eb7ab4..0000000 --- a/docs/Models/Components/LeadsCount.md +++ /dev/null @@ -1,8 +0,0 @@ -# LeadsCount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `leads` | *float* | :heavy_check_mark: | The total number of leads | \ No newline at end of file diff --git a/docs/Models/Components/LeadsCountries.md b/docs/Models/Components/LeadsCountries.md deleted file mode 100644 index 0bbe050..0000000 --- a/docs/Models/Components/LeadsCountries.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsCountries - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `country` | [Components\LeadsCountriesCountry](../../Models/Components/LeadsCountriesCountry.md) | :heavy_check_mark: | The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this country | \ No newline at end of file diff --git a/docs/Models/Components/LeadsCountriesCountry.md b/docs/Models/Components/LeadsCountriesCountry.md deleted file mode 100644 index 922393e..0000000 --- a/docs/Models/Components/LeadsCountriesCountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# LeadsCountriesCountry - -The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `Af` | AF | -| `Al` | AL | -| `Dz` | DZ | -| `As` | AS | -| `Ad` | AD | -| `Ao` | AO | -| `Ai` | AI | -| `Aq` | AQ | -| `Ag` | AG | -| `Ar` | AR | -| `Am` | AM | -| `Aw` | AW | -| `Au` | AU | -| `At` | AT | -| `Az` | AZ | -| `Bs` | BS | -| `Bh` | BH | -| `Bd` | BD | -| `Bb` | BB | -| `By` | BY | -| `Be` | BE | -| `Bz` | BZ | -| `Bj` | BJ | -| `Bm` | BM | -| `Bt` | BT | -| `Bo` | BO | -| `Ba` | BA | -| `Bw` | BW | -| `Bv` | BV | -| `Br` | BR | -| `Io` | IO | -| `Bn` | BN | -| `Bg` | BG | -| `Bf` | BF | -| `Bi` | BI | -| `Kh` | KH | -| `Cm` | CM | -| `Ca` | CA | -| `Cv` | CV | -| `Ky` | KY | -| `Cf` | CF | -| `Td` | TD | -| `Cl` | CL | -| `Cn` | CN | -| `Cx` | CX | -| `Cc` | CC | -| `Co` | CO | -| `Km` | KM | -| `Cg` | CG | -| `Cd` | CD | -| `Ck` | CK | -| `Cr` | CR | -| `Ci` | CI | -| `Hr` | HR | -| `Cu` | CU | -| `Cy` | CY | -| `Cz` | CZ | -| `Dk` | DK | -| `Dj` | DJ | -| `Dm` | DM | -| `Do` | DO | -| `Ec` | EC | -| `Eg` | EG | -| `Sv` | SV | -| `Gq` | GQ | -| `Er` | ER | -| `Ee` | EE | -| `Et` | ET | -| `Fk` | FK | -| `Fo` | FO | -| `Fj` | FJ | -| `Fi` | FI | -| `Fr` | FR | -| `Gf` | GF | -| `Pf` | PF | -| `Tf` | TF | -| `Ga` | GA | -| `Gm` | GM | -| `Ge` | GE | -| `De` | DE | -| `Gh` | GH | -| `Gi` | GI | -| `Gr` | GR | -| `Gl` | GL | -| `Gd` | GD | -| `Gp` | GP | -| `Gu` | GU | -| `Gt` | GT | -| `Gn` | GN | -| `Gw` | GW | -| `Gy` | GY | -| `Ht` | HT | -| `Hm` | HM | -| `Va` | VA | -| `Hn` | HN | -| `Hk` | HK | -| `Hu` | HU | -| `Is` | IS | -| `In` | IN | -| `Id` | ID | -| `Ir` | IR | -| `Iq` | IQ | -| `Ie` | IE | -| `Il` | IL | -| `It` | IT | -| `Jm` | JM | -| `Jp` | JP | -| `Jo` | JO | -| `Kz` | KZ | -| `Ke` | KE | -| `Ki` | KI | -| `Kp` | KP | -| `Kr` | KR | -| `Kw` | KW | -| `Kg` | KG | -| `La` | LA | -| `Lv` | LV | -| `Lb` | LB | -| `Ls` | LS | -| `Lr` | LR | -| `Ly` | LY | -| `Li` | LI | -| `Lt` | LT | -| `Lu` | LU | -| `Mo` | MO | -| `Mg` | MG | -| `Mw` | MW | -| `My` | MY | -| `Mv` | MV | -| `Ml` | ML | -| `Mt` | MT | -| `Mh` | MH | -| `Mq` | MQ | -| `Mr` | MR | -| `Mu` | MU | -| `Yt` | YT | -| `Mx` | MX | -| `Fm` | FM | -| `Md` | MD | -| `Mc` | MC | -| `Mn` | MN | -| `Ms` | MS | -| `Ma` | MA | -| `Mz` | MZ | -| `Mm` | MM | -| `Na` | NA | -| `Nr` | NR | -| `Np` | NP | -| `Nl` | NL | -| `Nc` | NC | -| `Nz` | NZ | -| `Ni` | NI | -| `Ne` | NE | -| `Ng` | NG | -| `Nu` | NU | -| `Nf` | NF | -| `Mk` | MK | -| `Mp` | MP | -| `No` | NO | -| `Om` | OM | -| `Pk` | PK | -| `Pw` | PW | -| `Ps` | PS | -| `Pa` | PA | -| `Pg` | PG | -| `Py` | PY | -| `Pe` | PE | -| `Ph` | PH | -| `Pn` | PN | -| `Pl` | PL | -| `Pt` | PT | -| `Pr` | PR | -| `Qa` | QA | -| `Re` | RE | -| `Ro` | RO | -| `Ru` | RU | -| `Rw` | RW | -| `Sh` | SH | -| `Kn` | KN | -| `Lc` | LC | -| `Pm` | PM | -| `Vc` | VC | -| `Ws` | WS | -| `Sm` | SM | -| `St` | ST | -| `Sa` | SA | -| `Sn` | SN | -| `Sc` | SC | -| `Sl` | SL | -| `Sg` | SG | -| `Sk` | SK | -| `Si` | SI | -| `Sb` | SB | -| `So` | SO | -| `Za` | ZA | -| `Gs` | GS | -| `Es` | ES | -| `Lk` | LK | -| `Sd` | SD | -| `Sr` | SR | -| `Sj` | SJ | -| `Sz` | SZ | -| `Se` | SE | -| `Ch` | CH | -| `Sy` | SY | -| `Tw` | TW | -| `Tj` | TJ | -| `Tz` | TZ | -| `Th` | TH | -| `Tl` | TL | -| `Tg` | TG | -| `Tk` | TK | -| `To` | TO | -| `Tt` | TT | -| `Tn` | TN | -| `Tr` | TR | -| `Tm` | TM | -| `Tc` | TC | -| `Tv` | TV | -| `Ug` | UG | -| `Ua` | UA | -| `Ae` | AE | -| `Gb` | GB | -| `Us` | US | -| `Um` | UM | -| `Uy` | UY | -| `Uz` | UZ | -| `Vu` | VU | -| `Ve` | VE | -| `Vn` | VN | -| `Vg` | VG | -| `Vi` | VI | -| `Wf` | WF | -| `Eh` | EH | -| `Ye` | YE | -| `Zm` | ZM | -| `Zw` | ZW | -| `Ax` | AX | -| `Bq` | BQ | -| `Cw` | CW | -| `Gg` | GG | -| `Im` | IM | -| `Je` | JE | -| `Me` | ME | -| `Bl` | BL | -| `Mf` | MF | -| `Rs` | RS | -| `Sx` | SX | -| `Ss` | SS | -| `Xk` | XK | \ No newline at end of file diff --git a/docs/Models/Components/LeadsDevices.md b/docs/Models/Components/LeadsDevices.md deleted file mode 100644 index bf30d16..0000000 --- a/docs/Models/Components/LeadsDevices.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsDevices - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `device` | *string* | :heavy_check_mark: | The name of the device | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this device | \ No newline at end of file diff --git a/docs/Models/Components/LeadsOS.md b/docs/Models/Components/LeadsOS.md deleted file mode 100644 index 0b139bb..0000000 --- a/docs/Models/Components/LeadsOS.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsOS - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `os` | *string* | :heavy_check_mark: | The name of the OS | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this OS | \ No newline at end of file diff --git a/docs/Models/Components/LeadsReferers.md b/docs/Models/Components/LeadsReferers.md deleted file mode 100644 index 483644e..0000000 --- a/docs/Models/Components/LeadsReferers.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsReferers - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this referer | \ No newline at end of file diff --git a/docs/Models/Components/LeadsTimeseries.md b/docs/Models/Components/LeadsTimeseries.md deleted file mode 100644 index 57ad6f8..0000000 --- a/docs/Models/Components/LeadsTimeseries.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsTimeseries - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `start` | *string* | :heavy_check_mark: | The starting timestamp of the interval | -| `leads` | *float* | :heavy_check_mark: | The number of leads in the interval | \ No newline at end of file diff --git a/docs/Models/Components/LeadsTopLinks.md b/docs/Models/Components/LeadsTopLinks.md deleted file mode 100644 index 1881f2d..0000000 --- a/docs/Models/Components/LeadsTopLinks.md +++ /dev/null @@ -1,15 +0,0 @@ -# LeadsTopLinks - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| ~~`link`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the short link | -| `id` | *string* | :heavy_check_mark: | The unique ID of the short link | -| `domain` | *string* | :heavy_check_mark: | The domain of the short link | -| `key` | *string* | :heavy_check_mark: | The key of the short link | -| `shortLink` | *string* | :heavy_check_mark: | The short link URL | -| `url` | *string* | :heavy_check_mark: | The destination URL of the short link | -| `createdAt` | *string* | :heavy_check_mark: | The creation timestamp of the short link | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this link | \ No newline at end of file diff --git a/docs/Models/Components/LeadsTopUrls.md b/docs/Models/Components/LeadsTopUrls.md deleted file mode 100644 index b56d122..0000000 --- a/docs/Models/Components/LeadsTopUrls.md +++ /dev/null @@ -1,9 +0,0 @@ -# LeadsTopUrls - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `url` | *string* | :heavy_check_mark: | The destination URL | -| `leads` | *float* | :heavy_check_mark: | The number of leads from this URL | \ No newline at end of file diff --git a/docs/Models/Components/SalesCities.md b/docs/Models/Components/SalesCities.md deleted file mode 100644 index 978d243..0000000 --- a/docs/Models/Components/SalesCities.md +++ /dev/null @@ -1,11 +0,0 @@ -# SalesCities - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `city` | *string* | :heavy_check_mark: | The name of the city | -| `country` | [Components\SalesCitiesCountry](../../Models/Components/SalesCitiesCountry.md) | :heavy_check_mark: | The 2-letter country code of the city: https://d.to/geo | -| `sales` | *float* | :heavy_check_mark: | The number of sales from this city | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales from this city | \ No newline at end of file diff --git a/docs/Models/Components/SalesCount.md b/docs/Models/Components/SalesCount.md deleted file mode 100644 index 250714d..0000000 --- a/docs/Models/Components/SalesCount.md +++ /dev/null @@ -1,9 +0,0 @@ -# SalesCount - - -## Fields - -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `sales` | *float* | :heavy_check_mark: | The total number of sales | -| `amount` | *float* | :heavy_check_mark: | The total amount of sales | \ No newline at end of file diff --git a/docs/Models/Components/SalesCountriesCountry.md b/docs/Models/Components/SalesCountriesCountry.md deleted file mode 100644 index f1d905b..0000000 --- a/docs/Models/Components/SalesCountriesCountry.md +++ /dev/null @@ -1,259 +0,0 @@ -# SalesCountriesCountry - -The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo - - -## Values - -| Name | Value | -| ----- | ----- | -| `Af` | AF | -| `Al` | AL | -| `Dz` | DZ | -| `As` | AS | -| `Ad` | AD | -| `Ao` | AO | -| `Ai` | AI | -| `Aq` | AQ | -| `Ag` | AG | -| `Ar` | AR | -| `Am` | AM | -| `Aw` | AW | -| `Au` | AU | -| `At` | AT | -| `Az` | AZ | -| `Bs` | BS | -| `Bh` | BH | -| `Bd` | BD | -| `Bb` | BB | -| `By` | BY | -| `Be` | BE | -| `Bz` | BZ | -| `Bj` | BJ | -| `Bm` | BM | -| `Bt` | BT | -| `Bo` | BO | -| `Ba` | BA | -| `Bw` | BW | -| `Bv` | BV | -| `Br` | BR | -| `Io` | IO | -| `Bn` | BN | -| `Bg` | BG | -| `Bf` | BF | -| `Bi` | BI | -| `Kh` | KH | -| `Cm` | CM | -| `Ca` | CA | -| `Cv` | CV | -| `Ky` | KY | -| `Cf` | CF | -| `Td` | TD | -| `Cl` | CL | -| `Cn` | CN | -| `Cx` | CX | -| `Cc` | CC | -| `Co` | CO | -| `Km` | KM | -| `Cg` | CG | -| `Cd` | CD | -| `Ck` | CK | -| `Cr` | CR | -| `Ci` | CI | -| `Hr` | HR | -| `Cu` | CU | -| `Cy` | CY | -| `Cz` | CZ | -| `Dk` | DK | -| `Dj` | DJ | -| `Dm` | DM | -| `Do` | DO | -| `Ec` | EC | -| `Eg` | EG | -| `Sv` | SV | -| `Gq` | GQ | -| `Er` | ER | -| `Ee` | EE | -| `Et` | ET | -| `Fk` | FK | -| `Fo` | FO | -| `Fj` | FJ | -| `Fi` | FI | -| `Fr` | FR | -| `Gf` | GF | -| `Pf` | PF | -| `Tf` | TF | -| `Ga` | GA | -| `Gm` | GM | -| `Ge` | GE | -| `De` | DE | -| `Gh` | GH | -| `Gi` | GI | -| `Gr` | GR | -| `Gl` | GL | -| `Gd` | GD | -| `Gp` | GP | -| `Gu` | GU | -| `Gt` | GT | -| `Gn` | GN | -| `Gw` | GW | -| `Gy` | GY | -| `Ht` | HT | -| `Hm` | HM | -| `Va` | VA | -| `Hn` | HN | -| `Hk` | HK | -| `Hu` | HU | -| `Is` | IS | -| `In` | IN | -| `Id` | ID | -| `Ir` | IR | -| `Iq` | IQ | -| `Ie` | IE | -| `Il` | IL | -| `It` | IT | -| `Jm` | JM | -| `Jp` | JP | -| `Jo` | JO | -| `Kz` | KZ | -| `Ke` | KE | -| `Ki` | KI | -| `Kp` | KP | -| `Kr` | KR | -| `Kw` | KW | -| `Kg` | KG | -| `La` | LA | -| `Lv` | LV | -| `Lb` | LB | -| `Ls` | LS | -| `Lr` | LR | -| `Ly` | LY | -| `Li` | LI | -| `Lt` | LT | -| `Lu` | LU | -| `Mo` | MO | -| `Mg` | MG | -| `Mw` | MW | -| `My` | MY | -| `Mv` | MV | -| `Ml` | ML | -| `Mt` | MT | -| `Mh` | MH | -| `Mq` | MQ | -| `Mr` | MR | -| `Mu` | MU | -| `Yt` | YT | -| `Mx` | MX | -| `Fm` | FM | -| `Md` | MD | -| `Mc` | MC | -| `Mn` | MN | -| `Ms` | MS | -| `Ma` | MA | -| `Mz` | MZ | -| `Mm` | MM | -| `Na` | NA | -| `Nr` | NR | -| `Np` | NP | -| `Nl` | NL | -| `Nc` | NC | -| `Nz` | NZ | -| `Ni` | NI | -| `Ne` | NE | -| `Ng` | NG | -| `Nu` | NU | -| `Nf` | NF | -| `Mk` | MK | -| `Mp` | MP | -| `No` | NO | -| `Om` | OM | -| `Pk` | PK | -| `Pw` | PW | -| `Ps` | PS | -| `Pa` | PA | -| `Pg` | PG | -| `Py` | PY | -| `Pe` | PE | -| `Ph` | PH | -| `Pn` | PN | -| `Pl` | PL | -| `Pt` | PT | -| `Pr` | PR | -| `Qa` | QA | -| `Re` | RE | -| `Ro` | RO | -| `Ru` | RU | -| `Rw` | RW | -| `Sh` | SH | -| `Kn` | KN | -| `Lc` | LC | -| `Pm` | PM | -| `Vc` | VC | -| `Ws` | WS | -| `Sm` | SM | -| `St` | ST | -| `Sa` | SA | -| `Sn` | SN | -| `Sc` | SC | -| `Sl` | SL | -| `Sg` | SG | -| `Sk` | SK | -| `Si` | SI | -| `Sb` | SB | -| `So` | SO | -| `Za` | ZA | -| `Gs` | GS | -| `Es` | ES | -| `Lk` | LK | -| `Sd` | SD | -| `Sr` | SR | -| `Sj` | SJ | -| `Sz` | SZ | -| `Se` | SE | -| `Ch` | CH | -| `Sy` | SY | -| `Tw` | TW | -| `Tj` | TJ | -| `Tz` | TZ | -| `Th` | TH | -| `Tl` | TL | -| `Tg` | TG | -| `Tk` | TK | -| `To` | TO | -| `Tt` | TT | -| `Tn` | TN | -| `Tr` | TR | -| `Tm` | TM | -| `Tc` | TC | -| `Tv` | TV | -| `Ug` | UG | -| `Ua` | UA | -| `Ae` | AE | -| `Gb` | GB | -| `Us` | US | -| `Um` | UM | -| `Uy` | UY | -| `Uz` | UZ | -| `Vu` | VU | -| `Ve` | VE | -| `Vn` | VN | -| `Vg` | VG | -| `Vi` | VI | -| `Wf` | WF | -| `Eh` | EH | -| `Ye` | YE | -| `Zm` | ZM | -| `Zw` | ZW | -| `Ax` | AX | -| `Bq` | BQ | -| `Cw` | CW | -| `Gg` | GG | -| `Im` | IM | -| `Je` | JE | -| `Me` | ME | -| `Bl` | BL | -| `Mf` | MF | -| `Rs` | RS | -| `Sx` | SX | -| `Ss` | SS | -| `Xk` | XK | \ No newline at end of file diff --git a/docs/Models/Operations/BulkDeleteLinksRequest.md b/docs/Models/Operations/BulkDeleteLinksRequest.md new file mode 100644 index 0000000..d104ccd --- /dev/null +++ b/docs/Models/Operations/BulkDeleteLinksRequest.md @@ -0,0 +1,8 @@ +# BulkDeleteLinksRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `linkIds` | *string* | :heavy_check_mark: | Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. | clux0rgak00011...,clux0rgak00022... | \ No newline at end of file diff --git a/docs/Models/Operations/BulkDeleteLinksResponse.md b/docs/Models/Operations/BulkDeleteLinksResponse.md new file mode 100644 index 0000000..23045c6 --- /dev/null +++ b/docs/Models/Operations/BulkDeleteLinksResponse.md @@ -0,0 +1,11 @@ +# BulkDeleteLinksResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\BulkDeleteLinksResponseBody](../../Models/Operations/BulkDeleteLinksResponseBody.md) | :heavy_minus_sign: | The deleted links count. | \ No newline at end of file diff --git a/docs/Models/Operations/BulkDeleteLinksResponseBody.md b/docs/Models/Operations/BulkDeleteLinksResponseBody.md new file mode 100644 index 0000000..46619a5 --- /dev/null +++ b/docs/Models/Operations/BulkDeleteLinksResponseBody.md @@ -0,0 +1,10 @@ +# BulkDeleteLinksResponseBody + +The deleted links count. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `deletedCount` | *float* | :heavy_check_mark: | The number of links deleted. | \ No newline at end of file diff --git a/docs/Models/Operations/Click.md b/docs/Models/Operations/Click.md new file mode 100644 index 0000000..3047c04 --- /dev/null +++ b/docs/Models/Operations/Click.md @@ -0,0 +1,8 @@ +# Click + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/Customer.md b/docs/Models/Operations/Customer.md new file mode 100644 index 0000000..f0fa1b9 --- /dev/null +++ b/docs/Models/Operations/Customer.md @@ -0,0 +1,11 @@ +# Customer + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `avatar` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsResponse.md b/docs/Models/Operations/ListEventsResponse.md index c6dbbc0..34e3464 100644 --- a/docs/Models/Operations/ListEventsResponse.md +++ b/docs/Models/Operations/ListEventsResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `clickEvents` | array<[Components\ClickEvents](../../Models/Components/ClickEvents.md)> | :heavy_minus_sign: | A list of events | \ No newline at end of file +| `clickEvents` | array<[Components\ClickEvent](../../Models/Components/ClickEvent.md)> | :heavy_minus_sign: | A list of events | \ No newline at end of file diff --git a/docs/Models/Operations/RetrieveAnalyticsResponse.md b/docs/Models/Operations/RetrieveAnalyticsResponse.md index 02c3fe3..55af42a 100644 --- a/docs/Models/Operations/RetrieveAnalyticsResponse.md +++ b/docs/Models/Operations/RetrieveAnalyticsResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `oneOf` | [Components\ClicksCount\|array\|Components\LeadsCount\|Components\SalesCount\|null](../../Models/Operations/RetrieveAnalyticsResponseBody.md) | :heavy_minus_sign: | Analytics data | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `oneOf` | [Components\AnalyticsCount\|array\|null](../../Models/Operations/RetrieveAnalyticsResponseBody.md) | :heavy_minus_sign: | Analytics data | \ No newline at end of file diff --git a/docs/Models/Operations/RetrieveAnalyticsResponseBody.md b/docs/Models/Operations/RetrieveAnalyticsResponseBody.md index c164d5d..9e32855 100644 --- a/docs/Models/Operations/RetrieveAnalyticsResponseBody.md +++ b/docs/Models/Operations/RetrieveAnalyticsResponseBody.md @@ -5,130 +5,10 @@ Analytics data ## Supported Types -### `Components\ClicksCount` +### `Components\AnalyticsCount` ```php -Components\ClicksCount $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `Components\LeadsCount` - -```php -Components\LeadsCount $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `array` - -```php -array $value = /* values here */ -``` - -### `Components\SalesCount` - -```php -Components\SalesCount $value = /* values here */ +Components\AnalyticsCount $value = /* values here */ ``` ### `array` diff --git a/docs/Models/Operations/Sale.md b/docs/Models/Operations/Sale.md new file mode 100644 index 0000000..bdb75f0 --- /dev/null +++ b/docs/Models/Operations/Sale.md @@ -0,0 +1,12 @@ +# Sale + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `amount` | *float* | :heavy_check_mark: | N/A | +| `currency` | *string* | :heavy_check_mark: | N/A | +| `paymentProcessor` | *string* | :heavy_check_mark: | N/A | +| `invoiceId` | *string* | :heavy_check_mark: | N/A | +| `metadata` | array | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/SortBy.md b/docs/Models/Operations/SortBy.md index c2ebb07..c11d65c 100644 --- a/docs/Models/Operations/SortBy.md +++ b/docs/Models/Operations/SortBy.md @@ -5,5 +5,4 @@ | Name | Value | | ----------- | ----------- | -| `Timestamp` | timestamp | -| `Amount` | amount | \ No newline at end of file +| `Timestamp` | timestamp | \ No newline at end of file diff --git a/docs/Models/Operations/TrackLeadResponseBody.md b/docs/Models/Operations/TrackLeadResponseBody.md index 60bde35..849e9b4 100644 --- a/docs/Models/Operations/TrackLeadResponseBody.md +++ b/docs/Models/Operations/TrackLeadResponseBody.md @@ -5,12 +5,7 @@ A lead was tracked. ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `clickId` | *string* | :heavy_check_mark: | N/A | -| `eventName` | *string* | :heavy_check_mark: | N/A | -| `customerId` | *string* | :heavy_check_mark: | N/A | -| `customerName` | *string* | :heavy_check_mark: | N/A | -| `customerEmail` | *string* | :heavy_check_mark: | N/A | -| `customerAvatar` | *string* | :heavy_check_mark: | N/A | -| `metadata` | array | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `click` | [Operations\Click](../../Models/Operations/Click.md) | :heavy_check_mark: | N/A | +| `customer` | [Operations\Customer](../../Models/Operations/Customer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/TrackSaleCustomer.md b/docs/Models/Operations/TrackSaleCustomer.md new file mode 100644 index 0000000..932f3d6 --- /dev/null +++ b/docs/Models/Operations/TrackSaleCustomer.md @@ -0,0 +1,11 @@ +# TrackSaleCustomer + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `email` | *string* | :heavy_check_mark: | N/A | +| `avatar` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/TrackSaleResponseBody.md b/docs/Models/Operations/TrackSaleResponseBody.md index 5f4e0eb..38919b3 100644 --- a/docs/Models/Operations/TrackSaleResponseBody.md +++ b/docs/Models/Operations/TrackSaleResponseBody.md @@ -5,12 +5,8 @@ A sale was tracked. ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `eventName` | *string* | :heavy_check_mark: | N/A | -| `customerId` | *string* | :heavy_check_mark: | N/A | -| `amount` | *float* | :heavy_check_mark: | N/A | -| `paymentProcessor` | *string* | :heavy_check_mark: | N/A | -| `invoiceId` | *string* | :heavy_check_mark: | N/A | -| `currency` | *string* | :heavy_check_mark: | N/A | -| `metadata` | array | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `eventName` | *string* | :heavy_check_mark: | N/A | +| `customer` | [Operations\TrackSaleCustomer](../../Models/Operations/TrackSaleCustomer.md) | :heavy_check_mark: | N/A | +| `sale` | [Operations\Sale](../../Models/Operations/Sale.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index a7f952a..533d900 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -51,7 +51,7 @@ try { page: 9174.16, limit: 6355.32, order: Operations\Order::Desc, - sortBy: Operations\SortBy::Amount, + sortBy: Operations\SortBy::Timestamp, ); $response = $sdk->events->list($request); diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 5d133cd..efb7ff0 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -11,6 +11,7 @@ * [delete](#delete) - Delete a link * [update](#update) - Update a link * [createMany](#createmany) - Bulk create links +* [deleteMany](#deletemany) - Bulk delete links * [updateMany](#updatemany) - Bulk update links * [upsert](#upsert) - Upsert a link @@ -1018,6 +1019,63 @@ try { | Dub\Models\Errors.SDKException | 4xx-5xx | */* | +## deleteMany + +Bulk delete up to 100 links for the authenticated workspace. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Components; + +$security = new Components\Security(); +$security->token = 'DUB_API_KEY'; + +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); + +try { + + $response = $sdk->links->deleteMany('clux0rgak00011...,clux0rgak00022...'); + + if ($response->object !== null) { + // handle response + } +} catch (Throwable $e) { + // handle exception +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `linkIds` | *string* | :heavy_check_mark: | Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored. | clux0rgak00011...,clux0rgak00022... | + +### Response + +**[?Operations\BulkDeleteLinksResponse](../../Models/Operations/BulkDeleteLinksResponse.md)** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Errors\BadRequest | 400 | application/json | +| Errors\Unauthorized | 401 | application/json | +| Errors\Forbidden | 403 | application/json | +| Errors\NotFound | 404 | application/json | +| Errors\Conflict | 409 | application/json | +| Errors\InviteExpired | 410 | application/json | +| Errors\UnprocessableEntity | 422 | application/json | +| Errors\RateLimitExceeded | 429 | application/json | +| Errors\InternalServerError | 500 | application/json | +| Dub\Models\Errors.SDKException | 4xx-5xx | */* | + + ## updateMany Bulk update up to 100 links with the same data for the authenticated workspace. diff --git a/src/Analytics.php b/src/Analytics.php index fab8025..2b0e6d5 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -51,7 +51,7 @@ public function retrieve( if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\ClicksCount|array<\Dub\Models\Components\ClicksTimeseries>|array<\Dub\Models\Components\ClicksCountries>|array<\Dub\Models\Components\ClicksCities>|array<\Dub\Models\Components\ClicksDevices>|array<\Dub\Models\Components\ClicksBrowsers>|array<\Dub\Models\Components\ClicksOS>|array<\Dub\Models\Components\ClicksReferers>|array<\Dub\Models\Components\ClicksTopLinks>|array<\Dub\Models\Components\ClicksTopUrls>|\Dub\Models\Components\LeadsCount|array<\Dub\Models\Components\LeadsTimeseries>|array<\Dub\Models\Components\LeadsCountries>|array<\Dub\Models\Components\LeadsCities>|array<\Dub\Models\Components\LeadsDevices>|array<\Dub\Models\Components\LeadsBrowsers>|array<\Dub\Models\Components\LeadsOS>|array<\Dub\Models\Components\LeadsReferers>|array<\Dub\Models\Components\LeadsTopLinks>|array<\Dub\Models\Components\LeadsTopUrls>|\Dub\Models\Components\SalesCount|array<\Dub\Models\Components\SalesTimeseries>|array<\Dub\Models\Components\SalesCountries>|array<\Dub\Models\Components\SalesCities>|array<\Dub\Models\Components\SalesDevices>|array<\Dub\Models\Components\SalesBrowsers>|array<\Dub\Models\Components\SalesOS>|array<\Dub\Models\Components\SalesReferers>|array<\Dub\Models\Components\SalesTopLinks>|array<\Dub\Models\Components\SalesTopUrls>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\AnalyticsCount|array<\Dub\Models\Components\AnalyticsTimeseries>|array<\Dub\Models\Components\AnalyticsCountries>|array<\Dub\Models\Components\AnalyticsCities>|array<\Dub\Models\Components\AnalyticsDevices>|array<\Dub\Models\Components\AnalyticsBrowsers>|array<\Dub\Models\Components\AnalyticsOS>|array<\Dub\Models\Components\AnalyticsReferers>|array<\Dub\Models\Components\AnalyticsTopLinks>|array<\Dub\Models\Components\AnalyticsTopUrls>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\RetrieveAnalyticsResponse( statusCode: $statusCode, contentType: $contentType, @@ -66,7 +66,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -74,7 +74,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -82,7 +82,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -90,7 +90,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -98,7 +98,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -106,7 +106,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -114,7 +114,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -122,7 +122,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -130,7 +130,7 @@ public function retrieve( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Domains.php b/src/Domains.php index 7d46390..096a1e1 100644 --- a/src/Domains.php +++ b/src/Domains.php @@ -78,7 +78,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -86,7 +86,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -94,7 +94,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -102,7 +102,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -110,7 +110,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -118,7 +118,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -126,7 +126,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -134,7 +134,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -142,7 +142,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -199,7 +199,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -207,7 +207,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -215,7 +215,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -223,7 +223,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -231,7 +231,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -239,7 +239,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -247,7 +247,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -255,7 +255,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -263,7 +263,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -319,7 +319,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -327,7 +327,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -335,7 +335,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -343,7 +343,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -351,7 +351,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -359,7 +359,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -367,7 +367,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -375,7 +375,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -383,7 +383,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -446,7 +446,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -454,7 +454,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -462,7 +462,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -470,7 +470,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -478,7 +478,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -486,7 +486,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -494,7 +494,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -502,7 +502,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -510,7 +510,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Events.php b/src/Events.php index a4115b1..0068750 100644 --- a/src/Events.php +++ b/src/Events.php @@ -51,7 +51,7 @@ public function list( if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\ClickEvents>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\ClickEvent>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\ListEventsResponse( statusCode: $statusCode, contentType: $contentType, @@ -66,7 +66,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -74,7 +74,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -82,7 +82,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -90,7 +90,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -98,7 +98,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -106,7 +106,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -114,7 +114,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -122,7 +122,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -130,7 +130,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Links.php b/src/Links.php index fea30c3..4cd45b7 100644 --- a/src/Links.php +++ b/src/Links.php @@ -66,7 +66,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -74,7 +74,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -82,7 +82,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -90,7 +90,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -98,7 +98,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -106,7 +106,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -114,7 +114,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -122,7 +122,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -130,7 +130,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -187,7 +187,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -195,7 +195,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -203,7 +203,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -211,7 +211,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -219,7 +219,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -227,7 +227,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -235,7 +235,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -243,7 +243,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -251,7 +251,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -305,7 +305,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -313,7 +313,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -321,7 +321,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -329,7 +329,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -337,7 +337,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -345,7 +345,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -353,7 +353,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -361,7 +361,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -369,7 +369,7 @@ public function count( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -435,7 +435,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -443,7 +443,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -451,7 +451,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -459,7 +459,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -467,7 +467,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -475,7 +475,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -483,7 +483,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -491,7 +491,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -499,7 +499,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -555,7 +555,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -563,7 +563,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -571,7 +571,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -579,7 +579,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -587,7 +587,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -595,7 +595,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -603,7 +603,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -611,7 +611,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -619,7 +619,7 @@ public function delete( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -682,7 +682,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -690,7 +690,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -698,7 +698,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -706,7 +706,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -714,7 +714,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -722,7 +722,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -730,7 +730,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -738,7 +738,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -746,7 +746,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -803,7 +803,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -811,7 +811,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -819,7 +819,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -827,7 +827,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -835,7 +835,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -843,7 +843,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -851,7 +851,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -859,7 +859,7 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -867,7 +867,128 @@ public function createMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Dub\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Bulk delete links + * + * Bulk delete up to 100 links for the authenticated workspace. + * + * @param string $linkIds + * @return Operations\BulkDeleteLinksResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function deleteMany( + string $linkIds, + ): Operations\BulkDeleteLinksResponse { + $request = new Operations\BulkDeleteLinksRequest( + linkIds: $linkIds, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/links/bulk'); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\BulkDeleteLinksRequest::class, $request)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\BulkDeleteLinksResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\BulkDeleteLinksResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 400) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 401) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 403) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 404) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 409) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 410) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 422) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 429) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 500) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -924,7 +1045,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -932,7 +1053,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -940,7 +1061,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -948,7 +1069,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -956,7 +1077,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -964,7 +1085,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -972,7 +1093,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -980,7 +1101,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -988,7 +1109,7 @@ public function updateMany( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1045,7 +1166,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1053,7 +1174,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1061,7 +1182,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1069,7 +1190,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1077,7 +1198,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1085,7 +1206,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1093,7 +1214,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1101,7 +1222,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -1109,7 +1230,7 @@ public function upsert( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Models/Components/SalesBrowsers.php b/src/Models/Components/AnalyticsBrowsers.php similarity index 50% rename from src/Models/Components/SalesBrowsers.php rename to src/Models/Components/AnalyticsBrowsers.php index e1a0086..cc27607 100644 --- a/src/Models/Components/SalesBrowsers.php +++ b/src/Models/Components/AnalyticsBrowsers.php @@ -9,7 +9,7 @@ namespace Dub\Models\Components; -class SalesBrowsers +class AnalyticsBrowsers { /** * The name of the browser @@ -19,6 +19,22 @@ class SalesBrowsers #[\JMS\Serializer\Annotation\SerializedName('browser')] public string $browser; + /** + * The number of clicks from this browser + * + * @var float $clicks + */ + #[\JMS\Serializer\Annotation\SerializedName('clicks')] + public float $clicks; + + /** + * The number of leads from this browser + * + * @var float $leads + */ + #[\JMS\Serializer\Annotation\SerializedName('leads')] + public float $leads; + /** * The number of sales from this browser * @@ -30,20 +46,24 @@ class SalesBrowsers /** * The total amount of sales from this browser * - * @var float $amount + * @var float $saleAmount */ - #[\JMS\Serializer\Annotation\SerializedName('amount')] - public float $amount; + #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] + public float $saleAmount; /** * @param ?string $browser + * @param ?float $clicks + * @param ?float $leads * @param ?float $sales - * @param ?float $amount + * @param ?float $saleAmount */ - public function __construct(?string $browser = null, ?float $sales = null, ?float $amount = null) + public function __construct(?string $browser = null, ?float $clicks = null, ?float $leads = null, ?float $sales = null, ?float $saleAmount = null) { $this->browser = $browser; + $this->clicks = $clicks; + $this->leads = $leads; $this->sales = $sales; - $this->amount = $amount; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/AnalyticsCities.php b/src/Models/Components/AnalyticsCities.php new file mode 100644 index 0000000..f549dea --- /dev/null +++ b/src/Models/Components/AnalyticsCities.php @@ -0,0 +1,80 @@ +city = $city; + $this->country = $country; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesCitiesCountry.php b/src/Models/Components/AnalyticsCitiesCountry.php similarity index 99% rename from src/Models/Components/SalesCitiesCountry.php rename to src/Models/Components/AnalyticsCitiesCountry.php index fc46c50..659f1f3 100644 --- a/src/Models/Components/SalesCitiesCountry.php +++ b/src/Models/Components/AnalyticsCitiesCountry.php @@ -10,7 +10,7 @@ /** The 2-letter country code of the city: https://d.to/geo */ -enum SalesCitiesCountry: string +enum AnalyticsCitiesCountry: string { case Af = 'AF'; case Al = 'AL'; diff --git a/src/Models/Components/AnalyticsCount.php b/src/Models/Components/AnalyticsCount.php new file mode 100644 index 0000000..079b0b1 --- /dev/null +++ b/src/Models/Components/AnalyticsCount.php @@ -0,0 +1,59 @@ +clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/AnalyticsCountries.php b/src/Models/Components/AnalyticsCountries.php new file mode 100644 index 0000000..014fa69 --- /dev/null +++ b/src/Models/Components/AnalyticsCountries.php @@ -0,0 +1,80 @@ +country = $country; + $this->city = $city; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/AnalyticsDevices.php b/src/Models/Components/AnalyticsDevices.php new file mode 100644 index 0000000..2a9f739 --- /dev/null +++ b/src/Models/Components/AnalyticsDevices.php @@ -0,0 +1,69 @@ +device = $device; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/AnalyticsOS.php b/src/Models/Components/AnalyticsOS.php new file mode 100644 index 0000000..2e28b89 --- /dev/null +++ b/src/Models/Components/AnalyticsOS.php @@ -0,0 +1,69 @@ +os = $os; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReferers.php b/src/Models/Components/AnalyticsReferers.php similarity index 51% rename from src/Models/Components/SalesReferers.php rename to src/Models/Components/AnalyticsReferers.php index 1123249..26f4262 100644 --- a/src/Models/Components/SalesReferers.php +++ b/src/Models/Components/AnalyticsReferers.php @@ -9,7 +9,7 @@ namespace Dub\Models\Components; -class SalesReferers +class AnalyticsReferers { /** * The name of the referer. If unknown, this will be `(direct)` @@ -19,6 +19,22 @@ class SalesReferers #[\JMS\Serializer\Annotation\SerializedName('referer')] public string $referer; + /** + * The number of clicks from this referer + * + * @var float $clicks + */ + #[\JMS\Serializer\Annotation\SerializedName('clicks')] + public float $clicks; + + /** + * The number of leads from this referer + * + * @var float $leads + */ + #[\JMS\Serializer\Annotation\SerializedName('leads')] + public float $leads; + /** * The number of sales from this referer * @@ -30,20 +46,24 @@ class SalesReferers /** * The total amount of sales from this referer * - * @var float $amount + * @var float $saleAmount */ - #[\JMS\Serializer\Annotation\SerializedName('amount')] - public float $amount; + #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] + public float $saleAmount; /** * @param ?string $referer + * @param ?float $clicks + * @param ?float $leads * @param ?float $sales - * @param ?float $amount + * @param ?float $saleAmount */ - public function __construct(?string $referer = null, ?float $sales = null, ?float $amount = null) + public function __construct(?string $referer = null, ?float $clicks = null, ?float $leads = null, ?float $sales = null, ?float $saleAmount = null) { $this->referer = $referer; + $this->clicks = $clicks; + $this->leads = $leads; $this->sales = $sales; - $this->amount = $amount; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/AnalyticsTimeseries.php b/src/Models/Components/AnalyticsTimeseries.php new file mode 100644 index 0000000..6e858dc --- /dev/null +++ b/src/Models/Components/AnalyticsTimeseries.php @@ -0,0 +1,69 @@ +start = $start; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesTopLinks.php b/src/Models/Components/AnalyticsTopLinks.php similarity index 75% rename from src/Models/Components/SalesTopLinks.php rename to src/Models/Components/AnalyticsTopLinks.php index 4c6d16a..faf46f3 100644 --- a/src/Models/Components/SalesTopLinks.php +++ b/src/Models/Components/AnalyticsTopLinks.php @@ -9,7 +9,7 @@ namespace Dub\Models\Components; -class SalesTopLinks +class AnalyticsTopLinks { /** * The unique ID of the short link @@ -68,6 +68,22 @@ class SalesTopLinks #[\JMS\Serializer\Annotation\SerializedName('createdAt')] public string $createdAt; + /** + * The number of clicks from this link + * + * @var float $clicks + */ + #[\JMS\Serializer\Annotation\SerializedName('clicks')] + public float $clicks; + + /** + * The number of leads from this link + * + * @var float $leads + */ + #[\JMS\Serializer\Annotation\SerializedName('leads')] + public float $leads; + /** * The number of sales from this link * @@ -79,10 +95,10 @@ class SalesTopLinks /** * The total amount of sales from this link * - * @var float $amount + * @var float $saleAmount */ - #[\JMS\Serializer\Annotation\SerializedName('amount')] - public float $amount; + #[\JMS\Serializer\Annotation\SerializedName('saleAmount')] + public float $saleAmount; /** * @param ?string $link @@ -92,10 +108,12 @@ class SalesTopLinks * @param ?string $shortLink * @param ?string $url * @param ?string $createdAt + * @param ?float $clicks + * @param ?float $leads * @param ?float $sales - * @param ?float $amount + * @param ?float $saleAmount */ - public function __construct(?string $link = null, ?string $id = null, ?string $domain = null, ?string $key = null, ?string $shortLink = null, ?string $url = null, ?string $createdAt = null, ?float $sales = null, ?float $amount = null) + public function __construct(?string $link = null, ?string $id = null, ?string $domain = null, ?string $key = null, ?string $shortLink = null, ?string $url = null, ?string $createdAt = null, ?float $clicks = null, ?float $leads = null, ?float $sales = null, ?float $saleAmount = null) { $this->link = $link; $this->id = $id; @@ -104,7 +122,9 @@ public function __construct(?string $link = null, ?string $id = null, ?string $d $this->shortLink = $shortLink; $this->url = $url; $this->createdAt = $createdAt; + $this->clicks = $clicks; + $this->leads = $leads; $this->sales = $sales; - $this->amount = $amount; + $this->saleAmount = $saleAmount; } } \ No newline at end of file diff --git a/src/Models/Components/AnalyticsTopUrls.php b/src/Models/Components/AnalyticsTopUrls.php new file mode 100644 index 0000000..149f944 --- /dev/null +++ b/src/Models/Components/AnalyticsTopUrls.php @@ -0,0 +1,69 @@ +url = $url; + $this->clicks = $clicks; + $this->leads = $leads; + $this->sales = $sales; + $this->saleAmount = $saleAmount; + } +} \ No newline at end of file diff --git a/src/Models/Components/City.php b/src/Models/Components/City.php new file mode 100644 index 0000000..82136e5 --- /dev/null +++ b/src/Models/Components/City.php @@ -0,0 +1,15 @@ +event = $event; $this->timestamp = $timestamp; $this->clickId = $clickId; $this->linkId = $linkId; diff --git a/src/Models/Components/ClicksBrowsers.php b/src/Models/Components/ClicksBrowsers.php deleted file mode 100644 index 2cf9963..0000000 --- a/src/Models/Components/ClicksBrowsers.php +++ /dev/null @@ -1,39 +0,0 @@ -browser = $browser; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksCities.php b/src/Models/Components/ClicksCities.php deleted file mode 100644 index 720b5f3..0000000 --- a/src/Models/Components/ClicksCities.php +++ /dev/null @@ -1,50 +0,0 @@ -city = $city; - $this->country = $country; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksCitiesCountry.php b/src/Models/Components/ClicksCitiesCountry.php deleted file mode 100644 index e8b4b87..0000000 --- a/src/Models/Components/ClicksCitiesCountry.php +++ /dev/null @@ -1,265 +0,0 @@ -clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksCountries.php b/src/Models/Components/ClicksCountries.php deleted file mode 100644 index 1846b42..0000000 --- a/src/Models/Components/ClicksCountries.php +++ /dev/null @@ -1,40 +0,0 @@ -country = $country; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksDevices.php b/src/Models/Components/ClicksDevices.php deleted file mode 100644 index 42cef63..0000000 --- a/src/Models/Components/ClicksDevices.php +++ /dev/null @@ -1,39 +0,0 @@ -device = $device; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksOS.php b/src/Models/Components/ClicksOS.php deleted file mode 100644 index 9448f11..0000000 --- a/src/Models/Components/ClicksOS.php +++ /dev/null @@ -1,39 +0,0 @@ -os = $os; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksReferers.php b/src/Models/Components/ClicksReferers.php deleted file mode 100644 index 646db4d..0000000 --- a/src/Models/Components/ClicksReferers.php +++ /dev/null @@ -1,39 +0,0 @@ -referer = $referer; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksTimeseries.php b/src/Models/Components/ClicksTimeseries.php deleted file mode 100644 index 06cfc04..0000000 --- a/src/Models/Components/ClicksTimeseries.php +++ /dev/null @@ -1,39 +0,0 @@ -start = $start; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksTopLinks.php b/src/Models/Components/ClicksTopLinks.php deleted file mode 100644 index 66e34a3..0000000 --- a/src/Models/Components/ClicksTopLinks.php +++ /dev/null @@ -1,100 +0,0 @@ -link = $link; - $this->id = $id; - $this->domain = $domain; - $this->key = $key; - $this->shortLink = $shortLink; - $this->url = $url; - $this->createdAt = $createdAt; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/ClicksTopUrls.php b/src/Models/Components/ClicksTopUrls.php deleted file mode 100644 index a0e7f11..0000000 --- a/src/Models/Components/ClicksTopUrls.php +++ /dev/null @@ -1,39 +0,0 @@ -url = $url; - $this->clicks = $clicks; - } -} \ No newline at end of file diff --git a/src/Models/Components/Event.php b/src/Models/Components/Event.php new file mode 100644 index 0000000..564ae04 --- /dev/null +++ b/src/Models/Components/Event.php @@ -0,0 +1,15 @@ +browser = $browser; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsCities.php b/src/Models/Components/LeadsCities.php deleted file mode 100644 index d4b99e3..0000000 --- a/src/Models/Components/LeadsCities.php +++ /dev/null @@ -1,50 +0,0 @@ -city = $city; - $this->country = $country; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsCitiesCountry.php b/src/Models/Components/LeadsCitiesCountry.php deleted file mode 100644 index ed4223f..0000000 --- a/src/Models/Components/LeadsCitiesCountry.php +++ /dev/null @@ -1,265 +0,0 @@ -leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsCountries.php b/src/Models/Components/LeadsCountries.php deleted file mode 100644 index 1121f67..0000000 --- a/src/Models/Components/LeadsCountries.php +++ /dev/null @@ -1,40 +0,0 @@ -country = $country; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsCountriesCountry.php b/src/Models/Components/LeadsCountriesCountry.php deleted file mode 100644 index 4a91ae2..0000000 --- a/src/Models/Components/LeadsCountriesCountry.php +++ /dev/null @@ -1,265 +0,0 @@ -device = $device; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsOS.php b/src/Models/Components/LeadsOS.php deleted file mode 100644 index 324bde2..0000000 --- a/src/Models/Components/LeadsOS.php +++ /dev/null @@ -1,39 +0,0 @@ -os = $os; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsReferers.php b/src/Models/Components/LeadsReferers.php deleted file mode 100644 index f8f8c2f..0000000 --- a/src/Models/Components/LeadsReferers.php +++ /dev/null @@ -1,39 +0,0 @@ -referer = $referer; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsTimeseries.php b/src/Models/Components/LeadsTimeseries.php deleted file mode 100644 index 987358b..0000000 --- a/src/Models/Components/LeadsTimeseries.php +++ /dev/null @@ -1,39 +0,0 @@ -start = $start; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsTopLinks.php b/src/Models/Components/LeadsTopLinks.php deleted file mode 100644 index 0cdffc4..0000000 --- a/src/Models/Components/LeadsTopLinks.php +++ /dev/null @@ -1,100 +0,0 @@ -link = $link; - $this->id = $id; - $this->domain = $domain; - $this->key = $key; - $this->shortLink = $shortLink; - $this->url = $url; - $this->createdAt = $createdAt; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsTopUrls.php b/src/Models/Components/LeadsTopUrls.php deleted file mode 100644 index 6e6f13e..0000000 --- a/src/Models/Components/LeadsTopUrls.php +++ /dev/null @@ -1,39 +0,0 @@ -url = $url; - $this->leads = $leads; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesCities.php b/src/Models/Components/SalesCities.php deleted file mode 100644 index 86665dd..0000000 --- a/src/Models/Components/SalesCities.php +++ /dev/null @@ -1,60 +0,0 @@ -city = $city; - $this->country = $country; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesCount.php b/src/Models/Components/SalesCount.php deleted file mode 100644 index bbf9067..0000000 --- a/src/Models/Components/SalesCount.php +++ /dev/null @@ -1,39 +0,0 @@ -sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesCountries.php b/src/Models/Components/SalesCountries.php deleted file mode 100644 index bc95b23..0000000 --- a/src/Models/Components/SalesCountries.php +++ /dev/null @@ -1,50 +0,0 @@ -country = $country; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesCountriesCountry.php b/src/Models/Components/SalesCountriesCountry.php deleted file mode 100644 index 5b67a67..0000000 --- a/src/Models/Components/SalesCountriesCountry.php +++ /dev/null @@ -1,265 +0,0 @@ -device = $device; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesOS.php b/src/Models/Components/SalesOS.php deleted file mode 100644 index 8baae35..0000000 --- a/src/Models/Components/SalesOS.php +++ /dev/null @@ -1,49 +0,0 @@ -os = $os; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesTimeseries.php b/src/Models/Components/SalesTimeseries.php deleted file mode 100644 index 066ff00..0000000 --- a/src/Models/Components/SalesTimeseries.php +++ /dev/null @@ -1,49 +0,0 @@ -start = $start; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesTopUrls.php b/src/Models/Components/SalesTopUrls.php deleted file mode 100644 index 966690b..0000000 --- a/src/Models/Components/SalesTopUrls.php +++ /dev/null @@ -1,49 +0,0 @@ -url = $url; - $this->sales = $sales; - $this->amount = $amount; - } -} \ No newline at end of file diff --git a/src/Models/Components/WorkspaceSchema.php b/src/Models/Components/WorkspaceSchema.php index 6f10878..7164040 100644 --- a/src/Models/Components/WorkspaceSchema.php +++ b/src/Models/Components/WorkspaceSchema.php @@ -228,7 +228,7 @@ class WorkspaceSchema * @var ?array $flags */ #[\JMS\Serializer\Annotation\SerializedName('flags')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $flags = null; diff --git a/src/Models/Errors/BadRequest.php b/src/Models/Errors/BadRequest.php index d82ee86..f3b6892 100644 --- a/src/Models/Errors/BadRequest.php +++ b/src/Models/Errors/BadRequest.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** BadRequest - The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */ class BadRequest { @@ -27,4 +28,13 @@ public function __construct(?Error $error = null) { $this->error = $error; } + + public function toException(): BadRequestThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new BadRequestThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/BadRequestThrowable.php b/src/Models/Errors/BadRequestThrowable.php new file mode 100644 index 0000000..550a2cd --- /dev/null +++ b/src/Models/Errors/BadRequestThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/Conflict.php b/src/Models/Errors/Conflict.php index f34e7fa..aee006f 100644 --- a/src/Models/Errors/Conflict.php +++ b/src/Models/Errors/Conflict.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** Conflict - This response is sent when a request conflicts with the current state of the server. */ class Conflict { @@ -27,4 +28,13 @@ public function __construct(?ConflictError $error = null) { $this->error = $error; } + + public function toException(): ConflictThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ConflictThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/ConflictThrowable.php b/src/Models/Errors/ConflictThrowable.php new file mode 100644 index 0000000..6f3fb98 --- /dev/null +++ b/src/Models/Errors/ConflictThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/Forbidden.php b/src/Models/Errors/Forbidden.php index a57a251..a43ece8 100644 --- a/src/Models/Errors/Forbidden.php +++ b/src/Models/Errors/Forbidden.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** Forbidden - The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server. */ class Forbidden { @@ -27,4 +28,13 @@ public function __construct(?ForbiddenError $error = null) { $this->error = $error; } + + public function toException(): ForbiddenThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ForbiddenThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/ForbiddenThrowable.php b/src/Models/Errors/ForbiddenThrowable.php new file mode 100644 index 0000000..18b6d1e --- /dev/null +++ b/src/Models/Errors/ForbiddenThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/InternalServerError.php b/src/Models/Errors/InternalServerError.php index b762bf7..f4d3cc7 100644 --- a/src/Models/Errors/InternalServerError.php +++ b/src/Models/Errors/InternalServerError.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** InternalServerError - The server has encountered a situation it does not know how to handle. */ class InternalServerError { @@ -27,4 +28,13 @@ public function __construct(?InternalServerErrorError $error = null) { $this->error = $error; } + + public function toException(): InternalServerErrorThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new InternalServerErrorThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/InternalServerErrorThrowable.php b/src/Models/Errors/InternalServerErrorThrowable.php new file mode 100644 index 0000000..fbd1447 --- /dev/null +++ b/src/Models/Errors/InternalServerErrorThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/InviteExpired.php b/src/Models/Errors/InviteExpired.php index 23744cd..404e9bc 100644 --- a/src/Models/Errors/InviteExpired.php +++ b/src/Models/Errors/InviteExpired.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** InviteExpired - This response is sent when the requested content has been permanently deleted from server, with no forwarding address. */ class InviteExpired { @@ -27,4 +28,13 @@ public function __construct(?InviteExpiredError $error = null) { $this->error = $error; } + + public function toException(): InviteExpiredThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new InviteExpiredThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/InviteExpiredThrowable.php b/src/Models/Errors/InviteExpiredThrowable.php new file mode 100644 index 0000000..e11680f --- /dev/null +++ b/src/Models/Errors/InviteExpiredThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/NotFound.php b/src/Models/Errors/NotFound.php index 2dbcde2..b64e8c9 100644 --- a/src/Models/Errors/NotFound.php +++ b/src/Models/Errors/NotFound.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** NotFound - The server cannot find the requested resource. */ class NotFound { @@ -27,4 +28,13 @@ public function __construct(?NotFoundError $error = null) { $this->error = $error; } + + public function toException(): NotFoundThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new NotFoundThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/NotFoundThrowable.php b/src/Models/Errors/NotFoundThrowable.php new file mode 100644 index 0000000..1a2d662 --- /dev/null +++ b/src/Models/Errors/NotFoundThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/RateLimitExceeded.php b/src/Models/Errors/RateLimitExceeded.php index aa143f5..a1ee3fd 100644 --- a/src/Models/Errors/RateLimitExceeded.php +++ b/src/Models/Errors/RateLimitExceeded.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** RateLimitExceeded - The user has sent too many requests in a given amount of time ("rate limiting") */ class RateLimitExceeded { @@ -27,4 +28,13 @@ public function __construct(?RateLimitExceededError $error = null) { $this->error = $error; } + + public function toException(): RateLimitExceededThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new RateLimitExceededThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/RateLimitExceededThrowable.php b/src/Models/Errors/RateLimitExceededThrowable.php new file mode 100644 index 0000000..372d9f6 --- /dev/null +++ b/src/Models/Errors/RateLimitExceededThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/Unauthorized.php b/src/Models/Errors/Unauthorized.php index 4b194b1..4b6f800 100644 --- a/src/Models/Errors/Unauthorized.php +++ b/src/Models/Errors/Unauthorized.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** Unauthorized - Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. */ class Unauthorized { @@ -27,4 +28,13 @@ public function __construct(?UnauthorizedError $error = null) { $this->error = $error; } + + public function toException(): UnauthorizedThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new UnauthorizedThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/UnauthorizedThrowable.php b/src/Models/Errors/UnauthorizedThrowable.php new file mode 100644 index 0000000..38ac9dd --- /dev/null +++ b/src/Models/Errors/UnauthorizedThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/UnprocessableEntity.php b/src/Models/Errors/UnprocessableEntity.php index b1620c7..3b7bcbf 100644 --- a/src/Models/Errors/UnprocessableEntity.php +++ b/src/Models/Errors/UnprocessableEntity.php @@ -9,6 +9,7 @@ namespace Dub\Models\Errors; +use Dub\Utils; /** UnprocessableEntity - The request was well-formed but was unable to be followed due to semantic errors. */ class UnprocessableEntity { @@ -27,4 +28,13 @@ public function __construct(?UnprocessableEntityError $error = null) { $this->error = $error; } + + public function toException(): UnprocessableEntityThrowable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new UnprocessableEntityThrowable($message, (int) $code, $this); + } } \ No newline at end of file diff --git a/src/Models/Errors/UnprocessableEntityThrowable.php b/src/Models/Errors/UnprocessableEntityThrowable.php new file mode 100644 index 0000000..9e7c2dd --- /dev/null +++ b/src/Models/Errors/UnprocessableEntityThrowable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Operations/BulkDeleteLinksRequest.php b/src/Models/Operations/BulkDeleteLinksRequest.php new file mode 100644 index 0000000..d74ae60 --- /dev/null +++ b/src/Models/Operations/BulkDeleteLinksRequest.php @@ -0,0 +1,29 @@ +linkIds = $linkIds; + } +} \ No newline at end of file diff --git a/src/Models/Operations/BulkDeleteLinksResponse.php b/src/Models/Operations/BulkDeleteLinksResponse.php new file mode 100644 index 0000000..519c9f4 --- /dev/null +++ b/src/Models/Operations/BulkDeleteLinksResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/BulkDeleteLinksResponseBody.php b/src/Models/Operations/BulkDeleteLinksResponseBody.php new file mode 100644 index 0000000..d87436c --- /dev/null +++ b/src/Models/Operations/BulkDeleteLinksResponseBody.php @@ -0,0 +1,30 @@ +deletedCount = $deletedCount; + } +} \ No newline at end of file diff --git a/src/Models/Operations/Click.php b/src/Models/Operations/Click.php new file mode 100644 index 0000000..42a5aec --- /dev/null +++ b/src/Models/Operations/Click.php @@ -0,0 +1,28 @@ +id = $id; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateLinkRequestBody.php b/src/Models/Operations/CreateLinkRequestBody.php index 416a8e3..d915c8a 100644 --- a/src/Models/Operations/CreateLinkRequestBody.php +++ b/src/Models/Operations/CreateLinkRequestBody.php @@ -98,7 +98,7 @@ class CreateLinkRequestBody * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagIds = null; @@ -108,7 +108,7 @@ class CreateLinkRequestBody * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagNames = null; @@ -226,7 +226,7 @@ class CreateLinkRequestBody * @var ?Components\LinkGeoTargeting $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Components\LinkGeoTargeting $geo = null; diff --git a/src/Models/Operations/CreateTagRequestBody.php b/src/Models/Operations/CreateTagRequestBody.php index a0a288c..e9fd531 100644 --- a/src/Models/Operations/CreateTagRequestBody.php +++ b/src/Models/Operations/CreateTagRequestBody.php @@ -26,7 +26,7 @@ class CreateTagRequestBody * @var ?Color $color */ #[\JMS\Serializer\Annotation\SerializedName('color')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Color')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Color|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Color $color = null; diff --git a/src/Models/Operations/Customer.php b/src/Models/Operations/Customer.php new file mode 100644 index 0000000..3d22719 --- /dev/null +++ b/src/Models/Operations/Customer.php @@ -0,0 +1,55 @@ +id = $id; + $this->name = $name; + $this->email = $email; + $this->avatar = $avatar; + } +} \ No newline at end of file diff --git a/src/Models/Operations/Data.php b/src/Models/Operations/Data.php index 55cf87f..42fb6ee 100644 --- a/src/Models/Operations/Data.php +++ b/src/Models/Operations/Data.php @@ -63,7 +63,7 @@ class Data * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagIds = null; @@ -73,7 +73,7 @@ class Data * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagNames = null; @@ -191,7 +191,7 @@ class Data * @var ?Components\LinkGeoTargeting $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Components\LinkGeoTargeting $geo = null; diff --git a/src/Models/Operations/ListEventsResponse.php b/src/Models/Operations/ListEventsResponse.php index 1fa9142..446ccbd 100644 --- a/src/Models/Operations/ListEventsResponse.php +++ b/src/Models/Operations/ListEventsResponse.php @@ -35,7 +35,7 @@ class ListEventsResponse /** * A list of events * - * @var ?array $clickEvents + * @var ?array $clickEvents */ public ?array $clickEvents = null; @@ -43,7 +43,7 @@ class ListEventsResponse * @param ?string $contentType * @param ?int $statusCode * @param ?\Psr\Http\Message\ResponseInterface $rawResponse - * @param ?array $clickEvents + * @param ?array $clickEvents */ public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $clickEvents = null) { diff --git a/src/Models/Operations/RequestBody.php b/src/Models/Operations/RequestBody.php index 018307f..2822b99 100644 --- a/src/Models/Operations/RequestBody.php +++ b/src/Models/Operations/RequestBody.php @@ -98,7 +98,7 @@ class RequestBody * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagIds = null; @@ -108,7 +108,7 @@ class RequestBody * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagNames = null; @@ -226,7 +226,7 @@ class RequestBody * @var ?Components\LinkGeoTargeting $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Components\LinkGeoTargeting $geo = null; diff --git a/src/Models/Operations/RetrieveAnalyticsResponse.php b/src/Models/Operations/RetrieveAnalyticsResponse.php index d9afe85..5eb4fed 100644 --- a/src/Models/Operations/RetrieveAnalyticsResponse.php +++ b/src/Models/Operations/RetrieveAnalyticsResponse.php @@ -35,17 +35,17 @@ class RetrieveAnalyticsResponse /** * Analytics data * - * @var Components\ClicksCount|array|array|array|array|array|array|array|array|array|Components\LeadsCount|array|array|array|array|array|array|array|array|array|Components\SalesCount|array|array|array|array|array|array|array|array|array|null $oneOf + * @var Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|null $oneOf */ - public Components\ClicksCount|array|Components\LeadsCount|Components\SalesCount|null $oneOf = null; + public Components\AnalyticsCount|array|null $oneOf = null; /** * @param ?string $contentType * @param ?int $statusCode * @param ?\Psr\Http\Message\ResponseInterface $rawResponse - * @param Components\ClicksCount|array|array|array|array|array|array|array|array|array|Components\LeadsCount|array|array|array|array|array|array|array|array|array|Components\SalesCount|array|array|array|array|array|array|array|array|array|null $oneOf + * @param Components\AnalyticsCount|array|array|array|array|array|array|array|array|array|null $oneOf */ - public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, Components\ClicksCount|array|Components\LeadsCount|Components\SalesCount|null $oneOf = null) + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, Components\AnalyticsCount|array|null $oneOf = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; diff --git a/src/Models/Operations/Sale.php b/src/Models/Operations/Sale.php new file mode 100644 index 0000000..c2b9114 --- /dev/null +++ b/src/Models/Operations/Sale.php @@ -0,0 +1,66 @@ + $metadata + */ + #[\JMS\Serializer\Annotation\SerializedName('metadata')] + #[\JMS\Serializer\Annotation\Type('array')] + public array $metadata; + + /** + * @param ?float $amount + * @param ?string $currency + * @param ?string $paymentProcessor + * @param ?string $invoiceId + * @param ?array $metadata + */ + public function __construct(?float $amount = null, ?string $currency = null, ?string $paymentProcessor = null, ?string $invoiceId = null, ?array $metadata = null) + { + $this->amount = $amount; + $this->currency = $currency; + $this->paymentProcessor = $paymentProcessor; + $this->invoiceId = $invoiceId; + $this->metadata = $metadata; + } +} \ No newline at end of file diff --git a/src/Models/Operations/SortBy.php b/src/Models/Operations/SortBy.php index 4c9c3a6..b703627 100644 --- a/src/Models/Operations/SortBy.php +++ b/src/Models/Operations/SortBy.php @@ -13,5 +13,4 @@ enum SortBy: string { case Timestamp = 'timestamp'; - case Amount = 'amount'; } diff --git a/src/Models/Operations/TrackLeadRequestBody.php b/src/Models/Operations/TrackLeadRequestBody.php index 50763fe..5f0127a 100644 --- a/src/Models/Operations/TrackLeadRequestBody.php +++ b/src/Models/Operations/TrackLeadRequestBody.php @@ -68,7 +68,7 @@ class TrackLeadRequestBody * @var ?array $metadata */ #[\JMS\Serializer\Annotation\SerializedName('metadata')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $metadata = null; diff --git a/src/Models/Operations/TrackLeadResponseBody.php b/src/Models/Operations/TrackLeadResponseBody.php index 0092b67..fb14cb8 100644 --- a/src/Models/Operations/TrackLeadResponseBody.php +++ b/src/Models/Operations/TrackLeadResponseBody.php @@ -14,73 +14,27 @@ class TrackLeadResponseBody { /** * - * @var string $clickId + * @var Click $click */ - #[\JMS\Serializer\Annotation\SerializedName('clickId')] - public string $clickId; + #[\JMS\Serializer\Annotation\SerializedName('click')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Click')] + public Click $click; /** * - * @var string $eventName + * @var Customer $customer */ - #[\JMS\Serializer\Annotation\SerializedName('eventName')] - public string $eventName; + #[\JMS\Serializer\Annotation\SerializedName('customer')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Customer')] + public Customer $customer; /** - * - * @var string $customerId - */ - #[\JMS\Serializer\Annotation\SerializedName('customerId')] - public string $customerId; - - /** - * - * @var string $customerName - */ - #[\JMS\Serializer\Annotation\SerializedName('customerName')] - public string $customerName; - - /** - * - * @var string $customerEmail - */ - #[\JMS\Serializer\Annotation\SerializedName('customerEmail')] - public string $customerEmail; - - /** - * - * @var string $customerAvatar - */ - #[\JMS\Serializer\Annotation\SerializedName('customerAvatar')] - public string $customerAvatar; - - /** - * $metadata - * - * @var ?array $metadata - */ - #[\JMS\Serializer\Annotation\SerializedName('metadata')] - #[\JMS\Serializer\Annotation\Type('array')] - #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?array $metadata = null; - - /** - * @param ?string $clickId - * @param ?string $eventName - * @param ?string $customerId - * @param ?string $customerName - * @param ?string $customerEmail - * @param ?string $customerAvatar - * @param ?array $metadata + * @param ?Click $click + * @param ?Customer $customer */ - public function __construct(?string $clickId = null, ?string $eventName = null, ?string $customerId = null, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null, ?array $metadata = null) + public function __construct(?Click $click = null, ?Customer $customer = null) { - $this->clickId = $clickId; - $this->eventName = $eventName; - $this->customerId = $customerId; - $this->customerName = $customerName; - $this->customerEmail = $customerEmail; - $this->customerAvatar = $customerAvatar; - $this->metadata = $metadata; + $this->click = $click; + $this->customer = $customer; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackSaleCustomer.php b/src/Models/Operations/TrackSaleCustomer.php new file mode 100644 index 0000000..88d33c4 --- /dev/null +++ b/src/Models/Operations/TrackSaleCustomer.php @@ -0,0 +1,55 @@ +id = $id; + $this->name = $name; + $this->email = $email; + $this->avatar = $avatar; + } +} \ No newline at end of file diff --git a/src/Models/Operations/TrackSaleRequestBody.php b/src/Models/Operations/TrackSaleRequestBody.php index 35ae89e..2783c73 100644 --- a/src/Models/Operations/TrackSaleRequestBody.php +++ b/src/Models/Operations/TrackSaleRequestBody.php @@ -69,7 +69,7 @@ class TrackSaleRequestBody * @var ?array $metadata */ #[\JMS\Serializer\Annotation\SerializedName('metadata')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $metadata = null; diff --git a/src/Models/Operations/TrackSaleResponseBody.php b/src/Models/Operations/TrackSaleResponseBody.php index bb62c80..89d18e9 100644 --- a/src/Models/Operations/TrackSaleResponseBody.php +++ b/src/Models/Operations/TrackSaleResponseBody.php @@ -21,65 +21,29 @@ class TrackSaleResponseBody /** * - * @var string $customerId + * @var TrackSaleCustomer $customer */ - #[\JMS\Serializer\Annotation\SerializedName('customerId')] - public string $customerId; + #[\JMS\Serializer\Annotation\SerializedName('customer')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\TrackSaleCustomer')] + public TrackSaleCustomer $customer; /** * - * @var float $amount + * @var Sale $sale */ - #[\JMS\Serializer\Annotation\SerializedName('amount')] - public float $amount; - - /** - * - * @var string $paymentProcessor - */ - #[\JMS\Serializer\Annotation\SerializedName('paymentProcessor')] - public string $paymentProcessor; - - /** - * - * @var string $invoiceId - */ - #[\JMS\Serializer\Annotation\SerializedName('invoiceId')] - public string $invoiceId; - - /** - * - * @var string $currency - */ - #[\JMS\Serializer\Annotation\SerializedName('currency')] - public string $currency; - - /** - * $metadata - * - * @var array $metadata - */ - #[\JMS\Serializer\Annotation\SerializedName('metadata')] - #[\JMS\Serializer\Annotation\Type('array')] - public array $metadata; + #[\JMS\Serializer\Annotation\SerializedName('sale')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Sale')] + public Sale $sale; /** * @param ?string $eventName - * @param ?string $customerId - * @param ?float $amount - * @param ?string $paymentProcessor - * @param ?string $invoiceId - * @param ?string $currency - * @param ?array $metadata + * @param ?TrackSaleCustomer $customer + * @param ?Sale $sale */ - public function __construct(?string $eventName = null, ?string $customerId = null, ?float $amount = null, ?string $paymentProcessor = null, ?string $invoiceId = null, ?string $currency = null, ?array $metadata = null) + public function __construct(?string $eventName = null, ?TrackSaleCustomer $customer = null, ?Sale $sale = null) { $this->eventName = $eventName; - $this->customerId = $customerId; - $this->amount = $amount; - $this->paymentProcessor = $paymentProcessor; - $this->invoiceId = $invoiceId; - $this->currency = $currency; - $this->metadata = $metadata; + $this->customer = $customer; + $this->sale = $sale; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateLinkRequestBody.php b/src/Models/Operations/UpdateLinkRequestBody.php index 1445519..f265d1c 100644 --- a/src/Models/Operations/UpdateLinkRequestBody.php +++ b/src/Models/Operations/UpdateLinkRequestBody.php @@ -99,7 +99,7 @@ class UpdateLinkRequestBody * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagIds = null; @@ -109,7 +109,7 @@ class UpdateLinkRequestBody * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagNames = null; @@ -226,7 +226,7 @@ class UpdateLinkRequestBody * @var ?Components\LinkGeoTargeting $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Components\LinkGeoTargeting $geo = null; diff --git a/src/Models/Operations/UpdateTagRequestBody.php b/src/Models/Operations/UpdateTagRequestBody.php index b359f86..1bfda4e 100644 --- a/src/Models/Operations/UpdateTagRequestBody.php +++ b/src/Models/Operations/UpdateTagRequestBody.php @@ -26,7 +26,7 @@ class UpdateTagRequestBody * @var ?UpdateTagColor $color */ #[\JMS\Serializer\Annotation\SerializedName('color')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\UpdateTagColor')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\UpdateTagColor|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?UpdateTagColor $color = null; diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index 4548554..b30e32d 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -98,7 +98,7 @@ class UpsertLinkRequestBody * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagIds = null; @@ -108,7 +108,7 @@ class UpsertLinkRequestBody * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('string|array')] + #[\JMS\Serializer\Annotation\Type('string|array|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public string|array|null $tagNames = null; @@ -226,7 +226,7 @@ class UpsertLinkRequestBody * @var ?Components\LinkGeoTargeting $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\LinkGeoTargeting|null')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Components\LinkGeoTargeting $geo = null; diff --git a/src/QRCodes.php b/src/QRCodes.php index 956f30a..6bdf07b 100644 --- a/src/QRCodes.php +++ b/src/QRCodes.php @@ -64,7 +64,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -72,7 +72,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -80,7 +80,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -88,7 +88,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -96,7 +96,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -104,7 +104,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -112,7 +112,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -120,7 +120,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -128,7 +128,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index 104b3b0..08423f0 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -27,11 +27,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.3.2'; + public string $sdkVersion = '0.4.0'; - public string $genVersion = '2.404.3'; + public string $genVersion = '2.409.0'; - public string $userAgent = 'speakeasy-sdk/php 0.3.2 2.404.3 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.4.0 2.409.0 0.0.1 dub/dub-php'; public function getServerUrl(): string { diff --git a/src/Tags.php b/src/Tags.php index d7b6c0d..082ceda 100644 --- a/src/Tags.php +++ b/src/Tags.php @@ -63,7 +63,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -71,7 +71,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -79,7 +79,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -87,7 +87,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -95,7 +95,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -103,7 +103,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -111,7 +111,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -119,7 +119,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -127,7 +127,7 @@ public function list( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -184,7 +184,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -192,7 +192,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -200,7 +200,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -208,7 +208,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -216,7 +216,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -224,7 +224,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -232,7 +232,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -240,7 +240,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -248,7 +248,7 @@ public function create( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -311,7 +311,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -319,7 +319,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -327,7 +327,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -335,7 +335,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -343,7 +343,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -351,7 +351,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -359,7 +359,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -367,7 +367,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -375,7 +375,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Track.php b/src/Track.php index fa3155e..5558557 100644 --- a/src/Track.php +++ b/src/Track.php @@ -69,7 +69,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -77,7 +77,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -85,7 +85,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -93,7 +93,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -101,7 +101,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -109,7 +109,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -117,7 +117,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -125,7 +125,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -133,7 +133,7 @@ public function lead( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -190,7 +190,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -198,7 +198,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -206,7 +206,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -214,7 +214,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -222,7 +222,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -230,7 +230,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -238,7 +238,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -246,7 +246,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -254,7 +254,7 @@ public function sale( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -311,7 +311,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -319,7 +319,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -327,7 +327,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -335,7 +335,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -343,7 +343,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -351,7 +351,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -359,7 +359,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -367,7 +367,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -375,7 +375,7 @@ public function customer( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } diff --git a/src/Utils/PhpDocTypeParser.php b/src/Utils/PhpDocTypeParser.php index 8e444d3..5488304 100644 --- a/src/Utils/PhpDocTypeParser.php +++ b/src/Utils/PhpDocTypeParser.php @@ -85,8 +85,14 @@ public function convertRecursive(Type $type): array ]; } } + } elseif (\is_a($type, \phpDocumentor\Reflection\Types\Null_::class)) { + return [ + 'name' => 'NULL', + 'params' => [], + ]; } + return [ 'name' => $type->__toString(), 'params' => [], diff --git a/src/Utils/UnionHandler.php b/src/Utils/UnionHandler.php index c62f05e..a16abe9 100644 --- a/src/Utils/UnionHandler.php +++ b/src/Utils/UnionHandler.php @@ -72,10 +72,21 @@ public function serializeUnion( if ($this->isPrimitiveType(gettype($data))) { return $this->matchSimpleType($data, $type, $context); } else { - $resolvedType = [ - 'name' => get_class($data), - 'params' => [], - ]; + if (is_array($data)) { + $innerType = gettype($data[0]); + if ($innerType === 'object') { + $innerType = get_class($data[0]); + } + $resolvedType = [ + 'name' => 'array', + 'params' => ['name' => $innerType, 'params' => []], + ]; + } else { + $resolvedType = [ + 'name' => get_class($data), + 'params' => [], + ]; + } return $context->getNavigator()->accept($data, $resolvedType); } @@ -94,73 +105,87 @@ public function deserializeUnion(DeserializationVisitorInterface $visitor, mixed throw new RuntimeException('XML deserialisation into union types is not supported yet.'); } + // if three params exist, it may mean that there was a union discriminator set for this type. + // It also may mean that there are three possible types. + if (count($type['params']) == 3 && $this->paramsLookLikeUnionDiscriminator($type)) { + $lookupField = $type['params'][1]; + if (empty($data[$lookupField])) { + throw new NonVisitableTypeException(sprintf('Union Discriminator Field "%s" not found in data', $lookupField)); + } + + $unionMap = $type['params'][2]; + $lookupValue = $data[$lookupField]; + if (empty($unionMap[$lookupValue])) { + throw new NonVisitableTypeException(sprintf('Union Discriminator Map does not contain key "%s"', $lookupValue)); + } + + $finalType = [ + 'name' => $unionMap[$lookupValue], + 'params' => [], + ]; - $alternativeName = null; + return $context->getNavigator()->accept($data, $finalType); + } foreach ($this->reorderTypes($type)['params'] as $possibleType) { - $propertyMetadata = $context->getMetadataStack()->top(); - $finalType = null; - if ($propertyMetadata->unionDiscriminatorField !== null) { - if (! array_key_exists($propertyMetadata->unionDiscriminatorField, $data)) { - throw new NonVisitableTypeException('Union Discriminator Field \''.$propertyMetadata->unionDiscriminatorField.'\' not found in data'); - } - $lkup = $data[$propertyMetadata->unionDiscriminatorField]; - if (! empty($propertyMetadata->unionDiscriminatorMap)) { - if (array_key_exists($lkup, $propertyMetadata->unionDiscriminatorMap)) { - $finalType = [ - 'name' => $propertyMetadata->unionDiscriminatorMap[$lkup], - 'params' => [], - ]; - } else { - throw new NonVisitableTypeException('Union Discriminator Map does not contain key \''.$lkup.'\''); - } + $typeToTry = $possibleType['name']; + if ($typeToTry === 'array') { + $typeNames = array_map(fn ($t) => $t['name'], $possibleType['params']); + $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + } + if ($typeToTry === 'enum') { + $typeToTry = $possibleType['params'][0]['name']; + } + if ($typeToTry == 'NULL') { + if ($data == null) { + return null; } else { - $finalType = [ - 'name' => $lkup, - 'params' => [], - ]; + continue; } } - - if ($finalType !== null && $finalType['name'] !== null) { - return $context->getNavigator()->accept($data, $finalType); - } else { - $typeToTry = $possibleType['name']; - if ($typeToTry === 'array') { - $typeNames = array_map(fn ($t) => $t['name'], $possibleType['params']); - $typeToTry = 'array<'.implode(', ', $typeNames).'>'; + $serializer = JSON::createSerializer(); + try { + if ($this->isPrimitiveType($possibleType['name']) && (is_array($data) || ! $this->testPrimitive($data, $possibleType['name']))) { + continue; } - $serializer = JSON::createSerializer(); - try { - if ($this->isPrimitiveType($possibleType['name']) && (is_array($data) || ! $this->testPrimitive($data, $possibleType['name']))) { - continue; - } - - $json_encoded_data = json_encode($data); - if ($json_encoded_data === false) { - throw new RuntimeException('Failed to encode data to JSON: '.json_last_error_msg()); - } - $accept = $serializer->deserialize($json_encoded_data, $typeToTry, 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - return $accept; - } catch (NonVisitableTypeException $e) { - continue; - } catch (PropertyMissingException $e) { - continue; - } catch (NonStringCastableTypeException $e) { - continue; - } catch (NonIntCastableTypeException $e) { - continue; - } catch (NonFloatCastableTypeException $e) { - continue; + $json_encoded_data = json_encode($data); + if ($json_encoded_data === false) { + throw new RuntimeException('Failed to encode data to JSON: '.json_last_error_msg()); } + $accept = $serializer->deserialize($json_encoded_data, $typeToTry, 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + + return $accept; + } catch (NonVisitableTypeException $e) { + continue; + } catch (PropertyMissingException $e) { + continue; + } catch (NonStringCastableTypeException $e) { + continue; + } catch (NonIntCastableTypeException $e) { + continue; + } catch (NonFloatCastableTypeException $e) { + continue; } } return null; } + /** + * @param array $type + * @return bool + */ + private function paramsLookLikeUnionDiscriminator(array $type): bool + { + // if the first param is null, then the second and third parameters + // will contain the discriminator details. + $first = $type['params'][0]; + + return $first === null; + } + /** * @param mixed $data * @param array $type @@ -168,8 +193,6 @@ public function deserializeUnion(DeserializationVisitorInterface $visitor, mixed */ private function matchSimpleType(mixed $data, array $type, Context $context): mixed { - $alternativeName = null; - foreach ($type['params'] as $possibleType) { if ($this->isPrimitiveType($possibleType['name']) && ! $this->testPrimitive($data, $possibleType['name'])) { continue; diff --git a/src/Workspaces.php b/src/Workspaces.php index 0057d2e..465d07b 100644 --- a/src/Workspaces.php +++ b/src/Workspaces.php @@ -68,7 +68,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -76,7 +76,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -84,7 +84,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -92,7 +92,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -100,7 +100,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -108,7 +108,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -116,7 +116,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -124,7 +124,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -132,7 +132,7 @@ public function get( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -195,7 +195,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -203,7 +203,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -211,7 +211,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -219,7 +219,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -227,7 +227,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -235,7 +235,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -243,7 +243,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -251,7 +251,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } @@ -259,7 +259,7 @@ public function update( if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj; + throw $obj->toException(); } else { throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); }