From f891d1a6c744d88800d94d13b496b16e8d19260c Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 20 Aug 2024 01:09:51 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.376.0 --- .speakeasy/gen.lock | 247 +- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 12 +- README.md | 1156 ++++---- RELEASES.md | 10 +- USAGE.md | 1152 ++++---- codeSamples.yaml | 148 +- composer.json | 12 +- docs/Models/Components/BadRequest.md | 8 - 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/Conflict.md | 8 - docs/Models/Components/ConflictError.md | 10 - docs/Models/Components/Country.md | 259 ++ docs/Models/Components/InternalServerError.md | 8 - .../Components/InternalServerErrorError.md | 10 - docs/Models/Components/InviteExpired.md | 8 - docs/Models/Components/InviteExpiredError.md | 10 - 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/LinkSchema.md | 4 +- docs/Models/Components/NotFound.md | 8 - docs/Models/Components/NotFoundError.md | 10 - docs/Models/Components/RateLimitExceeded.md | 8 - .../Components/RateLimitExceededError.md | 10 - docs/Models/Components/SalesBrowsers.md | 10 + docs/Models/Components/SalesCities.md | 11 + docs/Models/Components/SalesCitiesCountry.md | 259 ++ docs/Models/Components/SalesCount.md | 9 + docs/Models/Components/SalesCountries.md | 10 + .../Components/SalesCountriesCountry.md | 259 ++ docs/Models/Components/SalesDevices.md | 10 + docs/Models/Components/SalesOS.md | 10 + docs/Models/Components/SalesReferers.md | 10 + docs/Models/Components/SalesTimeseries.md | 10 + docs/Models/Components/SalesTopLinks.md | 16 + docs/Models/Components/SalesTopUrls.md | 10 + docs/Models/Components/Security.md | 2 +- docs/Models/Components/TagSchema.md | 10 +- docs/Models/Components/Unauthorized.md | 8 - docs/Models/Components/UnauthorizedError.md | 10 - docs/Models/Components/UnprocessableEntity.md | 8 - .../Components/UnprocessableEntityError.md | 10 - docs/Models/Components/Users.md | 6 +- docs/Models/Components/WorkspaceSchema.md | 44 +- docs/Models/Errors/BadRequest.md | 10 + docs/Models/{Components => Errors}/Code.md | 0 docs/Models/Errors/Conflict.md | 10 + .../{Components => Errors}/ConflictCode.md | 0 docs/Models/Errors/ConflictError.md | 10 + docs/Models/{Components => Errors}/Error.md | 2 +- docs/Models/Errors/Forbidden.md | 10 + .../{Components => Errors}/ForbiddenCode.md | 0 docs/Models/Errors/ForbiddenError.md | 10 + .../InternalServerError.md} | 6 +- .../InternalServerErrorCode.md | 0 .../InternalServerErrorError.md} | 6 +- docs/Models/Errors/InviteExpired.md | 10 + .../InviteExpiredCode.md | 0 docs/Models/Errors/InviteExpiredError.md | 10 + docs/Models/Errors/NotFound.md | 10 + .../{Components => Errors}/NotFoundCode.md | 0 docs/Models/Errors/NotFoundError.md | 10 + docs/Models/Errors/RateLimitExceeded.md | 10 + .../RateLimitExceededCode.md | 0 docs/Models/Errors/RateLimitExceededError.md | 10 + docs/Models/Errors/Unauthorized.md | 10 + .../UnauthorizedCode.md | 0 docs/Models/Errors/UnauthorizedError.md | 10 + docs/Models/Errors/UnprocessableEntity.md | 10 + .../UnprocessableEntityCode.md | 0 .../Models/Errors/UnprocessableEntityError.md | 10 + .../Operations/BulkCreateLinksResponse.md | 21 +- .../Operations/BulkCreateLinksTagIds.md | 19 + .../Operations/BulkCreateLinksTagNames.md | 19 + .../Operations/BulkUpdateLinksRequestBody.md | 8 +- .../Operations/BulkUpdateLinksResponse.md | 21 +- .../Operations/BulkUpdateLinksTagIds.md | 19 + .../Operations/BulkUpdateLinksTagNames.md | 19 + .../Models/Operations/CreateDomainResponse.md | 21 +- .../Operations/CreateLinkRequestBody.md | 6 +- docs/Models/Operations/CreateLinkResponse.md | 21 +- .../Models/Operations/CreateTagRequestBody.md | 2 +- docs/Models/Operations/CreateTagResponse.md | 21 +- docs/Models/Operations/Data.md | 6 +- .../Models/Operations/DeleteDomainResponse.md | 21 +- docs/Models/Operations/DeleteLinkResponse.md | 21 +- docs/Models/Operations/GetLinkInfoResponse.md | 21 +- .../GetLinksCountQueryParamTagIds.md | 19 + .../GetLinksCountQueryParamTagNames.md | 19 + .../Models/Operations/GetLinksCountRequest.md | 6 +- .../Operations/GetLinksCountResponse.md | 21 +- docs/Models/Operations/GetLinksRequest.md | 6 +- docs/Models/Operations/GetLinksResponse.md | 21 +- docs/Models/Operations/GetMetatagsResponse.md | 2 +- docs/Models/Operations/GetQRCodeRequest.md | 2 +- docs/Models/Operations/GetQRCodeResponse.md | 21 +- docs/Models/Operations/GetTagsResponse.md | 21 +- .../Models/Operations/GetWorkspaceResponse.md | 21 +- docs/Models/Operations/GroupBy.md | 42 +- docs/Models/Operations/ListDomainsResponse.md | 21 +- docs/Models/Operations/ListEventsRequest.md | 31 + docs/Models/Operations/ListEventsResponse.md | 11 + docs/Models/Operations/One.md | 8 + docs/Models/Operations/Order.md | 9 + docs/Models/Operations/QueryParamEvent.md | 13 + docs/Models/Operations/QueryParamGroupBy.md | 21 + docs/Models/Operations/QueryParamInterval.md | 17 + docs/Models/Operations/QueryParamTagIds.md | 19 + docs/Models/Operations/QueryParamTagNames.md | 19 + docs/Models/Operations/RequestBody.md | 6 +- .../Operations/RetrieveAnalyticsRequest.md | 10 +- .../Operations/RetrieveAnalyticsResponse.md | 21 +- .../RetrieveAnalyticsResponseBody.md | 187 ++ docs/Models/Operations/SortBy.md | 9 + docs/Models/Operations/TagIds.md | 19 + docs/Models/Operations/TagNames.md | 19 + docs/Models/Operations/Three.md | 8 + .../Operations/TrackCustomerResponse.md | 21 +- docs/Models/Operations/TrackLeadResponse.md | 21 +- .../Models/Operations/TrackSaleRequestBody.md | 2 +- docs/Models/Operations/TrackSaleResponse.md | 21 +- docs/Models/Operations/Two.md | 8 + docs/Models/Operations/UpdateDomainRequest.md | 8 +- .../Models/Operations/UpdateDomainResponse.md | 21 +- docs/Models/Operations/UpdateLinkRequest.md | 2 +- .../Operations/UpdateLinkRequestBody.md | 6 +- docs/Models/Operations/UpdateLinkResponse.md | 21 +- docs/Models/Operations/UpdateLinkTagIds.md | 19 + docs/Models/Operations/UpdateLinkTagNames.md | 19 + docs/Models/Operations/UpdateTagRequest.md | 8 +- .../Models/Operations/UpdateTagRequestBody.md | 2 +- docs/Models/Operations/UpdateTagResponse.md | 21 +- .../Operations/UpdateWorkspaceRequest.md | 8 +- .../Operations/UpdateWorkspaceResponse.md | 21 +- .../Operations/UpsertLinkRequestBody.md | 6 +- docs/Models/Operations/UpsertLinkResponse.md | 21 +- docs/Models/Operations/UpsertLinkTagIds.md | 19 + docs/Models/Operations/UpsertLinkTagNames.md | 19 + docs/sdks/analytics/README.md | 79 +- docs/sdks/domains/README.md | 146 +- docs/sdks/events/README.md | 90 + docs/sdks/links/README.md | 2607 +++++++++-------- docs/sdks/metatags/README.md | 16 +- docs/sdks/qrcodes/README.md | 49 +- docs/sdks/tags/README.md | 113 +- docs/sdks/track/README.md | 155 +- docs/sdks/workspaces/README.md | 70 +- phpstan.neon | 3 +- phpunit.xml | 17 + src/Analytics.php | 105 +- src/Domains.php | 424 ++- src/Dub.php | 5 + src/DubBuilder.php | 5 +- src/Events.php | 143 + src/Links.php | 926 ++++-- src/Metatags.php | 43 +- src/Models/Components/BadRequest.php | 22 - src/Models/Components/ClickEvents.php | 154 + 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/Conflict.php | 22 - src/Models/Components/Country.php | 265 ++ src/Models/Components/DomainSchema.php | 40 +- src/Models/Components/Domains.php | 16 +- src/Models/Components/Forbidden.php | 22 - src/Models/Components/Geo.php | 2004 +++++++++---- src/Models/Components/InternalServerError.php | 22 - src/Models/Components/InviteExpired.php | 22 - 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/LinkGeoTargeting.php | 2004 +++++++++---- src/Models/Components/LinkSchema.php | 170 +- src/Models/Components/NotFound.php | 22 - src/Models/Components/RateLimitExceeded.php | 22 - src/Models/Components/SalesBrowsers.php | 49 + src/Models/Components/SalesCities.php | 60 + src/Models/Components/SalesCitiesCountry.php | 265 ++ 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/SalesReferers.php | 49 + src/Models/Components/SalesTimeseries.php | 49 + src/Models/Components/SalesTopLinks.php | 110 + src/Models/Components/SalesTopUrls.php | 49 + src/Models/Components/Security.php | 13 +- src/Models/Components/TagSchema.php | 19 +- src/Models/Components/Unauthorized.php | 22 - src/Models/Components/UnprocessableEntity.php | 22 - src/Models/Components/Users.php | 11 +- src/Models/Components/WorkspaceSchema.php | 92 +- src/Models/Errors/BadRequest.php | 30 + src/Models/{Components => Errors}/Code.php | 2 +- src/Models/Errors/Conflict.php | 30 + .../{Components => Errors}/ConflictCode.php | 2 +- .../{Components => Errors}/ConflictError.php | 21 +- src/Models/{Components => Errors}/Error.php | 21 +- src/Models/Errors/Forbidden.php | 30 + .../{Components => Errors}/ForbiddenCode.php | 2 +- .../{Components => Errors}/ForbiddenError.php | 21 +- src/Models/Errors/InternalServerError.php | 30 + .../InternalServerErrorCode.php | 2 +- .../InternalServerErrorError.php | 21 +- src/Models/Errors/InviteExpired.php | 30 + .../InviteExpiredCode.php | 2 +- .../InviteExpiredError.php | 21 +- src/Models/Errors/NotFound.php | 30 + .../{Components => Errors}/NotFoundCode.php | 2 +- .../{Components => Errors}/NotFoundError.php | 21 +- src/Models/Errors/RateLimitExceeded.php | 30 + .../RateLimitExceededCode.php | 2 +- .../RateLimitExceededError.php | 21 +- src/Models/Errors/SDKException.php | 32 + src/Models/Errors/Unauthorized.php | 30 + .../UnauthorizedCode.php | 2 +- .../UnauthorizedError.php | 21 +- src/Models/Errors/UnprocessableEntity.php | 30 + .../UnprocessableEntityCode.php | 2 +- .../UnprocessableEntityError.php | 21 +- .../Operations/BulkCreateLinksResponse.php | 92 +- .../Operations/BulkUpdateLinksRequestBody.php | 16 +- .../Operations/BulkUpdateLinksResponse.php | 92 +- .../Operations/CreateDomainRequestBody.php | 20 +- .../Operations/CreateDomainResponse.php | 94 +- .../Operations/CreateLinkRequestBody.php | 141 +- src/Models/Operations/CreateLinkResponse.php | 94 +- .../Operations/CreateTagRequestBody.php | 19 +- src/Models/Operations/CreateTagResponse.php | 94 +- src/Models/Operations/Data.php | 125 +- src/Models/Operations/DeleteDomainRequest.php | 7 +- .../Operations/DeleteDomainResponse.php | 90 +- .../Operations/DeleteDomainResponseBody.php | 8 +- src/Models/Operations/DeleteLinkRequest.php | 7 +- src/Models/Operations/DeleteLinkResponse.php | 90 +- .../Operations/DeleteLinkResponseBody.php | 8 +- src/Models/Operations/GetLinkInfoRequest.php | 20 +- src/Models/Operations/GetLinkInfoResponse.php | 94 +- .../Operations/GetLinksCountRequest.php | 43 +- .../Operations/GetLinksCountResponse.php | 88 +- src/Models/Operations/GetLinksRequest.php | 47 +- src/Models/Operations/GetLinksResponse.php | 92 +- src/Models/Operations/GetMetatagsRequest.php | 7 +- src/Models/Operations/GetMetatagsResponse.php | 22 +- .../Operations/GetMetatagsResponseBody.php | 16 +- src/Models/Operations/GetQRCodeRequest.php | 24 +- src/Models/Operations/GetQRCodeResponse.php | 88 +- src/Models/Operations/GetTagsResponse.php | 92 +- src/Models/Operations/GetWorkspaceRequest.php | 7 +- .../Operations/GetWorkspaceResponse.php | 94 +- src/Models/Operations/ListDomainsRequest.php | 16 +- src/Models/Operations/ListDomainsResponse.php | 92 +- src/Models/Operations/ListEventsRequest.php | 256 ++ src/Models/Operations/ListEventsResponse.php | 55 + src/Models/Operations/One.php | 15 + src/Models/Operations/Order.php | 17 + src/Models/Operations/QueryParamEvent.php | 19 + .../{GroupBy.php => QueryParamGroupBy.php} | 2 +- src/Models/Operations/QueryParamInterval.php | 23 + src/Models/Operations/RequestBody.php | 141 +- .../Operations/RetrieveAnalyticsRequest.php | 84 +- .../Operations/RetrieveAnalyticsResponse.php | 94 +- src/Models/Operations/SortBy.php | 17 + src/Models/Operations/Three.php | 15 + .../Operations/TrackCustomerRequestBody.php | 20 +- .../Operations/TrackCustomerResponse.php | 90 +- .../Operations/TrackCustomerResponseBody.php | 36 +- .../Operations/TrackLeadRequestBody.php | 31 +- src/Models/Operations/TrackLeadResponse.php | 90 +- .../Operations/TrackLeadResponseBody.php | 55 +- .../Operations/TrackSaleRequestBody.php | 34 +- src/Models/Operations/TrackSaleResponse.php | 90 +- .../Operations/TrackSaleResponseBody.php | 55 +- src/Models/Operations/Two.php | 15 + src/Models/Operations/UpdateDomainRequest.php | 14 +- .../Operations/UpdateDomainRequestBody.php | 20 +- .../Operations/UpdateDomainResponse.php | 94 +- src/Models/Operations/UpdateLinkRequest.php | 14 +- .../Operations/UpdateLinkRequestBody.php | 143 +- src/Models/Operations/UpdateLinkResponse.php | 94 +- src/Models/Operations/UpdateTagRequest.php | 14 +- .../Operations/UpdateTagRequestBody.php | 19 +- src/Models/Operations/UpdateTagResponse.php | 94 +- .../Operations/UpdateWorkspaceRequest.php | 14 +- .../Operations/UpdateWorkspaceRequestBody.php | 20 +- .../Operations/UpdateWorkspaceResponse.php | 94 +- .../Operations/UpsertLinkRequestBody.php | 141 +- src/Models/Operations/UpsertLinkResponse.php | 94 +- src/QRCodes.php | 106 +- src/SDKConfiguration.php | 12 +- src/Tags.php | 308 +- src/Track.php | 303 +- src/Utils/DateHandler.php | 49 + src/Utils/DateTimeHandler.php | 49 + src/Utils/DefaultResponse.php | 88 + src/Utils/DefaultStream.php | 86 + src/Utils/EnumHandler.php | 7 +- src/Utils/Headers.php | 4 +- src/Utils/JSON.php | 15 +- src/Utils/MixedJSONHandler.php | 3 +- src/Utils/PathParameters.php | 4 +- src/Utils/PhpDocTypeParser.php | 95 + src/Utils/RequestBodies.php | 1 + src/Utils/UnionHandler.php | 270 ++ src/Utils/Utils.php | 17 +- src/Workspaces.php | 215 +- 346 files changed, 17056 insertions(+), 8000 deletions(-) delete mode 100644 docs/Models/Components/BadRequest.md create mode 100644 docs/Models/Components/ClickEvents.md create mode 100644 docs/Models/Components/ClicksBrowsers.md create mode 100644 docs/Models/Components/ClicksCities.md create mode 100644 docs/Models/Components/ClicksCitiesCountry.md create mode 100644 docs/Models/Components/ClicksCount.md create mode 100644 docs/Models/Components/ClicksCountries.md create mode 100644 docs/Models/Components/ClicksDevices.md create mode 100644 docs/Models/Components/ClicksOS.md create mode 100644 docs/Models/Components/ClicksReferers.md create mode 100644 docs/Models/Components/ClicksTimeseries.md create mode 100644 docs/Models/Components/ClicksTopLinks.md create mode 100644 docs/Models/Components/ClicksTopUrls.md delete mode 100644 docs/Models/Components/Conflict.md delete mode 100644 docs/Models/Components/ConflictError.md create mode 100644 docs/Models/Components/Country.md delete mode 100644 docs/Models/Components/InternalServerError.md delete mode 100644 docs/Models/Components/InternalServerErrorError.md delete mode 100644 docs/Models/Components/InviteExpired.md delete mode 100644 docs/Models/Components/InviteExpiredError.md create mode 100644 docs/Models/Components/LeadsBrowsers.md create mode 100644 docs/Models/Components/LeadsCities.md create mode 100644 docs/Models/Components/LeadsCitiesCountry.md create mode 100644 docs/Models/Components/LeadsCount.md create mode 100644 docs/Models/Components/LeadsCountries.md create mode 100644 docs/Models/Components/LeadsCountriesCountry.md create mode 100644 docs/Models/Components/LeadsDevices.md create mode 100644 docs/Models/Components/LeadsOS.md create mode 100644 docs/Models/Components/LeadsReferers.md create mode 100644 docs/Models/Components/LeadsTimeseries.md create mode 100644 docs/Models/Components/LeadsTopLinks.md create mode 100644 docs/Models/Components/LeadsTopUrls.md delete mode 100644 docs/Models/Components/NotFound.md delete mode 100644 docs/Models/Components/NotFoundError.md delete mode 100644 docs/Models/Components/RateLimitExceeded.md delete mode 100644 docs/Models/Components/RateLimitExceededError.md create mode 100644 docs/Models/Components/SalesBrowsers.md create mode 100644 docs/Models/Components/SalesCities.md create mode 100644 docs/Models/Components/SalesCitiesCountry.md create mode 100644 docs/Models/Components/SalesCount.md create mode 100644 docs/Models/Components/SalesCountries.md create mode 100644 docs/Models/Components/SalesCountriesCountry.md create mode 100644 docs/Models/Components/SalesDevices.md create mode 100644 docs/Models/Components/SalesOS.md create mode 100644 docs/Models/Components/SalesReferers.md create mode 100644 docs/Models/Components/SalesTimeseries.md create mode 100644 docs/Models/Components/SalesTopLinks.md create mode 100644 docs/Models/Components/SalesTopUrls.md delete mode 100644 docs/Models/Components/Unauthorized.md delete mode 100644 docs/Models/Components/UnauthorizedError.md delete mode 100644 docs/Models/Components/UnprocessableEntity.md delete mode 100644 docs/Models/Components/UnprocessableEntityError.md create mode 100644 docs/Models/Errors/BadRequest.md rename docs/Models/{Components => Errors}/Code.md (100%) create mode 100644 docs/Models/Errors/Conflict.md rename docs/Models/{Components => Errors}/ConflictCode.md (100%) create mode 100644 docs/Models/Errors/ConflictError.md rename docs/Models/{Components => Errors}/Error.md (92%) create mode 100644 docs/Models/Errors/Forbidden.md rename docs/Models/{Components => Errors}/ForbiddenCode.md (100%) create mode 100644 docs/Models/Errors/ForbiddenError.md rename docs/Models/{Components/Forbidden.md => Errors/InternalServerError.md} (80%) rename docs/Models/{Components => Errors}/InternalServerErrorCode.md (100%) rename docs/Models/{Components/ForbiddenError.md => Errors/InternalServerErrorError.md} (85%) create mode 100644 docs/Models/Errors/InviteExpired.md rename docs/Models/{Components => Errors}/InviteExpiredCode.md (100%) create mode 100644 docs/Models/Errors/InviteExpiredError.md create mode 100644 docs/Models/Errors/NotFound.md rename docs/Models/{Components => Errors}/NotFoundCode.md (100%) create mode 100644 docs/Models/Errors/NotFoundError.md create mode 100644 docs/Models/Errors/RateLimitExceeded.md rename docs/Models/{Components => Errors}/RateLimitExceededCode.md (100%) create mode 100644 docs/Models/Errors/RateLimitExceededError.md create mode 100644 docs/Models/Errors/Unauthorized.md rename docs/Models/{Components => Errors}/UnauthorizedCode.md (100%) create mode 100644 docs/Models/Errors/UnauthorizedError.md create mode 100644 docs/Models/Errors/UnprocessableEntity.md rename docs/Models/{Components => Errors}/UnprocessableEntityCode.md (100%) create mode 100644 docs/Models/Errors/UnprocessableEntityError.md create mode 100644 docs/Models/Operations/BulkCreateLinksTagIds.md create mode 100644 docs/Models/Operations/BulkCreateLinksTagNames.md create mode 100644 docs/Models/Operations/BulkUpdateLinksTagIds.md create mode 100644 docs/Models/Operations/BulkUpdateLinksTagNames.md create mode 100644 docs/Models/Operations/GetLinksCountQueryParamTagIds.md create mode 100644 docs/Models/Operations/GetLinksCountQueryParamTagNames.md create mode 100644 docs/Models/Operations/ListEventsRequest.md create mode 100644 docs/Models/Operations/ListEventsResponse.md create mode 100644 docs/Models/Operations/One.md create mode 100644 docs/Models/Operations/Order.md create mode 100644 docs/Models/Operations/QueryParamEvent.md create mode 100644 docs/Models/Operations/QueryParamGroupBy.md create mode 100644 docs/Models/Operations/QueryParamInterval.md create mode 100644 docs/Models/Operations/QueryParamTagIds.md create mode 100644 docs/Models/Operations/QueryParamTagNames.md create mode 100644 docs/Models/Operations/RetrieveAnalyticsResponseBody.md create mode 100644 docs/Models/Operations/SortBy.md create mode 100644 docs/Models/Operations/TagIds.md create mode 100644 docs/Models/Operations/TagNames.md create mode 100644 docs/Models/Operations/Three.md create mode 100644 docs/Models/Operations/Two.md create mode 100644 docs/Models/Operations/UpdateLinkTagIds.md create mode 100644 docs/Models/Operations/UpdateLinkTagNames.md create mode 100644 docs/Models/Operations/UpsertLinkTagIds.md create mode 100644 docs/Models/Operations/UpsertLinkTagNames.md create mode 100644 docs/sdks/events/README.md create mode 100644 phpunit.xml create mode 100644 src/Events.php delete mode 100644 src/Models/Components/BadRequest.php create mode 100644 src/Models/Components/ClickEvents.php create mode 100644 src/Models/Components/ClicksBrowsers.php create mode 100644 src/Models/Components/ClicksCities.php create mode 100644 src/Models/Components/ClicksCitiesCountry.php create mode 100644 src/Models/Components/ClicksCount.php create mode 100644 src/Models/Components/ClicksCountries.php create mode 100644 src/Models/Components/ClicksDevices.php create mode 100644 src/Models/Components/ClicksOS.php create mode 100644 src/Models/Components/ClicksReferers.php create mode 100644 src/Models/Components/ClicksTimeseries.php create mode 100644 src/Models/Components/ClicksTopLinks.php create mode 100644 src/Models/Components/ClicksTopUrls.php delete mode 100644 src/Models/Components/Conflict.php create mode 100644 src/Models/Components/Country.php delete mode 100644 src/Models/Components/Forbidden.php delete mode 100644 src/Models/Components/InternalServerError.php delete mode 100644 src/Models/Components/InviteExpired.php create mode 100644 src/Models/Components/LeadsBrowsers.php create mode 100644 src/Models/Components/LeadsCities.php create mode 100644 src/Models/Components/LeadsCitiesCountry.php create mode 100644 src/Models/Components/LeadsCount.php create mode 100644 src/Models/Components/LeadsCountries.php create mode 100644 src/Models/Components/LeadsCountriesCountry.php create mode 100644 src/Models/Components/LeadsDevices.php create mode 100644 src/Models/Components/LeadsOS.php create mode 100644 src/Models/Components/LeadsReferers.php create mode 100644 src/Models/Components/LeadsTimeseries.php create mode 100644 src/Models/Components/LeadsTopLinks.php create mode 100644 src/Models/Components/LeadsTopUrls.php delete mode 100644 src/Models/Components/NotFound.php delete mode 100644 src/Models/Components/RateLimitExceeded.php create mode 100644 src/Models/Components/SalesBrowsers.php create mode 100644 src/Models/Components/SalesCities.php create mode 100644 src/Models/Components/SalesCitiesCountry.php create mode 100644 src/Models/Components/SalesCount.php create mode 100644 src/Models/Components/SalesCountries.php create mode 100644 src/Models/Components/SalesCountriesCountry.php create mode 100644 src/Models/Components/SalesDevices.php create mode 100644 src/Models/Components/SalesOS.php create mode 100644 src/Models/Components/SalesReferers.php create mode 100644 src/Models/Components/SalesTimeseries.php create mode 100644 src/Models/Components/SalesTopLinks.php create mode 100644 src/Models/Components/SalesTopUrls.php delete mode 100644 src/Models/Components/Unauthorized.php delete mode 100644 src/Models/Components/UnprocessableEntity.php create mode 100644 src/Models/Errors/BadRequest.php rename src/Models/{Components => Errors}/Code.php (87%) create mode 100644 src/Models/Errors/Conflict.php rename src/Models/{Components => Errors}/ConflictCode.php (87%) rename src/Models/{Components => Errors}/ConflictError.php (63%) rename src/Models/{Components => Errors}/Error.php (64%) create mode 100644 src/Models/Errors/Forbidden.php rename src/Models/{Components => Errors}/ForbiddenCode.php (87%) rename src/Models/{Components => Errors}/ForbiddenError.php (62%) create mode 100644 src/Models/Errors/InternalServerError.php rename src/Models/{Components => Errors}/InternalServerErrorCode.php (88%) rename src/Models/{Components => Errors}/InternalServerErrorError.php (61%) create mode 100644 src/Models/Errors/InviteExpired.php rename src/Models/{Components => Errors}/InviteExpiredCode.php (88%) rename src/Models/{Components => Errors}/InviteExpiredError.php (62%) create mode 100644 src/Models/Errors/NotFound.php rename src/Models/{Components => Errors}/NotFoundCode.php (87%) rename src/Models/{Components => Errors}/NotFoundError.php (63%) create mode 100644 src/Models/Errors/RateLimitExceeded.php rename src/Models/{Components => Errors}/RateLimitExceededCode.php (88%) rename src/Models/{Components => Errors}/RateLimitExceededError.php (61%) create mode 100644 src/Models/Errors/SDKException.php create mode 100644 src/Models/Errors/Unauthorized.php rename src/Models/{Components => Errors}/UnauthorizedCode.php (88%) rename src/Models/{Components => Errors}/UnauthorizedError.php (62%) create mode 100644 src/Models/Errors/UnprocessableEntity.php rename src/Models/{Components => Errors}/UnprocessableEntityCode.php (88%) rename src/Models/{Components => Errors}/UnprocessableEntityError.php (61%) create mode 100644 src/Models/Operations/ListEventsRequest.php create mode 100644 src/Models/Operations/ListEventsResponse.php create mode 100644 src/Models/Operations/One.php create mode 100644 src/Models/Operations/Order.php create mode 100644 src/Models/Operations/QueryParamEvent.php rename src/Models/Operations/{GroupBy.php => QueryParamGroupBy.php} (95%) create mode 100644 src/Models/Operations/QueryParamInterval.php create mode 100644 src/Models/Operations/SortBy.php create mode 100644 src/Models/Operations/Three.php create mode 100644 src/Models/Operations/Two.php create mode 100644 src/Utils/DateHandler.php create mode 100644 src/Utils/DateTimeHandler.php create mode 100644 src/Utils/DefaultResponse.php create mode 100644 src/Utils/DefaultStream.php create mode 100644 src/Utils/PhpDocTypeParser.php create mode 100644 src/Utils/UnionHandler.php diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 141ede3..bab23c4 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,29 +1,33 @@ lockVersion: 2.0.0 id: 43187d3e-7c3c-4c11-b5d4-4b2334fb6d96 management: - docChecksum: e0d1746d131c608a54c04b32762b2faa + docChecksum: f10061c7787170c0db643f22823c9aa9 docVersion: 0.0.1 - speakeasyVersion: 1.348.1 - generationVersion: 2.380.1 - releaseVersion: 0.2.6 - configChecksum: 083dc9718ef1b94aea4cf95727f1bf54 + speakeasyVersion: 1.376.0 + generationVersion: 2.402.5 + releaseVersion: 0.3.0 + configChecksum: b9212d5fc23da407ab89aa6110b52f4d repoURL: https://github.com/dubinc/dub-php.git installationURL: https://github.com/dubinc/dub-php features: php: - core: 3.3.10 + core: 3.3.11 deprecations: 2.81.1 + errors: 0.1.0 examples: 2.81.3 flattening: 2.81.1 - globalSecurity: 2.81.6 + globalSecurity: 2.81.7 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.82.1 nameOverrides: 2.81.2 + responseFormat: 0.1.0 + unions: 0.1.0 generatedFiles: - src/SDKConfiguration.php - src/Links.php - src/QRCodes.php - src/Analytics.php + - src/Events.php - src/Workspaces.php - src/Tags.php - src/Domains.php @@ -33,8 +37,13 @@ generatedFiles: - src/DubBuilder.php - composer.json - phpstan.neon + - phpunit.xml - pint.json - rector.php + - src/Utils/DateHandler.php + - src/Utils/DateTimeHandler.php + - src/Utils/DefaultResponse.php + - src/Utils/DefaultStream.php - src/Utils/EnumHandler.php - src/Utils/FormMetadata.php - src/Utils/Headers.php @@ -43,6 +52,7 @@ generatedFiles: - src/Utils/MultipartMetadata.php - src/Utils/ParamsMetadata.php - src/Utils/PathParameters.php + - src/Utils/PhpDocTypeParser.php - src/Utils/QueryParameters.php - src/Utils/RequestBodies.php - src/Utils/RequestMetadata.php @@ -50,12 +60,17 @@ generatedFiles: - src/Utils/SecurityClient.php - src/Utils/SecurityMetadata.php - src/Utils/SpeakeasyMetadata.php + - src/Utils/UnionHandler.php - src/Utils/Utils.php + - src/Models/Errors/SDKException.php - src/Models/Operations/Sort.php - src/Models/Operations/GetLinksRequest.php - src/Models/Operations/GetLinksResponse.php - src/Models/Operations/CreateLinkRequestBody.php - src/Models/Operations/CreateLinkResponse.php + - src/Models/Operations/Three.php + - src/Models/Operations/Two.php + - src/Models/Operations/One.php - src/Models/Operations/GetLinksCountRequest.php - src/Models/Operations/GetLinksCountResponse.php - src/Models/Operations/GetLinkInfoRequest.php @@ -77,10 +92,16 @@ generatedFiles: - src/Models/Operations/GetQRCodeRequest.php - src/Models/Operations/GetQRCodeResponse.php - src/Models/Operations/Event.php - - src/Models/Operations/GroupBy.php + - src/Models/Operations/QueryParamGroupBy.php - src/Models/Operations/Interval.php - src/Models/Operations/RetrieveAnalyticsRequest.php - src/Models/Operations/RetrieveAnalyticsResponse.php + - src/Models/Operations/QueryParamEvent.php + - src/Models/Operations/QueryParamInterval.php + - src/Models/Operations/Order.php + - src/Models/Operations/SortBy.php + - src/Models/Operations/ListEventsRequest.php + - src/Models/Operations/ListEventsResponse.php - src/Models/Operations/GetWorkspaceRequest.php - src/Models/Operations/GetWorkspaceResponse.php - src/Models/Operations/UpdateWorkspaceRequestBody.php @@ -117,40 +138,50 @@ generatedFiles: - src/Models/Operations/GetMetatagsRequest.php - src/Models/Operations/GetMetatagsResponseBody.php - src/Models/Operations/GetMetatagsResponse.php - - src/Models/Components/InternalServerErrorCode.php - - src/Models/Components/InternalServerErrorError.php - - src/Models/Components/InternalServerError.php - - src/Models/Components/RateLimitExceededCode.php - - src/Models/Components/RateLimitExceededError.php - - src/Models/Components/RateLimitExceeded.php - - src/Models/Components/UnprocessableEntityCode.php - - src/Models/Components/UnprocessableEntityError.php - - src/Models/Components/UnprocessableEntity.php - - src/Models/Components/InviteExpiredCode.php - - src/Models/Components/InviteExpiredError.php - - src/Models/Components/InviteExpired.php - - src/Models/Components/ConflictCode.php - - src/Models/Components/ConflictError.php - - src/Models/Components/Conflict.php - - src/Models/Components/NotFoundCode.php - - src/Models/Components/NotFoundError.php - - src/Models/Components/NotFound.php - - src/Models/Components/ForbiddenCode.php - - src/Models/Components/ForbiddenError.php - - src/Models/Components/Forbidden.php - - src/Models/Components/UnauthorizedCode.php - - src/Models/Components/UnauthorizedError.php - - src/Models/Components/Unauthorized.php - - src/Models/Components/Code.php - - src/Models/Components/Error.php - - src/Models/Components/BadRequest.php - src/Models/Components/Geo.php - src/Models/Components/LinkSchema.php - 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/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/CountryCode.php - src/Models/Components/ContinentCode.php + - src/Models/Components/ClickEvents.php - src/Models/Components/Plan.php - src/Models/Components/Role.php - src/Models/Components/Users.php @@ -158,11 +189,48 @@ generatedFiles: - src/Models/Components/WorkspaceSchema.php - src/Models/Components/DomainSchema.php - src/Models/Components/Security.php + - src/Models/Errors/Code.php + - src/Models/Errors/Error.php + - src/Models/Errors/BadRequest.php + - src/Models/Errors/UnauthorizedCode.php + - src/Models/Errors/UnauthorizedError.php + - src/Models/Errors/Unauthorized.php + - src/Models/Errors/ForbiddenCode.php + - src/Models/Errors/ForbiddenError.php + - src/Models/Errors/Forbidden.php + - src/Models/Errors/NotFoundCode.php + - src/Models/Errors/NotFoundError.php + - src/Models/Errors/NotFound.php + - src/Models/Errors/ConflictCode.php + - src/Models/Errors/ConflictError.php + - src/Models/Errors/Conflict.php + - src/Models/Errors/InviteExpiredCode.php + - src/Models/Errors/InviteExpiredError.php + - src/Models/Errors/InviteExpired.php + - src/Models/Errors/UnprocessableEntityCode.php + - src/Models/Errors/UnprocessableEntityError.php + - src/Models/Errors/UnprocessableEntity.php + - src/Models/Errors/RateLimitExceededCode.php + - src/Models/Errors/RateLimitExceededError.php + - src/Models/Errors/RateLimitExceeded.php + - src/Models/Errors/InternalServerErrorCode.php + - src/Models/Errors/InternalServerErrorError.php + - src/Models/Errors/InternalServerError.php + - docs/Models/Operations/QueryParamTagIds.md + - docs/Models/Operations/QueryParamTagNames.md - docs/Models/Operations/Sort.md - docs/Models/Operations/GetLinksRequest.md - docs/Models/Operations/GetLinksResponse.md + - docs/Models/Operations/TagIds.md + - docs/Models/Operations/TagNames.md - docs/Models/Operations/CreateLinkRequestBody.md - docs/Models/Operations/CreateLinkResponse.md + - docs/Models/Operations/GetLinksCountQueryParamTagIds.md + - docs/Models/Operations/GetLinksCountQueryParamTagNames.md + - docs/Models/Operations/Three.md + - docs/Models/Operations/Two.md + - docs/Models/Operations/One.md + - docs/Models/Operations/GroupBy.md - docs/Models/Operations/GetLinksCountRequest.md - docs/Models/Operations/GetLinksCountResponse.md - docs/Models/Operations/GetLinkInfoRequest.md @@ -170,24 +238,39 @@ generatedFiles: - docs/Models/Operations/DeleteLinkRequest.md - docs/Models/Operations/DeleteLinkResponseBody.md - docs/Models/Operations/DeleteLinkResponse.md + - docs/Models/Operations/UpdateLinkTagIds.md + - docs/Models/Operations/UpdateLinkTagNames.md - docs/Models/Operations/UpdateLinkRequestBody.md - docs/Models/Operations/UpdateLinkRequest.md - docs/Models/Operations/UpdateLinkResponse.md + - docs/Models/Operations/BulkCreateLinksTagIds.md + - docs/Models/Operations/BulkCreateLinksTagNames.md - docs/Models/Operations/RequestBody.md - docs/Models/Operations/BulkCreateLinksResponse.md + - docs/Models/Operations/BulkUpdateLinksTagIds.md + - docs/Models/Operations/BulkUpdateLinksTagNames.md - docs/Models/Operations/Data.md - docs/Models/Operations/BulkUpdateLinksRequestBody.md - docs/Models/Operations/BulkUpdateLinksResponse.md + - docs/Models/Operations/UpsertLinkTagIds.md + - docs/Models/Operations/UpsertLinkTagNames.md - docs/Models/Operations/UpsertLinkRequestBody.md - docs/Models/Operations/UpsertLinkResponse.md - docs/Models/Operations/Level.md - docs/Models/Operations/GetQRCodeRequest.md - docs/Models/Operations/GetQRCodeResponse.md - docs/Models/Operations/Event.md - - docs/Models/Operations/GroupBy.md + - docs/Models/Operations/QueryParamGroupBy.md - docs/Models/Operations/Interval.md - docs/Models/Operations/RetrieveAnalyticsRequest.md + - docs/Models/Operations/RetrieveAnalyticsResponseBody.md - docs/Models/Operations/RetrieveAnalyticsResponse.md + - docs/Models/Operations/QueryParamEvent.md + - docs/Models/Operations/QueryParamInterval.md + - docs/Models/Operations/Order.md + - docs/Models/Operations/SortBy.md + - docs/Models/Operations/ListEventsRequest.md + - docs/Models/Operations/ListEventsResponse.md - docs/Models/Operations/GetWorkspaceRequest.md - docs/Models/Operations/GetWorkspaceResponse.md - docs/Models/Operations/UpdateWorkspaceRequestBody.md @@ -224,40 +307,50 @@ generatedFiles: - docs/Models/Operations/GetMetatagsRequest.md - docs/Models/Operations/GetMetatagsResponseBody.md - docs/Models/Operations/GetMetatagsResponse.md - - docs/Models/Components/InternalServerErrorCode.md - - docs/Models/Components/InternalServerErrorError.md - - docs/Models/Components/InternalServerError.md - - docs/Models/Components/RateLimitExceededCode.md - - docs/Models/Components/RateLimitExceededError.md - - docs/Models/Components/RateLimitExceeded.md - - docs/Models/Components/UnprocessableEntityCode.md - - docs/Models/Components/UnprocessableEntityError.md - - docs/Models/Components/UnprocessableEntity.md - - docs/Models/Components/InviteExpiredCode.md - - docs/Models/Components/InviteExpiredError.md - - docs/Models/Components/InviteExpired.md - - docs/Models/Components/ConflictCode.md - - docs/Models/Components/ConflictError.md - - docs/Models/Components/Conflict.md - - docs/Models/Components/NotFoundCode.md - - docs/Models/Components/NotFoundError.md - - docs/Models/Components/NotFound.md - - docs/Models/Components/ForbiddenCode.md - - docs/Models/Components/ForbiddenError.md - - docs/Models/Components/Forbidden.md - - docs/Models/Components/UnauthorizedCode.md - - docs/Models/Components/UnauthorizedError.md - - docs/Models/Components/Unauthorized.md - - docs/Models/Components/Code.md - - docs/Models/Components/Error.md - - docs/Models/Components/BadRequest.md - docs/Models/Components/Geo.md - docs/Models/Components/LinkSchema.md - 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/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/CountryCode.md - docs/Models/Components/ContinentCode.md + - docs/Models/Components/ClickEvents.md - docs/Models/Components/Plan.md - docs/Models/Components/Role.md - docs/Models/Components/Users.md @@ -265,10 +358,38 @@ generatedFiles: - docs/Models/Components/WorkspaceSchema.md - docs/Models/Components/DomainSchema.md - docs/Models/Components/Security.md + - docs/Models/Errors/Code.md + - docs/Models/Errors/Error.md + - docs/Models/Errors/BadRequest.md + - docs/Models/Errors/UnauthorizedCode.md + - docs/Models/Errors/UnauthorizedError.md + - docs/Models/Errors/Unauthorized.md + - docs/Models/Errors/ForbiddenCode.md + - docs/Models/Errors/ForbiddenError.md + - docs/Models/Errors/Forbidden.md + - docs/Models/Errors/NotFoundCode.md + - docs/Models/Errors/NotFoundError.md + - docs/Models/Errors/NotFound.md + - docs/Models/Errors/ConflictCode.md + - docs/Models/Errors/ConflictError.md + - docs/Models/Errors/Conflict.md + - docs/Models/Errors/InviteExpiredCode.md + - docs/Models/Errors/InviteExpiredError.md + - docs/Models/Errors/InviteExpired.md + - docs/Models/Errors/UnprocessableEntityCode.md + - docs/Models/Errors/UnprocessableEntityError.md + - docs/Models/Errors/UnprocessableEntity.md + - docs/Models/Errors/RateLimitExceededCode.md + - docs/Models/Errors/RateLimitExceededError.md + - docs/Models/Errors/RateLimitExceeded.md + - docs/Models/Errors/InternalServerErrorCode.md + - docs/Models/Errors/InternalServerErrorError.md + - docs/Models/Errors/InternalServerError.md - docs/sdks/dub/README.md - docs/sdks/links/README.md - docs/sdks/qrcodes/README.md - docs/sdks/analytics/README.md + - docs/sdks/events/README.md - docs/sdks/workspaces/README.md - docs/sdks/tags/README.md - docs/sdks/domains/README.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 89d76f0..0ee5d21 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,8 @@ generation: auth: oAuth2ClientCredentialsEnabled: true php: - version: 0.2.6 + version: 0.3.0 + clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: option: openapi diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c3fe6ed..df62985 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.348.1 +speakeasyVersion: 1.376.0 sources: dub: sourceNamespace: dub - sourceRevisionDigest: sha256:9319ceb7733849892cb97cf6d552bef01f7fe76693fdc350be159235d8ba88d2 - sourceBlobDigest: sha256:e9530928bb6e1851b36e43f0b3f24e7cc88a57714cdfd4c3ee091efc1f119efd + sourceRevisionDigest: sha256:835997901bef9668c2684528b3de24ca696ff433795ca9591ca8bb9a65f0d14f + sourceBlobDigest: sha256:95a8dafd6f02195984538c42d60d9df2182a04eb50f3954f50aa24872b1814c2 tags: - latest - main @@ -11,10 +11,10 @@ targets: my-first-target: source: dub sourceNamespace: dub - sourceRevisionDigest: sha256:9319ceb7733849892cb97cf6d552bef01f7fe76693fdc350be159235d8ba88d2 - sourceBlobDigest: sha256:e9530928bb6e1851b36e43f0b3f24e7cc88a57714cdfd4c3ee091efc1f119efd + sourceRevisionDigest: sha256:835997901bef9668c2684528b3de24ca696ff433795ca9591ca8bb9a65f0d14f + sourceBlobDigest: sha256:95a8dafd6f02195984538c42d60d9df2182a04eb50f3954f50aa24872b1814c2 codeSamplesNamespace: code-samples-php-my-first-target - codeSamplesRevisionDigest: sha256:54521ac792e84b748039726337935270c78f77007f175a6afc4291b0d195b020 + codeSamplesRevisionDigest: sha256:b204d48af776bff64452197c0e21afdde7038d7946878cf73e973d3ca45a5a7f outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 1122005..d3cdd76 100644 --- a/README.md +++ b/README.md @@ -50,306 +50,305 @@ composer update ### Example 1 ```php -token = 'DUB_API_KEY'; -$sdk = Dub\Dub::builder() - ->setSecurity($security) - ->build(); +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\CreateLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'lighthearted-kilogram.name'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = ['']; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'rHklDuL1dlrnUXo'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Reverse-engineered human-resource time-frame'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = ''; - + $request = new Operations\CreateLinkRequestBody( + url: 'https://google.com', + domain: 'lighthearted-kilogram.name', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'klDuL1dlrnUXohO', + proxy: false, + title: '', + description: 'User-friendly multi-state frame', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->create($request); if ($response->linkSchema !== null) { @@ -358,312 +357,310 @@ try { } catch (Throwable $e) { // handle exception } - ``` ### Example 2 ```php -token = 'DUB_API_KEY'; -$sdk = Dub\Dub::builder() - ->setSecurity($security) - ->build(); +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\UpsertLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'monthly-hometown.info'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = ['']; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'SFNg7iwZDcrQrPc'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Focused full-range forecast'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = ''; - + $request = new Operations\UpsertLinkRequestBody( + url: 'https://google.com', + domain: 'monthly-hometown.info', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'Ng7iwZDcrQrPcHB', + proxy: false, + title: '', + description: 'Organic asynchronous firmware', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->upsert($request); if ($response->linkSchema !== null) { @@ -672,7 +669,6 @@ try { } catch (Throwable $e) { // handle exception } - ``` @@ -699,6 +695,10 @@ try { * [retrieve](docs/sdks/analytics/README.md#retrieve) - Retrieve analytics for a link, a domain, or the authenticated workspace. +### [Events](docs/sdks/events/README.md) + +* [list](docs/sdks/events/README.md#list) - Retrieve a list of events + ### [Workspaces](docs/sdks/workspaces/README.md) * [get](docs/sdks/workspaces/README.md#get) - Retrieve a workspace diff --git a/RELEASES.md b/RELEASES.md index 3c69bae..578eda8 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -110,4 +110,12 @@ Based on: - OpenAPI Doc - Speakeasy CLI 1.348.1 (2.380.1) https://github.com/speakeasy-api/speakeasy ### Generated -- [php v0.2.6] . \ No newline at end of file +- [php v0.2.6] . + +## 2024-08-20 01:08:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.376.0 (2.402.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [php v0.3.0] . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 1688067..b2f71e7 100644 --- a/USAGE.md +++ b/USAGE.md @@ -1,305 +1,304 @@ ```php -token = 'DUB_API_KEY'; -$sdk = Dub\Dub::builder() - ->setSecurity($security) - ->build(); +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\CreateLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'lighthearted-kilogram.name'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = ['']; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'rHklDuL1dlrnUXo'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Reverse-engineered human-resource time-frame'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = ''; - + $request = new Operations\CreateLinkRequestBody( + url: 'https://google.com', + domain: 'lighthearted-kilogram.name', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'klDuL1dlrnUXohO', + proxy: false, + title: '', + description: 'User-friendly multi-state frame', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->create($request); if ($response->linkSchema !== null) { @@ -308,310 +307,308 @@ try { } catch (Throwable $e) { // handle exception } - ``` ```php -token = 'DUB_API_KEY'; -$sdk = Dub\Dub::builder() - ->setSecurity($security) - ->build(); +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\UpsertLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'monthly-hometown.info'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = ['']; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'SFNg7iwZDcrQrPc'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Focused full-range forecast'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = ''; - + $request = new Operations\UpsertLinkRequestBody( + url: 'https://google.com', + domain: 'monthly-hometown.info', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'Ng7iwZDcrQrPcHB', + proxy: false, + title: '', + description: 'Organic asynchronous firmware', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->upsert($request); if ($response->linkSchema !== null) { @@ -620,6 +617,5 @@ try { } catch (Throwable $e) { // handle exception } - ``` \ No newline at end of file diff --git a/codeSamples.yaml b/codeSamples.yaml index d8a8f81..cd5b9b4 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -3,147 +3,153 @@ info: title: CodeSamples overlay for php target version: 0.0.0 actions: - - target: $["paths"]["/links/{linkId}"]["delete"] - update: - "x-codeSamples": - - "lang": "php" - "label": "deleteLink" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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"]["/tags"]["post"] + - target: $["paths"]["/links"]["post"] update: "x-codeSamples": - "lang": "php" - "label": "createTag" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateTagRequestBody();\n $request->name = '';\n $request->color = Operations\\Color::Blue;\n $request->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"]["/domains/{slug}"]["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"]["/events"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "deleteDomain" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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"]["/links"]["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::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}" + - target: $["paths"]["/links/{linkId}"]["patch"] update: "x-codeSamples": - "lang": "php" - "label": "getLinks" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksRequest();\n $request->domain = 'smug-bow.name';\n $request->tagId = '';\n $request->tagIds = '';\n $request->tagNames = '';\n $request->search = '';\n $request->userId = '';\n $request->showArchived = false;\n $request->withTags = false;\n $request->sort = Operations\\Sort::CreatedAt;\n $request->page = 1;\n $request->pageSize = 50;;\n\n $response = $sdk->links->list($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" - - target: $["paths"]["/qr"]["get"] + "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": "getQRCode" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetQRCodeRequest();\n $request->url = 'https://brief-micronutrient.org';\n $request->size = 5442.21;\n $request->level = Operations\\Level::H;\n $request->fgColor = '';\n $request->bgColor = '';\n $request->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"]["/domains/{slug}"]["patch"] + "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"]["/analytics"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "updateDomain" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateDomainRequestBody();\n $requestBody->slug = 'acme.com';\n $requestBody->expiredUrl = 'https://acme.com/expired';\n $requestBody->archived = false;\n $requestBody->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/customer"]["post"] + "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"]["post"] update: "x-codeSamples": - "lang": "php" - "label": "trackCustomer" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackCustomerRequestBody();\n $request->customerId = '';\n $request->customerName = '';\n $request->customerEmail = 'Wilson.Smith@gmail.com';\n $request->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/{linkId}"]["patch"] + "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"]["/tags/{id}"]["patch"] update: "x-codeSamples": - "lang": "php" - "label": "updateLink" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateLinkRequestBody();\n $requestBody->url = 'https://google.com';\n $requestBody->domain = 'tidy-amazon.name';\n $requestBody->key = '';\n $requestBody->externalId = '123456';\n $requestBody->prefix = '';\n $requestBody->trackConversion = false;\n $requestBody->archived = false;\n $requestBody->publicStats = false;\n $requestBody->tagId = '';\n $requestBody->tagIds = [\n '',\n ];\n $requestBody->tagNames = '';\n $requestBody->comments = '';\n $requestBody->expiresAt = '';\n $requestBody->expiredUrl = '';\n $requestBody->password = 'AdaOKvPKDk8CkuA';\n $requestBody->proxy = false;\n $requestBody->title = '';\n $requestBody->description = 'Front-line 24/7 implementation';\n $requestBody->image = 'https://loremflickr.com/640/480';\n $requestBody->video = '';\n $requestBody->rewrite = false;\n $requestBody->ios = '';\n $requestBody->android = '';\n $requestBody->geo = new Components\\LinkGeoTargeting();\n $requestBody->geo->af = '';\n $requestBody->geo->al = '';\n $requestBody->geo->dz = '';\n $requestBody->geo->as = '';\n $requestBody->geo->ad = '';\n $requestBody->geo->ao = '';\n $requestBody->geo->ai = '';\n $requestBody->geo->aq = '';\n $requestBody->geo->ag = '';\n $requestBody->geo->ar = '';\n $requestBody->geo->am = '';\n $requestBody->geo->aw = '';\n $requestBody->geo->au = '';\n $requestBody->geo->at = '';\n $requestBody->geo->az = '';\n $requestBody->geo->bs = '';\n $requestBody->geo->bh = '';\n $requestBody->geo->bd = '';\n $requestBody->geo->bb = '';\n $requestBody->geo->by = '';\n $requestBody->geo->be = '';\n $requestBody->geo->bz = '';\n $requestBody->geo->bj = '';\n $requestBody->geo->bm = '';\n $requestBody->geo->bt = '';\n $requestBody->geo->bo = '';\n $requestBody->geo->ba = '';\n $requestBody->geo->bw = '';\n $requestBody->geo->bv = '';\n $requestBody->geo->br = '';\n $requestBody->geo->io = '';\n $requestBody->geo->bn = '';\n $requestBody->geo->bg = '';\n $requestBody->geo->bf = '';\n $requestBody->geo->bi = '';\n $requestBody->geo->kh = '';\n $requestBody->geo->cm = '';\n $requestBody->geo->ca = '';\n $requestBody->geo->cv = '';\n $requestBody->geo->ky = '';\n $requestBody->geo->cf = '';\n $requestBody->geo->td = '';\n $requestBody->geo->cl = '';\n $requestBody->geo->cn = '';\n $requestBody->geo->cx = '';\n $requestBody->geo->cc = '';\n $requestBody->geo->co = '';\n $requestBody->geo->km = '';\n $requestBody->geo->cg = '';\n $requestBody->geo->cd = '';\n $requestBody->geo->ck = '';\n $requestBody->geo->cr = '';\n $requestBody->geo->ci = '';\n $requestBody->geo->hr = '';\n $requestBody->geo->cu = '';\n $requestBody->geo->cy = '';\n $requestBody->geo->cz = '';\n $requestBody->geo->dk = '';\n $requestBody->geo->dj = '';\n $requestBody->geo->dm = '';\n $requestBody->geo->do = '';\n $requestBody->geo->ec = '';\n $requestBody->geo->eg = '';\n $requestBody->geo->sv = '';\n $requestBody->geo->gq = '';\n $requestBody->geo->er = '';\n $requestBody->geo->ee = '';\n $requestBody->geo->et = '';\n $requestBody->geo->fk = '';\n $requestBody->geo->fo = '';\n $requestBody->geo->fj = '';\n $requestBody->geo->fi = '';\n $requestBody->geo->fr = '';\n $requestBody->geo->gf = '';\n $requestBody->geo->pf = '';\n $requestBody->geo->tf = '';\n $requestBody->geo->ga = '';\n $requestBody->geo->gm = '';\n $requestBody->geo->ge = '';\n $requestBody->geo->de = '';\n $requestBody->geo->gh = '';\n $requestBody->geo->gi = '';\n $requestBody->geo->gr = '';\n $requestBody->geo->gl = '';\n $requestBody->geo->gd = '';\n $requestBody->geo->gp = '';\n $requestBody->geo->gu = '';\n $requestBody->geo->gt = '';\n $requestBody->geo->gn = '';\n $requestBody->geo->gw = '';\n $requestBody->geo->gy = '';\n $requestBody->geo->ht = '';\n $requestBody->geo->hm = '';\n $requestBody->geo->va = '';\n $requestBody->geo->hn = '';\n $requestBody->geo->hk = '';\n $requestBody->geo->hu = '';\n $requestBody->geo->is = '';\n $requestBody->geo->in = '';\n $requestBody->geo->id = '';\n $requestBody->geo->ir = '';\n $requestBody->geo->iq = '';\n $requestBody->geo->ie = '';\n $requestBody->geo->il = '';\n $requestBody->geo->it = '';\n $requestBody->geo->jm = '';\n $requestBody->geo->jp = '';\n $requestBody->geo->jo = '';\n $requestBody->geo->kz = '';\n $requestBody->geo->ke = '';\n $requestBody->geo->ki = '';\n $requestBody->geo->kp = '';\n $requestBody->geo->kr = '';\n $requestBody->geo->kw = '';\n $requestBody->geo->kg = '';\n $requestBody->geo->la = '';\n $requestBody->geo->lv = '';\n $requestBody->geo->lb = '';\n $requestBody->geo->ls = '';\n $requestBody->geo->lr = '';\n $requestBody->geo->ly = '';\n $requestBody->geo->li = '';\n $requestBody->geo->lt = '';\n $requestBody->geo->lu = '';\n $requestBody->geo->mo = '';\n $requestBody->geo->mg = '';\n $requestBody->geo->mw = '';\n $requestBody->geo->my = '';\n $requestBody->geo->mv = '';\n $requestBody->geo->ml = '';\n $requestBody->geo->mt = '';\n $requestBody->geo->mh = '';\n $requestBody->geo->mq = '';\n $requestBody->geo->mr = '';\n $requestBody->geo->mu = '';\n $requestBody->geo->yt = '';\n $requestBody->geo->mx = '';\n $requestBody->geo->fm = '';\n $requestBody->geo->md = '';\n $requestBody->geo->mc = '';\n $requestBody->geo->mn = '';\n $requestBody->geo->ms = '';\n $requestBody->geo->ma = '';\n $requestBody->geo->mz = '';\n $requestBody->geo->mm = '';\n $requestBody->geo->na = '';\n $requestBody->geo->nr = '';\n $requestBody->geo->np = '';\n $requestBody->geo->nl = '';\n $requestBody->geo->nc = '';\n $requestBody->geo->nz = '';\n $requestBody->geo->ni = '';\n $requestBody->geo->ne = '';\n $requestBody->geo->ng = '';\n $requestBody->geo->nu = '';\n $requestBody->geo->nf = '';\n $requestBody->geo->mk = '';\n $requestBody->geo->mp = '';\n $requestBody->geo->no = '';\n $requestBody->geo->om = '';\n $requestBody->geo->pk = '';\n $requestBody->geo->pw = '';\n $requestBody->geo->ps = '';\n $requestBody->geo->pa = '';\n $requestBody->geo->pg = '';\n $requestBody->geo->py = '';\n $requestBody->geo->pe = '';\n $requestBody->geo->ph = '';\n $requestBody->geo->pn = '';\n $requestBody->geo->pl = '';\n $requestBody->geo->pt = '';\n $requestBody->geo->pr = '';\n $requestBody->geo->qa = '';\n $requestBody->geo->re = '';\n $requestBody->geo->ro = '';\n $requestBody->geo->ru = '';\n $requestBody->geo->rw = '';\n $requestBody->geo->sh = '';\n $requestBody->geo->kn = '';\n $requestBody->geo->lc = '';\n $requestBody->geo->pm = '';\n $requestBody->geo->vc = '';\n $requestBody->geo->ws = '';\n $requestBody->geo->sm = '';\n $requestBody->geo->st = '';\n $requestBody->geo->sa = '';\n $requestBody->geo->sn = '';\n $requestBody->geo->sc = '';\n $requestBody->geo->sl = '';\n $requestBody->geo->sg = '';\n $requestBody->geo->sk = '';\n $requestBody->geo->si = '';\n $requestBody->geo->sb = '';\n $requestBody->geo->so = '';\n $requestBody->geo->za = '';\n $requestBody->geo->gs = '';\n $requestBody->geo->es = '';\n $requestBody->geo->lk = '';\n $requestBody->geo->sd = '';\n $requestBody->geo->sr = '';\n $requestBody->geo->sj = '';\n $requestBody->geo->sz = '';\n $requestBody->geo->se = '';\n $requestBody->geo->ch = '';\n $requestBody->geo->sy = '';\n $requestBody->geo->tw = '';\n $requestBody->geo->tj = '';\n $requestBody->geo->tz = '';\n $requestBody->geo->th = '';\n $requestBody->geo->tl = '';\n $requestBody->geo->tg = '';\n $requestBody->geo->tk = '';\n $requestBody->geo->to = '';\n $requestBody->geo->tt = '';\n $requestBody->geo->tn = '';\n $requestBody->geo->tr = '';\n $requestBody->geo->tm = '';\n $requestBody->geo->tc = '';\n $requestBody->geo->tv = '';\n $requestBody->geo->ug = '';\n $requestBody->geo->ua = '';\n $requestBody->geo->ae = '';\n $requestBody->geo->gb = '';\n $requestBody->geo->us = '';\n $requestBody->geo->um = '';\n $requestBody->geo->uy = '';\n $requestBody->geo->uz = '';\n $requestBody->geo->vu = '';\n $requestBody->geo->ve = '';\n $requestBody->geo->vn = '';\n $requestBody->geo->vg = '';\n $requestBody->geo->vi = '';\n $requestBody->geo->wf = '';\n $requestBody->geo->eh = '';\n $requestBody->geo->ye = '';\n $requestBody->geo->zm = '';\n $requestBody->geo->zw = '';\n $requestBody->geo->ax = '';\n $requestBody->geo->bq = '';\n $requestBody->geo->cw = '';\n $requestBody->geo->gg = '';\n $requestBody->geo->im = '';\n $requestBody->geo->je = '';\n $requestBody->geo->me = '';\n $requestBody->geo->bl = '';\n $requestBody->geo->mf = '';\n $requestBody->geo->rs = '';\n $requestBody->geo->sx = '';\n $requestBody->geo->ss = '';\n $requestBody->geo->xk = '';\n $requestBody->doIndex = false;\n $requestBody->utmSource = '';\n $requestBody->utmMedium = '';\n $requestBody->utmCampaign = '';\n $requestBody->utmTerm = '';\n $requestBody->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"] + "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"]["/links/upsert"]["put"] update: "x-codeSamples": - "lang": "php" - "label": "bulkUpdateLinks" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\BulkUpdateLinksRequestBody();\n $request->linkIds = [\n '',\n ];\n $request->data = new Operations\\Data();\n $request->data->url = 'https://google.com';\n $request->data->trackConversion = false;\n $request->data->archived = false;\n $request->data->publicStats = false;\n $request->data->tagId = '';\n $request->data->tagIds = [\n '',\n ];\n $request->data->tagNames = '';\n $request->data->comments = '';\n $request->data->expiresAt = '';\n $request->data->expiredUrl = '';\n $request->data->password = 'GWDSvXDvs2q1hzW';\n $request->data->proxy = false;\n $request->data->title = '';\n $request->data->description = 'Upgradable cohesive implementation';\n $request->data->image = 'https://loremflickr.com/640/480';\n $request->data->video = '';\n $request->data->rewrite = false;\n $request->data->ios = '';\n $request->data->android = '';\n $request->data->geo = new Components\\LinkGeoTargeting();\n $request->data->geo->af = '';\n $request->data->geo->al = '';\n $request->data->geo->dz = '';\n $request->data->geo->as = '';\n $request->data->geo->ad = '';\n $request->data->geo->ao = '';\n $request->data->geo->ai = '';\n $request->data->geo->aq = '';\n $request->data->geo->ag = '';\n $request->data->geo->ar = '';\n $request->data->geo->am = '';\n $request->data->geo->aw = '';\n $request->data->geo->au = '';\n $request->data->geo->at = '';\n $request->data->geo->az = '';\n $request->data->geo->bs = '';\n $request->data->geo->bh = '';\n $request->data->geo->bd = '';\n $request->data->geo->bb = '';\n $request->data->geo->by = '';\n $request->data->geo->be = '';\n $request->data->geo->bz = '';\n $request->data->geo->bj = '';\n $request->data->geo->bm = '';\n $request->data->geo->bt = '';\n $request->data->geo->bo = '';\n $request->data->geo->ba = '';\n $request->data->geo->bw = '';\n $request->data->geo->bv = '';\n $request->data->geo->br = '';\n $request->data->geo->io = '';\n $request->data->geo->bn = '';\n $request->data->geo->bg = '';\n $request->data->geo->bf = '';\n $request->data->geo->bi = '';\n $request->data->geo->kh = '';\n $request->data->geo->cm = '';\n $request->data->geo->ca = '';\n $request->data->geo->cv = '';\n $request->data->geo->ky = '';\n $request->data->geo->cf = '';\n $request->data->geo->td = '';\n $request->data->geo->cl = '';\n $request->data->geo->cn = '';\n $request->data->geo->cx = '';\n $request->data->geo->cc = '';\n $request->data->geo->co = '';\n $request->data->geo->km = '';\n $request->data->geo->cg = '';\n $request->data->geo->cd = '';\n $request->data->geo->ck = '';\n $request->data->geo->cr = '';\n $request->data->geo->ci = '';\n $request->data->geo->hr = '';\n $request->data->geo->cu = '';\n $request->data->geo->cy = '';\n $request->data->geo->cz = '';\n $request->data->geo->dk = '';\n $request->data->geo->dj = '';\n $request->data->geo->dm = '';\n $request->data->geo->do = '';\n $request->data->geo->ec = '';\n $request->data->geo->eg = '';\n $request->data->geo->sv = '';\n $request->data->geo->gq = '';\n $request->data->geo->er = '';\n $request->data->geo->ee = '';\n $request->data->geo->et = '';\n $request->data->geo->fk = '';\n $request->data->geo->fo = '';\n $request->data->geo->fj = '';\n $request->data->geo->fi = '';\n $request->data->geo->fr = '';\n $request->data->geo->gf = '';\n $request->data->geo->pf = '';\n $request->data->geo->tf = '';\n $request->data->geo->ga = '';\n $request->data->geo->gm = '';\n $request->data->geo->ge = '';\n $request->data->geo->de = '';\n $request->data->geo->gh = '';\n $request->data->geo->gi = '';\n $request->data->geo->gr = '';\n $request->data->geo->gl = '';\n $request->data->geo->gd = '';\n $request->data->geo->gp = '';\n $request->data->geo->gu = '';\n $request->data->geo->gt = '';\n $request->data->geo->gn = '';\n $request->data->geo->gw = '';\n $request->data->geo->gy = '';\n $request->data->geo->ht = '';\n $request->data->geo->hm = '';\n $request->data->geo->va = '';\n $request->data->geo->hn = '';\n $request->data->geo->hk = '';\n $request->data->geo->hu = '';\n $request->data->geo->is = '';\n $request->data->geo->in = '';\n $request->data->geo->id = '';\n $request->data->geo->ir = '';\n $request->data->geo->iq = '';\n $request->data->geo->ie = '';\n $request->data->geo->il = '';\n $request->data->geo->it = '';\n $request->data->geo->jm = '';\n $request->data->geo->jp = '';\n $request->data->geo->jo = '';\n $request->data->geo->kz = '';\n $request->data->geo->ke = '';\n $request->data->geo->ki = '';\n $request->data->geo->kp = '';\n $request->data->geo->kr = '';\n $request->data->geo->kw = '';\n $request->data->geo->kg = '';\n $request->data->geo->la = '';\n $request->data->geo->lv = '';\n $request->data->geo->lb = '';\n $request->data->geo->ls = '';\n $request->data->geo->lr = '';\n $request->data->geo->ly = '';\n $request->data->geo->li = '';\n $request->data->geo->lt = '';\n $request->data->geo->lu = '';\n $request->data->geo->mo = '';\n $request->data->geo->mg = '';\n $request->data->geo->mw = '';\n $request->data->geo->my = '';\n $request->data->geo->mv = '';\n $request->data->geo->ml = '';\n $request->data->geo->mt = '';\n $request->data->geo->mh = '';\n $request->data->geo->mq = '';\n $request->data->geo->mr = '';\n $request->data->geo->mu = '';\n $request->data->geo->yt = '';\n $request->data->geo->mx = '';\n $request->data->geo->fm = '';\n $request->data->geo->md = '';\n $request->data->geo->mc = '';\n $request->data->geo->mn = '';\n $request->data->geo->ms = '';\n $request->data->geo->ma = '';\n $request->data->geo->mz = '';\n $request->data->geo->mm = '';\n $request->data->geo->na = '';\n $request->data->geo->nr = '';\n $request->data->geo->np = '';\n $request->data->geo->nl = '';\n $request->data->geo->nc = '';\n $request->data->geo->nz = '';\n $request->data->geo->ni = '';\n $request->data->geo->ne = '';\n $request->data->geo->ng = '';\n $request->data->geo->nu = '';\n $request->data->geo->nf = '';\n $request->data->geo->mk = '';\n $request->data->geo->mp = '';\n $request->data->geo->no = '';\n $request->data->geo->om = '';\n $request->data->geo->pk = '';\n $request->data->geo->pw = '';\n $request->data->geo->ps = '';\n $request->data->geo->pa = '';\n $request->data->geo->pg = '';\n $request->data->geo->py = '';\n $request->data->geo->pe = '';\n $request->data->geo->ph = '';\n $request->data->geo->pn = '';\n $request->data->geo->pl = '';\n $request->data->geo->pt = '';\n $request->data->geo->pr = '';\n $request->data->geo->qa = '';\n $request->data->geo->re = '';\n $request->data->geo->ro = '';\n $request->data->geo->ru = '';\n $request->data->geo->rw = '';\n $request->data->geo->sh = '';\n $request->data->geo->kn = '';\n $request->data->geo->lc = '';\n $request->data->geo->pm = '';\n $request->data->geo->vc = '';\n $request->data->geo->ws = '';\n $request->data->geo->sm = '';\n $request->data->geo->st = '';\n $request->data->geo->sa = '';\n $request->data->geo->sn = '';\n $request->data->geo->sc = '';\n $request->data->geo->sl = '';\n $request->data->geo->sg = '';\n $request->data->geo->sk = '';\n $request->data->geo->si = '';\n $request->data->geo->sb = '';\n $request->data->geo->so = '';\n $request->data->geo->za = '';\n $request->data->geo->gs = '';\n $request->data->geo->es = '';\n $request->data->geo->lk = '';\n $request->data->geo->sd = '';\n $request->data->geo->sr = '';\n $request->data->geo->sj = '';\n $request->data->geo->sz = '';\n $request->data->geo->se = '';\n $request->data->geo->ch = '';\n $request->data->geo->sy = '';\n $request->data->geo->tw = '';\n $request->data->geo->tj = '';\n $request->data->geo->tz = '';\n $request->data->geo->th = '';\n $request->data->geo->tl = '';\n $request->data->geo->tg = '';\n $request->data->geo->tk = '';\n $request->data->geo->to = '';\n $request->data->geo->tt = '';\n $request->data->geo->tn = '';\n $request->data->geo->tr = '';\n $request->data->geo->tm = '';\n $request->data->geo->tc = '';\n $request->data->geo->tv = '';\n $request->data->geo->ug = '';\n $request->data->geo->ua = '';\n $request->data->geo->ae = '';\n $request->data->geo->gb = '';\n $request->data->geo->us = '';\n $request->data->geo->um = '';\n $request->data->geo->uy = '';\n $request->data->geo->uz = '';\n $request->data->geo->vu = '';\n $request->data->geo->ve = '';\n $request->data->geo->vn = '';\n $request->data->geo->vg = '';\n $request->data->geo->vi = '';\n $request->data->geo->wf = '';\n $request->data->geo->eh = '';\n $request->data->geo->ye = '';\n $request->data->geo->zm = '';\n $request->data->geo->zw = '';\n $request->data->geo->ax = '';\n $request->data->geo->bq = '';\n $request->data->geo->cw = '';\n $request->data->geo->gg = '';\n $request->data->geo->im = '';\n $request->data->geo->je = '';\n $request->data->geo->me = '';\n $request->data->geo->bl = '';\n $request->data->geo->mf = '';\n $request->data->geo->rs = '';\n $request->data->geo->sx = '';\n $request->data->geo->ss = '';\n $request->data->geo->xk = '';\n $request->data->doIndex = false;\n $request->data->utmSource = '';\n $request->data->utmMedium = '';\n $request->data->utmCampaign = '';\n $request->data->utmTerm = '';\n $request->data->utmContent = '';;\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"]["/workspaces/{idOrSlug}"]["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"]["/links"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "updateWorkspace" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateWorkspaceRequestBody();\n $requestBody->name = '';\n $requestBody->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": "getLinks" + "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\\GetLinksRequest(\n domain: 'smug-bow.name',\n tagId: '',\n tagIds: '',\n tagNames: [\n '',\n ],\n search: '',\n userId: '',\n showArchived: false,\n withTags: false,\n sort: Operations\\Sort::CreatedAt,\n page: 1,\n pageSize: 50,\n );\n $response = $sdk->links->list($request);\n\n if ($response->linkSchemas !== null) {\n // handle response\n }\n} catch (Throwable $e) {\n // handle exception\n}" + - target: $["paths"]["/links/info"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "getTags" - "source": "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"] + "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"]["/metatags"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "updateTag" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $requestBody = new Operations\\UpdateTagRequestBody();\n $requestBody->name = '';\n $requestBody->color = Operations\\UpdateTagColor::Brown;\n $requestBody->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}" + "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"]["/domains"]["get"] update: "x-codeSamples": - "lang": "php" "label": "listDomains" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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"]["post"] + "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}"]["patch"] update: "x-codeSamples": - "lang": "php" - "label": "createDomain" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateDomainRequestBody();\n $request->slug = 'acme.com';\n $request->expiredUrl = 'https://acme.com/expired';\n $request->archived = false;\n $request->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}" + "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": "trackSale" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackSaleRequestBody();\n $request->customerId = '';\n $request->amount = 996500;\n $request->paymentProcessor = Operations\\PaymentProcessor::Shopify;\n $request->eventName = 'Purchase';\n $request->invoiceId = '';\n $request->currency = 'European Unit of Account 17(E.U.A.-17)';\n $request->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"]["/links/upsert"]["put"] + "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"]["/domains/{slug}"]["delete"] update: "x-codeSamples": - "lang": "php" - "label": "upsertLink" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\UpsertLinkRequestBody();\n $request->url = 'https://google.com';\n $request->domain = 'monthly-hometown.info';\n $request->key = '';\n $request->externalId = '123456';\n $request->prefix = '';\n $request->trackConversion = false;\n $request->archived = false;\n $request->publicStats = false;\n $request->tagId = '';\n $request->tagIds = [\n '',\n ];\n $request->tagNames = '';\n $request->comments = '';\n $request->expiresAt = '';\n $request->expiredUrl = '';\n $request->password = 'SFNg7iwZDcrQrPc';\n $request->proxy = false;\n $request->title = '';\n $request->description = 'Focused full-range forecast';\n $request->image = 'https://loremflickr.com/640/480';\n $request->video = '';\n $request->rewrite = false;\n $request->ios = '';\n $request->android = '';\n $request->geo = new Components\\LinkGeoTargeting();\n $request->geo->af = '';\n $request->geo->al = '';\n $request->geo->dz = '';\n $request->geo->as = '';\n $request->geo->ad = '';\n $request->geo->ao = '';\n $request->geo->ai = '';\n $request->geo->aq = '';\n $request->geo->ag = '';\n $request->geo->ar = '';\n $request->geo->am = '';\n $request->geo->aw = '';\n $request->geo->au = '';\n $request->geo->at = '';\n $request->geo->az = '';\n $request->geo->bs = '';\n $request->geo->bh = '';\n $request->geo->bd = '';\n $request->geo->bb = '';\n $request->geo->by = '';\n $request->geo->be = '';\n $request->geo->bz = '';\n $request->geo->bj = '';\n $request->geo->bm = '';\n $request->geo->bt = '';\n $request->geo->bo = '';\n $request->geo->ba = '';\n $request->geo->bw = '';\n $request->geo->bv = '';\n $request->geo->br = '';\n $request->geo->io = '';\n $request->geo->bn = '';\n $request->geo->bg = '';\n $request->geo->bf = '';\n $request->geo->bi = '';\n $request->geo->kh = '';\n $request->geo->cm = '';\n $request->geo->ca = '';\n $request->geo->cv = '';\n $request->geo->ky = '';\n $request->geo->cf = '';\n $request->geo->td = '';\n $request->geo->cl = '';\n $request->geo->cn = '';\n $request->geo->cx = '';\n $request->geo->cc = '';\n $request->geo->co = '';\n $request->geo->km = '';\n $request->geo->cg = '';\n $request->geo->cd = '';\n $request->geo->ck = '';\n $request->geo->cr = '';\n $request->geo->ci = '';\n $request->geo->hr = '';\n $request->geo->cu = '';\n $request->geo->cy = '';\n $request->geo->cz = '';\n $request->geo->dk = '';\n $request->geo->dj = '';\n $request->geo->dm = '';\n $request->geo->do = '';\n $request->geo->ec = '';\n $request->geo->eg = '';\n $request->geo->sv = '';\n $request->geo->gq = '';\n $request->geo->er = '';\n $request->geo->ee = '';\n $request->geo->et = '';\n $request->geo->fk = '';\n $request->geo->fo = '';\n $request->geo->fj = '';\n $request->geo->fi = '';\n $request->geo->fr = '';\n $request->geo->gf = '';\n $request->geo->pf = '';\n $request->geo->tf = '';\n $request->geo->ga = '';\n $request->geo->gm = '';\n $request->geo->ge = '';\n $request->geo->de = '';\n $request->geo->gh = '';\n $request->geo->gi = '';\n $request->geo->gr = '';\n $request->geo->gl = '';\n $request->geo->gd = '';\n $request->geo->gp = '';\n $request->geo->gu = '';\n $request->geo->gt = '';\n $request->geo->gn = '';\n $request->geo->gw = '';\n $request->geo->gy = '';\n $request->geo->ht = '';\n $request->geo->hm = '';\n $request->geo->va = '';\n $request->geo->hn = '';\n $request->geo->hk = '';\n $request->geo->hu = '';\n $request->geo->is = '';\n $request->geo->in = '';\n $request->geo->id = '';\n $request->geo->ir = '';\n $request->geo->iq = '';\n $request->geo->ie = '';\n $request->geo->il = '';\n $request->geo->it = '';\n $request->geo->jm = '';\n $request->geo->jp = '';\n $request->geo->jo = '';\n $request->geo->kz = '';\n $request->geo->ke = '';\n $request->geo->ki = '';\n $request->geo->kp = '';\n $request->geo->kr = '';\n $request->geo->kw = '';\n $request->geo->kg = '';\n $request->geo->la = '';\n $request->geo->lv = '';\n $request->geo->lb = '';\n $request->geo->ls = '';\n $request->geo->lr = '';\n $request->geo->ly = '';\n $request->geo->li = '';\n $request->geo->lt = '';\n $request->geo->lu = '';\n $request->geo->mo = '';\n $request->geo->mg = '';\n $request->geo->mw = '';\n $request->geo->my = '';\n $request->geo->mv = '';\n $request->geo->ml = '';\n $request->geo->mt = '';\n $request->geo->mh = '';\n $request->geo->mq = '';\n $request->geo->mr = '';\n $request->geo->mu = '';\n $request->geo->yt = '';\n $request->geo->mx = '';\n $request->geo->fm = '';\n $request->geo->md = '';\n $request->geo->mc = '';\n $request->geo->mn = '';\n $request->geo->ms = '';\n $request->geo->ma = '';\n $request->geo->mz = '';\n $request->geo->mm = '';\n $request->geo->na = '';\n $request->geo->nr = '';\n $request->geo->np = '';\n $request->geo->nl = '';\n $request->geo->nc = '';\n $request->geo->nz = '';\n $request->geo->ni = '';\n $request->geo->ne = '';\n $request->geo->ng = '';\n $request->geo->nu = '';\n $request->geo->nf = '';\n $request->geo->mk = '';\n $request->geo->mp = '';\n $request->geo->no = '';\n $request->geo->om = '';\n $request->geo->pk = '';\n $request->geo->pw = '';\n $request->geo->ps = '';\n $request->geo->pa = '';\n $request->geo->pg = '';\n $request->geo->py = '';\n $request->geo->pe = '';\n $request->geo->ph = '';\n $request->geo->pn = '';\n $request->geo->pl = '';\n $request->geo->pt = '';\n $request->geo->pr = '';\n $request->geo->qa = '';\n $request->geo->re = '';\n $request->geo->ro = '';\n $request->geo->ru = '';\n $request->geo->rw = '';\n $request->geo->sh = '';\n $request->geo->kn = '';\n $request->geo->lc = '';\n $request->geo->pm = '';\n $request->geo->vc = '';\n $request->geo->ws = '';\n $request->geo->sm = '';\n $request->geo->st = '';\n $request->geo->sa = '';\n $request->geo->sn = '';\n $request->geo->sc = '';\n $request->geo->sl = '';\n $request->geo->sg = '';\n $request->geo->sk = '';\n $request->geo->si = '';\n $request->geo->sb = '';\n $request->geo->so = '';\n $request->geo->za = '';\n $request->geo->gs = '';\n $request->geo->es = '';\n $request->geo->lk = '';\n $request->geo->sd = '';\n $request->geo->sr = '';\n $request->geo->sj = '';\n $request->geo->sz = '';\n $request->geo->se = '';\n $request->geo->ch = '';\n $request->geo->sy = '';\n $request->geo->tw = '';\n $request->geo->tj = '';\n $request->geo->tz = '';\n $request->geo->th = '';\n $request->geo->tl = '';\n $request->geo->tg = '';\n $request->geo->tk = '';\n $request->geo->to = '';\n $request->geo->tt = '';\n $request->geo->tn = '';\n $request->geo->tr = '';\n $request->geo->tm = '';\n $request->geo->tc = '';\n $request->geo->tv = '';\n $request->geo->ug = '';\n $request->geo->ua = '';\n $request->geo->ae = '';\n $request->geo->gb = '';\n $request->geo->us = '';\n $request->geo->um = '';\n $request->geo->uy = '';\n $request->geo->uz = '';\n $request->geo->vu = '';\n $request->geo->ve = '';\n $request->geo->vn = '';\n $request->geo->vg = '';\n $request->geo->vi = '';\n $request->geo->wf = '';\n $request->geo->eh = '';\n $request->geo->ye = '';\n $request->geo->zm = '';\n $request->geo->zw = '';\n $request->geo->ax = '';\n $request->geo->bq = '';\n $request->geo->cw = '';\n $request->geo->gg = '';\n $request->geo->im = '';\n $request->geo->je = '';\n $request->geo->me = '';\n $request->geo->bl = '';\n $request->geo->mf = '';\n $request->geo->rs = '';\n $request->geo->sx = '';\n $request->geo->ss = '';\n $request->geo->xk = '';\n $request->doIndex = false;\n $request->utmSource = '';\n $request->utmMedium = '';\n $request->utmCampaign = '';\n $request->utmTerm = '';\n $request->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/count"]["get"] + "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"]["/track/lead"]["post"] update: "x-codeSamples": - "lang": "php" - "label": "getLinksCount" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\GetLinksCountRequest();\n $request->domain = 'false-epauliere.info';\n $request->tagId = '';\n $request->tagIds = '';\n $request->tagNames = '';\n $request->search = '';\n $request->userId = '';\n $request->showArchived = false;\n $request->withTags = false;\n $request->groupBy = '';;\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/info"]["get"] + "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": "getLinkInfo" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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/bulk"]["post"] + "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"]["/qr"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "bulkCreateLinks" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = [\n new Operations\\RequestBody(),\n ];\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"]["/analytics"]["get"] + "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}"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "retrieveAnalytics" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\RetrieveAnalyticsRequest();\n $request->event = Operations\\Event::Leads;\n $request->groupBy = Operations\\GroupBy::Trigger;\n $request->domain = 'vacant-platter.biz';\n $request->key = '';\n $request->linkId = '';\n $request->externalId = '';\n $request->interval = Operations\\Interval::Ninetyd;\n $request->start = '';\n $request->end = '';\n $request->timezone = 'America/New_York';\n $request->continent = Components\\ContinentCode::As;\n $request->country = Components\\CountryCode::Nz;\n $request->city = 'New York';\n $request->device = 'Desktop';\n $request->browser = 'Chrome';\n $request->os = 'Windows';\n $request->referer = 'google.com';\n $request->url = 'http://ajar-mall.com';\n $request->tagId = '';\n $request->qr = false;\n $request->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"]["/workspaces/{idOrSlug}"]["get"] + "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": "getWorkspace" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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"]["/track/lead"]["post"] + "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"]["/workspaces/{idOrSlug}"]["patch"] update: "x-codeSamples": - "lang": "php" - "label": "trackLead" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\TrackLeadRequestBody();\n $request->clickId = '';\n $request->eventName = 'Sign up';\n $request->customerId = '';\n $request->customerName = '';\n $request->customerEmail = 'Katelin24@hotmail.com';\n $request->customerAvatar = '';\n $request->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"]["/metatags"]["get"] + "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"] update: "x-codeSamples": - "lang": "php" - "label": "getMetatags" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n \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"]["post"] + "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"]["/links/count"]["get"] update: "x-codeSamples": - "lang": "php" - "label": "createLink" - "source": "token = 'DUB_API_KEY';\n\n$sdk = Dub\\Dub::builder()->setSecurity($security)->build();\n\ntry {\n $request = new Operations\\CreateLinkRequestBody();\n $request->url = 'https://google.com';\n $request->domain = 'lighthearted-kilogram.name';\n $request->key = '';\n $request->externalId = '123456';\n $request->prefix = '';\n $request->trackConversion = false;\n $request->archived = false;\n $request->publicStats = false;\n $request->tagId = '';\n $request->tagIds = [\n '',\n ];\n $request->tagNames = '';\n $request->comments = '';\n $request->expiresAt = '';\n $request->expiredUrl = '';\n $request->password = 'rHklDuL1dlrnUXo';\n $request->proxy = false;\n $request->title = '';\n $request->description = 'Reverse-engineered human-resource time-frame';\n $request->image = 'https://loremflickr.com/640/480';\n $request->video = '';\n $request->rewrite = false;\n $request->ios = '';\n $request->android = '';\n $request->geo = new Components\\LinkGeoTargeting();\n $request->geo->af = '';\n $request->geo->al = '';\n $request->geo->dz = '';\n $request->geo->as = '';\n $request->geo->ad = '';\n $request->geo->ao = '';\n $request->geo->ai = '';\n $request->geo->aq = '';\n $request->geo->ag = '';\n $request->geo->ar = '';\n $request->geo->am = '';\n $request->geo->aw = '';\n $request->geo->au = '';\n $request->geo->at = '';\n $request->geo->az = '';\n $request->geo->bs = '';\n $request->geo->bh = '';\n $request->geo->bd = '';\n $request->geo->bb = '';\n $request->geo->by = '';\n $request->geo->be = '';\n $request->geo->bz = '';\n $request->geo->bj = '';\n $request->geo->bm = '';\n $request->geo->bt = '';\n $request->geo->bo = '';\n $request->geo->ba = '';\n $request->geo->bw = '';\n $request->geo->bv = '';\n $request->geo->br = '';\n $request->geo->io = '';\n $request->geo->bn = '';\n $request->geo->bg = '';\n $request->geo->bf = '';\n $request->geo->bi = '';\n $request->geo->kh = '';\n $request->geo->cm = '';\n $request->geo->ca = '';\n $request->geo->cv = '';\n $request->geo->ky = '';\n $request->geo->cf = '';\n $request->geo->td = '';\n $request->geo->cl = '';\n $request->geo->cn = '';\n $request->geo->cx = '';\n $request->geo->cc = '';\n $request->geo->co = '';\n $request->geo->km = '';\n $request->geo->cg = '';\n $request->geo->cd = '';\n $request->geo->ck = '';\n $request->geo->cr = '';\n $request->geo->ci = '';\n $request->geo->hr = '';\n $request->geo->cu = '';\n $request->geo->cy = '';\n $request->geo->cz = '';\n $request->geo->dk = '';\n $request->geo->dj = '';\n $request->geo->dm = '';\n $request->geo->do = '';\n $request->geo->ec = '';\n $request->geo->eg = '';\n $request->geo->sv = '';\n $request->geo->gq = '';\n $request->geo->er = '';\n $request->geo->ee = '';\n $request->geo->et = '';\n $request->geo->fk = '';\n $request->geo->fo = '';\n $request->geo->fj = '';\n $request->geo->fi = '';\n $request->geo->fr = '';\n $request->geo->gf = '';\n $request->geo->pf = '';\n $request->geo->tf = '';\n $request->geo->ga = '';\n $request->geo->gm = '';\n $request->geo->ge = '';\n $request->geo->de = '';\n $request->geo->gh = '';\n $request->geo->gi = '';\n $request->geo->gr = '';\n $request->geo->gl = '';\n $request->geo->gd = '';\n $request->geo->gp = '';\n $request->geo->gu = '';\n $request->geo->gt = '';\n $request->geo->gn = '';\n $request->geo->gw = '';\n $request->geo->gy = '';\n $request->geo->ht = '';\n $request->geo->hm = '';\n $request->geo->va = '';\n $request->geo->hn = '';\n $request->geo->hk = '';\n $request->geo->hu = '';\n $request->geo->is = '';\n $request->geo->in = '';\n $request->geo->id = '';\n $request->geo->ir = '';\n $request->geo->iq = '';\n $request->geo->ie = '';\n $request->geo->il = '';\n $request->geo->it = '';\n $request->geo->jm = '';\n $request->geo->jp = '';\n $request->geo->jo = '';\n $request->geo->kz = '';\n $request->geo->ke = '';\n $request->geo->ki = '';\n $request->geo->kp = '';\n $request->geo->kr = '';\n $request->geo->kw = '';\n $request->geo->kg = '';\n $request->geo->la = '';\n $request->geo->lv = '';\n $request->geo->lb = '';\n $request->geo->ls = '';\n $request->geo->lr = '';\n $request->geo->ly = '';\n $request->geo->li = '';\n $request->geo->lt = '';\n $request->geo->lu = '';\n $request->geo->mo = '';\n $request->geo->mg = '';\n $request->geo->mw = '';\n $request->geo->my = '';\n $request->geo->mv = '';\n $request->geo->ml = '';\n $request->geo->mt = '';\n $request->geo->mh = '';\n $request->geo->mq = '';\n $request->geo->mr = '';\n $request->geo->mu = '';\n $request->geo->yt = '';\n $request->geo->mx = '';\n $request->geo->fm = '';\n $request->geo->md = '';\n $request->geo->mc = '';\n $request->geo->mn = '';\n $request->geo->ms = '';\n $request->geo->ma = '';\n $request->geo->mz = '';\n $request->geo->mm = '';\n $request->geo->na = '';\n $request->geo->nr = '';\n $request->geo->np = '';\n $request->geo->nl = '';\n $request->geo->nc = '';\n $request->geo->nz = '';\n $request->geo->ni = '';\n $request->geo->ne = '';\n $request->geo->ng = '';\n $request->geo->nu = '';\n $request->geo->nf = '';\n $request->geo->mk = '';\n $request->geo->mp = '';\n $request->geo->no = '';\n $request->geo->om = '';\n $request->geo->pk = '';\n $request->geo->pw = '';\n $request->geo->ps = '';\n $request->geo->pa = '';\n $request->geo->pg = '';\n $request->geo->py = '';\n $request->geo->pe = '';\n $request->geo->ph = '';\n $request->geo->pn = '';\n $request->geo->pl = '';\n $request->geo->pt = '';\n $request->geo->pr = '';\n $request->geo->qa = '';\n $request->geo->re = '';\n $request->geo->ro = '';\n $request->geo->ru = '';\n $request->geo->rw = '';\n $request->geo->sh = '';\n $request->geo->kn = '';\n $request->geo->lc = '';\n $request->geo->pm = '';\n $request->geo->vc = '';\n $request->geo->ws = '';\n $request->geo->sm = '';\n $request->geo->st = '';\n $request->geo->sa = '';\n $request->geo->sn = '';\n $request->geo->sc = '';\n $request->geo->sl = '';\n $request->geo->sg = '';\n $request->geo->sk = '';\n $request->geo->si = '';\n $request->geo->sb = '';\n $request->geo->so = '';\n $request->geo->za = '';\n $request->geo->gs = '';\n $request->geo->es = '';\n $request->geo->lk = '';\n $request->geo->sd = '';\n $request->geo->sr = '';\n $request->geo->sj = '';\n $request->geo->sz = '';\n $request->geo->se = '';\n $request->geo->ch = '';\n $request->geo->sy = '';\n $request->geo->tw = '';\n $request->geo->tj = '';\n $request->geo->tz = '';\n $request->geo->th = '';\n $request->geo->tl = '';\n $request->geo->tg = '';\n $request->geo->tk = '';\n $request->geo->to = '';\n $request->geo->tt = '';\n $request->geo->tn = '';\n $request->geo->tr = '';\n $request->geo->tm = '';\n $request->geo->tc = '';\n $request->geo->tv = '';\n $request->geo->ug = '';\n $request->geo->ua = '';\n $request->geo->ae = '';\n $request->geo->gb = '';\n $request->geo->us = '';\n $request->geo->um = '';\n $request->geo->uy = '';\n $request->geo->uz = '';\n $request->geo->vu = '';\n $request->geo->ve = '';\n $request->geo->vn = '';\n $request->geo->vg = '';\n $request->geo->vi = '';\n $request->geo->wf = '';\n $request->geo->eh = '';\n $request->geo->ye = '';\n $request->geo->zm = '';\n $request->geo->zw = '';\n $request->geo->ax = '';\n $request->geo->bq = '';\n $request->geo->cw = '';\n $request->geo->gg = '';\n $request->geo->im = '';\n $request->geo->je = '';\n $request->geo->me = '';\n $request->geo->bl = '';\n $request->geo->mf = '';\n $request->geo->rs = '';\n $request->geo->sx = '';\n $request->geo->ss = '';\n $request->geo->xk = '';\n $request->doIndex = false;\n $request->utmSource = '';\n $request->utmMedium = '';\n $request->utmCampaign = '';\n $request->utmTerm = '';\n $request->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}" + "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/{linkId}"]["delete"] + 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/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}" diff --git a/composer.json b/composer.json index cd339ad..9af4891 100644 --- a/composer.json +++ b/composer.json @@ -7,10 +7,18 @@ } }, "license": "MIT", + "repositories": [ + { + "type": "git", + "url": "https://github.com/idbentley/serializer" + } + ], "require": { "php": "^8.1", "guzzlehttp/guzzle": "^7.0", - "jms/serializer": "^3.22" + "jms/serializer": "dev-deserialize-unions", + "brick/date-time": "^0.7.0", + "phpdocumentor/type-resolver": "^1.8" }, "require-dev": { "laravel/pint": "^1.15", @@ -28,7 +36,7 @@ }, "scripts": { "test": [ - "./vendor/bin/phpunit --testdox" + "./vendor/bin/phpunit --testdox --display-warnings --colors=always" ], "stan": [ "./vendor/bin/phpstan analyse --memory-limit=2g" diff --git a/docs/Models/Components/BadRequest.md b/docs/Models/Components/BadRequest.md deleted file mode 100644 index 52952ab..0000000 --- a/docs/Models/Components/BadRequest.md +++ /dev/null @@ -1,8 +0,0 @@ -# BadRequest - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\Error](../../Models/Components/Error.md) | :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 new file mode 100644 index 0000000..21401a4 --- /dev/null +++ b/docs/Models/Components/ClickEvents.md @@ -0,0 +1,22 @@ +# 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 new file mode 100644 index 0000000..3b3ade5 --- /dev/null +++ b/docs/Models/Components/ClicksBrowsers.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..89a659e --- /dev/null +++ b/docs/Models/Components/ClicksCities.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 0000000..75d95ce --- /dev/null +++ b/docs/Models/Components/ClicksCitiesCountry.md @@ -0,0 +1,259 @@ +# 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 new file mode 100644 index 0000000..cd59d59 --- /dev/null +++ b/docs/Models/Components/ClicksCount.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 0000000..a5c1d01 --- /dev/null +++ b/docs/Models/Components/ClicksCountries.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..88acfc3 --- /dev/null +++ b/docs/Models/Components/ClicksDevices.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..6fd3005 --- /dev/null +++ b/docs/Models/Components/ClicksOS.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..21e5b54 --- /dev/null +++ b/docs/Models/Components/ClicksReferers.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..c866ed5 --- /dev/null +++ b/docs/Models/Components/ClicksTimeseries.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..b6153e1 --- /dev/null +++ b/docs/Models/Components/ClicksTopLinks.md @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000..96205d8 --- /dev/null +++ b/docs/Models/Components/ClicksTopUrls.md @@ -0,0 +1,9 @@ +# 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/Conflict.md b/docs/Models/Components/Conflict.md deleted file mode 100644 index 5156e03..0000000 --- a/docs/Models/Components/Conflict.md +++ /dev/null @@ -1,8 +0,0 @@ -# Conflict - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\ConflictError](../../Models/Components/ConflictError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/ConflictError.md b/docs/Models/Components/ConflictError.md deleted file mode 100644 index 3554f75..0000000 --- a/docs/Models/Components/ConflictError.md +++ /dev/null @@ -1,10 +0,0 @@ -# ConflictError - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `code` | [\Dub\Models\Components\ConflictCode](../../Models/Components/ConflictCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#conflict | \ No newline at end of file diff --git a/docs/Models/Components/Country.md b/docs/Models/Components/Country.md new file mode 100644 index 0000000..084285a --- /dev/null +++ b/docs/Models/Components/Country.md @@ -0,0 +1,259 @@ +# Country + +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/InternalServerError.md b/docs/Models/Components/InternalServerError.md deleted file mode 100644 index 6897912..0000000 --- a/docs/Models/Components/InternalServerError.md +++ /dev/null @@ -1,8 +0,0 @@ -# InternalServerError - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `error` | [\Dub\Models\Components\InternalServerErrorError](../../Models/Components/InternalServerErrorError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/InternalServerErrorError.md b/docs/Models/Components/InternalServerErrorError.md deleted file mode 100644 index 42de1e3..0000000 --- a/docs/Models/Components/InternalServerErrorError.md +++ /dev/null @@ -1,10 +0,0 @@ -# InternalServerErrorError - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\InternalServerErrorCode](../../Models/Components/InternalServerErrorCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal-server_error | \ No newline at end of file diff --git a/docs/Models/Components/InviteExpired.md b/docs/Models/Components/InviteExpired.md deleted file mode 100644 index e738509..0000000 --- a/docs/Models/Components/InviteExpired.md +++ /dev/null @@ -1,8 +0,0 @@ -# InviteExpired - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `error` | [\Dub\Models\Components\InviteExpiredError](../../Models/Components/InviteExpiredError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/InviteExpiredError.md b/docs/Models/Components/InviteExpiredError.md deleted file mode 100644 index c50d29e..0000000 --- a/docs/Models/Components/InviteExpiredError.md +++ /dev/null @@ -1,10 +0,0 @@ -# InviteExpiredError - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\InviteExpiredCode](../../Models/Components/InviteExpiredCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite-expired | \ No newline at end of file diff --git a/docs/Models/Components/LeadsBrowsers.md b/docs/Models/Components/LeadsBrowsers.md new file mode 100644 index 0000000..16cb450 --- /dev/null +++ b/docs/Models/Components/LeadsBrowsers.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..b7031d8 --- /dev/null +++ b/docs/Models/Components/LeadsCities.md @@ -0,0 +1,10 @@ +# 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 new file mode 100644 index 0000000..84af83c --- /dev/null +++ b/docs/Models/Components/LeadsCitiesCountry.md @@ -0,0 +1,259 @@ +# 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 new file mode 100644 index 0000000..1eb7ab4 --- /dev/null +++ b/docs/Models/Components/LeadsCount.md @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 0000000..0bbe050 --- /dev/null +++ b/docs/Models/Components/LeadsCountries.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..922393e --- /dev/null +++ b/docs/Models/Components/LeadsCountriesCountry.md @@ -0,0 +1,259 @@ +# 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 new file mode 100644 index 0000000..bf30d16 --- /dev/null +++ b/docs/Models/Components/LeadsDevices.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..0b139bb --- /dev/null +++ b/docs/Models/Components/LeadsOS.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..483644e --- /dev/null +++ b/docs/Models/Components/LeadsReferers.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..57ad6f8 --- /dev/null +++ b/docs/Models/Components/LeadsTimeseries.md @@ -0,0 +1,9 @@ +# 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 new file mode 100644 index 0000000..1881f2d --- /dev/null +++ b/docs/Models/Components/LeadsTopLinks.md @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 0000000..b56d122 --- /dev/null +++ b/docs/Models/Components/LeadsTopUrls.md @@ -0,0 +1,9 @@ +# 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/LinkSchema.md b/docs/Models/Components/LinkSchema.md index 3c7b079..a2a60ec 100644 --- a/docs/Models/Components/LinkSchema.md +++ b/docs/Models/Components/LinkSchema.md @@ -24,10 +24,10 @@ | `doIndex` | *bool* | :heavy_check_mark: | Whether to allow search engines to index the short link. | | `ios` | *string* | :heavy_check_mark: | The iOS destination URL for the short link for iOS device targeting. | | `android` | *string* | :heavy_check_mark: | The Android destination URL for the short link for Android device targeting. | -| `geo` | [\Dub\Models\Components\Geo](../../Models/Components/Geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | +| `geo` | [Components\Geo](../../Models/Components/Geo.md) | :heavy_check_mark: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo | | `publicStats` | *bool* | :heavy_check_mark: | Whether the short link's stats are publicly accessible. | | ~~`tagId`~~ | *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 tag assigned to the short link. This field is deprecated – use `tags` instead. | -| `tags` | array<[\Dub\Models\Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | +| `tags` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_check_mark: | The tags assigned to the short link. | | `comments` | *string* | :heavy_check_mark: | The comments for the short link. | | `shortLink` | *string* | :heavy_check_mark: | The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`). | | `qrCode` | *string* | :heavy_check_mark: | The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`). | diff --git a/docs/Models/Components/NotFound.md b/docs/Models/Components/NotFound.md deleted file mode 100644 index c728e30..0000000 --- a/docs/Models/Components/NotFound.md +++ /dev/null @@ -1,8 +0,0 @@ -# NotFound - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\NotFoundError](../../Models/Components/NotFoundError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/NotFoundError.md b/docs/Models/Components/NotFoundError.md deleted file mode 100644 index 137b2b0..0000000 --- a/docs/Models/Components/NotFoundError.md +++ /dev/null @@ -1,10 +0,0 @@ -# NotFoundError - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `code` | [\Dub\Models\Components\NotFoundCode](../../Models/Components/NotFoundCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not-found | \ No newline at end of file diff --git a/docs/Models/Components/RateLimitExceeded.md b/docs/Models/Components/RateLimitExceeded.md deleted file mode 100644 index 06f52c3..0000000 --- a/docs/Models/Components/RateLimitExceeded.md +++ /dev/null @@ -1,8 +0,0 @@ -# RateLimitExceeded - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\RateLimitExceededError](../../Models/Components/RateLimitExceededError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/RateLimitExceededError.md b/docs/Models/Components/RateLimitExceededError.md deleted file mode 100644 index 0e129c3..0000000 --- a/docs/Models/Components/RateLimitExceededError.md +++ /dev/null @@ -1,10 +0,0 @@ -# RateLimitExceededError - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `code` | [\Dub\Models\Components\RateLimitExceededCode](../../Models/Components/RateLimitExceededCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate-limit_exceeded | \ No newline at end of file diff --git a/docs/Models/Components/SalesBrowsers.md b/docs/Models/Components/SalesBrowsers.md new file mode 100644 index 0000000..a9553a0 --- /dev/null +++ b/docs/Models/Components/SalesBrowsers.md @@ -0,0 +1,10 @@ +# SalesBrowsers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `browser` | *string* | :heavy_check_mark: | The name of the 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 diff --git a/docs/Models/Components/SalesCities.md b/docs/Models/Components/SalesCities.md new file mode 100644 index 0000000..978d243 --- /dev/null +++ b/docs/Models/Components/SalesCities.md @@ -0,0 +1,11 @@ +# 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/SalesCitiesCountry.md b/docs/Models/Components/SalesCitiesCountry.md new file mode 100644 index 0000000..ba8a4fe --- /dev/null +++ b/docs/Models/Components/SalesCitiesCountry.md @@ -0,0 +1,259 @@ +# SalesCitiesCountry + +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/SalesCount.md b/docs/Models/Components/SalesCount.md new file mode 100644 index 0000000..250714d --- /dev/null +++ b/docs/Models/Components/SalesCount.md @@ -0,0 +1,9 @@ +# 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/SalesCountries.md b/docs/Models/Components/SalesCountries.md new file mode 100644 index 0000000..40ded01 --- /dev/null +++ b/docs/Models/Components/SalesCountries.md @@ -0,0 +1,10 @@ +# SalesCountries + + +## 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 | +| `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 diff --git a/docs/Models/Components/SalesCountriesCountry.md b/docs/Models/Components/SalesCountriesCountry.md new file mode 100644 index 0000000..f1d905b --- /dev/null +++ b/docs/Models/Components/SalesCountriesCountry.md @@ -0,0 +1,259 @@ +# 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/Components/SalesDevices.md b/docs/Models/Components/SalesDevices.md new file mode 100644 index 0000000..f712eb0 --- /dev/null +++ b/docs/Models/Components/SalesDevices.md @@ -0,0 +1,10 @@ +# SalesDevices + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `device` | *string* | :heavy_check_mark: | The name of the 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 diff --git a/docs/Models/Components/SalesOS.md b/docs/Models/Components/SalesOS.md new file mode 100644 index 0000000..e71dbec --- /dev/null +++ b/docs/Models/Components/SalesOS.md @@ -0,0 +1,10 @@ +# SalesOS + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `os` | *string* | :heavy_check_mark: | The name of the 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 diff --git a/docs/Models/Components/SalesReferers.md b/docs/Models/Components/SalesReferers.md new file mode 100644 index 0000000..24318cf --- /dev/null +++ b/docs/Models/Components/SalesReferers.md @@ -0,0 +1,10 @@ +# SalesReferers + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `referer` | *string* | :heavy_check_mark: | The name of the referer. If unknown, this will be `(direct)` | +| `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 diff --git a/docs/Models/Components/SalesTimeseries.md b/docs/Models/Components/SalesTimeseries.md new file mode 100644 index 0000000..84e0feb --- /dev/null +++ b/docs/Models/Components/SalesTimeseries.md @@ -0,0 +1,10 @@ +# SalesTimeseries + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `start` | *string* | :heavy_check_mark: | The starting timestamp of 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 diff --git a/docs/Models/Components/SalesTopLinks.md b/docs/Models/Components/SalesTopLinks.md new file mode 100644 index 0000000..427b9aa --- /dev/null +++ b/docs/Models/Components/SalesTopLinks.md @@ -0,0 +1,16 @@ +# SalesTopLinks + + +## 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 | +| `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 diff --git a/docs/Models/Components/SalesTopUrls.md b/docs/Models/Components/SalesTopUrls.md new file mode 100644 index 0000000..cb9730a --- /dev/null +++ b/docs/Models/Components/SalesTopUrls.md @@ -0,0 +1,10 @@ +# SalesTopUrls + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `url` | *string* | :heavy_check_mark: | The destination 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 diff --git a/docs/Models/Components/Security.md b/docs/Models/Components/Security.md index 4c2ba66..70fa401 100644 --- a/docs/Models/Components/Security.md +++ b/docs/Models/Components/Security.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| `token` | *?string* | :heavy_minus_sign: | N/A | DUB_API_KEY | \ No newline at end of file +| `token` | *string* | :heavy_check_mark: | N/A | DUB_API_KEY | \ No newline at end of file diff --git a/docs/Models/Components/TagSchema.md b/docs/Models/Components/TagSchema.md index 1b84f08..1c3d078 100644 --- a/docs/Models/Components/TagSchema.md +++ b/docs/Models/Components/TagSchema.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique ID of the tag. | -| `name` | *string* | :heavy_check_mark: | The name of the tag. | -| `color` | [\Dub\Models\Components\Color](../../Models/Components/Color.md) | :heavy_check_mark: | The color of the tag. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the tag. | +| `name` | *string* | :heavy_check_mark: | The name of the tag. | +| `color` | [Components\Color](../../Models/Components/Color.md) | :heavy_check_mark: | The color of the tag. | \ No newline at end of file diff --git a/docs/Models/Components/Unauthorized.md b/docs/Models/Components/Unauthorized.md deleted file mode 100644 index d641f28..0000000 --- a/docs/Models/Components/Unauthorized.md +++ /dev/null @@ -1,8 +0,0 @@ -# Unauthorized - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\UnauthorizedError](../../Models/Components/UnauthorizedError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/UnauthorizedError.md b/docs/Models/Components/UnauthorizedError.md deleted file mode 100644 index 5445842..0000000 --- a/docs/Models/Components/UnauthorizedError.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnauthorizedError - - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\UnauthorizedCode](../../Models/Components/UnauthorizedCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized | \ No newline at end of file diff --git a/docs/Models/Components/UnprocessableEntity.md b/docs/Models/Components/UnprocessableEntity.md deleted file mode 100644 index 85c1518..0000000 --- a/docs/Models/Components/UnprocessableEntity.md +++ /dev/null @@ -1,8 +0,0 @@ -# UnprocessableEntity - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `error` | [\Dub\Models\Components\UnprocessableEntityError](../../Models/Components/UnprocessableEntityError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/UnprocessableEntityError.md b/docs/Models/Components/UnprocessableEntityError.md deleted file mode 100644 index c4136e9..0000000 --- a/docs/Models/Components/UnprocessableEntityError.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnprocessableEntityError - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\UnprocessableEntityCode](../../Models/Components/UnprocessableEntityCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity | -| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable-entity | \ No newline at end of file diff --git a/docs/Models/Components/Users.md b/docs/Models/Components/Users.md index da09d4b..5edbac0 100644 --- a/docs/Models/Components/Users.md +++ b/docs/Models/Components/Users.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `role` | [\Dub\Models\Components\Role](../../Models/Components/Role.md) | :heavy_check_mark: | The role of the authenticated user in the workspace. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `role` | [Components\Role](../../Models/Components/Role.md) | :heavy_check_mark: | The role of the authenticated user in the workspace. | \ No newline at end of file diff --git a/docs/Models/Components/WorkspaceSchema.md b/docs/Models/Components/WorkspaceSchema.md index 496daa2..f63be0f 100644 --- a/docs/Models/Components/WorkspaceSchema.md +++ b/docs/Models/Components/WorkspaceSchema.md @@ -3,25 +3,25 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The unique ID of the workspace. | -| `name` | *string* | :heavy_check_mark: | The name of the workspace. | -| `slug` | *string* | :heavy_check_mark: | The slug of the workspace. | -| `logo` | *string* | :heavy_check_mark: | The logo of the workspace. | -| `usage` | *float* | :heavy_check_mark: | The usage of the workspace. | -| `usageLimit` | *float* | :heavy_check_mark: | The usage limit of the workspace. | -| `linksUsage` | *float* | :heavy_check_mark: | The links usage of the workspace. | -| `linksLimit` | *float* | :heavy_check_mark: | The links limit of the workspace. | -| `domainsLimit` | *float* | :heavy_check_mark: | The domains limit of the workspace. | -| `tagsLimit` | *float* | :heavy_check_mark: | The tags limit of the workspace. | -| `usersLimit` | *float* | :heavy_check_mark: | The users limit of the workspace. | -| `plan` | [\Dub\Models\Components\Plan](../../Models/Components/Plan.md) | :heavy_check_mark: | The plan of the workspace. | -| `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. | -| `billingCycleStart` | *float* | :heavy_check_mark: | The date and time when the billing cycle starts for the workspace. | -| `stripeConnectId` | *string* | :heavy_check_mark: | [BETA]: The Stripe Connect ID of the workspace. | -| `createdAt` | *string* | :heavy_check_mark: | The date and time when the workspace was created. | -| `users` | array<[\Dub\Models\Components\Users](../../Models/Components/Users.md)> | :heavy_check_mark: | The role of the authenticated user in the workspace. | -| `domains` | array<[\Dub\Models\Components\Domains](../../Models/Components/Domains.md)> | :heavy_check_mark: | The domains of the workspace. | -| `inviteCode` | *string* | :heavy_check_mark: | The invite code of the workspace. | -| `flags` | array | :heavy_minus_sign: | The feature flags of the workspace, indicating which features are enabled. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique ID of the workspace. | +| `name` | *string* | :heavy_check_mark: | The name of the workspace. | +| `slug` | *string* | :heavy_check_mark: | The slug of the workspace. | +| `logo` | *string* | :heavy_check_mark: | The logo of the workspace. | +| `usage` | *float* | :heavy_check_mark: | The usage of the workspace. | +| `usageLimit` | *float* | :heavy_check_mark: | The usage limit of the workspace. | +| `linksUsage` | *float* | :heavy_check_mark: | The links usage of the workspace. | +| `linksLimit` | *float* | :heavy_check_mark: | The links limit of the workspace. | +| `domainsLimit` | *float* | :heavy_check_mark: | The domains limit of the workspace. | +| `tagsLimit` | *float* | :heavy_check_mark: | The tags limit of the workspace. | +| `usersLimit` | *float* | :heavy_check_mark: | The users limit of the workspace. | +| `plan` | [Components\Plan](../../Models/Components/Plan.md) | :heavy_check_mark: | The plan of the workspace. | +| `stripeId` | *string* | :heavy_check_mark: | The Stripe ID of the workspace. | +| `billingCycleStart` | *float* | :heavy_check_mark: | The date and time when the billing cycle starts for the workspace. | +| `stripeConnectId` | *string* | :heavy_check_mark: | [BETA]: The Stripe Connect ID of the workspace. | +| `createdAt` | *string* | :heavy_check_mark: | The date and time when the workspace was created. | +| `users` | array<[Components\Users](../../Models/Components/Users.md)> | :heavy_check_mark: | The role of the authenticated user in the workspace. | +| `domains` | array<[Components\Domains](../../Models/Components/Domains.md)> | :heavy_check_mark: | The domains of the workspace. | +| `inviteCode` | *string* | :heavy_check_mark: | The invite code of the workspace. | +| `flags` | array | :heavy_minus_sign: | The feature flags of the workspace, indicating which features are enabled. | \ No newline at end of file diff --git a/docs/Models/Errors/BadRequest.md b/docs/Models/Errors/BadRequest.md new file mode 100644 index 0000000..27a3b48 --- /dev/null +++ b/docs/Models/Errors/BadRequest.md @@ -0,0 +1,10 @@ +# 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). + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `error` | [Errors\Error](../../Models/Errors/Error.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/Code.md b/docs/Models/Errors/Code.md similarity index 100% rename from docs/Models/Components/Code.md rename to docs/Models/Errors/Code.md diff --git a/docs/Models/Errors/Conflict.md b/docs/Models/Errors/Conflict.md new file mode 100644 index 0000000..d432cbc --- /dev/null +++ b/docs/Models/Errors/Conflict.md @@ -0,0 +1,10 @@ +# Conflict + +This response is sent when a request conflicts with the current state of the server. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `error` | [Errors\ConflictError](../../Models/Errors/ConflictError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/ConflictCode.md b/docs/Models/Errors/ConflictCode.md similarity index 100% rename from docs/Models/Components/ConflictCode.md rename to docs/Models/Errors/ConflictCode.md diff --git a/docs/Models/Errors/ConflictError.md b/docs/Models/Errors/ConflictError.md new file mode 100644 index 0000000..06db8ca --- /dev/null +++ b/docs/Models/Errors/ConflictError.md @@ -0,0 +1,10 @@ +# ConflictError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [Errors\ConflictCode](../../Models/Errors/ConflictCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | conflict | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#conflict | \ No newline at end of file diff --git a/docs/Models/Components/Error.md b/docs/Models/Errors/Error.md similarity index 92% rename from docs/Models/Components/Error.md rename to docs/Models/Errors/Error.md index e3b872a..c4f9038 100644 --- a/docs/Models/Components/Error.md +++ b/docs/Models/Errors/Error.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\Code](../../Models/Components/Code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request | +| `code` | [Errors\Code](../../Models/Errors/Code.md) | :heavy_check_mark: | A short code indicating the error code returned. | bad_request | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | | `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#bad-request | \ No newline at end of file diff --git a/docs/Models/Errors/Forbidden.md b/docs/Models/Errors/Forbidden.md new file mode 100644 index 0000000..67de2c6 --- /dev/null +++ b/docs/Models/Errors/Forbidden.md @@ -0,0 +1,10 @@ +# 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. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `error` | [Errors\ForbiddenError](../../Models/Errors/ForbiddenError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/ForbiddenCode.md b/docs/Models/Errors/ForbiddenCode.md similarity index 100% rename from docs/Models/Components/ForbiddenCode.md rename to docs/Models/Errors/ForbiddenCode.md diff --git a/docs/Models/Errors/ForbiddenError.md b/docs/Models/Errors/ForbiddenError.md new file mode 100644 index 0000000..536c199 --- /dev/null +++ b/docs/Models/Errors/ForbiddenError.md @@ -0,0 +1,10 @@ +# ForbiddenError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [Errors\ForbiddenCode](../../Models/Errors/ForbiddenCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden | \ No newline at end of file diff --git a/docs/Models/Components/Forbidden.md b/docs/Models/Errors/InternalServerError.md similarity index 80% rename from docs/Models/Components/Forbidden.md rename to docs/Models/Errors/InternalServerError.md index 4cbd9f1..8cd2525 100644 --- a/docs/Models/Components/Forbidden.md +++ b/docs/Models/Errors/InternalServerError.md @@ -1,8 +1,10 @@ -# Forbidden +# InternalServerError + +The server has encountered a situation it does not know how to handle. ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `error` | [\Dub\Models\Components\ForbiddenError](../../Models/Components/ForbiddenError.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `error` | [Errors\InternalServerErrorError](../../Models/Errors/InternalServerErrorError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/InternalServerErrorCode.md b/docs/Models/Errors/InternalServerErrorCode.md similarity index 100% rename from docs/Models/Components/InternalServerErrorCode.md rename to docs/Models/Errors/InternalServerErrorCode.md diff --git a/docs/Models/Components/ForbiddenError.md b/docs/Models/Errors/InternalServerErrorError.md similarity index 85% rename from docs/Models/Components/ForbiddenError.md rename to docs/Models/Errors/InternalServerErrorError.md index 96ee45b..f17b623 100644 --- a/docs/Models/Components/ForbiddenError.md +++ b/docs/Models/Errors/InternalServerErrorError.md @@ -1,10 +1,10 @@ -# ForbiddenError +# InternalServerErrorError ## Fields | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `code` | [\Dub\Models\Components\ForbiddenCode](../../Models/Components/ForbiddenCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | forbidden | +| `code` | [Errors\InternalServerErrorCode](../../Models/Errors/InternalServerErrorCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | internal_server_error | | `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | -| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#forbidden | \ No newline at end of file +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#internal-server_error | \ No newline at end of file diff --git a/docs/Models/Errors/InviteExpired.md b/docs/Models/Errors/InviteExpired.md new file mode 100644 index 0000000..a5645c6 --- /dev/null +++ b/docs/Models/Errors/InviteExpired.md @@ -0,0 +1,10 @@ +# InviteExpired + +This response is sent when the requested content has been permanently deleted from server, with no forwarding address. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `error` | [Errors\InviteExpiredError](../../Models/Errors/InviteExpiredError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/InviteExpiredCode.md b/docs/Models/Errors/InviteExpiredCode.md similarity index 100% rename from docs/Models/Components/InviteExpiredCode.md rename to docs/Models/Errors/InviteExpiredCode.md diff --git a/docs/Models/Errors/InviteExpiredError.md b/docs/Models/Errors/InviteExpiredError.md new file mode 100644 index 0000000..7a0e735 --- /dev/null +++ b/docs/Models/Errors/InviteExpiredError.md @@ -0,0 +1,10 @@ +# InviteExpiredError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `code` | [Errors\InviteExpiredCode](../../Models/Errors/InviteExpiredCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | invite_expired | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#invite-expired | \ No newline at end of file diff --git a/docs/Models/Errors/NotFound.md b/docs/Models/Errors/NotFound.md new file mode 100644 index 0000000..0ec7924 --- /dev/null +++ b/docs/Models/Errors/NotFound.md @@ -0,0 +1,10 @@ +# NotFound + +The server cannot find the requested resource. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `error` | [Errors\NotFoundError](../../Models/Errors/NotFoundError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/NotFoundCode.md b/docs/Models/Errors/NotFoundCode.md similarity index 100% rename from docs/Models/Components/NotFoundCode.md rename to docs/Models/Errors/NotFoundCode.md diff --git a/docs/Models/Errors/NotFoundError.md b/docs/Models/Errors/NotFoundError.md new file mode 100644 index 0000000..51864e8 --- /dev/null +++ b/docs/Models/Errors/NotFoundError.md @@ -0,0 +1,10 @@ +# NotFoundError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [Errors\NotFoundCode](../../Models/Errors/NotFoundCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | not_found | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#not-found | \ No newline at end of file diff --git a/docs/Models/Errors/RateLimitExceeded.md b/docs/Models/Errors/RateLimitExceeded.md new file mode 100644 index 0000000..ab4d777 --- /dev/null +++ b/docs/Models/Errors/RateLimitExceeded.md @@ -0,0 +1,10 @@ +# RateLimitExceeded + +The user has sent too many requests in a given amount of time ("rate limiting") + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `error` | [Errors\RateLimitExceededError](../../Models/Errors/RateLimitExceededError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/RateLimitExceededCode.md b/docs/Models/Errors/RateLimitExceededCode.md similarity index 100% rename from docs/Models/Components/RateLimitExceededCode.md rename to docs/Models/Errors/RateLimitExceededCode.md diff --git a/docs/Models/Errors/RateLimitExceededError.md b/docs/Models/Errors/RateLimitExceededError.md new file mode 100644 index 0000000..6c19721 --- /dev/null +++ b/docs/Models/Errors/RateLimitExceededError.md @@ -0,0 +1,10 @@ +# RateLimitExceededError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `code` | [Errors\RateLimitExceededCode](../../Models/Errors/RateLimitExceededCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | rate_limit_exceeded | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#rate-limit_exceeded | \ No newline at end of file diff --git a/docs/Models/Errors/Unauthorized.md b/docs/Models/Errors/Unauthorized.md new file mode 100644 index 0000000..5fe3e9d --- /dev/null +++ b/docs/Models/Errors/Unauthorized.md @@ -0,0 +1,10 @@ +# Unauthorized + +Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `error` | [Errors\UnauthorizedError](../../Models/Errors/UnauthorizedError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/UnauthorizedCode.md b/docs/Models/Errors/UnauthorizedCode.md similarity index 100% rename from docs/Models/Components/UnauthorizedCode.md rename to docs/Models/Errors/UnauthorizedCode.md diff --git a/docs/Models/Errors/UnauthorizedError.md b/docs/Models/Errors/UnauthorizedError.md new file mode 100644 index 0000000..c2b2cb8 --- /dev/null +++ b/docs/Models/Errors/UnauthorizedError.md @@ -0,0 +1,10 @@ +# UnauthorizedError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `code` | [Errors\UnauthorizedCode](../../Models/Errors/UnauthorizedCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unauthorized | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unauthorized | \ No newline at end of file diff --git a/docs/Models/Errors/UnprocessableEntity.md b/docs/Models/Errors/UnprocessableEntity.md new file mode 100644 index 0000000..e7953b3 --- /dev/null +++ b/docs/Models/Errors/UnprocessableEntity.md @@ -0,0 +1,10 @@ +# UnprocessableEntity + +The request was well-formed but was unable to be followed due to semantic errors. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `error` | [Errors\UnprocessableEntityError](../../Models/Errors/UnprocessableEntityError.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/UnprocessableEntityCode.md b/docs/Models/Errors/UnprocessableEntityCode.md similarity index 100% rename from docs/Models/Components/UnprocessableEntityCode.md rename to docs/Models/Errors/UnprocessableEntityCode.md diff --git a/docs/Models/Errors/UnprocessableEntityError.md b/docs/Models/Errors/UnprocessableEntityError.md new file mode 100644 index 0000000..465f5da --- /dev/null +++ b/docs/Models/Errors/UnprocessableEntityError.md @@ -0,0 +1,10 @@ +# UnprocessableEntityError + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `code` | [Errors\UnprocessableEntityCode](../../Models/Errors/UnprocessableEntityCode.md) | :heavy_check_mark: | A short code indicating the error code returned. | unprocessable_entity | +| `message` | *string* | :heavy_check_mark: | A human readable explanation of what went wrong. | The requested resource was not found. | +| `docUrl` | *?string* | :heavy_minus_sign: | A link to our documentation with more details about this error code | https://dub.co/docs/api-reference/errors#unprocessable-entity | \ No newline at end of file diff --git a/docs/Models/Operations/BulkCreateLinksResponse.md b/docs/Models/Operations/BulkCreateLinksResponse.md index 2d869db..9f5a033 100644 --- a/docs/Models/Operations/BulkCreateLinksResponse.md +++ b/docs/Models/Operations/BulkCreateLinksResponse.md @@ -3,18 +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 | -| `linkSchemas` | array<[\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | The created links | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchemas` | array<[Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | The created links | \ No newline at end of file diff --git a/docs/Models/Operations/BulkCreateLinksTagIds.md b/docs/Models/Operations/BulkCreateLinksTagIds.md new file mode 100644 index 0000000..57545e1 --- /dev/null +++ b/docs/Models/Operations/BulkCreateLinksTagIds.md @@ -0,0 +1,19 @@ +# BulkCreateLinksTagIds + +The unique IDs of the tags assigned to the short link. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/BulkCreateLinksTagNames.md b/docs/Models/Operations/BulkCreateLinksTagNames.md new file mode 100644 index 0000000..f7f12cb --- /dev/null +++ b/docs/Models/Operations/BulkCreateLinksTagNames.md @@ -0,0 +1,19 @@ +# BulkCreateLinksTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/BulkUpdateLinksRequestBody.md b/docs/Models/Operations/BulkUpdateLinksRequestBody.md index 5c128f8..a578bf2 100644 --- a/docs/Models/Operations/BulkUpdateLinksRequestBody.md +++ b/docs/Models/Operations/BulkUpdateLinksRequestBody.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `linkIds` | array<*string*> | :heavy_check_mark: | N/A | -| `data` | [\Dub\Models\Operations\Data](../../Models/Operations/Data.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `linkIds` | array<*string*> | :heavy_check_mark: | N/A | +| `data` | [Operations\Data](../../Models/Operations/Data.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/BulkUpdateLinksResponse.md b/docs/Models/Operations/BulkUpdateLinksResponse.md index 1faabf0..7355560 100644 --- a/docs/Models/Operations/BulkUpdateLinksResponse.md +++ b/docs/Models/Operations/BulkUpdateLinksResponse.md @@ -3,18 +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 | -| `linkSchemas` | array<[\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | The updated links | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchemas` | array<[Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | The updated links | \ No newline at end of file diff --git a/docs/Models/Operations/BulkUpdateLinksTagIds.md b/docs/Models/Operations/BulkUpdateLinksTagIds.md new file mode 100644 index 0000000..60dc801 --- /dev/null +++ b/docs/Models/Operations/BulkUpdateLinksTagIds.md @@ -0,0 +1,19 @@ +# BulkUpdateLinksTagIds + +The unique IDs of the tags assigned to the short link. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/BulkUpdateLinksTagNames.md b/docs/Models/Operations/BulkUpdateLinksTagNames.md new file mode 100644 index 0000000..94bf044 --- /dev/null +++ b/docs/Models/Operations/BulkUpdateLinksTagNames.md @@ -0,0 +1,19 @@ +# BulkUpdateLinksTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/CreateDomainResponse.md b/docs/Models/Operations/CreateDomainResponse.md index 4b5ebff..2a3c6d8 100644 --- a/docs/Models/Operations/CreateDomainResponse.md +++ b/docs/Models/Operations/CreateDomainResponse.md @@ -3,18 +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 | -| `domainSchema` | [?\Dub\Models\Components\DomainSchema](../../Models/Components/DomainSchema.md) | :heavy_minus_sign: | The domain was created. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `domainSchema` | [?Components\DomainSchema](../../Models/Components/DomainSchema.md) | :heavy_minus_sign: | The domain was created. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateLinkRequestBody.md b/docs/Models/Operations/CreateLinkRequestBody.md index f1cc318..33f22aa 100644 --- a/docs/Models/Operations/CreateLinkRequestBody.md +++ b/docs/Models/Operations/CreateLinkRequestBody.md @@ -14,8 +14,8 @@ | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/TagIds.md) | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | +| `tagNames` | [string\|array\|null](../../Models/Operations/TagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | @@ -28,7 +28,7 @@ | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *?string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *?string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [?\Dub\Models\Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `geo` | [?Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | | | `utmMedium` | *?string* | :heavy_minus_sign: | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | | diff --git a/docs/Models/Operations/CreateLinkResponse.md b/docs/Models/Operations/CreateLinkResponse.md index d2cb3f1..5b33b16 100644 --- a/docs/Models/Operations/CreateLinkResponse.md +++ b/docs/Models/Operations/CreateLinkResponse.md @@ -3,18 +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 | -| `linkSchema` | [?\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The created link | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchema` | [?Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The created link | \ No newline at end of file diff --git a/docs/Models/Operations/CreateTagRequestBody.md b/docs/Models/Operations/CreateTagRequestBody.md index e537ed1..6e49577 100644 --- a/docs/Models/Operations/CreateTagRequestBody.md +++ b/docs/Models/Operations/CreateTagRequestBody.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *?string* | :heavy_minus_sign: | The name of the tag to create. | -| `color` | [?\Dub\Models\Operations\Color](../../Models/Operations/Color.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. | +| `color` | [?Operations\Color](../../Models/Operations/Color.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. | | ~~`tag`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The name of the tag to create. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateTagResponse.md b/docs/Models/Operations/CreateTagResponse.md index 869f2a5..5647f17 100644 --- a/docs/Models/Operations/CreateTagResponse.md +++ b/docs/Models/Operations/CreateTagResponse.md @@ -3,18 +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 | -| `tagSchema` | [?\Dub\Models\Components\TagSchema](../../Models/Components/TagSchema.md) | :heavy_minus_sign: | The created tag | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `tagSchema` | [?Components\TagSchema](../../Models/Components/TagSchema.md) | :heavy_minus_sign: | The created tag | \ No newline at end of file diff --git a/docs/Models/Operations/Data.md b/docs/Models/Operations/Data.md index 1ae20bd..98986a5 100644 --- a/docs/Models/Operations/Data.md +++ b/docs/Models/Operations/Data.md @@ -10,8 +10,8 @@ | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/BulkUpdateLinksTagIds.md) | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | +| `tagNames` | [string\|array\|null](../../Models/Operations/BulkUpdateLinksTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | @@ -24,7 +24,7 @@ | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *?string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *?string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [?\Dub\Models\Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `geo` | [?Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | | | `utmMedium` | *?string* | :heavy_minus_sign: | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | | diff --git a/docs/Models/Operations/DeleteDomainResponse.md b/docs/Models/Operations/DeleteDomainResponse.md index 7cd6ecd..b58bd19 100644 --- a/docs/Models/Operations/DeleteDomainResponse.md +++ b/docs/Models/Operations/DeleteDomainResponse.md @@ -3,18 +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 | -| `object` | [?\Dub\Models\Operations\DeleteDomainResponseBody](../../Models/Operations/DeleteDomainResponseBody.md) | :heavy_minus_sign: | The domain was deleted. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `object` | [?Operations\DeleteDomainResponseBody](../../Models/Operations/DeleteDomainResponseBody.md) | :heavy_minus_sign: | The domain was deleted. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteLinkResponse.md b/docs/Models/Operations/DeleteLinkResponse.md index 2a8369e..92fddab 100644 --- a/docs/Models/Operations/DeleteLinkResponse.md +++ b/docs/Models/Operations/DeleteLinkResponse.md @@ -3,18 +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 | -| `object` | [?\Dub\Models\Operations\DeleteLinkResponseBody](../../Models/Operations/DeleteLinkResponseBody.md) | :heavy_minus_sign: | The deleted link | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `object` | [?Operations\DeleteLinkResponseBody](../../Models/Operations/DeleteLinkResponseBody.md) | :heavy_minus_sign: | The deleted link | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinkInfoResponse.md b/docs/Models/Operations/GetLinkInfoResponse.md index 45cb892..e010599 100644 --- a/docs/Models/Operations/GetLinkInfoResponse.md +++ b/docs/Models/Operations/GetLinkInfoResponse.md @@ -3,18 +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 | -| `linkSchema` | [?\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The retrieved link | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchema` | [?Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The retrieved link | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksCountQueryParamTagIds.md b/docs/Models/Operations/GetLinksCountQueryParamTagIds.md new file mode 100644 index 0000000..0b2a207 --- /dev/null +++ b/docs/Models/Operations/GetLinksCountQueryParamTagIds.md @@ -0,0 +1,19 @@ +# GetLinksCountQueryParamTagIds + +The tag IDs to filter the links by. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/GetLinksCountQueryParamTagNames.md b/docs/Models/Operations/GetLinksCountQueryParamTagNames.md new file mode 100644 index 0000000..b39490d --- /dev/null +++ b/docs/Models/Operations/GetLinksCountQueryParamTagNames.md @@ -0,0 +1,19 @@ +# GetLinksCountQueryParamTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/GetLinksCountRequest.md b/docs/Models/Operations/GetLinksCountRequest.md index b50e942..19b54bc 100644 --- a/docs/Models/Operations/GetLinksCountRequest.md +++ b/docs/Models/Operations/GetLinksCountRequest.md @@ -7,10 +7,10 @@ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `domain` | *?string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | | `tagId` | *?string* | :heavy_minus_sign: | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | -| `tagIds` | *mixed* | :heavy_minus_sign: | The tag IDs to filter the links by. | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | +| `tagIds` | [string\|array\|null](../../Models/Operations/GetLinksCountQueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to filter the links by. | +| `tagNames` | [string\|array\|null](../../Models/Operations/GetLinksCountQueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | | `showArchived` | *?bool* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | | `withTags` | *?bool* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. | -| `groupBy` | *mixed* | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file +| `groupBy` | [Operations\One\|Operations\Two\|Operations\Three\|null](../../Models/Operations/GroupBy.md) | :heavy_minus_sign: | The field to group the links by. | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksCountResponse.md b/docs/Models/Operations/GetLinksCountResponse.md index 3c14e85..76edc86 100644 --- a/docs/Models/Operations/GetLinksCountResponse.md +++ b/docs/Models/Operations/GetLinksCountResponse.md @@ -3,18 +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 | -| `number` | *?float* | :heavy_minus_sign: | A list of links | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `number` | *?float* | :heavy_minus_sign: | A list of links | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksRequest.md b/docs/Models/Operations/GetLinksRequest.md index a5a6574..46275e5 100644 --- a/docs/Models/Operations/GetLinksRequest.md +++ b/docs/Models/Operations/GetLinksRequest.md @@ -7,12 +7,12 @@ | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `domain` | *?string* | :heavy_minus_sign: | The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned. | | | `tagId` | *?string* | :heavy_minus_sign: | The tag ID to filter the links by. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The tag IDs to filter the links by. | | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/QueryParamTagIds.md) | :heavy_minus_sign: | The tag IDs to filter the links by. | | +| `tagNames` | [string\|array\|null](../../Models/Operations/QueryParamTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `search` | *?string* | :heavy_minus_sign: | The search term to filter the links by. The search term will be matched against the short link slug and the destination url. | | | `userId` | *?string* | :heavy_minus_sign: | The user ID to filter the links by. | | | `showArchived` | *?bool* | :heavy_minus_sign: | Whether to include archived links in the response. Defaults to `false` if not provided. | | | `withTags` | *?bool* | :heavy_minus_sign: | Whether to include tags in the response. Defaults to `false` if not provided. | | -| `sort` | [?\Dub\Models\Operations\Sort](../../Models/Operations/Sort.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`, and sort order is always descending. | | +| `sort` | [?Operations\Sort](../../Models/Operations/Sort.md) | :heavy_minus_sign: | The field to sort the links by. The default is `createdAt`, and sort order is always descending. | | | `page` | *?float* | :heavy_minus_sign: | The page number for pagination. | 1 | | `pageSize` | *?float* | :heavy_minus_sign: | The number of items per page. | 50 | \ No newline at end of file diff --git a/docs/Models/Operations/GetLinksResponse.md b/docs/Models/Operations/GetLinksResponse.md index 4dbe667..9799df5 100644 --- a/docs/Models/Operations/GetLinksResponse.md +++ b/docs/Models/Operations/GetLinksResponse.md @@ -3,18 +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 | -| `linkSchemas` | array<[\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | A list of links | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchemas` | array<[Components\LinkSchema](../../Models/Components/LinkSchema.md)> | :heavy_minus_sign: | A list of links | \ No newline at end of file diff --git a/docs/Models/Operations/GetMetatagsResponse.md b/docs/Models/Operations/GetMetatagsResponse.md index ce8b652..e94ac36 100644 --- a/docs/Models/Operations/GetMetatagsResponse.md +++ b/docs/Models/Operations/GetMetatagsResponse.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 | -| `object` | [?\Dub\Models\Operations\GetMetatagsResponseBody](../../Models/Operations/GetMetatagsResponseBody.md) | :heavy_minus_sign: | The retrieved metatags | \ No newline at end of file +| `object` | [?Operations\GetMetatagsResponseBody](../../Models/Operations/GetMetatagsResponseBody.md) | :heavy_minus_sign: | The retrieved metatags | \ No newline at end of file diff --git a/docs/Models/Operations/GetQRCodeRequest.md b/docs/Models/Operations/GetQRCodeRequest.md index 8587cd4..2cc1131 100644 --- a/docs/Models/Operations/GetQRCodeRequest.md +++ b/docs/Models/Operations/GetQRCodeRequest.md @@ -7,7 +7,7 @@ | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | `url` | *string* | :heavy_check_mark: | The URL to generate a QR code for. | | `size` | *?float* | :heavy_minus_sign: | The size of the QR code in pixels. Defaults to `600` if not provided. | -| `level` | [?\Dub\Models\Operations\Level](../../Models/Operations/Level.md) | :heavy_minus_sign: | The level of error correction to use for the QR code. Defaults to `L` if not provided. | +| `level` | [?Operations\Level](../../Models/Operations/Level.md) | :heavy_minus_sign: | The level of error correction to use for the QR code. Defaults to `L` if not provided. | | `fgColor` | *?string* | :heavy_minus_sign: | The foreground color of the QR code in hex format. Defaults to `#000000` if not provided. | | `bgColor` | *?string* | :heavy_minus_sign: | The background color of the QR code in hex format. Defaults to `#ffffff` if not provided. | | `includeMargin` | *?bool* | :heavy_minus_sign: | Whether to include a margin around the QR code. Defaults to `false` if not provided. | \ No newline at end of file diff --git a/docs/Models/Operations/GetQRCodeResponse.md b/docs/Models/Operations/GetQRCodeResponse.md index 9c272b8..c65e9d0 100644 --- a/docs/Models/Operations/GetQRCodeResponse.md +++ b/docs/Models/Operations/GetQRCodeResponse.md @@ -3,18 +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 | -| `res` | *?string* | :heavy_minus_sign: | The QR code | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `res` | *?string* | :heavy_minus_sign: | The QR code | \ No newline at end of file diff --git a/docs/Models/Operations/GetTagsResponse.md b/docs/Models/Operations/GetTagsResponse.md index ee6a8ac..148fc22 100644 --- a/docs/Models/Operations/GetTagsResponse.md +++ b/docs/Models/Operations/GetTagsResponse.md @@ -3,18 +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 | -| `tagSchemas` | array<[\Dub\Models\Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_minus_sign: | A list of tags | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `tagSchemas` | array<[Components\TagSchema](../../Models/Components/TagSchema.md)> | :heavy_minus_sign: | A list of tags | \ No newline at end of file diff --git a/docs/Models/Operations/GetWorkspaceResponse.md b/docs/Models/Operations/GetWorkspaceResponse.md index cb64912..9294032 100644 --- a/docs/Models/Operations/GetWorkspaceResponse.md +++ b/docs/Models/Operations/GetWorkspaceResponse.md @@ -3,18 +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 | -| `workspaceSchema` | [?\Dub\Models\Components\WorkspaceSchema](../../Models/Components/WorkspaceSchema.md) | :heavy_minus_sign: | The retrieved workspace | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `workspaceSchema` | [?Components\WorkspaceSchema](../../Models/Components/WorkspaceSchema.md) | :heavy_minus_sign: | The retrieved workspace | \ No newline at end of file diff --git a/docs/Models/Operations/GroupBy.md b/docs/Models/Operations/GroupBy.md index ebcc98a..b5edd87 100644 --- a/docs/Models/Operations/GroupBy.md +++ b/docs/Models/Operations/GroupBy.md @@ -1,21 +1,25 @@ # GroupBy -The parameter to group the analytics data points by. Defaults to 'count' if undefined. - - -## Values - -| Name | Value | -| ------------ | ------------ | -| `Count` | count | -| `Timeseries` | timeseries | -| `Continents` | continents | -| `Countries` | countries | -| `Cities` | cities | -| `Devices` | devices | -| `Browsers` | browsers | -| `Os` | os | -| `Referers` | referers | -| `TopLinks` | top_links | -| `TopUrls` | top_urls | -| `Trigger` | trigger | \ No newline at end of file +The field to group the links by. + + +## Supported Types + +### `Operations\One` + +```php +Operations\One $value = /* values here */ +``` + +### `Operations\Two` + +```php +Operations\Two $value = /* values here */ +``` + +### `Operations\Three` + +```php +Operations\Three $value = /* values here */ +``` + diff --git a/docs/Models/Operations/ListDomainsResponse.md b/docs/Models/Operations/ListDomainsResponse.md index 295af37..d14ef85 100644 --- a/docs/Models/Operations/ListDomainsResponse.md +++ b/docs/Models/Operations/ListDomainsResponse.md @@ -3,18 +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 | -| `domainSchemas` | array<[\Dub\Models\Components\DomainSchema](../../Models/Components/DomainSchema.md)> | :heavy_minus_sign: | The domains were retrieved. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `domainSchemas` | array<[Components\DomainSchema](../../Models/Components/DomainSchema.md)> | :heavy_minus_sign: | The domains were retrieved. | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsRequest.md b/docs/Models/Operations/ListEventsRequest.md new file mode 100644 index 0000000..a47c650 --- /dev/null +++ b/docs/Models/Operations/ListEventsRequest.md @@ -0,0 +1,31 @@ +# ListEventsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `event` | [?Operations\QueryParamEvent](../../Models/Operations/QueryParamEvent.md) | :heavy_minus_sign: | The type of event to retrieve analytics for. Defaults to 'clicks'. | | +| `domain` | *?string* | :heavy_minus_sign: | The domain to filter analytics for. | | +| `key` | *?string* | :heavy_minus_sign: | The short link slug. | | +| `linkId` | *?string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | | +| `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | | +| `interval` | [?Operations\QueryParamInterval](../../Models/Operations/QueryParamInterval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | | +| `start` | *?string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | | +| `end` | *?string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | | +| `timezone` | *?string* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York | +| `continent` | [?Components\ContinentCode](../../Models/Components/ContinentCode.md) | :heavy_minus_sign: | The continent to retrieve analytics for. | | +| `country` | [?Components\CountryCode](../../Models/Components/CountryCode.md) | :heavy_minus_sign: | The country to retrieve analytics for. | | +| `city` | *?string* | :heavy_minus_sign: | The city to retrieve analytics for. | New York | +| `device` | *?string* | :heavy_minus_sign: | The device to retrieve analytics for. | Desktop | +| `browser` | *?string* | :heavy_minus_sign: | The browser to retrieve analytics for. | Chrome | +| `os` | *?string* | :heavy_minus_sign: | The OS to retrieve analytics for. | Windows | +| `referer` | *?string* | :heavy_minus_sign: | The referer to retrieve analytics for. | google.com | +| `url` | *?string* | :heavy_minus_sign: | The URL to retrieve analytics for. | | +| `tagId` | *?string* | :heavy_minus_sign: | The tag ID to retrieve analytics for. | | +| `qr` | *?bool* | :heavy_minus_sign: | Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both. | | +| `root` | *?bool* | :heavy_minus_sign: | Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both. | | +| `page` | *?float* | :heavy_minus_sign: | N/A | | +| `limit` | *?float* | :heavy_minus_sign: | N/A | | +| `order` | [?Operations\Order](../../Models/Operations/Order.md) | :heavy_minus_sign: | N/A | | +| `sortBy` | [?Operations\SortBy](../../Models/Operations/SortBy.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Operations/ListEventsResponse.md b/docs/Models/Operations/ListEventsResponse.md new file mode 100644 index 0000000..c6dbbc0 --- /dev/null +++ b/docs/Models/Operations/ListEventsResponse.md @@ -0,0 +1,11 @@ +# ListEventsResponse + + +## 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 | +| `clickEvents` | array<[Components\ClickEvents](../../Models/Components/ClickEvents.md)> | :heavy_minus_sign: | A list of events | \ No newline at end of file diff --git a/docs/Models/Operations/One.md b/docs/Models/Operations/One.md new file mode 100644 index 0000000..187e6eb --- /dev/null +++ b/docs/Models/Operations/One.md @@ -0,0 +1,8 @@ +# One + + +## Values + +| Name | Value | +| -------- | -------- | +| `Domain` | domain | \ No newline at end of file diff --git a/docs/Models/Operations/Order.md b/docs/Models/Operations/Order.md new file mode 100644 index 0000000..765034d --- /dev/null +++ b/docs/Models/Operations/Order.md @@ -0,0 +1,9 @@ +# Order + + +## Values + +| Name | Value | +| ------ | ------ | +| `Asc` | asc | +| `Desc` | desc | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamEvent.md b/docs/Models/Operations/QueryParamEvent.md new file mode 100644 index 0000000..cf52106 --- /dev/null +++ b/docs/Models/Operations/QueryParamEvent.md @@ -0,0 +1,13 @@ +# QueryParamEvent + +The type of event to retrieve analytics for. Defaults to 'clicks'. + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Clicks` | clicks | +| `Leads` | leads | +| `Sales` | sales | +| `Composite` | composite | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamGroupBy.md b/docs/Models/Operations/QueryParamGroupBy.md new file mode 100644 index 0000000..81f128f --- /dev/null +++ b/docs/Models/Operations/QueryParamGroupBy.md @@ -0,0 +1,21 @@ +# QueryParamGroupBy + +The parameter to group the analytics data points by. Defaults to 'count' if undefined. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Count` | count | +| `Timeseries` | timeseries | +| `Continents` | continents | +| `Countries` | countries | +| `Cities` | cities | +| `Devices` | devices | +| `Browsers` | browsers | +| `Os` | os | +| `Referers` | referers | +| `TopLinks` | top_links | +| `TopUrls` | top_urls | +| `Trigger` | trigger | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamInterval.md b/docs/Models/Operations/QueryParamInterval.md new file mode 100644 index 0000000..3438f76 --- /dev/null +++ b/docs/Models/Operations/QueryParamInterval.md @@ -0,0 +1,17 @@ +# QueryParamInterval + +The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `TwentyFourh` | 24h | +| `Sevend` | 7d | +| `Thirtyd` | 30d | +| `Ninetyd` | 90d | +| `Ytd` | ytd | +| `Oney` | 1y | +| `All` | all | +| `AllUnfiltered` | all_unfiltered | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamTagIds.md b/docs/Models/Operations/QueryParamTagIds.md new file mode 100644 index 0000000..1d44cd2 --- /dev/null +++ b/docs/Models/Operations/QueryParamTagIds.md @@ -0,0 +1,19 @@ +# QueryParamTagIds + +The tag IDs to filter the links by. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/QueryParamTagNames.md b/docs/Models/Operations/QueryParamTagNames.md new file mode 100644 index 0000000..75a030f --- /dev/null +++ b/docs/Models/Operations/QueryParamTagNames.md @@ -0,0 +1,19 @@ +# QueryParamTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/RequestBody.md b/docs/Models/Operations/RequestBody.md index 4d2c5e6..e382e3c 100644 --- a/docs/Models/Operations/RequestBody.md +++ b/docs/Models/Operations/RequestBody.md @@ -14,8 +14,8 @@ | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/BulkCreateLinksTagIds.md) | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | +| `tagNames` | [string\|array\|null](../../Models/Operations/BulkCreateLinksTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | @@ -28,7 +28,7 @@ | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *?string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *?string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [?\Dub\Models\Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `geo` | [?Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | | | `utmMedium` | *?string* | :heavy_minus_sign: | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | | diff --git a/docs/Models/Operations/RetrieveAnalyticsRequest.md b/docs/Models/Operations/RetrieveAnalyticsRequest.md index 057d734..bbd0286 100644 --- a/docs/Models/Operations/RetrieveAnalyticsRequest.md +++ b/docs/Models/Operations/RetrieveAnalyticsRequest.md @@ -5,18 +5,18 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `event` | [?\Dub\Models\Operations\Event](../../Models/Operations/Event.md) | :heavy_minus_sign: | The type of event to retrieve analytics for. Defaults to 'clicks'. | | -| `groupBy` | [?\Dub\Models\Operations\GroupBy](../../Models/Operations/GroupBy.md) | :heavy_minus_sign: | The parameter to group the analytics data points by. Defaults to 'count' if undefined. | | +| `event` | [?Operations\Event](../../Models/Operations/Event.md) | :heavy_minus_sign: | The type of event to retrieve analytics for. Defaults to 'clicks'. | | +| `groupBy` | [?Operations\QueryParamGroupBy](../../Models/Operations/QueryParamGroupBy.md) | :heavy_minus_sign: | The parameter to group the analytics data points by. Defaults to 'count' if undefined. | | | `domain` | *?string* | :heavy_minus_sign: | The domain to filter analytics for. | | | `key` | *?string* | :heavy_minus_sign: | The short link slug. | | | `linkId` | *?string* | :heavy_minus_sign: | The unique ID of the short link on Dub. | | | `externalId` | *?string* | :heavy_minus_sign: | This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter. | | -| `interval` | [?\Dub\Models\Operations\Interval](../../Models/Operations/Interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | | +| `interval` | [?Operations\Interval](../../Models/Operations/Interval.md) | :heavy_minus_sign: | The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. | | | `start` | *?string* | :heavy_minus_sign: | The start date and time when to retrieve analytics from. | | | `end` | *?string* | :heavy_minus_sign: | The end date and time when to retrieve analytics from. If not provided, defaults to the current date. | | | `timezone` | *?string* | :heavy_minus_sign: | The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC. | America/New_York | -| `continent` | [?\Dub\Models\Components\ContinentCode](../../Models/Components/ContinentCode.md) | :heavy_minus_sign: | The continent to retrieve analytics for. | | -| `country` | [?\Dub\Models\Components\CountryCode](../../Models/Components/CountryCode.md) | :heavy_minus_sign: | The country to retrieve analytics for. | | +| `continent` | [?Components\ContinentCode](../../Models/Components/ContinentCode.md) | :heavy_minus_sign: | The continent to retrieve analytics for. | | +| `country` | [?Components\CountryCode](../../Models/Components/CountryCode.md) | :heavy_minus_sign: | The country to retrieve analytics for. | | | `city` | *?string* | :heavy_minus_sign: | The city to retrieve analytics for. | New York | | `device` | *?string* | :heavy_minus_sign: | The device to retrieve analytics for. | Desktop | | `browser` | *?string* | :heavy_minus_sign: | The browser to retrieve analytics for. | Chrome | diff --git a/docs/Models/Operations/RetrieveAnalyticsResponse.md b/docs/Models/Operations/RetrieveAnalyticsResponse.md index e4475cf..02c3fe3 100644 --- a/docs/Models/Operations/RetrieveAnalyticsResponse.md +++ b/docs/Models/Operations/RetrieveAnalyticsResponse.md @@ -3,18 +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` | *mixed* | :heavy_minus_sign: | Analytics data | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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\ClicksCount\|array\|Components\LeadsCount\|Components\SalesCount\|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 new file mode 100644 index 0000000..c164d5d --- /dev/null +++ b/docs/Models/Operations/RetrieveAnalyticsResponseBody.md @@ -0,0 +1,187 @@ +# RetrieveAnalyticsResponseBody + +Analytics data + + +## Supported Types + +### `Components\ClicksCount` + +```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 */ +``` + +### `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 */ +``` + diff --git a/docs/Models/Operations/SortBy.md b/docs/Models/Operations/SortBy.md new file mode 100644 index 0000000..c2ebb07 --- /dev/null +++ b/docs/Models/Operations/SortBy.md @@ -0,0 +1,9 @@ +# SortBy + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `Timestamp` | timestamp | +| `Amount` | amount | \ No newline at end of file diff --git a/docs/Models/Operations/TagIds.md b/docs/Models/Operations/TagIds.md new file mode 100644 index 0000000..fcf7ab6 --- /dev/null +++ b/docs/Models/Operations/TagIds.md @@ -0,0 +1,19 @@ +# TagIds + +The unique IDs of the tags assigned to the short link. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/TagNames.md b/docs/Models/Operations/TagNames.md new file mode 100644 index 0000000..8fb6937 --- /dev/null +++ b/docs/Models/Operations/TagNames.md @@ -0,0 +1,19 @@ +# TagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/Three.md b/docs/Models/Operations/Three.md new file mode 100644 index 0000000..7a5f576 --- /dev/null +++ b/docs/Models/Operations/Three.md @@ -0,0 +1,8 @@ +# Three + + +## Values + +| Name | Value | +| -------- | -------- | +| `UserId` | userId | \ No newline at end of file diff --git a/docs/Models/Operations/TrackCustomerResponse.md b/docs/Models/Operations/TrackCustomerResponse.md index 03ff4c3..ed7d44f 100644 --- a/docs/Models/Operations/TrackCustomerResponse.md +++ b/docs/Models/Operations/TrackCustomerResponse.md @@ -3,18 +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 | -| `object` | [?\Dub\Models\Operations\TrackCustomerResponseBody](../../Models/Operations/TrackCustomerResponseBody.md) | :heavy_minus_sign: | A customer was tracked. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `object` | [?Operations\TrackCustomerResponseBody](../../Models/Operations/TrackCustomerResponseBody.md) | :heavy_minus_sign: | A customer was tracked. | \ No newline at end of file diff --git a/docs/Models/Operations/TrackLeadResponse.md b/docs/Models/Operations/TrackLeadResponse.md index a335a76..dd69c15 100644 --- a/docs/Models/Operations/TrackLeadResponse.md +++ b/docs/Models/Operations/TrackLeadResponse.md @@ -3,18 +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 | -| `object` | [?\Dub\Models\Operations\TrackLeadResponseBody](../../Models/Operations/TrackLeadResponseBody.md) | :heavy_minus_sign: | A lead was tracked. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `object` | [?Operations\TrackLeadResponseBody](../../Models/Operations/TrackLeadResponseBody.md) | :heavy_minus_sign: | A lead was tracked. | \ No newline at end of file diff --git a/docs/Models/Operations/TrackSaleRequestBody.md b/docs/Models/Operations/TrackSaleRequestBody.md index 56d347a..5ddc225 100644 --- a/docs/Models/Operations/TrackSaleRequestBody.md +++ b/docs/Models/Operations/TrackSaleRequestBody.md @@ -7,7 +7,7 @@ | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `customerId` | *string* | :heavy_check_mark: | This is the unique identifier for the customer in the client's app. This is used to track the customer's journey. | | | `amount` | *int* | :heavy_check_mark: | The amount of the sale. Should be passed in cents. | | -| `paymentProcessor` | [\Dub\Models\Operations\PaymentProcessor](../../Models/Operations/PaymentProcessor.md) | :heavy_check_mark: | The payment processor via which the sale was made. | | +| `paymentProcessor` | [Operations\PaymentProcessor](../../Models/Operations/PaymentProcessor.md) | :heavy_check_mark: | The payment processor via which the sale was made. | | | `eventName` | *?string* | :heavy_minus_sign: | The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc. | Purchase | | `invoiceId` | *?string* | :heavy_minus_sign: | The invoice ID of the sale. | | | `currency` | *?string* | :heavy_minus_sign: | The currency of the sale. Accepts ISO 4217 currency codes. | | diff --git a/docs/Models/Operations/TrackSaleResponse.md b/docs/Models/Operations/TrackSaleResponse.md index 8db3a5f..e799d26 100644 --- a/docs/Models/Operations/TrackSaleResponse.md +++ b/docs/Models/Operations/TrackSaleResponse.md @@ -3,18 +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 | -| `object` | [?\Dub\Models\Operations\TrackSaleResponseBody](../../Models/Operations/TrackSaleResponseBody.md) | :heavy_minus_sign: | A sale was tracked. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `object` | [?Operations\TrackSaleResponseBody](../../Models/Operations/TrackSaleResponseBody.md) | :heavy_minus_sign: | A sale was tracked. | \ No newline at end of file diff --git a/docs/Models/Operations/Two.md b/docs/Models/Operations/Two.md new file mode 100644 index 0000000..46cb4a6 --- /dev/null +++ b/docs/Models/Operations/Two.md @@ -0,0 +1,8 @@ +# Two + + +## Values + +| Name | Value | +| ------- | ------- | +| `TagId` | tagId | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateDomainRequest.md b/docs/Models/Operations/UpdateDomainRequest.md index 9858968..141216e 100644 --- a/docs/Models/Operations/UpdateDomainRequest.md +++ b/docs/Models/Operations/UpdateDomainRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | -| `requestBody` | [?\Dub\Models\Operations\UpdateDomainRequestBody](../../Models/Operations/UpdateDomainRequestBody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | +| `requestBody` | [?Operations\UpdateDomainRequestBody](../../Models/Operations/UpdateDomainRequestBody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateDomainResponse.md b/docs/Models/Operations/UpdateDomainResponse.md index 9e7f3aa..cad0e21 100644 --- a/docs/Models/Operations/UpdateDomainResponse.md +++ b/docs/Models/Operations/UpdateDomainResponse.md @@ -3,18 +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 | -| `domainSchema` | [?\Dub\Models\Components\DomainSchema](../../Models/Components/DomainSchema.md) | :heavy_minus_sign: | The domain was updated. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `domainSchema` | [?Components\DomainSchema](../../Models/Components/DomainSchema.md) | :heavy_minus_sign: | The domain was updated. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateLinkRequest.md b/docs/Models/Operations/UpdateLinkRequest.md index 4c5c712..5e1e850 100644 --- a/docs/Models/Operations/UpdateLinkRequest.md +++ b/docs/Models/Operations/UpdateLinkRequest.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `linkId` | *string* | :heavy_check_mark: | The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | -| `requestBody` | [?\Dub\Models\Operations\UpdateLinkRequestBody](../../Models/Operations/UpdateLinkRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `requestBody` | [?Operations\UpdateLinkRequestBody](../../Models/Operations/UpdateLinkRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateLinkRequestBody.md b/docs/Models/Operations/UpdateLinkRequestBody.md index e990ece..5987bb7 100644 --- a/docs/Models/Operations/UpdateLinkRequestBody.md +++ b/docs/Models/Operations/UpdateLinkRequestBody.md @@ -14,8 +14,8 @@ | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/UpdateLinkTagIds.md) | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | +| `tagNames` | [string\|array\|null](../../Models/Operations/UpdateLinkTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | @@ -28,7 +28,7 @@ | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *?string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *?string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [?\Dub\Models\Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | N/A | | +| `geo` | [?Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | N/A | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | | | `utmMedium` | *?string* | :heavy_minus_sign: | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | | diff --git a/docs/Models/Operations/UpdateLinkResponse.md b/docs/Models/Operations/UpdateLinkResponse.md index 8d0cda8..50559da 100644 --- a/docs/Models/Operations/UpdateLinkResponse.md +++ b/docs/Models/Operations/UpdateLinkResponse.md @@ -3,18 +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 | -| `linkSchema` | [?\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The updated link | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchema` | [?Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The updated link | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateLinkTagIds.md b/docs/Models/Operations/UpdateLinkTagIds.md new file mode 100644 index 0000000..48b5453 --- /dev/null +++ b/docs/Models/Operations/UpdateLinkTagIds.md @@ -0,0 +1,19 @@ +# UpdateLinkTagIds + +The unique IDs of the tags assigned to the short link. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/UpdateLinkTagNames.md b/docs/Models/Operations/UpdateLinkTagNames.md new file mode 100644 index 0000000..6bcd535 --- /dev/null +++ b/docs/Models/Operations/UpdateLinkTagNames.md @@ -0,0 +1,19 @@ +# UpdateLinkTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/UpdateTagRequest.md b/docs/Models/Operations/UpdateTagRequest.md index 5919f0a..fe91edf 100644 --- a/docs/Models/Operations/UpdateTagRequest.md +++ b/docs/Models/Operations/UpdateTagRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the tag to update. | -| `requestBody` | [?\Dub\Models\Operations\UpdateTagRequestBody](../../Models/Operations/UpdateTagRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the tag to update. | +| `requestBody` | [?Operations\UpdateTagRequestBody](../../Models/Operations/UpdateTagRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateTagRequestBody.md b/docs/Models/Operations/UpdateTagRequestBody.md index c5cd69a..8223d04 100644 --- a/docs/Models/Operations/UpdateTagRequestBody.md +++ b/docs/Models/Operations/UpdateTagRequestBody.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *?string* | :heavy_minus_sign: | The name of the tag to create. | -| `color` | [?\Dub\Models\Operations\UpdateTagColor](../../Models/Operations/UpdateTagColor.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. | +| `color` | [?Operations\UpdateTagColor](../../Models/Operations/UpdateTagColor.md) | :heavy_minus_sign: | The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. | | ~~`tag`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The name of the tag to create. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateTagResponse.md b/docs/Models/Operations/UpdateTagResponse.md index 3713c8a..29292f7 100644 --- a/docs/Models/Operations/UpdateTagResponse.md +++ b/docs/Models/Operations/UpdateTagResponse.md @@ -3,18 +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 | -| `tagSchema` | [?\Dub\Models\Components\TagSchema](../../Models/Components/TagSchema.md) | :heavy_minus_sign: | The updated tag. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `tagSchema` | [?Components\TagSchema](../../Models/Components/TagSchema.md) | :heavy_minus_sign: | The updated tag. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateWorkspaceRequest.md b/docs/Models/Operations/UpdateWorkspaceRequest.md index 15d0375..ea718a7 100644 --- a/docs/Models/Operations/UpdateWorkspaceRequest.md +++ b/docs/Models/Operations/UpdateWorkspaceRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace to update. | -| `requestBody` | [?\Dub\Models\Operations\UpdateWorkspaceRequestBody](../../Models/Operations/UpdateWorkspaceRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace to update. | +| `requestBody` | [?Operations\UpdateWorkspaceRequestBody](../../Models/Operations/UpdateWorkspaceRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateWorkspaceResponse.md b/docs/Models/Operations/UpdateWorkspaceResponse.md index 6188e62..f5fdd76 100644 --- a/docs/Models/Operations/UpdateWorkspaceResponse.md +++ b/docs/Models/Operations/UpdateWorkspaceResponse.md @@ -3,18 +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 | -| `workspaceSchema` | [?\Dub\Models\Components\WorkspaceSchema](../../Models/Components/WorkspaceSchema.md) | :heavy_minus_sign: | The updated workspace. | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `workspaceSchema` | [?Components\WorkspaceSchema](../../Models/Components/WorkspaceSchema.md) | :heavy_minus_sign: | The updated workspace. | \ No newline at end of file diff --git a/docs/Models/Operations/UpsertLinkRequestBody.md b/docs/Models/Operations/UpsertLinkRequestBody.md index d300031..aedfbd0 100644 --- a/docs/Models/Operations/UpsertLinkRequestBody.md +++ b/docs/Models/Operations/UpsertLinkRequestBody.md @@ -14,8 +14,8 @@ | `archived` | *?bool* | :heavy_minus_sign: | Whether the short link is archived. | | | `publicStats` | *?bool* | :heavy_minus_sign: | Whether the short link's stats are publicly accessible. | | | ~~`tagId`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead. | | -| `tagIds` | *mixed* | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | -| `tagNames` | *mixed* | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | +| `tagIds` | [string\|array\|null](../../Models/Operations/UpsertLinkTagIds.md) | :heavy_minus_sign: | The unique IDs of the tags assigned to the short link. | [
"clux0rgak00011..."
] | +| `tagNames` | [string\|array\|null](../../Models/Operations/UpsertLinkTagNames.md) | :heavy_minus_sign: | The unique name of the tags assigned to the short link (case insensitive). | | | `comments` | *?string* | :heavy_minus_sign: | The comments for the short link. | | | `expiresAt` | *?string* | :heavy_minus_sign: | The date and time when the short link will expire at. | | | `expiredUrl` | *?string* | :heavy_minus_sign: | The URL to redirect to when the short link has expired. | | @@ -28,7 +28,7 @@ | `rewrite` | *?bool* | :heavy_minus_sign: | Whether the short link uses link cloaking. | | | `ios` | *?string* | :heavy_minus_sign: | The iOS destination URL for the short link for iOS device targeting. | | | `android` | *?string* | :heavy_minus_sign: | The Android destination URL for the short link for Android device targeting. | | -| `geo` | [?\Dub\Models\Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | +| `geo` | [?Components\LinkGeoTargeting](../../Models/Components/LinkGeoTargeting.md) | :heavy_minus_sign: | Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. | | | `doIndex` | *?bool* | :heavy_minus_sign: | Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex | | | `utmSource` | *?string* | :heavy_minus_sign: | The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL. | | | `utmMedium` | *?string* | :heavy_minus_sign: | The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL. | | diff --git a/docs/Models/Operations/UpsertLinkResponse.md b/docs/Models/Operations/UpsertLinkResponse.md index 62eb114..88201db 100644 --- a/docs/Models/Operations/UpsertLinkResponse.md +++ b/docs/Models/Operations/UpsertLinkResponse.md @@ -3,18 +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 | -| `linkSchema` | [?\Dub\Models\Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The upserted link | -| `badRequest` | [?\Dub\Models\Components\BadRequest](../../Models/Components/BadRequest.md) | :heavy_minus_sign: | 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). | -| `unauthorized` | [?\Dub\Models\Components\Unauthorized](../../Models/Components/Unauthorized.md) | :heavy_minus_sign: | Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. | -| `forbidden` | [?\Dub\Models\Components\Forbidden](../../Models/Components/Forbidden.md) | :heavy_minus_sign: | 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. | -| `notFound` | [?\Dub\Models\Components\NotFound](../../Models/Components/NotFound.md) | :heavy_minus_sign: | The server cannot find the requested resource. | -| `conflict` | [?\Dub\Models\Components\Conflict](../../Models/Components/Conflict.md) | :heavy_minus_sign: | This response is sent when a request conflicts with the current state of the server. | -| `inviteExpired` | [?\Dub\Models\Components\InviteExpired](../../Models/Components/InviteExpired.md) | :heavy_minus_sign: | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. | -| `unprocessableEntity` | [?\Dub\Models\Components\UnprocessableEntity](../../Models/Components/UnprocessableEntity.md) | :heavy_minus_sign: | The request was well-formed but was unable to be followed due to semantic errors. | -| `rateLimitExceeded` | [?\Dub\Models\Components\RateLimitExceeded](../../Models/Components/RateLimitExceeded.md) | :heavy_minus_sign: | The user has sent too many requests in a given amount of time ("rate limiting") | -| `internalServerError` | [?\Dub\Models\Components\InternalServerError](../../Models/Components/InternalServerError.md) | :heavy_minus_sign: | The server has encountered a situation it does not know how to handle. | \ 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 | +| `linkSchema` | [?Components\LinkSchema](../../Models/Components/LinkSchema.md) | :heavy_minus_sign: | The upserted link | \ No newline at end of file diff --git a/docs/Models/Operations/UpsertLinkTagIds.md b/docs/Models/Operations/UpsertLinkTagIds.md new file mode 100644 index 0000000..98b221c --- /dev/null +++ b/docs/Models/Operations/UpsertLinkTagIds.md @@ -0,0 +1,19 @@ +# UpsertLinkTagIds + +The unique IDs of the tags assigned to the short link. + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/Models/Operations/UpsertLinkTagNames.md b/docs/Models/Operations/UpsertLinkTagNames.md new file mode 100644 index 0000000..31223a2 --- /dev/null +++ b/docs/Models/Operations/UpsertLinkTagNames.md @@ -0,0 +1,19 @@ +# UpsertLinkTagNames + +The unique name of the tags assigned to the short link (case insensitive). + + +## Supported Types + +### `string` + +```php +string $value = /* values here */ +``` + +### `array` + +```php +array $value = /* values here */ +``` + diff --git a/docs/sdks/analytics/README.md b/docs/sdks/analytics/README.md index 2ea72d4..9955f15 100644 --- a/docs/sdks/analytics/README.md +++ b/docs/sdks/analytics/README.md @@ -12,15 +12,13 @@ Retrieve analytics for a link, a domain, or the authenticated workspace. The res ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -28,29 +26,29 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\RetrieveAnalyticsRequest(); - $request->event = Operations\Event::Leads; - $request->groupBy = Operations\GroupBy::Trigger; - $request->domain = 'vacant-platter.biz'; - $request->key = ''; - $request->linkId = ''; - $request->externalId = ''; - $request->interval = Operations\Interval::Ninetyd; - $request->start = ''; - $request->end = ''; - $request->timezone = 'America/New_York'; - $request->continent = Components\ContinentCode::As; - $request->country = Components\CountryCode::Nz; - $request->city = 'New York'; - $request->device = 'Desktop'; - $request->browser = 'Chrome'; - $request->os = 'Windows'; - $request->referer = 'google.com'; - $request->url = 'http://ajar-mall.com'; - $request->tagId = ''; - $request->qr = false; - $request->root = false;; - + $request = new Operations\RetrieveAnalyticsRequest( + event: Operations\Event::Leads, + groupBy: Operations\QueryParamGroupBy::Trigger, + domain: 'vacant-platter.biz', + key: '', + linkId: '', + externalId: '', + interval: Operations\Interval::Ninetyd, + start: '', + end: '', + timezone: 'America/New_York', + continent: Components\ContinentCode::As, + country: Components\CountryCode::Nz, + city: 'New York', + device: 'Desktop', + browser: 'Chrome', + os: 'Windows', + referer: 'google.com', + url: 'http://ajar-mall.com', + tagId: '', + qr: false, + root: false, + ); $response = $sdk->analytics->retrieve($request); if ($response->oneOf !== null) { @@ -61,14 +59,29 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `$request` | [\Dub\Models\Operations\RetrieveAnalyticsRequest](../../Models/Operations/RetrieveAnalyticsRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `$request` | [Operations\RetrieveAnalyticsRequest](../../Models/Operations/RetrieveAnalyticsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\RetrieveAnalyticsResponse](../../Models/Operations/RetrieveAnalyticsResponse.md)** - +**[?Operations\RetrieveAnalyticsResponse](../../Models/Operations/RetrieveAnalyticsResponse.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 | */* | diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 27ba80a..27dcf69 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -15,15 +15,12 @@ Retrieve a list of domains associated with the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -31,7 +28,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->domains->list(false, '', 1, 50); @@ -43,6 +39,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | Example | @@ -55,8 +53,21 @@ try { ### Response -**[?\Dub\Models\Operations\ListDomainsResponse](../../Models/Operations/ListDomainsResponse.md)** - +**[?Operations\ListDomainsResponse](../../Models/Operations/ListDomainsResponse.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 | */* | ## create @@ -65,15 +76,13 @@ Create a domain for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -81,12 +90,12 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\CreateDomainRequestBody(); - $request->slug = 'acme.com'; - $request->expiredUrl = 'https://acme.com/expired'; - $request->archived = false; - $request->placeholder = 'https://dub.co/help/article/what-is-dub';; - + $request = new Operations\CreateDomainRequestBody( + slug: 'acme.com', + expiredUrl: 'https://acme.com/expired', + archived: false, + placeholder: 'https://dub.co/help/article/what-is-dub', + ); $response = $sdk->domains->create($request); if ($response->domainSchema !== null) { @@ -97,17 +106,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\CreateDomainRequestBody](../../Models/Operations/CreateDomainRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `$request` | [Operations\CreateDomainRequestBody](../../Models/Operations/CreateDomainRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\CreateDomainResponse](../../Models/Operations/CreateDomainResponse.md)** - +**[?Operations\CreateDomainResponse](../../Models/Operations/CreateDomainResponse.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 | */* | ## delete @@ -116,15 +140,12 @@ Delete a domain from a workspace. It cannot be undone. This will also delete all ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -132,7 +153,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->domains->delete('acme.com'); @@ -144,6 +164,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | Example | @@ -153,8 +175,21 @@ try { ### Response -**[?\Dub\Models\Operations\DeleteDomainResponse](../../Models/Operations/DeleteDomainResponse.md)** - +**[?Operations\DeleteDomainResponse](../../Models/Operations/DeleteDomainResponse.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 | */* | ## update @@ -163,15 +198,13 @@ Update a domain for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -179,12 +212,12 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $requestBody = new Operations\UpdateDomainRequestBody(); - $requestBody->slug = 'acme.com'; - $requestBody->expiredUrl = 'https://acme.com/expired'; - $requestBody->archived = false; - $requestBody->placeholder = 'https://dub.co/help/article/what-is-dub'; - + $requestBody = new Operations\UpdateDomainRequestBody( + slug: 'acme.com', + expiredUrl: 'https://acme.com/expired', + archived: false, + placeholder: 'https://dub.co/help/article/what-is-dub', + ); $response = $sdk->domains->update('acme.com', $requestBody); if ($response->domainSchema !== null) { @@ -195,15 +228,30 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -| `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | -| `requestBody` | [\Dub\Models\Operations\UpdateDomainRequestBody](../../Models/Operations/UpdateDomainRequestBody.md) | :heavy_minus_sign: | N/A | | +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `slug` | *string* | :heavy_check_mark: | The domain name. | acme.com | +| `requestBody` | [Operations\UpdateDomainRequestBody](../../Models/Operations/UpdateDomainRequestBody.md) | :heavy_minus_sign: | N/A | | ### Response -**[?\Dub\Models\Operations\UpdateDomainResponse](../../Models/Operations/UpdateDomainResponse.md)** - +**[?Operations\UpdateDomainResponse](../../Models/Operations/UpdateDomainResponse.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 | */* | diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 0000000..068e1d1 --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,90 @@ +# Events + + +### Available Operations + +* [list](#list) - Retrieve a list of events + +## list + +Retrieve a paginated list of events for the authenticated workspace. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Dub; +use Dub\Models\Components; +use Dub\Models\Operations; + +$security = new Components\Security(); +$security->token = 'DUB_API_KEY'; + +$sdk = Dub\Dub::builder()->setSecurity($security)->build(); + +try { + $request = new Operations\ListEventsRequest( + event: Operations\QueryParamEvent::Composite, + domain: 'burly-math.biz', + key: '', + linkId: '', + externalId: '', + interval: Operations\QueryParamInterval::Oney, + start: '', + end: '', + timezone: 'America/New_York', + continent: Components\ContinentCode::As, + country: Components\CountryCode::Cx, + city: 'New York', + device: 'Desktop', + browser: 'Chrome', + os: 'Windows', + referer: 'google.com', + url: 'https://elliptical-auditorium.com', + tagId: '', + qr: false, + root: false, + page: 9174.16, + limit: 6355.32, + order: Operations\Order::Desc, + sortBy: Operations\SortBy::Amount, + ); + $response = $sdk->events->list($request); + + if ($response->clickEvents !== null) { + // handle response + } +} catch (Throwable $e) { + // handle exception +} +``` + + + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `$request` | [Operations\ListEventsRequest](../../Models/Operations/ListEventsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[?Operations\ListEventsResponse](../../Models/Operations/ListEventsResponse.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 | */* | diff --git a/docs/sdks/links/README.md b/docs/sdks/links/README.md index 92c8b2c..2f124c0 100644 --- a/docs/sdks/links/README.md +++ b/docs/sdks/links/README.md @@ -20,15 +20,13 @@ Retrieve a paginated list of links for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -36,19 +34,21 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\GetLinksRequest(); - $request->domain = 'smug-bow.name'; - $request->tagId = ''; - $request->tagIds = ''; - $request->tagNames = ''; - $request->search = ''; - $request->userId = ''; - $request->showArchived = false; - $request->withTags = false; - $request->sort = Operations\Sort::CreatedAt; - $request->page = 1; - $request->pageSize = 50;; - + $request = new Operations\GetLinksRequest( + domain: 'smug-bow.name', + tagId: '', + tagIds: '', + tagNames: [ + '', + ], + search: '', + userId: '', + showArchived: false, + withTags: false, + sort: Operations\Sort::CreatedAt, + page: 1, + pageSize: 50, + ); $response = $sdk->links->list($request); if ($response->linkSchemas !== null) { @@ -59,17 +59,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `$request` | [\Dub\Models\Operations\GetLinksRequest](../../Models/Operations/GetLinksRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `$request` | [Operations\GetLinksRequest](../../Models/Operations/GetLinksRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\GetLinksResponse](../../Models/Operations/GetLinksResponse.md)** - +**[?Operations\GetLinksResponse](../../Models/Operations/GetLinksResponse.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 | */* | ## create @@ -78,15 +93,13 @@ Create a new link for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -94,290 +107,291 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\CreateLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'lighthearted-kilogram.name'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = [ - '', - ]; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'rHklDuL1dlrnUXo'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Reverse-engineered human-resource time-frame'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = '';; - + $request = new Operations\CreateLinkRequestBody( + url: 'https://google.com', + domain: 'lighthearted-kilogram.name', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'klDuL1dlrnUXohO', + proxy: false, + title: '', + description: 'User-friendly multi-state frame', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->create($request); if ($response->linkSchema !== null) { @@ -388,17 +402,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `$request` | [\Dub\Models\Operations\CreateLinkRequestBody](../../Models/Operations/CreateLinkRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `$request` | [Operations\CreateLinkRequestBody](../../Models/Operations/CreateLinkRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\CreateLinkResponse](../../Models/Operations/CreateLinkResponse.md)** - +**[?Operations\CreateLinkResponse](../../Models/Operations/CreateLinkResponse.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 | */* | ## count @@ -407,15 +436,13 @@ Retrieve the number of links for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -423,17 +450,21 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\GetLinksCountRequest(); - $request->domain = 'false-epauliere.info'; - $request->tagId = ''; - $request->tagIds = ''; - $request->tagNames = ''; - $request->search = ''; - $request->userId = ''; - $request->showArchived = false; - $request->withTags = false; - $request->groupBy = '';; - + $request = new Operations\GetLinksCountRequest( + domain: 'false-epauliere.info', + tagId: '', + tagIds: [ + '', + ], + tagNames: [ + '', + ], + search: '', + userId: '', + showArchived: false, + withTags: false, + groupBy: Operations\Two::TagId, + ); $response = $sdk->links->count($request); if ($response->number !== null) { @@ -444,17 +475,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\GetLinksCountRequest](../../Models/Operations/GetLinksCountRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `$request` | [Operations\GetLinksCountRequest](../../Models/Operations/GetLinksCountRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\GetLinksCountResponse](../../Models/Operations/GetLinksCountResponse.md)** - +**[?Operations\GetLinksCountResponse](../../Models/Operations/GetLinksCountResponse.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 | */* | ## get @@ -463,15 +509,12 @@ Retrieve the info for a link. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -479,7 +522,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->links->get('', '', 'clux0rgak00011...', 'ext_123456'); @@ -491,6 +533,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | Example | @@ -503,8 +547,21 @@ try { ### Response -**[?\Dub\Models\Operations\GetLinkInfoResponse](../../Models/Operations/GetLinkInfoResponse.md)** - +**[?Operations\GetLinkInfoResponse](../../Models/Operations/GetLinkInfoResponse.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 | */* | ## delete @@ -513,15 +570,12 @@ Delete a link for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -529,7 +583,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->links->delete(''); @@ -541,6 +594,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -550,8 +605,21 @@ try { ### Response -**[?\Dub\Models\Operations\DeleteLinkResponse](../../Models/Operations/DeleteLinkResponse.md)** - +**[?Operations\DeleteLinkResponse](../../Models/Operations/DeleteLinkResponse.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 | */* | ## update @@ -560,15 +628,13 @@ Update a link for the authenticated workspace. If there's no change, returns it ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -576,290 +642,289 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $requestBody = new Operations\UpdateLinkRequestBody(); - $requestBody->url = 'https://google.com'; - $requestBody->domain = 'tidy-amazon.name'; - $requestBody->key = ''; - $requestBody->externalId = '123456'; - $requestBody->prefix = ''; - $requestBody->trackConversion = false; - $requestBody->archived = false; - $requestBody->publicStats = false; - $requestBody->tagId = ''; - $requestBody->tagIds = [ - '', - ]; - $requestBody->tagNames = ''; - $requestBody->comments = ''; - $requestBody->expiresAt = ''; - $requestBody->expiredUrl = ''; - $requestBody->password = 'AdaOKvPKDk8CkuA'; - $requestBody->proxy = false; - $requestBody->title = ''; - $requestBody->description = 'Front-line 24/7 implementation'; - $requestBody->image = 'https://loremflickr.com/640/480'; - $requestBody->video = ''; - $requestBody->rewrite = false; - $requestBody->ios = ''; - $requestBody->android = ''; - $requestBody->geo = new Components\LinkGeoTargeting(); - $requestBody->geo->af = ''; - $requestBody->geo->al = ''; - $requestBody->geo->dz = ''; - $requestBody->geo->as = ''; - $requestBody->geo->ad = ''; - $requestBody->geo->ao = ''; - $requestBody->geo->ai = ''; - $requestBody->geo->aq = ''; - $requestBody->geo->ag = ''; - $requestBody->geo->ar = ''; - $requestBody->geo->am = ''; - $requestBody->geo->aw = ''; - $requestBody->geo->au = ''; - $requestBody->geo->at = ''; - $requestBody->geo->az = ''; - $requestBody->geo->bs = ''; - $requestBody->geo->bh = ''; - $requestBody->geo->bd = ''; - $requestBody->geo->bb = ''; - $requestBody->geo->by = ''; - $requestBody->geo->be = ''; - $requestBody->geo->bz = ''; - $requestBody->geo->bj = ''; - $requestBody->geo->bm = ''; - $requestBody->geo->bt = ''; - $requestBody->geo->bo = ''; - $requestBody->geo->ba = ''; - $requestBody->geo->bw = ''; - $requestBody->geo->bv = ''; - $requestBody->geo->br = ''; - $requestBody->geo->io = ''; - $requestBody->geo->bn = ''; - $requestBody->geo->bg = ''; - $requestBody->geo->bf = ''; - $requestBody->geo->bi = ''; - $requestBody->geo->kh = ''; - $requestBody->geo->cm = ''; - $requestBody->geo->ca = ''; - $requestBody->geo->cv = ''; - $requestBody->geo->ky = ''; - $requestBody->geo->cf = ''; - $requestBody->geo->td = ''; - $requestBody->geo->cl = ''; - $requestBody->geo->cn = ''; - $requestBody->geo->cx = ''; - $requestBody->geo->cc = ''; - $requestBody->geo->co = ''; - $requestBody->geo->km = ''; - $requestBody->geo->cg = ''; - $requestBody->geo->cd = ''; - $requestBody->geo->ck = ''; - $requestBody->geo->cr = ''; - $requestBody->geo->ci = ''; - $requestBody->geo->hr = ''; - $requestBody->geo->cu = ''; - $requestBody->geo->cy = ''; - $requestBody->geo->cz = ''; - $requestBody->geo->dk = ''; - $requestBody->geo->dj = ''; - $requestBody->geo->dm = ''; - $requestBody->geo->do = ''; - $requestBody->geo->ec = ''; - $requestBody->geo->eg = ''; - $requestBody->geo->sv = ''; - $requestBody->geo->gq = ''; - $requestBody->geo->er = ''; - $requestBody->geo->ee = ''; - $requestBody->geo->et = ''; - $requestBody->geo->fk = ''; - $requestBody->geo->fo = ''; - $requestBody->geo->fj = ''; - $requestBody->geo->fi = ''; - $requestBody->geo->fr = ''; - $requestBody->geo->gf = ''; - $requestBody->geo->pf = ''; - $requestBody->geo->tf = ''; - $requestBody->geo->ga = ''; - $requestBody->geo->gm = ''; - $requestBody->geo->ge = ''; - $requestBody->geo->de = ''; - $requestBody->geo->gh = ''; - $requestBody->geo->gi = ''; - $requestBody->geo->gr = ''; - $requestBody->geo->gl = ''; - $requestBody->geo->gd = ''; - $requestBody->geo->gp = ''; - $requestBody->geo->gu = ''; - $requestBody->geo->gt = ''; - $requestBody->geo->gn = ''; - $requestBody->geo->gw = ''; - $requestBody->geo->gy = ''; - $requestBody->geo->ht = ''; - $requestBody->geo->hm = ''; - $requestBody->geo->va = ''; - $requestBody->geo->hn = ''; - $requestBody->geo->hk = ''; - $requestBody->geo->hu = ''; - $requestBody->geo->is = ''; - $requestBody->geo->in = ''; - $requestBody->geo->id = ''; - $requestBody->geo->ir = ''; - $requestBody->geo->iq = ''; - $requestBody->geo->ie = ''; - $requestBody->geo->il = ''; - $requestBody->geo->it = ''; - $requestBody->geo->jm = ''; - $requestBody->geo->jp = ''; - $requestBody->geo->jo = ''; - $requestBody->geo->kz = ''; - $requestBody->geo->ke = ''; - $requestBody->geo->ki = ''; - $requestBody->geo->kp = ''; - $requestBody->geo->kr = ''; - $requestBody->geo->kw = ''; - $requestBody->geo->kg = ''; - $requestBody->geo->la = ''; - $requestBody->geo->lv = ''; - $requestBody->geo->lb = ''; - $requestBody->geo->ls = ''; - $requestBody->geo->lr = ''; - $requestBody->geo->ly = ''; - $requestBody->geo->li = ''; - $requestBody->geo->lt = ''; - $requestBody->geo->lu = ''; - $requestBody->geo->mo = ''; - $requestBody->geo->mg = ''; - $requestBody->geo->mw = ''; - $requestBody->geo->my = ''; - $requestBody->geo->mv = ''; - $requestBody->geo->ml = ''; - $requestBody->geo->mt = ''; - $requestBody->geo->mh = ''; - $requestBody->geo->mq = ''; - $requestBody->geo->mr = ''; - $requestBody->geo->mu = ''; - $requestBody->geo->yt = ''; - $requestBody->geo->mx = ''; - $requestBody->geo->fm = ''; - $requestBody->geo->md = ''; - $requestBody->geo->mc = ''; - $requestBody->geo->mn = ''; - $requestBody->geo->ms = ''; - $requestBody->geo->ma = ''; - $requestBody->geo->mz = ''; - $requestBody->geo->mm = ''; - $requestBody->geo->na = ''; - $requestBody->geo->nr = ''; - $requestBody->geo->np = ''; - $requestBody->geo->nl = ''; - $requestBody->geo->nc = ''; - $requestBody->geo->nz = ''; - $requestBody->geo->ni = ''; - $requestBody->geo->ne = ''; - $requestBody->geo->ng = ''; - $requestBody->geo->nu = ''; - $requestBody->geo->nf = ''; - $requestBody->geo->mk = ''; - $requestBody->geo->mp = ''; - $requestBody->geo->no = ''; - $requestBody->geo->om = ''; - $requestBody->geo->pk = ''; - $requestBody->geo->pw = ''; - $requestBody->geo->ps = ''; - $requestBody->geo->pa = ''; - $requestBody->geo->pg = ''; - $requestBody->geo->py = ''; - $requestBody->geo->pe = ''; - $requestBody->geo->ph = ''; - $requestBody->geo->pn = ''; - $requestBody->geo->pl = ''; - $requestBody->geo->pt = ''; - $requestBody->geo->pr = ''; - $requestBody->geo->qa = ''; - $requestBody->geo->re = ''; - $requestBody->geo->ro = ''; - $requestBody->geo->ru = ''; - $requestBody->geo->rw = ''; - $requestBody->geo->sh = ''; - $requestBody->geo->kn = ''; - $requestBody->geo->lc = ''; - $requestBody->geo->pm = ''; - $requestBody->geo->vc = ''; - $requestBody->geo->ws = ''; - $requestBody->geo->sm = ''; - $requestBody->geo->st = ''; - $requestBody->geo->sa = ''; - $requestBody->geo->sn = ''; - $requestBody->geo->sc = ''; - $requestBody->geo->sl = ''; - $requestBody->geo->sg = ''; - $requestBody->geo->sk = ''; - $requestBody->geo->si = ''; - $requestBody->geo->sb = ''; - $requestBody->geo->so = ''; - $requestBody->geo->za = ''; - $requestBody->geo->gs = ''; - $requestBody->geo->es = ''; - $requestBody->geo->lk = ''; - $requestBody->geo->sd = ''; - $requestBody->geo->sr = ''; - $requestBody->geo->sj = ''; - $requestBody->geo->sz = ''; - $requestBody->geo->se = ''; - $requestBody->geo->ch = ''; - $requestBody->geo->sy = ''; - $requestBody->geo->tw = ''; - $requestBody->geo->tj = ''; - $requestBody->geo->tz = ''; - $requestBody->geo->th = ''; - $requestBody->geo->tl = ''; - $requestBody->geo->tg = ''; - $requestBody->geo->tk = ''; - $requestBody->geo->to = ''; - $requestBody->geo->tt = ''; - $requestBody->geo->tn = ''; - $requestBody->geo->tr = ''; - $requestBody->geo->tm = ''; - $requestBody->geo->tc = ''; - $requestBody->geo->tv = ''; - $requestBody->geo->ug = ''; - $requestBody->geo->ua = ''; - $requestBody->geo->ae = ''; - $requestBody->geo->gb = ''; - $requestBody->geo->us = ''; - $requestBody->geo->um = ''; - $requestBody->geo->uy = ''; - $requestBody->geo->uz = ''; - $requestBody->geo->vu = ''; - $requestBody->geo->ve = ''; - $requestBody->geo->vn = ''; - $requestBody->geo->vg = ''; - $requestBody->geo->vi = ''; - $requestBody->geo->wf = ''; - $requestBody->geo->eh = ''; - $requestBody->geo->ye = ''; - $requestBody->geo->zm = ''; - $requestBody->geo->zw = ''; - $requestBody->geo->ax = ''; - $requestBody->geo->bq = ''; - $requestBody->geo->cw = ''; - $requestBody->geo->gg = ''; - $requestBody->geo->im = ''; - $requestBody->geo->je = ''; - $requestBody->geo->me = ''; - $requestBody->geo->bl = ''; - $requestBody->geo->mf = ''; - $requestBody->geo->rs = ''; - $requestBody->geo->sx = ''; - $requestBody->geo->ss = ''; - $requestBody->geo->xk = ''; - $requestBody->doIndex = false; - $requestBody->utmSource = ''; - $requestBody->utmMedium = ''; - $requestBody->utmCampaign = ''; - $requestBody->utmTerm = ''; - $requestBody->utmContent = ''; - + $requestBody = new Operations\UpdateLinkRequestBody( + url: 'https://google.com', + domain: 'tidy-amazon.name', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: '["clux0rgak00011..."]', + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'daOKvPKDk8CkuAM', + proxy: false, + title: '', + description: 'Mandatory real-time migration', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->update('', $requestBody); if ($response->linkSchema !== null) { @@ -870,18 +935,33 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `linkId` | *string* | :heavy_check_mark: | The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`. | -| `requestBody` | [\Dub\Models\Operations\UpdateLinkRequestBody](../../Models/Operations/UpdateLinkRequestBody.md) | :heavy_minus_sign: | N/A | +| `requestBody` | [Operations\UpdateLinkRequestBody](../../Models/Operations/UpdateLinkRequestBody.md) | :heavy_minus_sign: | N/A | ### Response -**[?\Dub\Models\Operations\UpdateLinkResponse](../../Models/Operations/UpdateLinkResponse.md)** - +**[?Operations\UpdateLinkResponse](../../Models/Operations/UpdateLinkResponse.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 | */* | ## createMany @@ -890,15 +970,13 @@ Bulk create up to 100 links for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -906,10 +984,9 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = [ - new Operations\RequestBody(), + $request = [ + new Operations\RequestBody, ]; - $response = $sdk->links->createMany($request); if ($response->linkSchemas !== null) { @@ -920,6 +997,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -929,8 +1008,21 @@ try { ### Response -**[?\Dub\Models\Operations\BulkCreateLinksResponse](../../Models/Operations/BulkCreateLinksResponse.md)** - +**[?Operations\BulkCreateLinksResponse](../../Models/Operations/BulkCreateLinksResponse.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 @@ -939,15 +1031,13 @@ Bulk update up to 100 links with the same data for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -955,290 +1045,290 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\BulkUpdateLinksRequestBody(); - $request->linkIds = [ - '', - ]; - $request->data = new Operations\Data(); - $request->data->url = 'https://google.com'; - $request->data->trackConversion = false; - $request->data->archived = false; - $request->data->publicStats = false; - $request->data->tagId = ''; - $request->data->tagIds = [ - '', - ]; - $request->data->tagNames = ''; - $request->data->comments = ''; - $request->data->expiresAt = ''; - $request->data->expiredUrl = ''; - $request->data->password = 'GWDSvXDvs2q1hzW'; - $request->data->proxy = false; - $request->data->title = ''; - $request->data->description = 'Upgradable cohesive implementation'; - $request->data->image = 'https://loremflickr.com/640/480'; - $request->data->video = ''; - $request->data->rewrite = false; - $request->data->ios = ''; - $request->data->android = ''; - $request->data->geo = new Components\LinkGeoTargeting(); - $request->data->geo->af = ''; - $request->data->geo->al = ''; - $request->data->geo->dz = ''; - $request->data->geo->as = ''; - $request->data->geo->ad = ''; - $request->data->geo->ao = ''; - $request->data->geo->ai = ''; - $request->data->geo->aq = ''; - $request->data->geo->ag = ''; - $request->data->geo->ar = ''; - $request->data->geo->am = ''; - $request->data->geo->aw = ''; - $request->data->geo->au = ''; - $request->data->geo->at = ''; - $request->data->geo->az = ''; - $request->data->geo->bs = ''; - $request->data->geo->bh = ''; - $request->data->geo->bd = ''; - $request->data->geo->bb = ''; - $request->data->geo->by = ''; - $request->data->geo->be = ''; - $request->data->geo->bz = ''; - $request->data->geo->bj = ''; - $request->data->geo->bm = ''; - $request->data->geo->bt = ''; - $request->data->geo->bo = ''; - $request->data->geo->ba = ''; - $request->data->geo->bw = ''; - $request->data->geo->bv = ''; - $request->data->geo->br = ''; - $request->data->geo->io = ''; - $request->data->geo->bn = ''; - $request->data->geo->bg = ''; - $request->data->geo->bf = ''; - $request->data->geo->bi = ''; - $request->data->geo->kh = ''; - $request->data->geo->cm = ''; - $request->data->geo->ca = ''; - $request->data->geo->cv = ''; - $request->data->geo->ky = ''; - $request->data->geo->cf = ''; - $request->data->geo->td = ''; - $request->data->geo->cl = ''; - $request->data->geo->cn = ''; - $request->data->geo->cx = ''; - $request->data->geo->cc = ''; - $request->data->geo->co = ''; - $request->data->geo->km = ''; - $request->data->geo->cg = ''; - $request->data->geo->cd = ''; - $request->data->geo->ck = ''; - $request->data->geo->cr = ''; - $request->data->geo->ci = ''; - $request->data->geo->hr = ''; - $request->data->geo->cu = ''; - $request->data->geo->cy = ''; - $request->data->geo->cz = ''; - $request->data->geo->dk = ''; - $request->data->geo->dj = ''; - $request->data->geo->dm = ''; - $request->data->geo->do = ''; - $request->data->geo->ec = ''; - $request->data->geo->eg = ''; - $request->data->geo->sv = ''; - $request->data->geo->gq = ''; - $request->data->geo->er = ''; - $request->data->geo->ee = ''; - $request->data->geo->et = ''; - $request->data->geo->fk = ''; - $request->data->geo->fo = ''; - $request->data->geo->fj = ''; - $request->data->geo->fi = ''; - $request->data->geo->fr = ''; - $request->data->geo->gf = ''; - $request->data->geo->pf = ''; - $request->data->geo->tf = ''; - $request->data->geo->ga = ''; - $request->data->geo->gm = ''; - $request->data->geo->ge = ''; - $request->data->geo->de = ''; - $request->data->geo->gh = ''; - $request->data->geo->gi = ''; - $request->data->geo->gr = ''; - $request->data->geo->gl = ''; - $request->data->geo->gd = ''; - $request->data->geo->gp = ''; - $request->data->geo->gu = ''; - $request->data->geo->gt = ''; - $request->data->geo->gn = ''; - $request->data->geo->gw = ''; - $request->data->geo->gy = ''; - $request->data->geo->ht = ''; - $request->data->geo->hm = ''; - $request->data->geo->va = ''; - $request->data->geo->hn = ''; - $request->data->geo->hk = ''; - $request->data->geo->hu = ''; - $request->data->geo->is = ''; - $request->data->geo->in = ''; - $request->data->geo->id = ''; - $request->data->geo->ir = ''; - $request->data->geo->iq = ''; - $request->data->geo->ie = ''; - $request->data->geo->il = ''; - $request->data->geo->it = ''; - $request->data->geo->jm = ''; - $request->data->geo->jp = ''; - $request->data->geo->jo = ''; - $request->data->geo->kz = ''; - $request->data->geo->ke = ''; - $request->data->geo->ki = ''; - $request->data->geo->kp = ''; - $request->data->geo->kr = ''; - $request->data->geo->kw = ''; - $request->data->geo->kg = ''; - $request->data->geo->la = ''; - $request->data->geo->lv = ''; - $request->data->geo->lb = ''; - $request->data->geo->ls = ''; - $request->data->geo->lr = ''; - $request->data->geo->ly = ''; - $request->data->geo->li = ''; - $request->data->geo->lt = ''; - $request->data->geo->lu = ''; - $request->data->geo->mo = ''; - $request->data->geo->mg = ''; - $request->data->geo->mw = ''; - $request->data->geo->my = ''; - $request->data->geo->mv = ''; - $request->data->geo->ml = ''; - $request->data->geo->mt = ''; - $request->data->geo->mh = ''; - $request->data->geo->mq = ''; - $request->data->geo->mr = ''; - $request->data->geo->mu = ''; - $request->data->geo->yt = ''; - $request->data->geo->mx = ''; - $request->data->geo->fm = ''; - $request->data->geo->md = ''; - $request->data->geo->mc = ''; - $request->data->geo->mn = ''; - $request->data->geo->ms = ''; - $request->data->geo->ma = ''; - $request->data->geo->mz = ''; - $request->data->geo->mm = ''; - $request->data->geo->na = ''; - $request->data->geo->nr = ''; - $request->data->geo->np = ''; - $request->data->geo->nl = ''; - $request->data->geo->nc = ''; - $request->data->geo->nz = ''; - $request->data->geo->ni = ''; - $request->data->geo->ne = ''; - $request->data->geo->ng = ''; - $request->data->geo->nu = ''; - $request->data->geo->nf = ''; - $request->data->geo->mk = ''; - $request->data->geo->mp = ''; - $request->data->geo->no = ''; - $request->data->geo->om = ''; - $request->data->geo->pk = ''; - $request->data->geo->pw = ''; - $request->data->geo->ps = ''; - $request->data->geo->pa = ''; - $request->data->geo->pg = ''; - $request->data->geo->py = ''; - $request->data->geo->pe = ''; - $request->data->geo->ph = ''; - $request->data->geo->pn = ''; - $request->data->geo->pl = ''; - $request->data->geo->pt = ''; - $request->data->geo->pr = ''; - $request->data->geo->qa = ''; - $request->data->geo->re = ''; - $request->data->geo->ro = ''; - $request->data->geo->ru = ''; - $request->data->geo->rw = ''; - $request->data->geo->sh = ''; - $request->data->geo->kn = ''; - $request->data->geo->lc = ''; - $request->data->geo->pm = ''; - $request->data->geo->vc = ''; - $request->data->geo->ws = ''; - $request->data->geo->sm = ''; - $request->data->geo->st = ''; - $request->data->geo->sa = ''; - $request->data->geo->sn = ''; - $request->data->geo->sc = ''; - $request->data->geo->sl = ''; - $request->data->geo->sg = ''; - $request->data->geo->sk = ''; - $request->data->geo->si = ''; - $request->data->geo->sb = ''; - $request->data->geo->so = ''; - $request->data->geo->za = ''; - $request->data->geo->gs = ''; - $request->data->geo->es = ''; - $request->data->geo->lk = ''; - $request->data->geo->sd = ''; - $request->data->geo->sr = ''; - $request->data->geo->sj = ''; - $request->data->geo->sz = ''; - $request->data->geo->se = ''; - $request->data->geo->ch = ''; - $request->data->geo->sy = ''; - $request->data->geo->tw = ''; - $request->data->geo->tj = ''; - $request->data->geo->tz = ''; - $request->data->geo->th = ''; - $request->data->geo->tl = ''; - $request->data->geo->tg = ''; - $request->data->geo->tk = ''; - $request->data->geo->to = ''; - $request->data->geo->tt = ''; - $request->data->geo->tn = ''; - $request->data->geo->tr = ''; - $request->data->geo->tm = ''; - $request->data->geo->tc = ''; - $request->data->geo->tv = ''; - $request->data->geo->ug = ''; - $request->data->geo->ua = ''; - $request->data->geo->ae = ''; - $request->data->geo->gb = ''; - $request->data->geo->us = ''; - $request->data->geo->um = ''; - $request->data->geo->uy = ''; - $request->data->geo->uz = ''; - $request->data->geo->vu = ''; - $request->data->geo->ve = ''; - $request->data->geo->vn = ''; - $request->data->geo->vg = ''; - $request->data->geo->vi = ''; - $request->data->geo->wf = ''; - $request->data->geo->eh = ''; - $request->data->geo->ye = ''; - $request->data->geo->zm = ''; - $request->data->geo->zw = ''; - $request->data->geo->ax = ''; - $request->data->geo->bq = ''; - $request->data->geo->cw = ''; - $request->data->geo->gg = ''; - $request->data->geo->im = ''; - $request->data->geo->je = ''; - $request->data->geo->me = ''; - $request->data->geo->bl = ''; - $request->data->geo->mf = ''; - $request->data->geo->rs = ''; - $request->data->geo->sx = ''; - $request->data->geo->ss = ''; - $request->data->geo->xk = ''; - $request->data->doIndex = false; - $request->data->utmSource = ''; - $request->data->utmMedium = ''; - $request->data->utmCampaign = ''; - $request->data->utmTerm = ''; - $request->data->utmContent = '';; - + $request = new Operations\BulkUpdateLinksRequestBody( + linkIds: [ + '', + ], + data: new Operations\Data( + url: 'https://google.com', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: '["clux0rgak00011..."]', + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'WDSvXDvs2q1hzWy', + proxy: false, + title: '', + description: 'Diverse holistic internet solution', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ), + ); $response = $sdk->links->updateMany($request); if ($response->linkSchemas !== null) { @@ -1249,17 +1339,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\BulkUpdateLinksRequestBody](../../Models/Operations/BulkUpdateLinksRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `$request` | [Operations\BulkUpdateLinksRequestBody](../../Models/Operations/BulkUpdateLinksRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\BulkUpdateLinksResponse](../../Models/Operations/BulkUpdateLinksResponse.md)** - +**[?Operations\BulkUpdateLinksResponse](../../Models/Operations/BulkUpdateLinksResponse.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 | */* | ## upsert @@ -1268,15 +1373,13 @@ Upsert a link for the authenticated workspace by its URL. If a link with the sam ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -1284,290 +1387,291 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\UpsertLinkRequestBody(); - $request->url = 'https://google.com'; - $request->domain = 'monthly-hometown.info'; - $request->key = ''; - $request->externalId = '123456'; - $request->prefix = ''; - $request->trackConversion = false; - $request->archived = false; - $request->publicStats = false; - $request->tagId = ''; - $request->tagIds = [ - '', - ]; - $request->tagNames = ''; - $request->comments = ''; - $request->expiresAt = ''; - $request->expiredUrl = ''; - $request->password = 'SFNg7iwZDcrQrPc'; - $request->proxy = false; - $request->title = ''; - $request->description = 'Focused full-range forecast'; - $request->image = 'https://loremflickr.com/640/480'; - $request->video = ''; - $request->rewrite = false; - $request->ios = ''; - $request->android = ''; - $request->geo = new Components\LinkGeoTargeting(); - $request->geo->af = ''; - $request->geo->al = ''; - $request->geo->dz = ''; - $request->geo->as = ''; - $request->geo->ad = ''; - $request->geo->ao = ''; - $request->geo->ai = ''; - $request->geo->aq = ''; - $request->geo->ag = ''; - $request->geo->ar = ''; - $request->geo->am = ''; - $request->geo->aw = ''; - $request->geo->au = ''; - $request->geo->at = ''; - $request->geo->az = ''; - $request->geo->bs = ''; - $request->geo->bh = ''; - $request->geo->bd = ''; - $request->geo->bb = ''; - $request->geo->by = ''; - $request->geo->be = ''; - $request->geo->bz = ''; - $request->geo->bj = ''; - $request->geo->bm = ''; - $request->geo->bt = ''; - $request->geo->bo = ''; - $request->geo->ba = ''; - $request->geo->bw = ''; - $request->geo->bv = ''; - $request->geo->br = ''; - $request->geo->io = ''; - $request->geo->bn = ''; - $request->geo->bg = ''; - $request->geo->bf = ''; - $request->geo->bi = ''; - $request->geo->kh = ''; - $request->geo->cm = ''; - $request->geo->ca = ''; - $request->geo->cv = ''; - $request->geo->ky = ''; - $request->geo->cf = ''; - $request->geo->td = ''; - $request->geo->cl = ''; - $request->geo->cn = ''; - $request->geo->cx = ''; - $request->geo->cc = ''; - $request->geo->co = ''; - $request->geo->km = ''; - $request->geo->cg = ''; - $request->geo->cd = ''; - $request->geo->ck = ''; - $request->geo->cr = ''; - $request->geo->ci = ''; - $request->geo->hr = ''; - $request->geo->cu = ''; - $request->geo->cy = ''; - $request->geo->cz = ''; - $request->geo->dk = ''; - $request->geo->dj = ''; - $request->geo->dm = ''; - $request->geo->do = ''; - $request->geo->ec = ''; - $request->geo->eg = ''; - $request->geo->sv = ''; - $request->geo->gq = ''; - $request->geo->er = ''; - $request->geo->ee = ''; - $request->geo->et = ''; - $request->geo->fk = ''; - $request->geo->fo = ''; - $request->geo->fj = ''; - $request->geo->fi = ''; - $request->geo->fr = ''; - $request->geo->gf = ''; - $request->geo->pf = ''; - $request->geo->tf = ''; - $request->geo->ga = ''; - $request->geo->gm = ''; - $request->geo->ge = ''; - $request->geo->de = ''; - $request->geo->gh = ''; - $request->geo->gi = ''; - $request->geo->gr = ''; - $request->geo->gl = ''; - $request->geo->gd = ''; - $request->geo->gp = ''; - $request->geo->gu = ''; - $request->geo->gt = ''; - $request->geo->gn = ''; - $request->geo->gw = ''; - $request->geo->gy = ''; - $request->geo->ht = ''; - $request->geo->hm = ''; - $request->geo->va = ''; - $request->geo->hn = ''; - $request->geo->hk = ''; - $request->geo->hu = ''; - $request->geo->is = ''; - $request->geo->in = ''; - $request->geo->id = ''; - $request->geo->ir = ''; - $request->geo->iq = ''; - $request->geo->ie = ''; - $request->geo->il = ''; - $request->geo->it = ''; - $request->geo->jm = ''; - $request->geo->jp = ''; - $request->geo->jo = ''; - $request->geo->kz = ''; - $request->geo->ke = ''; - $request->geo->ki = ''; - $request->geo->kp = ''; - $request->geo->kr = ''; - $request->geo->kw = ''; - $request->geo->kg = ''; - $request->geo->la = ''; - $request->geo->lv = ''; - $request->geo->lb = ''; - $request->geo->ls = ''; - $request->geo->lr = ''; - $request->geo->ly = ''; - $request->geo->li = ''; - $request->geo->lt = ''; - $request->geo->lu = ''; - $request->geo->mo = ''; - $request->geo->mg = ''; - $request->geo->mw = ''; - $request->geo->my = ''; - $request->geo->mv = ''; - $request->geo->ml = ''; - $request->geo->mt = ''; - $request->geo->mh = ''; - $request->geo->mq = ''; - $request->geo->mr = ''; - $request->geo->mu = ''; - $request->geo->yt = ''; - $request->geo->mx = ''; - $request->geo->fm = ''; - $request->geo->md = ''; - $request->geo->mc = ''; - $request->geo->mn = ''; - $request->geo->ms = ''; - $request->geo->ma = ''; - $request->geo->mz = ''; - $request->geo->mm = ''; - $request->geo->na = ''; - $request->geo->nr = ''; - $request->geo->np = ''; - $request->geo->nl = ''; - $request->geo->nc = ''; - $request->geo->nz = ''; - $request->geo->ni = ''; - $request->geo->ne = ''; - $request->geo->ng = ''; - $request->geo->nu = ''; - $request->geo->nf = ''; - $request->geo->mk = ''; - $request->geo->mp = ''; - $request->geo->no = ''; - $request->geo->om = ''; - $request->geo->pk = ''; - $request->geo->pw = ''; - $request->geo->ps = ''; - $request->geo->pa = ''; - $request->geo->pg = ''; - $request->geo->py = ''; - $request->geo->pe = ''; - $request->geo->ph = ''; - $request->geo->pn = ''; - $request->geo->pl = ''; - $request->geo->pt = ''; - $request->geo->pr = ''; - $request->geo->qa = ''; - $request->geo->re = ''; - $request->geo->ro = ''; - $request->geo->ru = ''; - $request->geo->rw = ''; - $request->geo->sh = ''; - $request->geo->kn = ''; - $request->geo->lc = ''; - $request->geo->pm = ''; - $request->geo->vc = ''; - $request->geo->ws = ''; - $request->geo->sm = ''; - $request->geo->st = ''; - $request->geo->sa = ''; - $request->geo->sn = ''; - $request->geo->sc = ''; - $request->geo->sl = ''; - $request->geo->sg = ''; - $request->geo->sk = ''; - $request->geo->si = ''; - $request->geo->sb = ''; - $request->geo->so = ''; - $request->geo->za = ''; - $request->geo->gs = ''; - $request->geo->es = ''; - $request->geo->lk = ''; - $request->geo->sd = ''; - $request->geo->sr = ''; - $request->geo->sj = ''; - $request->geo->sz = ''; - $request->geo->se = ''; - $request->geo->ch = ''; - $request->geo->sy = ''; - $request->geo->tw = ''; - $request->geo->tj = ''; - $request->geo->tz = ''; - $request->geo->th = ''; - $request->geo->tl = ''; - $request->geo->tg = ''; - $request->geo->tk = ''; - $request->geo->to = ''; - $request->geo->tt = ''; - $request->geo->tn = ''; - $request->geo->tr = ''; - $request->geo->tm = ''; - $request->geo->tc = ''; - $request->geo->tv = ''; - $request->geo->ug = ''; - $request->geo->ua = ''; - $request->geo->ae = ''; - $request->geo->gb = ''; - $request->geo->us = ''; - $request->geo->um = ''; - $request->geo->uy = ''; - $request->geo->uz = ''; - $request->geo->vu = ''; - $request->geo->ve = ''; - $request->geo->vn = ''; - $request->geo->vg = ''; - $request->geo->vi = ''; - $request->geo->wf = ''; - $request->geo->eh = ''; - $request->geo->ye = ''; - $request->geo->zm = ''; - $request->geo->zw = ''; - $request->geo->ax = ''; - $request->geo->bq = ''; - $request->geo->cw = ''; - $request->geo->gg = ''; - $request->geo->im = ''; - $request->geo->je = ''; - $request->geo->me = ''; - $request->geo->bl = ''; - $request->geo->mf = ''; - $request->geo->rs = ''; - $request->geo->sx = ''; - $request->geo->ss = ''; - $request->geo->xk = ''; - $request->doIndex = false; - $request->utmSource = ''; - $request->utmMedium = ''; - $request->utmCampaign = ''; - $request->utmTerm = ''; - $request->utmContent = '';; - + $request = new Operations\UpsertLinkRequestBody( + url: 'https://google.com', + domain: 'monthly-hometown.info', + key: '', + externalId: '123456', + prefix: '', + trackConversion: false, + archived: false, + publicStats: false, + tagId: '', + tagIds: [ + '', + ], + tagNames: '', + comments: '', + expiresAt: '', + expiredUrl: '', + password: 'Ng7iwZDcrQrPcHB', + proxy: false, + title: '', + description: 'Organic asynchronous firmware', + image: 'https://loremflickr.com/640/480', + video: '', + rewrite: false, + ios: '', + android: '', + geo: new Components\LinkGeoTargeting( + af: '', + al: '', + dz: '', + as: '', + ad: '', + ao: '', + ai: '', + aq: '', + ag: '', + ar: '', + am: '', + aw: '', + au: '', + at: '', + az: '', + bs: '', + bh: '', + bd: '', + bb: '', + by: '', + be: '', + bz: '', + bj: '', + bm: '', + bt: '', + bo: '', + ba: '', + bw: '', + bv: '', + br: '', + io: '', + bn: '', + bg: '', + bf: '', + bi: '', + kh: '', + cm: '', + ca: '', + cv: '', + ky: '', + cf: '', + td: '', + cl: '', + cn: '', + cx: '', + cc: '', + co: '', + km: '', + cg: '', + cd: '', + ck: '', + cr: '', + ci: '', + hr: '', + cu: '', + cy: '', + cz: '', + dk: '', + dj: '', + dm: '', + do: '', + ec: '', + eg: '', + sv: '', + gq: '', + er: '', + ee: '', + et: '', + fk: '', + fo: '', + fj: '', + fi: '', + fr: '', + gf: '', + pf: '', + tf: '', + ga: '', + gm: '', + ge: '', + de: '', + gh: '', + gi: '', + gr: '', + gl: '', + gd: '', + gp: '', + gu: '', + gt: '', + gn: '', + gw: '', + gy: '', + ht: '', + hm: '', + va: '', + hn: '', + hk: '', + hu: '', + is: '', + in: '', + id: '', + ir: '', + iq: '', + ie: '', + il: '', + it: '', + jm: '', + jp: '', + jo: '', + kz: '', + ke: '', + ki: '', + kp: '', + kr: '', + kw: '', + kg: '', + la: '', + lv: '', + lb: '', + ls: '', + lr: '', + ly: '', + li: '', + lt: '', + lu: '', + mo: '', + mg: '', + mw: '', + my: '', + mv: '', + ml: '', + mt: '', + mh: '', + mq: '', + mr: '', + mu: '', + yt: '', + mx: '', + fm: '', + md: '', + mc: '', + mn: '', + ms: '', + ma: '', + mz: '', + mm: '', + na: '', + nr: '', + np: '', + nl: '', + nc: '', + nz: '', + ni: '', + ne: '', + ng: '', + nu: '', + nf: '', + mk: '', + mp: '', + no: '', + om: '', + pk: '', + pw: '', + ps: '', + pa: '', + pg: '', + py: '', + pe: '', + ph: '', + pn: '', + pl: '', + pt: '', + pr: '', + qa: '', + re: '', + ro: '', + ru: '', + rw: '', + sh: '', + kn: '', + lc: '', + pm: '', + vc: '', + ws: '', + sm: '', + st: '', + sa: '', + sn: '', + sc: '', + sl: '', + sg: '', + sk: '', + si: '', + sb: '', + so: '', + za: '', + gs: '', + es: '', + lk: '', + sd: '', + sr: '', + sj: '', + sz: '', + se: '', + ch: '', + sy: '', + tw: '', + tj: '', + tz: '', + th: '', + tl: '', + tg: '', + tk: '', + to: '', + tt: '', + tn: '', + tr: '', + tm: '', + tc: '', + tv: '', + ug: '', + ua: '', + ae: '', + gb: '', + us: '', + um: '', + uy: '', + uz: '', + vu: '', + ve: '', + vn: '', + vg: '', + vi: '', + wf: '', + eh: '', + ye: '', + zm: '', + zw: '', + ax: '', + bq: '', + cw: '', + gg: '', + im: '', + je: '', + me: '', + bl: '', + mf: '', + rs: '', + sx: '', + ss: '', + xk: '', + ), + doIndex: false, + utmSource: '', + utmMedium: '', + utmCampaign: '', + utmTerm: '', + utmContent: '', + ); $response = $sdk->links->upsert($request); if ($response->linkSchema !== null) { @@ -1578,14 +1682,29 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `$request` | [\Dub\Models\Operations\UpsertLinkRequestBody](../../Models/Operations/UpsertLinkRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `$request` | [Operations\UpsertLinkRequestBody](../../Models/Operations/UpsertLinkRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\UpsertLinkResponse](../../Models/Operations/UpsertLinkResponse.md)** - +**[?Operations\UpsertLinkResponse](../../Models/Operations/UpsertLinkResponse.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 | */* | diff --git a/docs/sdks/metatags/README.md b/docs/sdks/metatags/README.md index e46432e..a1745d1 100644 --- a/docs/sdks/metatags/README.md +++ b/docs/sdks/metatags/README.md @@ -12,15 +12,12 @@ Retrieve the metatags for a URL. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -28,7 +25,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->metatags->get('https://dub.co'); @@ -40,6 +36,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | Example | @@ -49,5 +47,9 @@ try { ### Response -**[?\Dub\Models\Operations\GetMetatagsResponse](../../Models/Operations/GetMetatagsResponse.md)** +**[?Operations\GetMetatagsResponse](../../Models/Operations/GetMetatagsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| Dub\Models\Errors.SDKException | 4xx-5xx | */* | diff --git a/docs/sdks/qrcodes/README.md b/docs/sdks/qrcodes/README.md index d5b59d9..77fb229 100644 --- a/docs/sdks/qrcodes/README.md +++ b/docs/sdks/qrcodes/README.md @@ -12,15 +12,13 @@ Retrieve a QR code for a link. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -28,14 +26,14 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\GetQRCodeRequest(); - $request->url = 'https://brief-micronutrient.org'; - $request->size = 5442.21; - $request->level = Operations\Level::H; - $request->fgColor = ''; - $request->bgColor = ''; - $request->includeMargin = false;; - + $request = new Operations\GetQRCodeRequest( + url: 'https://brief-micronutrient.org', + size: 5442.21, + level: Operations\Level::H, + fgColor: '', + bgColor: '', + includeMargin: false, + ); $response = $sdk->qrCodes->get($request); if ($response->res !== null) { @@ -46,14 +44,29 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\GetQRCodeRequest](../../Models/Operations/GetQRCodeRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `$request` | [Operations\GetQRCodeRequest](../../Models/Operations/GetQRCodeRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\GetQRCodeResponse](../../Models/Operations/GetQRCodeResponse.md)** - +**[?Operations\GetQRCodeResponse](../../Models/Operations/GetQRCodeResponse.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 | */* | diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 71e394c..872bdd6 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -14,14 +14,12 @@ Retrieve a list of tags for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -40,10 +38,25 @@ try { ``` -### Response -**[?\Dub\Models\Operations\GetTagsResponse](../../Models/Operations/GetTagsResponse.md)** +### Response + +**[?Operations\GetTagsResponse](../../Models/Operations/GetTagsResponse.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 | */* | ## create @@ -52,15 +65,13 @@ Create a new tag for the authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -68,11 +79,11 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\CreateTagRequestBody(); - $request->name = ''; - $request->color = Operations\Color::Blue; - $request->tag = '';; - + $request = new Operations\CreateTagRequestBody( + name: '', + color: Operations\Color::Blue, + tag: '', + ); $response = $sdk->tags->create($request); if ($response->tagSchema !== null) { @@ -83,17 +94,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\CreateTagRequestBody](../../Models/Operations/CreateTagRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `$request` | [Operations\CreateTagRequestBody](../../Models/Operations/CreateTagRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\CreateTagResponse](../../Models/Operations/CreateTagResponse.md)** - +**[?Operations\CreateTagResponse](../../Models/Operations/CreateTagResponse.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 | */* | ## update @@ -102,15 +128,13 @@ Update a tag in the workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -118,11 +142,11 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $requestBody = new Operations\UpdateTagRequestBody(); - $requestBody->name = ''; - $requestBody->color = Operations\UpdateTagColor::Brown; - $requestBody->tag = ''; - + $requestBody = new Operations\UpdateTagRequestBody( + name: '', + color: Operations\UpdateTagColor::Brown, + tag: '', + ); $response = $sdk->tags->update('', $requestBody); if ($response->tagSchema !== null) { @@ -133,15 +157,30 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the tag to update. | -| `requestBody` | [\Dub\Models\Operations\UpdateTagRequestBody](../../Models/Operations/UpdateTagRequestBody.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the tag to update. | +| `requestBody` | [Operations\UpdateTagRequestBody](../../Models/Operations/UpdateTagRequestBody.md) | :heavy_minus_sign: | N/A | ### Response -**[?\Dub\Models\Operations\UpdateTagResponse](../../Models/Operations/UpdateTagResponse.md)** - +**[?Operations\UpdateTagResponse](../../Models/Operations/UpdateTagResponse.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 | */* | diff --git a/docs/sdks/track/README.md b/docs/sdks/track/README.md index c15f86f..2bde610 100644 --- a/docs/sdks/track/README.md +++ b/docs/sdks/track/README.md @@ -14,15 +14,13 @@ Track a lead for a short link. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -30,17 +28,17 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\TrackLeadRequestBody(); - $request->clickId = ''; - $request->eventName = 'Sign up'; - $request->customerId = ''; - $request->customerName = ''; - $request->customerEmail = 'Katelin24@hotmail.com'; - $request->customerAvatar = ''; - $request->metadata = [ - 'Assistant' => '', - ];; - + $request = new Operations\TrackLeadRequestBody( + clickId: '', + eventName: 'Sign up', + customerId: '', + customerName: '', + customerEmail: 'Katelin24@hotmail.com', + customerAvatar: '', + metadata: [ + 'Assistant' => '', + ], + ); $response = $sdk->track->lead($request); if ($response->object !== null) { @@ -51,17 +49,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\TrackLeadRequestBody](../../Models/Operations/TrackLeadRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `$request` | [Operations\TrackLeadRequestBody](../../Models/Operations/TrackLeadRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\TrackLeadResponse](../../Models/Operations/TrackLeadResponse.md)** - +**[?Operations\TrackLeadResponse](../../Models/Operations/TrackLeadResponse.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 | */* | ## sale @@ -70,15 +83,13 @@ Track a sale for a short link. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -86,17 +97,17 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\TrackSaleRequestBody(); - $request->customerId = ''; - $request->amount = 996500; - $request->paymentProcessor = Operations\PaymentProcessor::Shopify; - $request->eventName = 'Purchase'; - $request->invoiceId = ''; - $request->currency = 'European Unit of Account 17(E.U.A.-17)'; - $request->metadata = [ - 'Stage' => '', - ];; - + $request = new Operations\TrackSaleRequestBody( + customerId: '', + amount: 996500, + paymentProcessor: Operations\PaymentProcessor::Shopify, + eventName: 'Purchase', + invoiceId: '', + currency: 'European Unit of Account 17(E.U.A.-17)', + metadata: [ + 'Stage' => '', + ], + ); $response = $sdk->track->sale($request); if ($response->object !== null) { @@ -107,17 +118,32 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `$request` | [\Dub\Models\Operations\TrackSaleRequestBody](../../Models/Operations/TrackSaleRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `$request` | [Operations\TrackSaleRequestBody](../../Models/Operations/TrackSaleRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\TrackSaleResponse](../../Models/Operations/TrackSaleResponse.md)** - +**[?Operations\TrackSaleResponse](../../Models/Operations/TrackSaleResponse.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 | */* | ## customer @@ -126,15 +152,13 @@ Track a customer for an authenticated workspace. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -142,12 +166,12 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $request = new Operations\TrackCustomerRequestBody(); - $request->customerId = ''; - $request->customerName = ''; - $request->customerEmail = 'Wilson.Smith@gmail.com'; - $request->customerAvatar = '';; - + $request = new Operations\TrackCustomerRequestBody( + customerId: '', + customerName: '', + customerEmail: 'Wilson.Smith@gmail.com', + customerAvatar: '', + ); $response = $sdk->track->customer($request); if ($response->object !== null) { @@ -158,14 +182,29 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `$request` | [\Dub\Models\Operations\TrackCustomerRequestBody](../../Models/Operations/TrackCustomerRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `$request` | [Operations\TrackCustomerRequestBody](../../Models/Operations/TrackCustomerRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[?\Dub\Models\Operations\TrackCustomerResponse](../../Models/Operations/TrackCustomerResponse.md)** - +**[?Operations\TrackCustomerResponse](../../Models/Operations/TrackCustomerResponse.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 | */* | diff --git a/docs/sdks/workspaces/README.md b/docs/sdks/workspaces/README.md index ed53177..0b3b021 100644 --- a/docs/sdks/workspaces/README.md +++ b/docs/sdks/workspaces/README.md @@ -13,15 +13,12 @@ Retrieve a workspace for the authenticated user. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -29,7 +26,6 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $response = $sdk->workspaces->get(''); @@ -41,6 +37,8 @@ try { } ``` + + ### Parameters | Parameter | Type | Required | Description | @@ -50,8 +48,21 @@ try { ### Response -**[?\Dub\Models\Operations\GetWorkspaceResponse](../../Models/Operations/GetWorkspaceResponse.md)** - +**[?Operations\GetWorkspaceResponse](../../Models/Operations/GetWorkspaceResponse.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 | */* | ## update @@ -60,15 +71,13 @@ Update a workspace by ID or slug. ### Example Usage ```php -token = 'DUB_API_KEY'; @@ -76,10 +85,10 @@ $security->token = 'DUB_API_KEY'; $sdk = Dub\Dub::builder()->setSecurity($security)->build(); try { - $requestBody = new Operations\UpdateWorkspaceRequestBody(); - $requestBody->name = ''; - $requestBody->slug = ''; - + $requestBody = new Operations\UpdateWorkspaceRequestBody( + name: '', + slug: '', + ); $response = $sdk->workspaces->update('', $requestBody); if ($response->workspaceSchema !== null) { @@ -90,15 +99,30 @@ try { } ``` + + ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace to update. | -| `requestBody` | [\Dub\Models\Operations\UpdateWorkspaceRequestBody](../../Models/Operations/UpdateWorkspaceRequestBody.md) | :heavy_minus_sign: | N/A | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `idOrSlug` | *string* | :heavy_check_mark: | The ID or slug of the workspace to update. | +| `requestBody` | [Operations\UpdateWorkspaceRequestBody](../../Models/Operations/UpdateWorkspaceRequestBody.md) | :heavy_minus_sign: | N/A | ### Response -**[?\Dub\Models\Operations\UpdateWorkspaceResponse](../../Models/Operations/UpdateWorkspaceResponse.md)** - +**[?Operations\UpdateWorkspaceResponse](../../Models/Operations/UpdateWorkspaceResponse.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 | */* | diff --git a/phpstan.neon b/phpstan.neon index 14130c0..f623fd1 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -5,8 +5,7 @@ parameters: reportUnmatchedIgnoredErrors: false - checkGenericClassInNonGenericObjectType: false - ignoreErrors: - '#.*?class ReflectionProperty constructor expects object\|string.*?#' - '#^Strict comparison using === between .*? will always evaluate to false\.$#' + - identifier: missingType.generics diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..d3f71bf --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,17 @@ + + + + + ./Tests + + + + + ./src + + + diff --git a/src/Analytics.php b/src/Analytics.php index d91e891..ca52adb 100644 --- a/src/Analytics.php +++ b/src/Analytics.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Analytics { private SDKConfiguration $sdkConfiguration; @@ -25,80 +28,116 @@ public function __construct(SDKConfiguration $sdkConfig) * * Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters. * - * @param \Dub\Models\Operations\RetrieveAnalyticsRequest $request - * @return \Dub\Models\Operations\RetrieveAnalyticsResponse + * @param Operations\RetrieveAnalyticsRequest $request + * @return Operations\RetrieveAnalyticsResponse + * @throws \Dub\Models\Errors\SDKException */ public function retrieve( - ?\Dub\Models\Operations\RetrieveAnalyticsRequest $request, - ): \Dub\Models\Operations\RetrieveAnalyticsResponse { + ?Operations\RetrieveAnalyticsRequest $request, + ): Operations\RetrieveAnalyticsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/analytics'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\RetrieveAnalyticsRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\RetrieveAnalyticsRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\RetrieveAnalyticsResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->oneOf = $serializer->deserialize((string) $httpResponse->getBody(), 'mixed', 'json'); + $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)); + $response = new Operations\RetrieveAnalyticsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + oneOf: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/Domains.php b/src/Domains.php index 9bbdb35..4e39568 100644 --- a/src/Domains.php +++ b/src/Domains.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Domains { private SDKConfiguration $sdkConfiguration; @@ -29,88 +32,125 @@ public function __construct(SDKConfiguration $sdkConfig) * @param ?string $search * @param ?float $page * @param ?float $pageSize - * @return \Dub\Models\Operations\ListDomainsResponse + * @return Operations\ListDomainsResponse + * @throws \Dub\Models\Errors\SDKException */ public function list( ?bool $archived = null, ?string $search = null, ?float $page = null, ?float $pageSize = null, - ): \Dub\Models\Operations\ListDomainsResponse { - $request = new \Dub\Models\Operations\ListDomainsRequest(); - $request->archived = $archived; - $request->search = $search; - $request->page = $page; - $request->pageSize = $pageSize; + ): Operations\ListDomainsResponse { + $request = new Operations\ListDomainsRequest( + archived: $archived, + search: $search, + page: $page, + pageSize: $pageSize, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/domains'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\ListDomainsRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\ListDomainsRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\ListDomainsResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->domainSchemas = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\DomainSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListDomainsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + domainSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -118,12 +158,13 @@ public function list( * * Create a domain for the authenticated workspace. * - * @param \Dub\Models\Operations\CreateDomainRequestBody $request - * @return \Dub\Models\Operations\CreateDomainResponse + * @param Operations\CreateDomainRequestBody $request + * @return Operations\CreateDomainResponse + * @throws \Dub\Models\Errors\SDKException */ public function create( - ?\Dub\Models\Operations\CreateDomainRequestBody $request, - ): \Dub\Models\Operations\CreateDomainResponse { + ?Operations\CreateDomainRequestBody $request, + ): Operations\CreateDomainResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/domains'); $options = ['http_errors' => false]; @@ -133,69 +174,104 @@ public function create( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\CreateDomainResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 201) { + if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->domainSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\DomainSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\DomainSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateDomainResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + domainSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -204,81 +280,118 @@ public function create( * Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain. * * @param string $slug - * @return \Dub\Models\Operations\DeleteDomainResponse + * @return Operations\DeleteDomainResponse + * @throws \Dub\Models\Errors\SDKException */ public function delete( string $slug, - ): \Dub\Models\Operations\DeleteDomainResponse { - $request = new \Dub\Models\Operations\DeleteDomainRequest(); - $request->slug = $slug; + ): Operations\DeleteDomainResponse { + $request = new Operations\DeleteDomainRequest( + slug: $slug, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/domains/{slug}', \Dub\Models\Operations\DeleteDomainRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/domains/{slug}', Operations\DeleteDomainRequest::class, $request); $options = ['http_errors' => false]; $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('DELETE', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\DeleteDomainResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\DeleteDomainResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\DeleteDomainResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteDomainResponse( + 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 ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -287,18 +400,20 @@ public function delete( * Update a domain for the authenticated workspace. * * @param string $slug - * @param ?\Dub\Models\Operations\UpdateDomainRequestBody $requestBody - * @return \Dub\Models\Operations\UpdateDomainResponse + * @param ?Operations\UpdateDomainRequestBody $requestBody + * @return Operations\UpdateDomainResponse + * @throws \Dub\Models\Errors\SDKException */ public function update( string $slug, - ?\Dub\Models\Operations\UpdateDomainRequestBody $requestBody = null, - ): \Dub\Models\Operations\UpdateDomainResponse { - $request = new \Dub\Models\Operations\UpdateDomainRequest(); - $request->slug = $slug; - $request->requestBody = $requestBody; + ?Operations\UpdateDomainRequestBody $requestBody = null, + ): Operations\UpdateDomainResponse { + $request = new Operations\UpdateDomainRequest( + slug: $slug, + requestBody: $requestBody, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/domains/{slug}', \Dub\Models\Operations\UpdateDomainRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/domains/{slug}', Operations\UpdateDomainRequest::class, $request); $options = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); if ($body !== null) { @@ -306,68 +421,103 @@ public function update( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('PATCH', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\UpdateDomainResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->domainSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\DomainSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\DomainSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateDomainResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + domainSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/Dub.php b/src/Dub.php index 0d3500c..7387aaf 100644 --- a/src/Dub.php +++ b/src/Dub.php @@ -8,6 +8,8 @@ namespace Dub; + + /** Dub - Dub.co API: Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs. */ class Dub { @@ -22,6 +24,8 @@ class Dub public Analytics $analytics; + public Events $events; + public Workspaces $workspaces; public Tags $tags; @@ -51,6 +55,7 @@ public function __construct( $this->links = new Links($this->sdkConfiguration); $this->qrCodes = new QRCodes($this->sdkConfiguration); $this->analytics = new Analytics($this->sdkConfiguration); + $this->events = new Events($this->sdkConfiguration); $this->workspaces = new Workspaces($this->sdkConfiguration); $this->tags = new Tags($this->sdkConfiguration); $this->domains = new Domains($this->sdkConfiguration); diff --git a/src/DubBuilder.php b/src/DubBuilder.php index 9a0031e..8368334 100644 --- a/src/DubBuilder.php +++ b/src/DubBuilder.php @@ -39,8 +39,9 @@ public function setClient(\GuzzleHttp\ClientInterface $client): DubBuilder */ public function setSecurity(string $token): DubBuilder { - $security = new Models\Components\Security(); - $security->token = $token; + $security = new Models\Components\Security( + token: $token + ); $this->sdkConfig->security = $security; return $this; diff --git a/src/Events.php b/src/Events.php new file mode 100644 index 0000000..276186c --- /dev/null +++ b/src/Events.php @@ -0,0 +1,143 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Retrieve a list of events + * + * Retrieve a paginated list of events for the authenticated workspace. + * + * @param Operations\ListEventsRequest $request + * @return Operations\ListEventsResponse + * @throws \Dub\Models\Errors\SDKException + */ + public function list( + ?Operations\ListEventsRequest $request, + ): Operations\ListEventsResponse { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/events'); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\ListEventsRequest::class, $request, null)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $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(), 'array<\Dub\Models\Components\ClickEvents>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListEventsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + clickEvents: $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; + } 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; + } 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; + } 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; + } 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; + } 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; + } 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; + } 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; + } 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; + } 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); + } + } +} \ No newline at end of file diff --git a/src/Links.php b/src/Links.php index 3d2cd94..b6a2aee 100644 --- a/src/Links.php +++ b/src/Links.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Links { private SDKConfiguration $sdkConfiguration; @@ -25,81 +28,117 @@ public function __construct(SDKConfiguration $sdkConfig) * * Retrieve a paginated list of links for the authenticated workspace. * - * @param \Dub\Models\Operations\GetLinksRequest $request - * @return \Dub\Models\Operations\GetLinksResponse + * @param Operations\GetLinksRequest $request + * @return Operations\GetLinksResponse + * @throws \Dub\Models\Errors\SDKException */ public function list( - ?\Dub\Models\Operations\GetLinksRequest $request, - ): \Dub\Models\Operations\GetLinksResponse { + ?Operations\GetLinksRequest $request, + ): Operations\GetLinksResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\GetLinksRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetLinksRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetLinksResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchemas = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\LinkSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetLinksResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -107,12 +146,13 @@ public function list( * * Create a new link for the authenticated workspace. * - * @param \Dub\Models\Operations\CreateLinkRequestBody $request - * @return \Dub\Models\Operations\CreateLinkResponse + * @param Operations\CreateLinkRequestBody $request + * @return Operations\CreateLinkResponse + * @throws \Dub\Models\Errors\SDKException */ public function create( - ?\Dub\Models\Operations\CreateLinkRequestBody $request, - ): \Dub\Models\Operations\CreateLinkResponse { + ?Operations\CreateLinkRequestBody $request, + ): Operations\CreateLinkResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links'); $options = ['http_errors' => false]; @@ -122,69 +162,104 @@ public function create( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\CreateLinkResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\LinkSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\LinkSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateLinkResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -192,81 +267,117 @@ public function create( * * Retrieve the number of links for the authenticated workspace. * - * @param \Dub\Models\Operations\GetLinksCountRequest $request - * @return \Dub\Models\Operations\GetLinksCountResponse + * @param Operations\GetLinksCountRequest $request + * @return Operations\GetLinksCountResponse + * @throws \Dub\Models\Errors\SDKException */ public function count( - ?\Dub\Models\Operations\GetLinksCountRequest $request, - ): \Dub\Models\Operations\GetLinksCountResponse { + ?Operations\GetLinksCountRequest $request, + ): Operations\GetLinksCountResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links/count'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\GetLinksCountRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetLinksCountRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetLinksCountResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->number = $serializer->deserialize((string) $httpResponse->getBody(), 'float', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'float', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetLinksCountResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + number: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -278,88 +389,125 @@ public function count( * @param ?string $key * @param ?string $linkId * @param ?string $externalId - * @return \Dub\Models\Operations\GetLinkInfoResponse + * @return Operations\GetLinkInfoResponse + * @throws \Dub\Models\Errors\SDKException */ public function get( ?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, - ): \Dub\Models\Operations\GetLinkInfoResponse { - $request = new \Dub\Models\Operations\GetLinkInfoRequest(); - $request->domain = $domain; - $request->key = $key; - $request->linkId = $linkId; - $request->externalId = $externalId; + ): Operations\GetLinkInfoResponse { + $request = new Operations\GetLinkInfoRequest( + domain: $domain, + key: $key, + linkId: $linkId, + externalId: $externalId, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links/info'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\GetLinkInfoRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetLinkInfoRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetLinkInfoResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\LinkSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\LinkSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetLinkInfoResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -368,81 +516,118 @@ public function get( * Delete a link for the authenticated workspace. * * @param string $linkId - * @return \Dub\Models\Operations\DeleteLinkResponse + * @return Operations\DeleteLinkResponse + * @throws \Dub\Models\Errors\SDKException */ public function delete( string $linkId, - ): \Dub\Models\Operations\DeleteLinkResponse { - $request = new \Dub\Models\Operations\DeleteLinkRequest(); - $request->linkId = $linkId; + ): Operations\DeleteLinkResponse { + $request = new Operations\DeleteLinkRequest( + linkId: $linkId, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/links/{linkId}', \Dub\Models\Operations\DeleteLinkRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/links/{linkId}', Operations\DeleteLinkRequest::class, $request); $options = ['http_errors' => false]; $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('DELETE', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\DeleteLinkResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\DeleteLinkResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\DeleteLinkResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteLinkResponse( + 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 ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -451,18 +636,20 @@ public function delete( * Update a link for the authenticated workspace. If there's no change, returns it as it is. * * @param string $linkId - * @param ?\Dub\Models\Operations\UpdateLinkRequestBody $requestBody - * @return \Dub\Models\Operations\UpdateLinkResponse + * @param ?Operations\UpdateLinkRequestBody $requestBody + * @return Operations\UpdateLinkResponse + * @throws \Dub\Models\Errors\SDKException */ public function update( string $linkId, - ?\Dub\Models\Operations\UpdateLinkRequestBody $requestBody = null, - ): \Dub\Models\Operations\UpdateLinkResponse { - $request = new \Dub\Models\Operations\UpdateLinkRequest(); - $request->linkId = $linkId; - $request->requestBody = $requestBody; + ?Operations\UpdateLinkRequestBody $requestBody = null, + ): Operations\UpdateLinkResponse { + $request = new Operations\UpdateLinkRequest( + linkId: $linkId, + requestBody: $requestBody, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/links/{linkId}', \Dub\Models\Operations\UpdateLinkRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/links/{linkId}', Operations\UpdateLinkRequest::class, $request); $options = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); if ($body !== null) { @@ -470,69 +657,104 @@ public function update( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('PATCH', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\UpdateLinkResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\LinkSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\LinkSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateLinkResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -540,12 +762,13 @@ public function update( * * Bulk create up to 100 links for the authenticated workspace. * - * @param array<\Dub\Models\Operations\RequestBody> $request - * @return \Dub\Models\Operations\BulkCreateLinksResponse + * @param array $request + * @return Operations\BulkCreateLinksResponse + * @throws \Dub\Models\Errors\SDKException */ public function createMany( ?array $request, - ): \Dub\Models\Operations\BulkCreateLinksResponse { + ): Operations\BulkCreateLinksResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links/bulk'); $options = ['http_errors' => false]; @@ -555,69 +778,104 @@ public function createMany( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\BulkCreateLinksResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchemas = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\LinkSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\BulkCreateLinksResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -625,12 +883,13 @@ public function createMany( * * Bulk update up to 100 links with the same data for the authenticated workspace. * - * @param \Dub\Models\Operations\BulkUpdateLinksRequestBody $request - * @return \Dub\Models\Operations\BulkUpdateLinksResponse + * @param Operations\BulkUpdateLinksRequestBody $request + * @return Operations\BulkUpdateLinksResponse + * @throws \Dub\Models\Errors\SDKException */ public function updateMany( - ?\Dub\Models\Operations\BulkUpdateLinksRequestBody $request, - ): \Dub\Models\Operations\BulkUpdateLinksResponse { + ?Operations\BulkUpdateLinksRequestBody $request, + ): Operations\BulkUpdateLinksResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links/bulk'); $options = ['http_errors' => false]; @@ -640,69 +899,104 @@ public function updateMany( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('PATCH', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\BulkUpdateLinksResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchemas = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\LinkSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\BulkUpdateLinksResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -710,12 +1004,13 @@ public function updateMany( * * Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created. * - * @param \Dub\Models\Operations\UpsertLinkRequestBody $request - * @return \Dub\Models\Operations\UpsertLinkResponse + * @param Operations\UpsertLinkRequestBody $request + * @return Operations\UpsertLinkResponse + * @throws \Dub\Models\Errors\SDKException */ public function upsert( - ?\Dub\Models\Operations\UpsertLinkRequestBody $request, - ): \Dub\Models\Operations\UpsertLinkResponse { + ?Operations\UpsertLinkRequestBody $request, + ): Operations\UpsertLinkResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/links/upsert'); $options = ['http_errors' => false]; @@ -725,68 +1020,103 @@ public function upsert( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PUT', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('PUT', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\UpsertLinkResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->linkSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\LinkSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\LinkSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpsertLinkResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + linkSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/Metatags.php b/src/Metatags.php index 3038819..f72af96 100644 --- a/src/Metatags.php +++ b/src/Metatags.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Metatags { private SDKConfiguration $sdkConfiguration; @@ -26,36 +29,46 @@ public function __construct(SDKConfiguration $sdkConfig) * Retrieve the metatags for a URL. * * @param string $url - * @return \Dub\Models\Operations\GetMetatagsResponse + * @return Operations\GetMetatagsResponse + * @throws \Dub\Models\Errors\SDKException */ public function get( string $url, - ): \Dub\Models\Operations\GetMetatagsResponse { - $request = new \Dub\Models\Operations\GetMetatagsRequest(); - $request->url = $url; + ): Operations\GetMetatagsResponse { + $request = new Operations\GetMetatagsRequest( + url: $url, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/metatags'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\GetMetatagsRequest::class, $request, null)); + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetMetatagsRequest::class, $request, null)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetMetatagsResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\GetMetatagsResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\GetMetatagsResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetMetatagsResponse( + 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 && $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); } - - return $response; } } \ No newline at end of file diff --git a/src/Models/Components/BadRequest.php b/src/Models/Components/BadRequest.php deleted file mode 100644 index aff49a3..0000000 --- a/src/Models/Components/BadRequest.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\Error(); - } -} \ No newline at end of file diff --git a/src/Models/Components/ClickEvents.php b/src/Models/Components/ClickEvents.php new file mode 100644 index 0000000..fa14ee2 --- /dev/null +++ b/src/Models/Components/ClickEvents.php @@ -0,0 +1,154 @@ +timestamp = $timestamp; + $this->clickId = $clickId; + $this->linkId = $linkId; + $this->domain = $domain; + $this->key = $key; + $this->url = $url; + $this->continent = $continent; + $this->country = $country; + $this->city = $city; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->referer = $referer; + $this->ip = $ip; + $this->qr = $qr; + } +} \ No newline at end of file diff --git a/src/Models/Components/ClicksBrowsers.php b/src/Models/Components/ClicksBrowsers.php new file mode 100644 index 0000000..2cf9963 --- /dev/null +++ b/src/Models/Components/ClicksBrowsers.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..720b5f3 --- /dev/null +++ b/src/Models/Components/ClicksCities.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..e8b4b87 --- /dev/null +++ b/src/Models/Components/ClicksCitiesCountry.php @@ -0,0 +1,265 @@ +clicks = $clicks; + } +} \ No newline at end of file diff --git a/src/Models/Components/ClicksCountries.php b/src/Models/Components/ClicksCountries.php new file mode 100644 index 0000000..1846b42 --- /dev/null +++ b/src/Models/Components/ClicksCountries.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..42cef63 --- /dev/null +++ b/src/Models/Components/ClicksDevices.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..9448f11 --- /dev/null +++ b/src/Models/Components/ClicksOS.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..646db4d --- /dev/null +++ b/src/Models/Components/ClicksReferers.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..06cfc04 --- /dev/null +++ b/src/Models/Components/ClicksTimeseries.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..66e34a3 --- /dev/null +++ b/src/Models/Components/ClicksTopLinks.php @@ -0,0 +1,100 @@ +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 new file mode 100644 index 0000000..a0e7f11 --- /dev/null +++ b/src/Models/Components/ClicksTopUrls.php @@ -0,0 +1,39 @@ +url = $url; + $this->clicks = $clicks; + } +} \ No newline at end of file diff --git a/src/Models/Components/Conflict.php b/src/Models/Components/Conflict.php deleted file mode 100644 index 375d57c..0000000 --- a/src/Models/Components/Conflict.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\ConflictError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/Country.php b/src/Models/Components/Country.php new file mode 100644 index 0000000..393a9a3 --- /dev/null +++ b/src/Models/Components/Country.php @@ -0,0 +1,265 @@ +id = ''; - $this->slug = ''; - $this->verified = false; - $this->primary = false; - $this->archived = false; - $this->placeholder = ''; - $this->expiredUrl = ''; - $this->createdAt = ''; - $this->updatedAt = ''; + $this->id = $id; + $this->slug = $slug; + $this->verified = $verified; + $this->primary = $primary; + $this->archived = $archived; + $this->placeholder = $placeholder; + $this->expiredUrl = $expiredUrl; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; } } \ No newline at end of file diff --git a/src/Models/Components/Domains.php b/src/Models/Components/Domains.php index 6081799..407c9d5 100644 --- a/src/Models/Components/Domains.php +++ b/src/Models/Components/Domains.php @@ -17,7 +17,6 @@ class Domains * @var string $slug */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] public string $slug; /** @@ -26,7 +25,6 @@ class Domains * @var bool $primary */ #[\JMS\Serializer\Annotation\SerializedName('primary')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $primary; /** @@ -35,13 +33,17 @@ class Domains * @var bool $verified */ #[\JMS\Serializer\Annotation\SerializedName('verified')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $verified; - public function __construct() + /** + * @param ?string $slug + * @param ?bool $primary + * @param ?bool $verified + */ + public function __construct(?string $slug = null, ?bool $primary = null, ?bool $verified = null) { - $this->slug = ''; - $this->primary = false; - $this->verified = false; + $this->slug = $slug; + $this->primary = $primary; + $this->verified = $verified; } } \ No newline at end of file diff --git a/src/Models/Components/Forbidden.php b/src/Models/Components/Forbidden.php deleted file mode 100644 index b3ff0eb..0000000 --- a/src/Models/Components/Forbidden.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\ForbiddenError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/Geo.php b/src/Models/Components/Geo.php index e74ea93..5c2829d 100644 --- a/src/Models/Components/Geo.php +++ b/src/Models/Components/Geo.php @@ -12,1507 +12,2509 @@ /** Geo - Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo */ class Geo { + /** + * + * @var ?string $af + */ #[\JMS\Serializer\Annotation\SerializedName('AF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $af = null; + /** + * + * @var ?string $al + */ #[\JMS\Serializer\Annotation\SerializedName('AL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $al = null; + /** + * + * @var ?string $dz + */ #[\JMS\Serializer\Annotation\SerializedName('DZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dz = null; + /** + * + * @var ?string $as + */ #[\JMS\Serializer\Annotation\SerializedName('AS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $as = null; + /** + * + * @var ?string $ad + */ #[\JMS\Serializer\Annotation\SerializedName('AD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ad = null; + /** + * + * @var ?string $ao + */ #[\JMS\Serializer\Annotation\SerializedName('AO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ao = null; + /** + * + * @var ?string $ai + */ #[\JMS\Serializer\Annotation\SerializedName('AI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ai = null; + /** + * + * @var ?string $aq + */ #[\JMS\Serializer\Annotation\SerializedName('AQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $aq = null; + /** + * + * @var ?string $ag + */ #[\JMS\Serializer\Annotation\SerializedName('AG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ag = null; + /** + * + * @var ?string $ar + */ #[\JMS\Serializer\Annotation\SerializedName('AR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ar = null; + /** + * + * @var ?string $am + */ #[\JMS\Serializer\Annotation\SerializedName('AM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $am = null; + /** + * + * @var ?string $aw + */ #[\JMS\Serializer\Annotation\SerializedName('AW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $aw = null; + /** + * + * @var ?string $au + */ #[\JMS\Serializer\Annotation\SerializedName('AU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $au = null; + /** + * + * @var ?string $at + */ #[\JMS\Serializer\Annotation\SerializedName('AT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $at = null; + /** + * + * @var ?string $az + */ #[\JMS\Serializer\Annotation\SerializedName('AZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $az = null; + /** + * + * @var ?string $bs + */ #[\JMS\Serializer\Annotation\SerializedName('BS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bs = null; + /** + * + * @var ?string $bh + */ #[\JMS\Serializer\Annotation\SerializedName('BH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bh = null; + /** + * + * @var ?string $bd + */ #[\JMS\Serializer\Annotation\SerializedName('BD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bd = null; + /** + * + * @var ?string $bb + */ #[\JMS\Serializer\Annotation\SerializedName('BB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bb = null; + /** + * + * @var ?string $by + */ #[\JMS\Serializer\Annotation\SerializedName('BY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $by = null; + /** + * + * @var ?string $be + */ #[\JMS\Serializer\Annotation\SerializedName('BE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $be = null; + /** + * + * @var ?string $bz + */ #[\JMS\Serializer\Annotation\SerializedName('BZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bz = null; + /** + * + * @var ?string $bj + */ #[\JMS\Serializer\Annotation\SerializedName('BJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bj = null; + /** + * + * @var ?string $bm + */ #[\JMS\Serializer\Annotation\SerializedName('BM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bm = null; + /** + * + * @var ?string $bt + */ #[\JMS\Serializer\Annotation\SerializedName('BT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bt = null; + /** + * + * @var ?string $bo + */ #[\JMS\Serializer\Annotation\SerializedName('BO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bo = null; + /** + * + * @var ?string $ba + */ #[\JMS\Serializer\Annotation\SerializedName('BA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ba = null; + /** + * + * @var ?string $bw + */ #[\JMS\Serializer\Annotation\SerializedName('BW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bw = null; + /** + * + * @var ?string $bv + */ #[\JMS\Serializer\Annotation\SerializedName('BV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bv = null; + /** + * + * @var ?string $br + */ #[\JMS\Serializer\Annotation\SerializedName('BR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $br = null; + /** + * + * @var ?string $io + */ #[\JMS\Serializer\Annotation\SerializedName('IO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $io = null; + /** + * + * @var ?string $bn + */ #[\JMS\Serializer\Annotation\SerializedName('BN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bn = null; + /** + * + * @var ?string $bg + */ #[\JMS\Serializer\Annotation\SerializedName('BG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bg = null; + /** + * + * @var ?string $bf + */ #[\JMS\Serializer\Annotation\SerializedName('BF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bf = null; + /** + * + * @var ?string $bi + */ #[\JMS\Serializer\Annotation\SerializedName('BI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bi = null; + /** + * + * @var ?string $kh + */ #[\JMS\Serializer\Annotation\SerializedName('KH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kh = null; + /** + * + * @var ?string $cm + */ #[\JMS\Serializer\Annotation\SerializedName('CM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cm = null; + /** + * + * @var ?string $ca + */ #[\JMS\Serializer\Annotation\SerializedName('CA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ca = null; + /** + * + * @var ?string $cv + */ #[\JMS\Serializer\Annotation\SerializedName('CV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cv = null; + /** + * + * @var ?string $ky + */ #[\JMS\Serializer\Annotation\SerializedName('KY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ky = null; + /** + * + * @var ?string $cf + */ #[\JMS\Serializer\Annotation\SerializedName('CF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cf = null; + /** + * + * @var ?string $td + */ #[\JMS\Serializer\Annotation\SerializedName('TD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $td = null; + /** + * + * @var ?string $cl + */ #[\JMS\Serializer\Annotation\SerializedName('CL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cl = null; + /** + * + * @var ?string $cn + */ #[\JMS\Serializer\Annotation\SerializedName('CN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cn = null; + /** + * + * @var ?string $cx + */ #[\JMS\Serializer\Annotation\SerializedName('CX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cx = null; + /** + * + * @var ?string $cc + */ #[\JMS\Serializer\Annotation\SerializedName('CC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cc = null; + /** + * + * @var ?string $co + */ #[\JMS\Serializer\Annotation\SerializedName('CO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $co = null; + /** + * + * @var ?string $km + */ #[\JMS\Serializer\Annotation\SerializedName('KM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $km = null; + /** + * + * @var ?string $cg + */ #[\JMS\Serializer\Annotation\SerializedName('CG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cg = null; + /** + * + * @var ?string $cd + */ #[\JMS\Serializer\Annotation\SerializedName('CD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cd = null; + /** + * + * @var ?string $ck + */ #[\JMS\Serializer\Annotation\SerializedName('CK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ck = null; + /** + * + * @var ?string $cr + */ #[\JMS\Serializer\Annotation\SerializedName('CR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cr = null; + /** + * + * @var ?string $ci + */ #[\JMS\Serializer\Annotation\SerializedName('CI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ci = null; + /** + * + * @var ?string $hr + */ #[\JMS\Serializer\Annotation\SerializedName('HR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hr = null; + /** + * + * @var ?string $cu + */ #[\JMS\Serializer\Annotation\SerializedName('CU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cu = null; + /** + * + * @var ?string $cy + */ #[\JMS\Serializer\Annotation\SerializedName('CY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cy = null; + /** + * + * @var ?string $cz + */ #[\JMS\Serializer\Annotation\SerializedName('CZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cz = null; + /** + * + * @var ?string $dk + */ #[\JMS\Serializer\Annotation\SerializedName('DK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dk = null; + /** + * + * @var ?string $dj + */ #[\JMS\Serializer\Annotation\SerializedName('DJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dj = null; + /** + * + * @var ?string $dm + */ #[\JMS\Serializer\Annotation\SerializedName('DM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dm = null; + /** + * + * @var ?string $do + */ #[\JMS\Serializer\Annotation\SerializedName('DO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $do = null; + /** + * + * @var ?string $ec + */ #[\JMS\Serializer\Annotation\SerializedName('EC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ec = null; + /** + * + * @var ?string $eg + */ #[\JMS\Serializer\Annotation\SerializedName('EG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $eg = null; + /** + * + * @var ?string $sv + */ #[\JMS\Serializer\Annotation\SerializedName('SV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sv = null; + /** + * + * @var ?string $gq + */ #[\JMS\Serializer\Annotation\SerializedName('GQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gq = null; + /** + * + * @var ?string $er + */ #[\JMS\Serializer\Annotation\SerializedName('ER')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $er = null; + /** + * + * @var ?string $ee + */ #[\JMS\Serializer\Annotation\SerializedName('EE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ee = null; + /** + * + * @var ?string $et + */ #[\JMS\Serializer\Annotation\SerializedName('ET')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $et = null; + /** + * + * @var ?string $fk + */ #[\JMS\Serializer\Annotation\SerializedName('FK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fk = null; + /** + * + * @var ?string $fo + */ #[\JMS\Serializer\Annotation\SerializedName('FO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fo = null; + /** + * + * @var ?string $fj + */ #[\JMS\Serializer\Annotation\SerializedName('FJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fj = null; + /** + * + * @var ?string $fi + */ #[\JMS\Serializer\Annotation\SerializedName('FI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fi = null; + /** + * + * @var ?string $fr + */ #[\JMS\Serializer\Annotation\SerializedName('FR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fr = null; + /** + * + * @var ?string $gf + */ #[\JMS\Serializer\Annotation\SerializedName('GF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gf = null; + /** + * + * @var ?string $pf + */ #[\JMS\Serializer\Annotation\SerializedName('PF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pf = null; + /** + * + * @var ?string $tf + */ #[\JMS\Serializer\Annotation\SerializedName('TF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tf = null; + /** + * + * @var ?string $ga + */ #[\JMS\Serializer\Annotation\SerializedName('GA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ga = null; + /** + * + * @var ?string $gm + */ #[\JMS\Serializer\Annotation\SerializedName('GM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gm = null; + /** + * + * @var ?string $ge + */ #[\JMS\Serializer\Annotation\SerializedName('GE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ge = null; + /** + * + * @var ?string $de + */ #[\JMS\Serializer\Annotation\SerializedName('DE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $de = null; + /** + * + * @var ?string $gh + */ #[\JMS\Serializer\Annotation\SerializedName('GH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gh = null; + /** + * + * @var ?string $gi + */ #[\JMS\Serializer\Annotation\SerializedName('GI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gi = null; + /** + * + * @var ?string $gr + */ #[\JMS\Serializer\Annotation\SerializedName('GR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gr = null; + /** + * + * @var ?string $gl + */ #[\JMS\Serializer\Annotation\SerializedName('GL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gl = null; + /** + * + * @var ?string $gd + */ #[\JMS\Serializer\Annotation\SerializedName('GD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gd = null; + /** + * + * @var ?string $gp + */ #[\JMS\Serializer\Annotation\SerializedName('GP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gp = null; + /** + * + * @var ?string $gu + */ #[\JMS\Serializer\Annotation\SerializedName('GU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gu = null; + /** + * + * @var ?string $gt + */ #[\JMS\Serializer\Annotation\SerializedName('GT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gt = null; + /** + * + * @var ?string $gn + */ #[\JMS\Serializer\Annotation\SerializedName('GN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gn = null; + /** + * + * @var ?string $gw + */ #[\JMS\Serializer\Annotation\SerializedName('GW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gw = null; + /** + * + * @var ?string $gy + */ #[\JMS\Serializer\Annotation\SerializedName('GY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gy = null; + /** + * + * @var ?string $ht + */ #[\JMS\Serializer\Annotation\SerializedName('HT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ht = null; + /** + * + * @var ?string $hm + */ #[\JMS\Serializer\Annotation\SerializedName('HM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hm = null; + /** + * + * @var ?string $va + */ #[\JMS\Serializer\Annotation\SerializedName('VA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $va = null; + /** + * + * @var ?string $hn + */ #[\JMS\Serializer\Annotation\SerializedName('HN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hn = null; + /** + * + * @var ?string $hk + */ #[\JMS\Serializer\Annotation\SerializedName('HK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hk = null; + /** + * + * @var ?string $hu + */ #[\JMS\Serializer\Annotation\SerializedName('HU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hu = null; + /** + * + * @var ?string $is + */ #[\JMS\Serializer\Annotation\SerializedName('IS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $is = null; + /** + * + * @var ?string $in + */ #[\JMS\Serializer\Annotation\SerializedName('IN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $in = null; + /** + * + * @var ?string $id + */ #[\JMS\Serializer\Annotation\SerializedName('ID')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $id = null; + /** + * + * @var ?string $ir + */ #[\JMS\Serializer\Annotation\SerializedName('IR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ir = null; + /** + * + * @var ?string $iq + */ #[\JMS\Serializer\Annotation\SerializedName('IQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $iq = null; + /** + * + * @var ?string $ie + */ #[\JMS\Serializer\Annotation\SerializedName('IE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ie = null; + /** + * + * @var ?string $il + */ #[\JMS\Serializer\Annotation\SerializedName('IL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $il = null; + /** + * + * @var ?string $it + */ #[\JMS\Serializer\Annotation\SerializedName('IT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $it = null; + /** + * + * @var ?string $jm + */ #[\JMS\Serializer\Annotation\SerializedName('JM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jm = null; + /** + * + * @var ?string $jp + */ #[\JMS\Serializer\Annotation\SerializedName('JP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jp = null; + /** + * + * @var ?string $jo + */ #[\JMS\Serializer\Annotation\SerializedName('JO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jo = null; + /** + * + * @var ?string $kz + */ #[\JMS\Serializer\Annotation\SerializedName('KZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kz = null; + /** + * + * @var ?string $ke + */ #[\JMS\Serializer\Annotation\SerializedName('KE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ke = null; + /** + * + * @var ?string $ki + */ #[\JMS\Serializer\Annotation\SerializedName('KI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ki = null; + /** + * + * @var ?string $kp + */ #[\JMS\Serializer\Annotation\SerializedName('KP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kp = null; + /** + * + * @var ?string $kr + */ #[\JMS\Serializer\Annotation\SerializedName('KR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kr = null; + /** + * + * @var ?string $kw + */ #[\JMS\Serializer\Annotation\SerializedName('KW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kw = null; + /** + * + * @var ?string $kg + */ #[\JMS\Serializer\Annotation\SerializedName('KG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kg = null; + /** + * + * @var ?string $la + */ #[\JMS\Serializer\Annotation\SerializedName('LA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $la = null; + /** + * + * @var ?string $lv + */ #[\JMS\Serializer\Annotation\SerializedName('LV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lv = null; + /** + * + * @var ?string $lb + */ #[\JMS\Serializer\Annotation\SerializedName('LB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lb = null; + /** + * + * @var ?string $ls + */ #[\JMS\Serializer\Annotation\SerializedName('LS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ls = null; + /** + * + * @var ?string $lr + */ #[\JMS\Serializer\Annotation\SerializedName('LR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lr = null; + /** + * + * @var ?string $ly + */ #[\JMS\Serializer\Annotation\SerializedName('LY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ly = null; + /** + * + * @var ?string $li + */ #[\JMS\Serializer\Annotation\SerializedName('LI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $li = null; + /** + * + * @var ?string $lt + */ #[\JMS\Serializer\Annotation\SerializedName('LT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lt = null; + /** + * + * @var ?string $lu + */ #[\JMS\Serializer\Annotation\SerializedName('LU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lu = null; + /** + * + * @var ?string $mo + */ #[\JMS\Serializer\Annotation\SerializedName('MO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mo = null; + /** + * + * @var ?string $mg + */ #[\JMS\Serializer\Annotation\SerializedName('MG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mg = null; + /** + * + * @var ?string $mw + */ #[\JMS\Serializer\Annotation\SerializedName('MW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mw = null; + /** + * + * @var ?string $my + */ #[\JMS\Serializer\Annotation\SerializedName('MY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $my = null; + /** + * + * @var ?string $mv + */ #[\JMS\Serializer\Annotation\SerializedName('MV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mv = null; + /** + * + * @var ?string $ml + */ #[\JMS\Serializer\Annotation\SerializedName('ML')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ml = null; + /** + * + * @var ?string $mt + */ #[\JMS\Serializer\Annotation\SerializedName('MT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mt = null; + /** + * + * @var ?string $mh + */ #[\JMS\Serializer\Annotation\SerializedName('MH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mh = null; + /** + * + * @var ?string $mq + */ #[\JMS\Serializer\Annotation\SerializedName('MQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mq = null; + /** + * + * @var ?string $mr + */ #[\JMS\Serializer\Annotation\SerializedName('MR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mr = null; + /** + * + * @var ?string $mu + */ #[\JMS\Serializer\Annotation\SerializedName('MU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mu = null; + /** + * + * @var ?string $yt + */ #[\JMS\Serializer\Annotation\SerializedName('YT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $yt = null; + /** + * + * @var ?string $mx + */ #[\JMS\Serializer\Annotation\SerializedName('MX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mx = null; + /** + * + * @var ?string $fm + */ #[\JMS\Serializer\Annotation\SerializedName('FM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fm = null; + /** + * + * @var ?string $md + */ #[\JMS\Serializer\Annotation\SerializedName('MD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $md = null; + /** + * + * @var ?string $mc + */ #[\JMS\Serializer\Annotation\SerializedName('MC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mc = null; + /** + * + * @var ?string $mn + */ #[\JMS\Serializer\Annotation\SerializedName('MN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mn = null; + /** + * + * @var ?string $ms + */ #[\JMS\Serializer\Annotation\SerializedName('MS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ms = null; + /** + * + * @var ?string $ma + */ #[\JMS\Serializer\Annotation\SerializedName('MA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ma = null; + /** + * + * @var ?string $mz + */ #[\JMS\Serializer\Annotation\SerializedName('MZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mz = null; + /** + * + * @var ?string $mm + */ #[\JMS\Serializer\Annotation\SerializedName('MM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mm = null; + /** + * + * @var ?string $na + */ #[\JMS\Serializer\Annotation\SerializedName('NA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $na = null; + /** + * + * @var ?string $nr + */ #[\JMS\Serializer\Annotation\SerializedName('NR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nr = null; + /** + * + * @var ?string $np + */ #[\JMS\Serializer\Annotation\SerializedName('NP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $np = null; + /** + * + * @var ?string $nl + */ #[\JMS\Serializer\Annotation\SerializedName('NL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nl = null; + /** + * + * @var ?string $nc + */ #[\JMS\Serializer\Annotation\SerializedName('NC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nc = null; + /** + * + * @var ?string $nz + */ #[\JMS\Serializer\Annotation\SerializedName('NZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nz = null; + /** + * + * @var ?string $ni + */ #[\JMS\Serializer\Annotation\SerializedName('NI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ni = null; + /** + * + * @var ?string $ne + */ #[\JMS\Serializer\Annotation\SerializedName('NE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ne = null; + /** + * + * @var ?string $ng + */ #[\JMS\Serializer\Annotation\SerializedName('NG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ng = null; + /** + * + * @var ?string $nu + */ #[\JMS\Serializer\Annotation\SerializedName('NU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nu = null; + /** + * + * @var ?string $nf + */ #[\JMS\Serializer\Annotation\SerializedName('NF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nf = null; + /** + * + * @var ?string $mk + */ #[\JMS\Serializer\Annotation\SerializedName('MK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mk = null; + /** + * + * @var ?string $mp + */ #[\JMS\Serializer\Annotation\SerializedName('MP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mp = null; + /** + * + * @var ?string $no + */ #[\JMS\Serializer\Annotation\SerializedName('NO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $no = null; + /** + * + * @var ?string $om + */ #[\JMS\Serializer\Annotation\SerializedName('OM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $om = null; + /** + * + * @var ?string $pk + */ #[\JMS\Serializer\Annotation\SerializedName('PK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pk = null; + /** + * + * @var ?string $pw + */ #[\JMS\Serializer\Annotation\SerializedName('PW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pw = null; + /** + * + * @var ?string $ps + */ #[\JMS\Serializer\Annotation\SerializedName('PS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ps = null; + /** + * + * @var ?string $pa + */ #[\JMS\Serializer\Annotation\SerializedName('PA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pa = null; + /** + * + * @var ?string $pg + */ #[\JMS\Serializer\Annotation\SerializedName('PG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pg = null; + /** + * + * @var ?string $py + */ #[\JMS\Serializer\Annotation\SerializedName('PY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $py = null; + /** + * + * @var ?string $pe + */ #[\JMS\Serializer\Annotation\SerializedName('PE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pe = null; + /** + * + * @var ?string $ph + */ #[\JMS\Serializer\Annotation\SerializedName('PH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ph = null; + /** + * + * @var ?string $pn + */ #[\JMS\Serializer\Annotation\SerializedName('PN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pn = null; + /** + * + * @var ?string $pl + */ #[\JMS\Serializer\Annotation\SerializedName('PL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pl = null; + /** + * + * @var ?string $pt + */ #[\JMS\Serializer\Annotation\SerializedName('PT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pt = null; + /** + * + * @var ?string $pr + */ #[\JMS\Serializer\Annotation\SerializedName('PR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pr = null; + /** + * + * @var ?string $qa + */ #[\JMS\Serializer\Annotation\SerializedName('QA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $qa = null; + /** + * + * @var ?string $re + */ #[\JMS\Serializer\Annotation\SerializedName('RE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $re = null; + /** + * + * @var ?string $ro + */ #[\JMS\Serializer\Annotation\SerializedName('RO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ro = null; + /** + * + * @var ?string $ru + */ #[\JMS\Serializer\Annotation\SerializedName('RU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ru = null; + /** + * + * @var ?string $rw + */ #[\JMS\Serializer\Annotation\SerializedName('RW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $rw = null; + /** + * + * @var ?string $sh + */ #[\JMS\Serializer\Annotation\SerializedName('SH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sh = null; + /** + * + * @var ?string $kn + */ #[\JMS\Serializer\Annotation\SerializedName('KN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kn = null; + /** + * + * @var ?string $lc + */ #[\JMS\Serializer\Annotation\SerializedName('LC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lc = null; + /** + * + * @var ?string $pm + */ #[\JMS\Serializer\Annotation\SerializedName('PM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pm = null; + /** + * + * @var ?string $vc + */ #[\JMS\Serializer\Annotation\SerializedName('VC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vc = null; + /** + * + * @var ?string $ws + */ #[\JMS\Serializer\Annotation\SerializedName('WS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ws = null; + /** + * + * @var ?string $sm + */ #[\JMS\Serializer\Annotation\SerializedName('SM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sm = null; + /** + * + * @var ?string $st + */ #[\JMS\Serializer\Annotation\SerializedName('ST')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $st = null; + /** + * + * @var ?string $sa + */ #[\JMS\Serializer\Annotation\SerializedName('SA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sa = null; + /** + * + * @var ?string $sn + */ #[\JMS\Serializer\Annotation\SerializedName('SN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sn = null; + /** + * + * @var ?string $sc + */ #[\JMS\Serializer\Annotation\SerializedName('SC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sc = null; + /** + * + * @var ?string $sl + */ #[\JMS\Serializer\Annotation\SerializedName('SL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sl = null; + /** + * + * @var ?string $sg + */ #[\JMS\Serializer\Annotation\SerializedName('SG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sg = null; + /** + * + * @var ?string $sk + */ #[\JMS\Serializer\Annotation\SerializedName('SK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sk = null; + /** + * + * @var ?string $si + */ #[\JMS\Serializer\Annotation\SerializedName('SI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $si = null; + /** + * + * @var ?string $sb + */ #[\JMS\Serializer\Annotation\SerializedName('SB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sb = null; + /** + * + * @var ?string $so + */ #[\JMS\Serializer\Annotation\SerializedName('SO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $so = null; + /** + * + * @var ?string $za + */ #[\JMS\Serializer\Annotation\SerializedName('ZA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $za = null; + /** + * + * @var ?string $gs + */ #[\JMS\Serializer\Annotation\SerializedName('GS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gs = null; + /** + * + * @var ?string $es + */ #[\JMS\Serializer\Annotation\SerializedName('ES')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $es = null; + /** + * + * @var ?string $lk + */ #[\JMS\Serializer\Annotation\SerializedName('LK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lk = null; + /** + * + * @var ?string $sd + */ #[\JMS\Serializer\Annotation\SerializedName('SD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sd = null; + /** + * + * @var ?string $sr + */ #[\JMS\Serializer\Annotation\SerializedName('SR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sr = null; + /** + * + * @var ?string $sj + */ #[\JMS\Serializer\Annotation\SerializedName('SJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sj = null; + /** + * + * @var ?string $sz + */ #[\JMS\Serializer\Annotation\SerializedName('SZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sz = null; + /** + * + * @var ?string $se + */ #[\JMS\Serializer\Annotation\SerializedName('SE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $se = null; + /** + * + * @var ?string $ch + */ #[\JMS\Serializer\Annotation\SerializedName('CH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ch = null; + /** + * + * @var ?string $sy + */ #[\JMS\Serializer\Annotation\SerializedName('SY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sy = null; + /** + * + * @var ?string $tw + */ #[\JMS\Serializer\Annotation\SerializedName('TW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tw = null; + /** + * + * @var ?string $tj + */ #[\JMS\Serializer\Annotation\SerializedName('TJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tj = null; + /** + * + * @var ?string $tz + */ #[\JMS\Serializer\Annotation\SerializedName('TZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tz = null; + /** + * + * @var ?string $th + */ #[\JMS\Serializer\Annotation\SerializedName('TH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $th = null; + /** + * + * @var ?string $tl + */ #[\JMS\Serializer\Annotation\SerializedName('TL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tl = null; + /** + * + * @var ?string $tg + */ #[\JMS\Serializer\Annotation\SerializedName('TG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tg = null; + /** + * + * @var ?string $tk + */ #[\JMS\Serializer\Annotation\SerializedName('TK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tk = null; + /** + * + * @var ?string $to + */ #[\JMS\Serializer\Annotation\SerializedName('TO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $to = null; + /** + * + * @var ?string $tt + */ #[\JMS\Serializer\Annotation\SerializedName('TT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tt = null; + /** + * + * @var ?string $tn + */ #[\JMS\Serializer\Annotation\SerializedName('TN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tn = null; + /** + * + * @var ?string $tr + */ #[\JMS\Serializer\Annotation\SerializedName('TR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tr = null; + /** + * + * @var ?string $tm + */ #[\JMS\Serializer\Annotation\SerializedName('TM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tm = null; + /** + * + * @var ?string $tc + */ #[\JMS\Serializer\Annotation\SerializedName('TC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tc = null; + /** + * + * @var ?string $tv + */ #[\JMS\Serializer\Annotation\SerializedName('TV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tv = null; + /** + * + * @var ?string $ug + */ #[\JMS\Serializer\Annotation\SerializedName('UG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ug = null; + /** + * + * @var ?string $ua + */ #[\JMS\Serializer\Annotation\SerializedName('UA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ua = null; + /** + * + * @var ?string $ae + */ #[\JMS\Serializer\Annotation\SerializedName('AE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ae = null; + /** + * + * @var ?string $gb + */ #[\JMS\Serializer\Annotation\SerializedName('GB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gb = null; + /** + * + * @var ?string $us + */ #[\JMS\Serializer\Annotation\SerializedName('US')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $us = null; + /** + * + * @var ?string $um + */ #[\JMS\Serializer\Annotation\SerializedName('UM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $um = null; + /** + * + * @var ?string $uy + */ #[\JMS\Serializer\Annotation\SerializedName('UY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $uy = null; + /** + * + * @var ?string $uz + */ #[\JMS\Serializer\Annotation\SerializedName('UZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $uz = null; + /** + * + * @var ?string $vu + */ #[\JMS\Serializer\Annotation\SerializedName('VU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vu = null; + /** + * + * @var ?string $ve + */ #[\JMS\Serializer\Annotation\SerializedName('VE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ve = null; + /** + * + * @var ?string $vn + */ #[\JMS\Serializer\Annotation\SerializedName('VN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vn = null; + /** + * + * @var ?string $vg + */ #[\JMS\Serializer\Annotation\SerializedName('VG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vg = null; + /** + * + * @var ?string $vi + */ #[\JMS\Serializer\Annotation\SerializedName('VI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vi = null; + /** + * + * @var ?string $wf + */ #[\JMS\Serializer\Annotation\SerializedName('WF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $wf = null; + /** + * + * @var ?string $eh + */ #[\JMS\Serializer\Annotation\SerializedName('EH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $eh = null; + /** + * + * @var ?string $ye + */ #[\JMS\Serializer\Annotation\SerializedName('YE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ye = null; + /** + * + * @var ?string $zm + */ #[\JMS\Serializer\Annotation\SerializedName('ZM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $zm = null; + /** + * + * @var ?string $zw + */ #[\JMS\Serializer\Annotation\SerializedName('ZW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $zw = null; + /** + * + * @var ?string $ax + */ #[\JMS\Serializer\Annotation\SerializedName('AX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ax = null; + /** + * + * @var ?string $bq + */ #[\JMS\Serializer\Annotation\SerializedName('BQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bq = null; + /** + * + * @var ?string $cw + */ #[\JMS\Serializer\Annotation\SerializedName('CW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cw = null; + /** + * + * @var ?string $gg + */ #[\JMS\Serializer\Annotation\SerializedName('GG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gg = null; + /** + * + * @var ?string $im + */ #[\JMS\Serializer\Annotation\SerializedName('IM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $im = null; + /** + * + * @var ?string $je + */ #[\JMS\Serializer\Annotation\SerializedName('JE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $je = null; + /** + * + * @var ?string $me + */ #[\JMS\Serializer\Annotation\SerializedName('ME')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $me = null; + /** + * + * @var ?string $bl + */ #[\JMS\Serializer\Annotation\SerializedName('BL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bl = null; + /** + * + * @var ?string $mf + */ #[\JMS\Serializer\Annotation\SerializedName('MF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mf = null; + /** + * + * @var ?string $rs + */ #[\JMS\Serializer\Annotation\SerializedName('RS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $rs = null; + /** + * + * @var ?string $sx + */ #[\JMS\Serializer\Annotation\SerializedName('SX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sx = null; + /** + * + * @var ?string $ss + */ #[\JMS\Serializer\Annotation\SerializedName('SS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ss = null; + /** + * + * @var ?string $xk + */ #[\JMS\Serializer\Annotation\SerializedName('XK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $xk = null; - public function __construct() + /** + * @param ?string $af + * @param ?string $al + * @param ?string $dz + * @param ?string $as + * @param ?string $ad + * @param ?string $ao + * @param ?string $ai + * @param ?string $aq + * @param ?string $ag + * @param ?string $ar + * @param ?string $am + * @param ?string $aw + * @param ?string $au + * @param ?string $at + * @param ?string $az + * @param ?string $bs + * @param ?string $bh + * @param ?string $bd + * @param ?string $bb + * @param ?string $by + * @param ?string $be + * @param ?string $bz + * @param ?string $bj + * @param ?string $bm + * @param ?string $bt + * @param ?string $bo + * @param ?string $ba + * @param ?string $bw + * @param ?string $bv + * @param ?string $br + * @param ?string $io + * @param ?string $bn + * @param ?string $bg + * @param ?string $bf + * @param ?string $bi + * @param ?string $kh + * @param ?string $cm + * @param ?string $ca + * @param ?string $cv + * @param ?string $ky + * @param ?string $cf + * @param ?string $td + * @param ?string $cl + * @param ?string $cn + * @param ?string $cx + * @param ?string $cc + * @param ?string $co + * @param ?string $km + * @param ?string $cg + * @param ?string $cd + * @param ?string $ck + * @param ?string $cr + * @param ?string $ci + * @param ?string $hr + * @param ?string $cu + * @param ?string $cy + * @param ?string $cz + * @param ?string $dk + * @param ?string $dj + * @param ?string $dm + * @param ?string $do + * @param ?string $ec + * @param ?string $eg + * @param ?string $sv + * @param ?string $gq + * @param ?string $er + * @param ?string $ee + * @param ?string $et + * @param ?string $fk + * @param ?string $fo + * @param ?string $fj + * @param ?string $fi + * @param ?string $fr + * @param ?string $gf + * @param ?string $pf + * @param ?string $tf + * @param ?string $ga + * @param ?string $gm + * @param ?string $ge + * @param ?string $de + * @param ?string $gh + * @param ?string $gi + * @param ?string $gr + * @param ?string $gl + * @param ?string $gd + * @param ?string $gp + * @param ?string $gu + * @param ?string $gt + * @param ?string $gn + * @param ?string $gw + * @param ?string $gy + * @param ?string $ht + * @param ?string $hm + * @param ?string $va + * @param ?string $hn + * @param ?string $hk + * @param ?string $hu + * @param ?string $is + * @param ?string $in + * @param ?string $id + * @param ?string $ir + * @param ?string $iq + * @param ?string $ie + * @param ?string $il + * @param ?string $it + * @param ?string $jm + * @param ?string $jp + * @param ?string $jo + * @param ?string $kz + * @param ?string $ke + * @param ?string $ki + * @param ?string $kp + * @param ?string $kr + * @param ?string $kw + * @param ?string $kg + * @param ?string $la + * @param ?string $lv + * @param ?string $lb + * @param ?string $ls + * @param ?string $lr + * @param ?string $ly + * @param ?string $li + * @param ?string $lt + * @param ?string $lu + * @param ?string $mo + * @param ?string $mg + * @param ?string $mw + * @param ?string $my + * @param ?string $mv + * @param ?string $ml + * @param ?string $mt + * @param ?string $mh + * @param ?string $mq + * @param ?string $mr + * @param ?string $mu + * @param ?string $yt + * @param ?string $mx + * @param ?string $fm + * @param ?string $md + * @param ?string $mc + * @param ?string $mn + * @param ?string $ms + * @param ?string $ma + * @param ?string $mz + * @param ?string $mm + * @param ?string $na + * @param ?string $nr + * @param ?string $np + * @param ?string $nl + * @param ?string $nc + * @param ?string $nz + * @param ?string $ni + * @param ?string $ne + * @param ?string $ng + * @param ?string $nu + * @param ?string $nf + * @param ?string $mk + * @param ?string $mp + * @param ?string $no + * @param ?string $om + * @param ?string $pk + * @param ?string $pw + * @param ?string $ps + * @param ?string $pa + * @param ?string $pg + * @param ?string $py + * @param ?string $pe + * @param ?string $ph + * @param ?string $pn + * @param ?string $pl + * @param ?string $pt + * @param ?string $pr + * @param ?string $qa + * @param ?string $re + * @param ?string $ro + * @param ?string $ru + * @param ?string $rw + * @param ?string $sh + * @param ?string $kn + * @param ?string $lc + * @param ?string $pm + * @param ?string $vc + * @param ?string $ws + * @param ?string $sm + * @param ?string $st + * @param ?string $sa + * @param ?string $sn + * @param ?string $sc + * @param ?string $sl + * @param ?string $sg + * @param ?string $sk + * @param ?string $si + * @param ?string $sb + * @param ?string $so + * @param ?string $za + * @param ?string $gs + * @param ?string $es + * @param ?string $lk + * @param ?string $sd + * @param ?string $sr + * @param ?string $sj + * @param ?string $sz + * @param ?string $se + * @param ?string $ch + * @param ?string $sy + * @param ?string $tw + * @param ?string $tj + * @param ?string $tz + * @param ?string $th + * @param ?string $tl + * @param ?string $tg + * @param ?string $tk + * @param ?string $to + * @param ?string $tt + * @param ?string $tn + * @param ?string $tr + * @param ?string $tm + * @param ?string $tc + * @param ?string $tv + * @param ?string $ug + * @param ?string $ua + * @param ?string $ae + * @param ?string $gb + * @param ?string $us + * @param ?string $um + * @param ?string $uy + * @param ?string $uz + * @param ?string $vu + * @param ?string $ve + * @param ?string $vn + * @param ?string $vg + * @param ?string $vi + * @param ?string $wf + * @param ?string $eh + * @param ?string $ye + * @param ?string $zm + * @param ?string $zw + * @param ?string $ax + * @param ?string $bq + * @param ?string $cw + * @param ?string $gg + * @param ?string $im + * @param ?string $je + * @param ?string $me + * @param ?string $bl + * @param ?string $mf + * @param ?string $rs + * @param ?string $sx + * @param ?string $ss + * @param ?string $xk + */ + public function __construct(?string $af = null, ?string $al = null, ?string $dz = null, ?string $as = null, ?string $ad = null, ?string $ao = null, ?string $ai = null, ?string $aq = null, ?string $ag = null, ?string $ar = null, ?string $am = null, ?string $aw = null, ?string $au = null, ?string $at = null, ?string $az = null, ?string $bs = null, ?string $bh = null, ?string $bd = null, ?string $bb = null, ?string $by = null, ?string $be = null, ?string $bz = null, ?string $bj = null, ?string $bm = null, ?string $bt = null, ?string $bo = null, ?string $ba = null, ?string $bw = null, ?string $bv = null, ?string $br = null, ?string $io = null, ?string $bn = null, ?string $bg = null, ?string $bf = null, ?string $bi = null, ?string $kh = null, ?string $cm = null, ?string $ca = null, ?string $cv = null, ?string $ky = null, ?string $cf = null, ?string $td = null, ?string $cl = null, ?string $cn = null, ?string $cx = null, ?string $cc = null, ?string $co = null, ?string $km = null, ?string $cg = null, ?string $cd = null, ?string $ck = null, ?string $cr = null, ?string $ci = null, ?string $hr = null, ?string $cu = null, ?string $cy = null, ?string $cz = null, ?string $dk = null, ?string $dj = null, ?string $dm = null, ?string $do = null, ?string $ec = null, ?string $eg = null, ?string $sv = null, ?string $gq = null, ?string $er = null, ?string $ee = null, ?string $et = null, ?string $fk = null, ?string $fo = null, ?string $fj = null, ?string $fi = null, ?string $fr = null, ?string $gf = null, ?string $pf = null, ?string $tf = null, ?string $ga = null, ?string $gm = null, ?string $ge = null, ?string $de = null, ?string $gh = null, ?string $gi = null, ?string $gr = null, ?string $gl = null, ?string $gd = null, ?string $gp = null, ?string $gu = null, ?string $gt = null, ?string $gn = null, ?string $gw = null, ?string $gy = null, ?string $ht = null, ?string $hm = null, ?string $va = null, ?string $hn = null, ?string $hk = null, ?string $hu = null, ?string $is = null, ?string $in = null, ?string $id = null, ?string $ir = null, ?string $iq = null, ?string $ie = null, ?string $il = null, ?string $it = null, ?string $jm = null, ?string $jp = null, ?string $jo = null, ?string $kz = null, ?string $ke = null, ?string $ki = null, ?string $kp = null, ?string $kr = null, ?string $kw = null, ?string $kg = null, ?string $la = null, ?string $lv = null, ?string $lb = null, ?string $ls = null, ?string $lr = null, ?string $ly = null, ?string $li = null, ?string $lt = null, ?string $lu = null, ?string $mo = null, ?string $mg = null, ?string $mw = null, ?string $my = null, ?string $mv = null, ?string $ml = null, ?string $mt = null, ?string $mh = null, ?string $mq = null, ?string $mr = null, ?string $mu = null, ?string $yt = null, ?string $mx = null, ?string $fm = null, ?string $md = null, ?string $mc = null, ?string $mn = null, ?string $ms = null, ?string $ma = null, ?string $mz = null, ?string $mm = null, ?string $na = null, ?string $nr = null, ?string $np = null, ?string $nl = null, ?string $nc = null, ?string $nz = null, ?string $ni = null, ?string $ne = null, ?string $ng = null, ?string $nu = null, ?string $nf = null, ?string $mk = null, ?string $mp = null, ?string $no = null, ?string $om = null, ?string $pk = null, ?string $pw = null, ?string $ps = null, ?string $pa = null, ?string $pg = null, ?string $py = null, ?string $pe = null, ?string $ph = null, ?string $pn = null, ?string $pl = null, ?string $pt = null, ?string $pr = null, ?string $qa = null, ?string $re = null, ?string $ro = null, ?string $ru = null, ?string $rw = null, ?string $sh = null, ?string $kn = null, ?string $lc = null, ?string $pm = null, ?string $vc = null, ?string $ws = null, ?string $sm = null, ?string $st = null, ?string $sa = null, ?string $sn = null, ?string $sc = null, ?string $sl = null, ?string $sg = null, ?string $sk = null, ?string $si = null, ?string $sb = null, ?string $so = null, ?string $za = null, ?string $gs = null, ?string $es = null, ?string $lk = null, ?string $sd = null, ?string $sr = null, ?string $sj = null, ?string $sz = null, ?string $se = null, ?string $ch = null, ?string $sy = null, ?string $tw = null, ?string $tj = null, ?string $tz = null, ?string $th = null, ?string $tl = null, ?string $tg = null, ?string $tk = null, ?string $to = null, ?string $tt = null, ?string $tn = null, ?string $tr = null, ?string $tm = null, ?string $tc = null, ?string $tv = null, ?string $ug = null, ?string $ua = null, ?string $ae = null, ?string $gb = null, ?string $us = null, ?string $um = null, ?string $uy = null, ?string $uz = null, ?string $vu = null, ?string $ve = null, ?string $vn = null, ?string $vg = null, ?string $vi = null, ?string $wf = null, ?string $eh = null, ?string $ye = null, ?string $zm = null, ?string $zw = null, ?string $ax = null, ?string $bq = null, ?string $cw = null, ?string $gg = null, ?string $im = null, ?string $je = null, ?string $me = null, ?string $bl = null, ?string $mf = null, ?string $rs = null, ?string $sx = null, ?string $ss = null, ?string $xk = null) { - $this->af = null; - $this->al = null; - $this->dz = null; - $this->as = null; - $this->ad = null; - $this->ao = null; - $this->ai = null; - $this->aq = null; - $this->ag = null; - $this->ar = null; - $this->am = null; - $this->aw = null; - $this->au = null; - $this->at = null; - $this->az = null; - $this->bs = null; - $this->bh = null; - $this->bd = null; - $this->bb = null; - $this->by = null; - $this->be = null; - $this->bz = null; - $this->bj = null; - $this->bm = null; - $this->bt = null; - $this->bo = null; - $this->ba = null; - $this->bw = null; - $this->bv = null; - $this->br = null; - $this->io = null; - $this->bn = null; - $this->bg = null; - $this->bf = null; - $this->bi = null; - $this->kh = null; - $this->cm = null; - $this->ca = null; - $this->cv = null; - $this->ky = null; - $this->cf = null; - $this->td = null; - $this->cl = null; - $this->cn = null; - $this->cx = null; - $this->cc = null; - $this->co = null; - $this->km = null; - $this->cg = null; - $this->cd = null; - $this->ck = null; - $this->cr = null; - $this->ci = null; - $this->hr = null; - $this->cu = null; - $this->cy = null; - $this->cz = null; - $this->dk = null; - $this->dj = null; - $this->dm = null; - $this->do = null; - $this->ec = null; - $this->eg = null; - $this->sv = null; - $this->gq = null; - $this->er = null; - $this->ee = null; - $this->et = null; - $this->fk = null; - $this->fo = null; - $this->fj = null; - $this->fi = null; - $this->fr = null; - $this->gf = null; - $this->pf = null; - $this->tf = null; - $this->ga = null; - $this->gm = null; - $this->ge = null; - $this->de = null; - $this->gh = null; - $this->gi = null; - $this->gr = null; - $this->gl = null; - $this->gd = null; - $this->gp = null; - $this->gu = null; - $this->gt = null; - $this->gn = null; - $this->gw = null; - $this->gy = null; - $this->ht = null; - $this->hm = null; - $this->va = null; - $this->hn = null; - $this->hk = null; - $this->hu = null; - $this->is = null; - $this->in = null; - $this->id = null; - $this->ir = null; - $this->iq = null; - $this->ie = null; - $this->il = null; - $this->it = null; - $this->jm = null; - $this->jp = null; - $this->jo = null; - $this->kz = null; - $this->ke = null; - $this->ki = null; - $this->kp = null; - $this->kr = null; - $this->kw = null; - $this->kg = null; - $this->la = null; - $this->lv = null; - $this->lb = null; - $this->ls = null; - $this->lr = null; - $this->ly = null; - $this->li = null; - $this->lt = null; - $this->lu = null; - $this->mo = null; - $this->mg = null; - $this->mw = null; - $this->my = null; - $this->mv = null; - $this->ml = null; - $this->mt = null; - $this->mh = null; - $this->mq = null; - $this->mr = null; - $this->mu = null; - $this->yt = null; - $this->mx = null; - $this->fm = null; - $this->md = null; - $this->mc = null; - $this->mn = null; - $this->ms = null; - $this->ma = null; - $this->mz = null; - $this->mm = null; - $this->na = null; - $this->nr = null; - $this->np = null; - $this->nl = null; - $this->nc = null; - $this->nz = null; - $this->ni = null; - $this->ne = null; - $this->ng = null; - $this->nu = null; - $this->nf = null; - $this->mk = null; - $this->mp = null; - $this->no = null; - $this->om = null; - $this->pk = null; - $this->pw = null; - $this->ps = null; - $this->pa = null; - $this->pg = null; - $this->py = null; - $this->pe = null; - $this->ph = null; - $this->pn = null; - $this->pl = null; - $this->pt = null; - $this->pr = null; - $this->qa = null; - $this->re = null; - $this->ro = null; - $this->ru = null; - $this->rw = null; - $this->sh = null; - $this->kn = null; - $this->lc = null; - $this->pm = null; - $this->vc = null; - $this->ws = null; - $this->sm = null; - $this->st = null; - $this->sa = null; - $this->sn = null; - $this->sc = null; - $this->sl = null; - $this->sg = null; - $this->sk = null; - $this->si = null; - $this->sb = null; - $this->so = null; - $this->za = null; - $this->gs = null; - $this->es = null; - $this->lk = null; - $this->sd = null; - $this->sr = null; - $this->sj = null; - $this->sz = null; - $this->se = null; - $this->ch = null; - $this->sy = null; - $this->tw = null; - $this->tj = null; - $this->tz = null; - $this->th = null; - $this->tl = null; - $this->tg = null; - $this->tk = null; - $this->to = null; - $this->tt = null; - $this->tn = null; - $this->tr = null; - $this->tm = null; - $this->tc = null; - $this->tv = null; - $this->ug = null; - $this->ua = null; - $this->ae = null; - $this->gb = null; - $this->us = null; - $this->um = null; - $this->uy = null; - $this->uz = null; - $this->vu = null; - $this->ve = null; - $this->vn = null; - $this->vg = null; - $this->vi = null; - $this->wf = null; - $this->eh = null; - $this->ye = null; - $this->zm = null; - $this->zw = null; - $this->ax = null; - $this->bq = null; - $this->cw = null; - $this->gg = null; - $this->im = null; - $this->je = null; - $this->me = null; - $this->bl = null; - $this->mf = null; - $this->rs = null; - $this->sx = null; - $this->ss = null; - $this->xk = null; + $this->af = $af; + $this->al = $al; + $this->dz = $dz; + $this->as = $as; + $this->ad = $ad; + $this->ao = $ao; + $this->ai = $ai; + $this->aq = $aq; + $this->ag = $ag; + $this->ar = $ar; + $this->am = $am; + $this->aw = $aw; + $this->au = $au; + $this->at = $at; + $this->az = $az; + $this->bs = $bs; + $this->bh = $bh; + $this->bd = $bd; + $this->bb = $bb; + $this->by = $by; + $this->be = $be; + $this->bz = $bz; + $this->bj = $bj; + $this->bm = $bm; + $this->bt = $bt; + $this->bo = $bo; + $this->ba = $ba; + $this->bw = $bw; + $this->bv = $bv; + $this->br = $br; + $this->io = $io; + $this->bn = $bn; + $this->bg = $bg; + $this->bf = $bf; + $this->bi = $bi; + $this->kh = $kh; + $this->cm = $cm; + $this->ca = $ca; + $this->cv = $cv; + $this->ky = $ky; + $this->cf = $cf; + $this->td = $td; + $this->cl = $cl; + $this->cn = $cn; + $this->cx = $cx; + $this->cc = $cc; + $this->co = $co; + $this->km = $km; + $this->cg = $cg; + $this->cd = $cd; + $this->ck = $ck; + $this->cr = $cr; + $this->ci = $ci; + $this->hr = $hr; + $this->cu = $cu; + $this->cy = $cy; + $this->cz = $cz; + $this->dk = $dk; + $this->dj = $dj; + $this->dm = $dm; + $this->do = $do; + $this->ec = $ec; + $this->eg = $eg; + $this->sv = $sv; + $this->gq = $gq; + $this->er = $er; + $this->ee = $ee; + $this->et = $et; + $this->fk = $fk; + $this->fo = $fo; + $this->fj = $fj; + $this->fi = $fi; + $this->fr = $fr; + $this->gf = $gf; + $this->pf = $pf; + $this->tf = $tf; + $this->ga = $ga; + $this->gm = $gm; + $this->ge = $ge; + $this->de = $de; + $this->gh = $gh; + $this->gi = $gi; + $this->gr = $gr; + $this->gl = $gl; + $this->gd = $gd; + $this->gp = $gp; + $this->gu = $gu; + $this->gt = $gt; + $this->gn = $gn; + $this->gw = $gw; + $this->gy = $gy; + $this->ht = $ht; + $this->hm = $hm; + $this->va = $va; + $this->hn = $hn; + $this->hk = $hk; + $this->hu = $hu; + $this->is = $is; + $this->in = $in; + $this->id = $id; + $this->ir = $ir; + $this->iq = $iq; + $this->ie = $ie; + $this->il = $il; + $this->it = $it; + $this->jm = $jm; + $this->jp = $jp; + $this->jo = $jo; + $this->kz = $kz; + $this->ke = $ke; + $this->ki = $ki; + $this->kp = $kp; + $this->kr = $kr; + $this->kw = $kw; + $this->kg = $kg; + $this->la = $la; + $this->lv = $lv; + $this->lb = $lb; + $this->ls = $ls; + $this->lr = $lr; + $this->ly = $ly; + $this->li = $li; + $this->lt = $lt; + $this->lu = $lu; + $this->mo = $mo; + $this->mg = $mg; + $this->mw = $mw; + $this->my = $my; + $this->mv = $mv; + $this->ml = $ml; + $this->mt = $mt; + $this->mh = $mh; + $this->mq = $mq; + $this->mr = $mr; + $this->mu = $mu; + $this->yt = $yt; + $this->mx = $mx; + $this->fm = $fm; + $this->md = $md; + $this->mc = $mc; + $this->mn = $mn; + $this->ms = $ms; + $this->ma = $ma; + $this->mz = $mz; + $this->mm = $mm; + $this->na = $na; + $this->nr = $nr; + $this->np = $np; + $this->nl = $nl; + $this->nc = $nc; + $this->nz = $nz; + $this->ni = $ni; + $this->ne = $ne; + $this->ng = $ng; + $this->nu = $nu; + $this->nf = $nf; + $this->mk = $mk; + $this->mp = $mp; + $this->no = $no; + $this->om = $om; + $this->pk = $pk; + $this->pw = $pw; + $this->ps = $ps; + $this->pa = $pa; + $this->pg = $pg; + $this->py = $py; + $this->pe = $pe; + $this->ph = $ph; + $this->pn = $pn; + $this->pl = $pl; + $this->pt = $pt; + $this->pr = $pr; + $this->qa = $qa; + $this->re = $re; + $this->ro = $ro; + $this->ru = $ru; + $this->rw = $rw; + $this->sh = $sh; + $this->kn = $kn; + $this->lc = $lc; + $this->pm = $pm; + $this->vc = $vc; + $this->ws = $ws; + $this->sm = $sm; + $this->st = $st; + $this->sa = $sa; + $this->sn = $sn; + $this->sc = $sc; + $this->sl = $sl; + $this->sg = $sg; + $this->sk = $sk; + $this->si = $si; + $this->sb = $sb; + $this->so = $so; + $this->za = $za; + $this->gs = $gs; + $this->es = $es; + $this->lk = $lk; + $this->sd = $sd; + $this->sr = $sr; + $this->sj = $sj; + $this->sz = $sz; + $this->se = $se; + $this->ch = $ch; + $this->sy = $sy; + $this->tw = $tw; + $this->tj = $tj; + $this->tz = $tz; + $this->th = $th; + $this->tl = $tl; + $this->tg = $tg; + $this->tk = $tk; + $this->to = $to; + $this->tt = $tt; + $this->tn = $tn; + $this->tr = $tr; + $this->tm = $tm; + $this->tc = $tc; + $this->tv = $tv; + $this->ug = $ug; + $this->ua = $ua; + $this->ae = $ae; + $this->gb = $gb; + $this->us = $us; + $this->um = $um; + $this->uy = $uy; + $this->uz = $uz; + $this->vu = $vu; + $this->ve = $ve; + $this->vn = $vn; + $this->vg = $vg; + $this->vi = $vi; + $this->wf = $wf; + $this->eh = $eh; + $this->ye = $ye; + $this->zm = $zm; + $this->zw = $zw; + $this->ax = $ax; + $this->bq = $bq; + $this->cw = $cw; + $this->gg = $gg; + $this->im = $im; + $this->je = $je; + $this->me = $me; + $this->bl = $bl; + $this->mf = $mf; + $this->rs = $rs; + $this->sx = $sx; + $this->ss = $ss; + $this->xk = $xk; } } \ No newline at end of file diff --git a/src/Models/Components/InternalServerError.php b/src/Models/Components/InternalServerError.php deleted file mode 100644 index 1af84ad..0000000 --- a/src/Models/Components/InternalServerError.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\InternalServerErrorError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/InviteExpired.php b/src/Models/Components/InviteExpired.php deleted file mode 100644 index b8efd46..0000000 --- a/src/Models/Components/InviteExpired.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\InviteExpiredError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/LeadsBrowsers.php b/src/Models/Components/LeadsBrowsers.php new file mode 100644 index 0000000..ea88013 --- /dev/null +++ b/src/Models/Components/LeadsBrowsers.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..d4b99e3 --- /dev/null +++ b/src/Models/Components/LeadsCities.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..ed4223f --- /dev/null +++ b/src/Models/Components/LeadsCitiesCountry.php @@ -0,0 +1,265 @@ +leads = $leads; + } +} \ No newline at end of file diff --git a/src/Models/Components/LeadsCountries.php b/src/Models/Components/LeadsCountries.php new file mode 100644 index 0000000..1121f67 --- /dev/null +++ b/src/Models/Components/LeadsCountries.php @@ -0,0 +1,40 @@ +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 new file mode 100644 index 0000000..4a91ae2 --- /dev/null +++ b/src/Models/Components/LeadsCountriesCountry.php @@ -0,0 +1,265 @@ +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 new file mode 100644 index 0000000..324bde2 --- /dev/null +++ b/src/Models/Components/LeadsOS.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..f8f8c2f --- /dev/null +++ b/src/Models/Components/LeadsReferers.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..987358b --- /dev/null +++ b/src/Models/Components/LeadsTimeseries.php @@ -0,0 +1,39 @@ +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 new file mode 100644 index 0000000..0cdffc4 --- /dev/null +++ b/src/Models/Components/LeadsTopLinks.php @@ -0,0 +1,100 @@ +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 new file mode 100644 index 0000000..6e6f13e --- /dev/null +++ b/src/Models/Components/LeadsTopUrls.php @@ -0,0 +1,39 @@ +url = $url; + $this->leads = $leads; + } +} \ No newline at end of file diff --git a/src/Models/Components/LinkGeoTargeting.php b/src/Models/Components/LinkGeoTargeting.php index 28f3467..5f29979 100644 --- a/src/Models/Components/LinkGeoTargeting.php +++ b/src/Models/Components/LinkGeoTargeting.php @@ -12,1507 +12,2509 @@ /** LinkGeoTargeting - Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. */ class LinkGeoTargeting { + /** + * + * @var ?string $af + */ #[\JMS\Serializer\Annotation\SerializedName('AF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $af = null; + /** + * + * @var ?string $al + */ #[\JMS\Serializer\Annotation\SerializedName('AL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $al = null; + /** + * + * @var ?string $dz + */ #[\JMS\Serializer\Annotation\SerializedName('DZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dz = null; + /** + * + * @var ?string $as + */ #[\JMS\Serializer\Annotation\SerializedName('AS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $as = null; + /** + * + * @var ?string $ad + */ #[\JMS\Serializer\Annotation\SerializedName('AD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ad = null; + /** + * + * @var ?string $ao + */ #[\JMS\Serializer\Annotation\SerializedName('AO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ao = null; + /** + * + * @var ?string $ai + */ #[\JMS\Serializer\Annotation\SerializedName('AI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ai = null; + /** + * + * @var ?string $aq + */ #[\JMS\Serializer\Annotation\SerializedName('AQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $aq = null; + /** + * + * @var ?string $ag + */ #[\JMS\Serializer\Annotation\SerializedName('AG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ag = null; + /** + * + * @var ?string $ar + */ #[\JMS\Serializer\Annotation\SerializedName('AR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ar = null; + /** + * + * @var ?string $am + */ #[\JMS\Serializer\Annotation\SerializedName('AM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $am = null; + /** + * + * @var ?string $aw + */ #[\JMS\Serializer\Annotation\SerializedName('AW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $aw = null; + /** + * + * @var ?string $au + */ #[\JMS\Serializer\Annotation\SerializedName('AU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $au = null; + /** + * + * @var ?string $at + */ #[\JMS\Serializer\Annotation\SerializedName('AT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $at = null; + /** + * + * @var ?string $az + */ #[\JMS\Serializer\Annotation\SerializedName('AZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $az = null; + /** + * + * @var ?string $bs + */ #[\JMS\Serializer\Annotation\SerializedName('BS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bs = null; + /** + * + * @var ?string $bh + */ #[\JMS\Serializer\Annotation\SerializedName('BH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bh = null; + /** + * + * @var ?string $bd + */ #[\JMS\Serializer\Annotation\SerializedName('BD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bd = null; + /** + * + * @var ?string $bb + */ #[\JMS\Serializer\Annotation\SerializedName('BB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bb = null; + /** + * + * @var ?string $by + */ #[\JMS\Serializer\Annotation\SerializedName('BY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $by = null; + /** + * + * @var ?string $be + */ #[\JMS\Serializer\Annotation\SerializedName('BE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $be = null; + /** + * + * @var ?string $bz + */ #[\JMS\Serializer\Annotation\SerializedName('BZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bz = null; + /** + * + * @var ?string $bj + */ #[\JMS\Serializer\Annotation\SerializedName('BJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bj = null; + /** + * + * @var ?string $bm + */ #[\JMS\Serializer\Annotation\SerializedName('BM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bm = null; + /** + * + * @var ?string $bt + */ #[\JMS\Serializer\Annotation\SerializedName('BT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bt = null; + /** + * + * @var ?string $bo + */ #[\JMS\Serializer\Annotation\SerializedName('BO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bo = null; + /** + * + * @var ?string $ba + */ #[\JMS\Serializer\Annotation\SerializedName('BA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ba = null; + /** + * + * @var ?string $bw + */ #[\JMS\Serializer\Annotation\SerializedName('BW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bw = null; + /** + * + * @var ?string $bv + */ #[\JMS\Serializer\Annotation\SerializedName('BV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bv = null; + /** + * + * @var ?string $br + */ #[\JMS\Serializer\Annotation\SerializedName('BR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $br = null; + /** + * + * @var ?string $io + */ #[\JMS\Serializer\Annotation\SerializedName('IO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $io = null; + /** + * + * @var ?string $bn + */ #[\JMS\Serializer\Annotation\SerializedName('BN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bn = null; + /** + * + * @var ?string $bg + */ #[\JMS\Serializer\Annotation\SerializedName('BG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bg = null; + /** + * + * @var ?string $bf + */ #[\JMS\Serializer\Annotation\SerializedName('BF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bf = null; + /** + * + * @var ?string $bi + */ #[\JMS\Serializer\Annotation\SerializedName('BI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bi = null; + /** + * + * @var ?string $kh + */ #[\JMS\Serializer\Annotation\SerializedName('KH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kh = null; + /** + * + * @var ?string $cm + */ #[\JMS\Serializer\Annotation\SerializedName('CM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cm = null; + /** + * + * @var ?string $ca + */ #[\JMS\Serializer\Annotation\SerializedName('CA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ca = null; + /** + * + * @var ?string $cv + */ #[\JMS\Serializer\Annotation\SerializedName('CV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cv = null; + /** + * + * @var ?string $ky + */ #[\JMS\Serializer\Annotation\SerializedName('KY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ky = null; + /** + * + * @var ?string $cf + */ #[\JMS\Serializer\Annotation\SerializedName('CF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cf = null; + /** + * + * @var ?string $td + */ #[\JMS\Serializer\Annotation\SerializedName('TD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $td = null; + /** + * + * @var ?string $cl + */ #[\JMS\Serializer\Annotation\SerializedName('CL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cl = null; + /** + * + * @var ?string $cn + */ #[\JMS\Serializer\Annotation\SerializedName('CN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cn = null; + /** + * + * @var ?string $cx + */ #[\JMS\Serializer\Annotation\SerializedName('CX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cx = null; + /** + * + * @var ?string $cc + */ #[\JMS\Serializer\Annotation\SerializedName('CC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cc = null; + /** + * + * @var ?string $co + */ #[\JMS\Serializer\Annotation\SerializedName('CO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $co = null; + /** + * + * @var ?string $km + */ #[\JMS\Serializer\Annotation\SerializedName('KM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $km = null; + /** + * + * @var ?string $cg + */ #[\JMS\Serializer\Annotation\SerializedName('CG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cg = null; + /** + * + * @var ?string $cd + */ #[\JMS\Serializer\Annotation\SerializedName('CD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cd = null; + /** + * + * @var ?string $ck + */ #[\JMS\Serializer\Annotation\SerializedName('CK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ck = null; + /** + * + * @var ?string $cr + */ #[\JMS\Serializer\Annotation\SerializedName('CR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cr = null; + /** + * + * @var ?string $ci + */ #[\JMS\Serializer\Annotation\SerializedName('CI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ci = null; + /** + * + * @var ?string $hr + */ #[\JMS\Serializer\Annotation\SerializedName('HR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hr = null; + /** + * + * @var ?string $cu + */ #[\JMS\Serializer\Annotation\SerializedName('CU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cu = null; + /** + * + * @var ?string $cy + */ #[\JMS\Serializer\Annotation\SerializedName('CY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cy = null; + /** + * + * @var ?string $cz + */ #[\JMS\Serializer\Annotation\SerializedName('CZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cz = null; + /** + * + * @var ?string $dk + */ #[\JMS\Serializer\Annotation\SerializedName('DK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dk = null; + /** + * + * @var ?string $dj + */ #[\JMS\Serializer\Annotation\SerializedName('DJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dj = null; + /** + * + * @var ?string $dm + */ #[\JMS\Serializer\Annotation\SerializedName('DM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $dm = null; + /** + * + * @var ?string $do + */ #[\JMS\Serializer\Annotation\SerializedName('DO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $do = null; + /** + * + * @var ?string $ec + */ #[\JMS\Serializer\Annotation\SerializedName('EC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ec = null; + /** + * + * @var ?string $eg + */ #[\JMS\Serializer\Annotation\SerializedName('EG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $eg = null; + /** + * + * @var ?string $sv + */ #[\JMS\Serializer\Annotation\SerializedName('SV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sv = null; + /** + * + * @var ?string $gq + */ #[\JMS\Serializer\Annotation\SerializedName('GQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gq = null; + /** + * + * @var ?string $er + */ #[\JMS\Serializer\Annotation\SerializedName('ER')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $er = null; + /** + * + * @var ?string $ee + */ #[\JMS\Serializer\Annotation\SerializedName('EE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ee = null; + /** + * + * @var ?string $et + */ #[\JMS\Serializer\Annotation\SerializedName('ET')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $et = null; + /** + * + * @var ?string $fk + */ #[\JMS\Serializer\Annotation\SerializedName('FK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fk = null; + /** + * + * @var ?string $fo + */ #[\JMS\Serializer\Annotation\SerializedName('FO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fo = null; + /** + * + * @var ?string $fj + */ #[\JMS\Serializer\Annotation\SerializedName('FJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fj = null; + /** + * + * @var ?string $fi + */ #[\JMS\Serializer\Annotation\SerializedName('FI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fi = null; + /** + * + * @var ?string $fr + */ #[\JMS\Serializer\Annotation\SerializedName('FR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fr = null; + /** + * + * @var ?string $gf + */ #[\JMS\Serializer\Annotation\SerializedName('GF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gf = null; + /** + * + * @var ?string $pf + */ #[\JMS\Serializer\Annotation\SerializedName('PF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pf = null; + /** + * + * @var ?string $tf + */ #[\JMS\Serializer\Annotation\SerializedName('TF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tf = null; + /** + * + * @var ?string $ga + */ #[\JMS\Serializer\Annotation\SerializedName('GA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ga = null; + /** + * + * @var ?string $gm + */ #[\JMS\Serializer\Annotation\SerializedName('GM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gm = null; + /** + * + * @var ?string $ge + */ #[\JMS\Serializer\Annotation\SerializedName('GE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ge = null; + /** + * + * @var ?string $de + */ #[\JMS\Serializer\Annotation\SerializedName('DE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $de = null; + /** + * + * @var ?string $gh + */ #[\JMS\Serializer\Annotation\SerializedName('GH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gh = null; + /** + * + * @var ?string $gi + */ #[\JMS\Serializer\Annotation\SerializedName('GI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gi = null; + /** + * + * @var ?string $gr + */ #[\JMS\Serializer\Annotation\SerializedName('GR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gr = null; + /** + * + * @var ?string $gl + */ #[\JMS\Serializer\Annotation\SerializedName('GL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gl = null; + /** + * + * @var ?string $gd + */ #[\JMS\Serializer\Annotation\SerializedName('GD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gd = null; + /** + * + * @var ?string $gp + */ #[\JMS\Serializer\Annotation\SerializedName('GP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gp = null; + /** + * + * @var ?string $gu + */ #[\JMS\Serializer\Annotation\SerializedName('GU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gu = null; + /** + * + * @var ?string $gt + */ #[\JMS\Serializer\Annotation\SerializedName('GT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gt = null; + /** + * + * @var ?string $gn + */ #[\JMS\Serializer\Annotation\SerializedName('GN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gn = null; + /** + * + * @var ?string $gw + */ #[\JMS\Serializer\Annotation\SerializedName('GW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gw = null; + /** + * + * @var ?string $gy + */ #[\JMS\Serializer\Annotation\SerializedName('GY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gy = null; + /** + * + * @var ?string $ht + */ #[\JMS\Serializer\Annotation\SerializedName('HT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ht = null; + /** + * + * @var ?string $hm + */ #[\JMS\Serializer\Annotation\SerializedName('HM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hm = null; + /** + * + * @var ?string $va + */ #[\JMS\Serializer\Annotation\SerializedName('VA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $va = null; + /** + * + * @var ?string $hn + */ #[\JMS\Serializer\Annotation\SerializedName('HN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hn = null; + /** + * + * @var ?string $hk + */ #[\JMS\Serializer\Annotation\SerializedName('HK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hk = null; + /** + * + * @var ?string $hu + */ #[\JMS\Serializer\Annotation\SerializedName('HU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $hu = null; + /** + * + * @var ?string $is + */ #[\JMS\Serializer\Annotation\SerializedName('IS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $is = null; + /** + * + * @var ?string $in + */ #[\JMS\Serializer\Annotation\SerializedName('IN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $in = null; + /** + * + * @var ?string $id + */ #[\JMS\Serializer\Annotation\SerializedName('ID')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $id = null; + /** + * + * @var ?string $ir + */ #[\JMS\Serializer\Annotation\SerializedName('IR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ir = null; + /** + * + * @var ?string $iq + */ #[\JMS\Serializer\Annotation\SerializedName('IQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $iq = null; + /** + * + * @var ?string $ie + */ #[\JMS\Serializer\Annotation\SerializedName('IE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ie = null; + /** + * + * @var ?string $il + */ #[\JMS\Serializer\Annotation\SerializedName('IL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $il = null; + /** + * + * @var ?string $it + */ #[\JMS\Serializer\Annotation\SerializedName('IT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $it = null; + /** + * + * @var ?string $jm + */ #[\JMS\Serializer\Annotation\SerializedName('JM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jm = null; + /** + * + * @var ?string $jp + */ #[\JMS\Serializer\Annotation\SerializedName('JP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jp = null; + /** + * + * @var ?string $jo + */ #[\JMS\Serializer\Annotation\SerializedName('JO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $jo = null; + /** + * + * @var ?string $kz + */ #[\JMS\Serializer\Annotation\SerializedName('KZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kz = null; + /** + * + * @var ?string $ke + */ #[\JMS\Serializer\Annotation\SerializedName('KE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ke = null; + /** + * + * @var ?string $ki + */ #[\JMS\Serializer\Annotation\SerializedName('KI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ki = null; + /** + * + * @var ?string $kp + */ #[\JMS\Serializer\Annotation\SerializedName('KP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kp = null; + /** + * + * @var ?string $kr + */ #[\JMS\Serializer\Annotation\SerializedName('KR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kr = null; + /** + * + * @var ?string $kw + */ #[\JMS\Serializer\Annotation\SerializedName('KW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kw = null; + /** + * + * @var ?string $kg + */ #[\JMS\Serializer\Annotation\SerializedName('KG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kg = null; + /** + * + * @var ?string $la + */ #[\JMS\Serializer\Annotation\SerializedName('LA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $la = null; + /** + * + * @var ?string $lv + */ #[\JMS\Serializer\Annotation\SerializedName('LV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lv = null; + /** + * + * @var ?string $lb + */ #[\JMS\Serializer\Annotation\SerializedName('LB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lb = null; + /** + * + * @var ?string $ls + */ #[\JMS\Serializer\Annotation\SerializedName('LS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ls = null; + /** + * + * @var ?string $lr + */ #[\JMS\Serializer\Annotation\SerializedName('LR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lr = null; + /** + * + * @var ?string $ly + */ #[\JMS\Serializer\Annotation\SerializedName('LY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ly = null; + /** + * + * @var ?string $li + */ #[\JMS\Serializer\Annotation\SerializedName('LI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $li = null; + /** + * + * @var ?string $lt + */ #[\JMS\Serializer\Annotation\SerializedName('LT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lt = null; + /** + * + * @var ?string $lu + */ #[\JMS\Serializer\Annotation\SerializedName('LU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lu = null; + /** + * + * @var ?string $mo + */ #[\JMS\Serializer\Annotation\SerializedName('MO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mo = null; + /** + * + * @var ?string $mg + */ #[\JMS\Serializer\Annotation\SerializedName('MG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mg = null; + /** + * + * @var ?string $mw + */ #[\JMS\Serializer\Annotation\SerializedName('MW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mw = null; + /** + * + * @var ?string $my + */ #[\JMS\Serializer\Annotation\SerializedName('MY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $my = null; + /** + * + * @var ?string $mv + */ #[\JMS\Serializer\Annotation\SerializedName('MV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mv = null; + /** + * + * @var ?string $ml + */ #[\JMS\Serializer\Annotation\SerializedName('ML')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ml = null; + /** + * + * @var ?string $mt + */ #[\JMS\Serializer\Annotation\SerializedName('MT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mt = null; + /** + * + * @var ?string $mh + */ #[\JMS\Serializer\Annotation\SerializedName('MH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mh = null; + /** + * + * @var ?string $mq + */ #[\JMS\Serializer\Annotation\SerializedName('MQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mq = null; + /** + * + * @var ?string $mr + */ #[\JMS\Serializer\Annotation\SerializedName('MR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mr = null; + /** + * + * @var ?string $mu + */ #[\JMS\Serializer\Annotation\SerializedName('MU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mu = null; + /** + * + * @var ?string $yt + */ #[\JMS\Serializer\Annotation\SerializedName('YT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $yt = null; + /** + * + * @var ?string $mx + */ #[\JMS\Serializer\Annotation\SerializedName('MX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mx = null; + /** + * + * @var ?string $fm + */ #[\JMS\Serializer\Annotation\SerializedName('FM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $fm = null; + /** + * + * @var ?string $md + */ #[\JMS\Serializer\Annotation\SerializedName('MD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $md = null; + /** + * + * @var ?string $mc + */ #[\JMS\Serializer\Annotation\SerializedName('MC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mc = null; + /** + * + * @var ?string $mn + */ #[\JMS\Serializer\Annotation\SerializedName('MN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mn = null; + /** + * + * @var ?string $ms + */ #[\JMS\Serializer\Annotation\SerializedName('MS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ms = null; + /** + * + * @var ?string $ma + */ #[\JMS\Serializer\Annotation\SerializedName('MA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ma = null; + /** + * + * @var ?string $mz + */ #[\JMS\Serializer\Annotation\SerializedName('MZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mz = null; + /** + * + * @var ?string $mm + */ #[\JMS\Serializer\Annotation\SerializedName('MM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mm = null; + /** + * + * @var ?string $na + */ #[\JMS\Serializer\Annotation\SerializedName('NA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $na = null; + /** + * + * @var ?string $nr + */ #[\JMS\Serializer\Annotation\SerializedName('NR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nr = null; + /** + * + * @var ?string $np + */ #[\JMS\Serializer\Annotation\SerializedName('NP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $np = null; + /** + * + * @var ?string $nl + */ #[\JMS\Serializer\Annotation\SerializedName('NL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nl = null; + /** + * + * @var ?string $nc + */ #[\JMS\Serializer\Annotation\SerializedName('NC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nc = null; + /** + * + * @var ?string $nz + */ #[\JMS\Serializer\Annotation\SerializedName('NZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nz = null; + /** + * + * @var ?string $ni + */ #[\JMS\Serializer\Annotation\SerializedName('NI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ni = null; + /** + * + * @var ?string $ne + */ #[\JMS\Serializer\Annotation\SerializedName('NE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ne = null; + /** + * + * @var ?string $ng + */ #[\JMS\Serializer\Annotation\SerializedName('NG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ng = null; + /** + * + * @var ?string $nu + */ #[\JMS\Serializer\Annotation\SerializedName('NU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nu = null; + /** + * + * @var ?string $nf + */ #[\JMS\Serializer\Annotation\SerializedName('NF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $nf = null; + /** + * + * @var ?string $mk + */ #[\JMS\Serializer\Annotation\SerializedName('MK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mk = null; + /** + * + * @var ?string $mp + */ #[\JMS\Serializer\Annotation\SerializedName('MP')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mp = null; + /** + * + * @var ?string $no + */ #[\JMS\Serializer\Annotation\SerializedName('NO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $no = null; + /** + * + * @var ?string $om + */ #[\JMS\Serializer\Annotation\SerializedName('OM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $om = null; + /** + * + * @var ?string $pk + */ #[\JMS\Serializer\Annotation\SerializedName('PK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pk = null; + /** + * + * @var ?string $pw + */ #[\JMS\Serializer\Annotation\SerializedName('PW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pw = null; + /** + * + * @var ?string $ps + */ #[\JMS\Serializer\Annotation\SerializedName('PS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ps = null; + /** + * + * @var ?string $pa + */ #[\JMS\Serializer\Annotation\SerializedName('PA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pa = null; + /** + * + * @var ?string $pg + */ #[\JMS\Serializer\Annotation\SerializedName('PG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pg = null; + /** + * + * @var ?string $py + */ #[\JMS\Serializer\Annotation\SerializedName('PY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $py = null; + /** + * + * @var ?string $pe + */ #[\JMS\Serializer\Annotation\SerializedName('PE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pe = null; + /** + * + * @var ?string $ph + */ #[\JMS\Serializer\Annotation\SerializedName('PH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ph = null; + /** + * + * @var ?string $pn + */ #[\JMS\Serializer\Annotation\SerializedName('PN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pn = null; + /** + * + * @var ?string $pl + */ #[\JMS\Serializer\Annotation\SerializedName('PL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pl = null; + /** + * + * @var ?string $pt + */ #[\JMS\Serializer\Annotation\SerializedName('PT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pt = null; + /** + * + * @var ?string $pr + */ #[\JMS\Serializer\Annotation\SerializedName('PR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pr = null; + /** + * + * @var ?string $qa + */ #[\JMS\Serializer\Annotation\SerializedName('QA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $qa = null; + /** + * + * @var ?string $re + */ #[\JMS\Serializer\Annotation\SerializedName('RE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $re = null; + /** + * + * @var ?string $ro + */ #[\JMS\Serializer\Annotation\SerializedName('RO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ro = null; + /** + * + * @var ?string $ru + */ #[\JMS\Serializer\Annotation\SerializedName('RU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ru = null; + /** + * + * @var ?string $rw + */ #[\JMS\Serializer\Annotation\SerializedName('RW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $rw = null; + /** + * + * @var ?string $sh + */ #[\JMS\Serializer\Annotation\SerializedName('SH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sh = null; + /** + * + * @var ?string $kn + */ #[\JMS\Serializer\Annotation\SerializedName('KN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $kn = null; + /** + * + * @var ?string $lc + */ #[\JMS\Serializer\Annotation\SerializedName('LC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lc = null; + /** + * + * @var ?string $pm + */ #[\JMS\Serializer\Annotation\SerializedName('PM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $pm = null; + /** + * + * @var ?string $vc + */ #[\JMS\Serializer\Annotation\SerializedName('VC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vc = null; + /** + * + * @var ?string $ws + */ #[\JMS\Serializer\Annotation\SerializedName('WS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ws = null; + /** + * + * @var ?string $sm + */ #[\JMS\Serializer\Annotation\SerializedName('SM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sm = null; + /** + * + * @var ?string $st + */ #[\JMS\Serializer\Annotation\SerializedName('ST')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $st = null; + /** + * + * @var ?string $sa + */ #[\JMS\Serializer\Annotation\SerializedName('SA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sa = null; + /** + * + * @var ?string $sn + */ #[\JMS\Serializer\Annotation\SerializedName('SN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sn = null; + /** + * + * @var ?string $sc + */ #[\JMS\Serializer\Annotation\SerializedName('SC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sc = null; + /** + * + * @var ?string $sl + */ #[\JMS\Serializer\Annotation\SerializedName('SL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sl = null; + /** + * + * @var ?string $sg + */ #[\JMS\Serializer\Annotation\SerializedName('SG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sg = null; + /** + * + * @var ?string $sk + */ #[\JMS\Serializer\Annotation\SerializedName('SK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sk = null; + /** + * + * @var ?string $si + */ #[\JMS\Serializer\Annotation\SerializedName('SI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $si = null; + /** + * + * @var ?string $sb + */ #[\JMS\Serializer\Annotation\SerializedName('SB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sb = null; + /** + * + * @var ?string $so + */ #[\JMS\Serializer\Annotation\SerializedName('SO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $so = null; + /** + * + * @var ?string $za + */ #[\JMS\Serializer\Annotation\SerializedName('ZA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $za = null; + /** + * + * @var ?string $gs + */ #[\JMS\Serializer\Annotation\SerializedName('GS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gs = null; + /** + * + * @var ?string $es + */ #[\JMS\Serializer\Annotation\SerializedName('ES')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $es = null; + /** + * + * @var ?string $lk + */ #[\JMS\Serializer\Annotation\SerializedName('LK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $lk = null; + /** + * + * @var ?string $sd + */ #[\JMS\Serializer\Annotation\SerializedName('SD')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sd = null; + /** + * + * @var ?string $sr + */ #[\JMS\Serializer\Annotation\SerializedName('SR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sr = null; + /** + * + * @var ?string $sj + */ #[\JMS\Serializer\Annotation\SerializedName('SJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sj = null; + /** + * + * @var ?string $sz + */ #[\JMS\Serializer\Annotation\SerializedName('SZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sz = null; + /** + * + * @var ?string $se + */ #[\JMS\Serializer\Annotation\SerializedName('SE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $se = null; + /** + * + * @var ?string $ch + */ #[\JMS\Serializer\Annotation\SerializedName('CH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ch = null; + /** + * + * @var ?string $sy + */ #[\JMS\Serializer\Annotation\SerializedName('SY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sy = null; + /** + * + * @var ?string $tw + */ #[\JMS\Serializer\Annotation\SerializedName('TW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tw = null; + /** + * + * @var ?string $tj + */ #[\JMS\Serializer\Annotation\SerializedName('TJ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tj = null; + /** + * + * @var ?string $tz + */ #[\JMS\Serializer\Annotation\SerializedName('TZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tz = null; + /** + * + * @var ?string $th + */ #[\JMS\Serializer\Annotation\SerializedName('TH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $th = null; + /** + * + * @var ?string $tl + */ #[\JMS\Serializer\Annotation\SerializedName('TL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tl = null; + /** + * + * @var ?string $tg + */ #[\JMS\Serializer\Annotation\SerializedName('TG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tg = null; + /** + * + * @var ?string $tk + */ #[\JMS\Serializer\Annotation\SerializedName('TK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tk = null; + /** + * + * @var ?string $to + */ #[\JMS\Serializer\Annotation\SerializedName('TO')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $to = null; + /** + * + * @var ?string $tt + */ #[\JMS\Serializer\Annotation\SerializedName('TT')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tt = null; + /** + * + * @var ?string $tn + */ #[\JMS\Serializer\Annotation\SerializedName('TN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tn = null; + /** + * + * @var ?string $tr + */ #[\JMS\Serializer\Annotation\SerializedName('TR')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tr = null; + /** + * + * @var ?string $tm + */ #[\JMS\Serializer\Annotation\SerializedName('TM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tm = null; + /** + * + * @var ?string $tc + */ #[\JMS\Serializer\Annotation\SerializedName('TC')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tc = null; + /** + * + * @var ?string $tv + */ #[\JMS\Serializer\Annotation\SerializedName('TV')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tv = null; + /** + * + * @var ?string $ug + */ #[\JMS\Serializer\Annotation\SerializedName('UG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ug = null; + /** + * + * @var ?string $ua + */ #[\JMS\Serializer\Annotation\SerializedName('UA')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ua = null; + /** + * + * @var ?string $ae + */ #[\JMS\Serializer\Annotation\SerializedName('AE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ae = null; + /** + * + * @var ?string $gb + */ #[\JMS\Serializer\Annotation\SerializedName('GB')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gb = null; + /** + * + * @var ?string $us + */ #[\JMS\Serializer\Annotation\SerializedName('US')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $us = null; + /** + * + * @var ?string $um + */ #[\JMS\Serializer\Annotation\SerializedName('UM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $um = null; + /** + * + * @var ?string $uy + */ #[\JMS\Serializer\Annotation\SerializedName('UY')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $uy = null; + /** + * + * @var ?string $uz + */ #[\JMS\Serializer\Annotation\SerializedName('UZ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $uz = null; + /** + * + * @var ?string $vu + */ #[\JMS\Serializer\Annotation\SerializedName('VU')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vu = null; + /** + * + * @var ?string $ve + */ #[\JMS\Serializer\Annotation\SerializedName('VE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ve = null; + /** + * + * @var ?string $vn + */ #[\JMS\Serializer\Annotation\SerializedName('VN')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vn = null; + /** + * + * @var ?string $vg + */ #[\JMS\Serializer\Annotation\SerializedName('VG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vg = null; + /** + * + * @var ?string $vi + */ #[\JMS\Serializer\Annotation\SerializedName('VI')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $vi = null; + /** + * + * @var ?string $wf + */ #[\JMS\Serializer\Annotation\SerializedName('WF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $wf = null; + /** + * + * @var ?string $eh + */ #[\JMS\Serializer\Annotation\SerializedName('EH')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $eh = null; + /** + * + * @var ?string $ye + */ #[\JMS\Serializer\Annotation\SerializedName('YE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ye = null; + /** + * + * @var ?string $zm + */ #[\JMS\Serializer\Annotation\SerializedName('ZM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $zm = null; + /** + * + * @var ?string $zw + */ #[\JMS\Serializer\Annotation\SerializedName('ZW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $zw = null; + /** + * + * @var ?string $ax + */ #[\JMS\Serializer\Annotation\SerializedName('AX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ax = null; + /** + * + * @var ?string $bq + */ #[\JMS\Serializer\Annotation\SerializedName('BQ')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bq = null; + /** + * + * @var ?string $cw + */ #[\JMS\Serializer\Annotation\SerializedName('CW')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $cw = null; + /** + * + * @var ?string $gg + */ #[\JMS\Serializer\Annotation\SerializedName('GG')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $gg = null; + /** + * + * @var ?string $im + */ #[\JMS\Serializer\Annotation\SerializedName('IM')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $im = null; + /** + * + * @var ?string $je + */ #[\JMS\Serializer\Annotation\SerializedName('JE')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $je = null; + /** + * + * @var ?string $me + */ #[\JMS\Serializer\Annotation\SerializedName('ME')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $me = null; + /** + * + * @var ?string $bl + */ #[\JMS\Serializer\Annotation\SerializedName('BL')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $bl = null; + /** + * + * @var ?string $mf + */ #[\JMS\Serializer\Annotation\SerializedName('MF')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $mf = null; + /** + * + * @var ?string $rs + */ #[\JMS\Serializer\Annotation\SerializedName('RS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $rs = null; + /** + * + * @var ?string $sx + */ #[\JMS\Serializer\Annotation\SerializedName('SX')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $sx = null; + /** + * + * @var ?string $ss + */ #[\JMS\Serializer\Annotation\SerializedName('SS')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ss = null; + /** + * + * @var ?string $xk + */ #[\JMS\Serializer\Annotation\SerializedName('XK')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $xk = null; - public function __construct() + /** + * @param ?string $af + * @param ?string $al + * @param ?string $dz + * @param ?string $as + * @param ?string $ad + * @param ?string $ao + * @param ?string $ai + * @param ?string $aq + * @param ?string $ag + * @param ?string $ar + * @param ?string $am + * @param ?string $aw + * @param ?string $au + * @param ?string $at + * @param ?string $az + * @param ?string $bs + * @param ?string $bh + * @param ?string $bd + * @param ?string $bb + * @param ?string $by + * @param ?string $be + * @param ?string $bz + * @param ?string $bj + * @param ?string $bm + * @param ?string $bt + * @param ?string $bo + * @param ?string $ba + * @param ?string $bw + * @param ?string $bv + * @param ?string $br + * @param ?string $io + * @param ?string $bn + * @param ?string $bg + * @param ?string $bf + * @param ?string $bi + * @param ?string $kh + * @param ?string $cm + * @param ?string $ca + * @param ?string $cv + * @param ?string $ky + * @param ?string $cf + * @param ?string $td + * @param ?string $cl + * @param ?string $cn + * @param ?string $cx + * @param ?string $cc + * @param ?string $co + * @param ?string $km + * @param ?string $cg + * @param ?string $cd + * @param ?string $ck + * @param ?string $cr + * @param ?string $ci + * @param ?string $hr + * @param ?string $cu + * @param ?string $cy + * @param ?string $cz + * @param ?string $dk + * @param ?string $dj + * @param ?string $dm + * @param ?string $do + * @param ?string $ec + * @param ?string $eg + * @param ?string $sv + * @param ?string $gq + * @param ?string $er + * @param ?string $ee + * @param ?string $et + * @param ?string $fk + * @param ?string $fo + * @param ?string $fj + * @param ?string $fi + * @param ?string $fr + * @param ?string $gf + * @param ?string $pf + * @param ?string $tf + * @param ?string $ga + * @param ?string $gm + * @param ?string $ge + * @param ?string $de + * @param ?string $gh + * @param ?string $gi + * @param ?string $gr + * @param ?string $gl + * @param ?string $gd + * @param ?string $gp + * @param ?string $gu + * @param ?string $gt + * @param ?string $gn + * @param ?string $gw + * @param ?string $gy + * @param ?string $ht + * @param ?string $hm + * @param ?string $va + * @param ?string $hn + * @param ?string $hk + * @param ?string $hu + * @param ?string $is + * @param ?string $in + * @param ?string $id + * @param ?string $ir + * @param ?string $iq + * @param ?string $ie + * @param ?string $il + * @param ?string $it + * @param ?string $jm + * @param ?string $jp + * @param ?string $jo + * @param ?string $kz + * @param ?string $ke + * @param ?string $ki + * @param ?string $kp + * @param ?string $kr + * @param ?string $kw + * @param ?string $kg + * @param ?string $la + * @param ?string $lv + * @param ?string $lb + * @param ?string $ls + * @param ?string $lr + * @param ?string $ly + * @param ?string $li + * @param ?string $lt + * @param ?string $lu + * @param ?string $mo + * @param ?string $mg + * @param ?string $mw + * @param ?string $my + * @param ?string $mv + * @param ?string $ml + * @param ?string $mt + * @param ?string $mh + * @param ?string $mq + * @param ?string $mr + * @param ?string $mu + * @param ?string $yt + * @param ?string $mx + * @param ?string $fm + * @param ?string $md + * @param ?string $mc + * @param ?string $mn + * @param ?string $ms + * @param ?string $ma + * @param ?string $mz + * @param ?string $mm + * @param ?string $na + * @param ?string $nr + * @param ?string $np + * @param ?string $nl + * @param ?string $nc + * @param ?string $nz + * @param ?string $ni + * @param ?string $ne + * @param ?string $ng + * @param ?string $nu + * @param ?string $nf + * @param ?string $mk + * @param ?string $mp + * @param ?string $no + * @param ?string $om + * @param ?string $pk + * @param ?string $pw + * @param ?string $ps + * @param ?string $pa + * @param ?string $pg + * @param ?string $py + * @param ?string $pe + * @param ?string $ph + * @param ?string $pn + * @param ?string $pl + * @param ?string $pt + * @param ?string $pr + * @param ?string $qa + * @param ?string $re + * @param ?string $ro + * @param ?string $ru + * @param ?string $rw + * @param ?string $sh + * @param ?string $kn + * @param ?string $lc + * @param ?string $pm + * @param ?string $vc + * @param ?string $ws + * @param ?string $sm + * @param ?string $st + * @param ?string $sa + * @param ?string $sn + * @param ?string $sc + * @param ?string $sl + * @param ?string $sg + * @param ?string $sk + * @param ?string $si + * @param ?string $sb + * @param ?string $so + * @param ?string $za + * @param ?string $gs + * @param ?string $es + * @param ?string $lk + * @param ?string $sd + * @param ?string $sr + * @param ?string $sj + * @param ?string $sz + * @param ?string $se + * @param ?string $ch + * @param ?string $sy + * @param ?string $tw + * @param ?string $tj + * @param ?string $tz + * @param ?string $th + * @param ?string $tl + * @param ?string $tg + * @param ?string $tk + * @param ?string $to + * @param ?string $tt + * @param ?string $tn + * @param ?string $tr + * @param ?string $tm + * @param ?string $tc + * @param ?string $tv + * @param ?string $ug + * @param ?string $ua + * @param ?string $ae + * @param ?string $gb + * @param ?string $us + * @param ?string $um + * @param ?string $uy + * @param ?string $uz + * @param ?string $vu + * @param ?string $ve + * @param ?string $vn + * @param ?string $vg + * @param ?string $vi + * @param ?string $wf + * @param ?string $eh + * @param ?string $ye + * @param ?string $zm + * @param ?string $zw + * @param ?string $ax + * @param ?string $bq + * @param ?string $cw + * @param ?string $gg + * @param ?string $im + * @param ?string $je + * @param ?string $me + * @param ?string $bl + * @param ?string $mf + * @param ?string $rs + * @param ?string $sx + * @param ?string $ss + * @param ?string $xk + */ + public function __construct(?string $af = null, ?string $al = null, ?string $dz = null, ?string $as = null, ?string $ad = null, ?string $ao = null, ?string $ai = null, ?string $aq = null, ?string $ag = null, ?string $ar = null, ?string $am = null, ?string $aw = null, ?string $au = null, ?string $at = null, ?string $az = null, ?string $bs = null, ?string $bh = null, ?string $bd = null, ?string $bb = null, ?string $by = null, ?string $be = null, ?string $bz = null, ?string $bj = null, ?string $bm = null, ?string $bt = null, ?string $bo = null, ?string $ba = null, ?string $bw = null, ?string $bv = null, ?string $br = null, ?string $io = null, ?string $bn = null, ?string $bg = null, ?string $bf = null, ?string $bi = null, ?string $kh = null, ?string $cm = null, ?string $ca = null, ?string $cv = null, ?string $ky = null, ?string $cf = null, ?string $td = null, ?string $cl = null, ?string $cn = null, ?string $cx = null, ?string $cc = null, ?string $co = null, ?string $km = null, ?string $cg = null, ?string $cd = null, ?string $ck = null, ?string $cr = null, ?string $ci = null, ?string $hr = null, ?string $cu = null, ?string $cy = null, ?string $cz = null, ?string $dk = null, ?string $dj = null, ?string $dm = null, ?string $do = null, ?string $ec = null, ?string $eg = null, ?string $sv = null, ?string $gq = null, ?string $er = null, ?string $ee = null, ?string $et = null, ?string $fk = null, ?string $fo = null, ?string $fj = null, ?string $fi = null, ?string $fr = null, ?string $gf = null, ?string $pf = null, ?string $tf = null, ?string $ga = null, ?string $gm = null, ?string $ge = null, ?string $de = null, ?string $gh = null, ?string $gi = null, ?string $gr = null, ?string $gl = null, ?string $gd = null, ?string $gp = null, ?string $gu = null, ?string $gt = null, ?string $gn = null, ?string $gw = null, ?string $gy = null, ?string $ht = null, ?string $hm = null, ?string $va = null, ?string $hn = null, ?string $hk = null, ?string $hu = null, ?string $is = null, ?string $in = null, ?string $id = null, ?string $ir = null, ?string $iq = null, ?string $ie = null, ?string $il = null, ?string $it = null, ?string $jm = null, ?string $jp = null, ?string $jo = null, ?string $kz = null, ?string $ke = null, ?string $ki = null, ?string $kp = null, ?string $kr = null, ?string $kw = null, ?string $kg = null, ?string $la = null, ?string $lv = null, ?string $lb = null, ?string $ls = null, ?string $lr = null, ?string $ly = null, ?string $li = null, ?string $lt = null, ?string $lu = null, ?string $mo = null, ?string $mg = null, ?string $mw = null, ?string $my = null, ?string $mv = null, ?string $ml = null, ?string $mt = null, ?string $mh = null, ?string $mq = null, ?string $mr = null, ?string $mu = null, ?string $yt = null, ?string $mx = null, ?string $fm = null, ?string $md = null, ?string $mc = null, ?string $mn = null, ?string $ms = null, ?string $ma = null, ?string $mz = null, ?string $mm = null, ?string $na = null, ?string $nr = null, ?string $np = null, ?string $nl = null, ?string $nc = null, ?string $nz = null, ?string $ni = null, ?string $ne = null, ?string $ng = null, ?string $nu = null, ?string $nf = null, ?string $mk = null, ?string $mp = null, ?string $no = null, ?string $om = null, ?string $pk = null, ?string $pw = null, ?string $ps = null, ?string $pa = null, ?string $pg = null, ?string $py = null, ?string $pe = null, ?string $ph = null, ?string $pn = null, ?string $pl = null, ?string $pt = null, ?string $pr = null, ?string $qa = null, ?string $re = null, ?string $ro = null, ?string $ru = null, ?string $rw = null, ?string $sh = null, ?string $kn = null, ?string $lc = null, ?string $pm = null, ?string $vc = null, ?string $ws = null, ?string $sm = null, ?string $st = null, ?string $sa = null, ?string $sn = null, ?string $sc = null, ?string $sl = null, ?string $sg = null, ?string $sk = null, ?string $si = null, ?string $sb = null, ?string $so = null, ?string $za = null, ?string $gs = null, ?string $es = null, ?string $lk = null, ?string $sd = null, ?string $sr = null, ?string $sj = null, ?string $sz = null, ?string $se = null, ?string $ch = null, ?string $sy = null, ?string $tw = null, ?string $tj = null, ?string $tz = null, ?string $th = null, ?string $tl = null, ?string $tg = null, ?string $tk = null, ?string $to = null, ?string $tt = null, ?string $tn = null, ?string $tr = null, ?string $tm = null, ?string $tc = null, ?string $tv = null, ?string $ug = null, ?string $ua = null, ?string $ae = null, ?string $gb = null, ?string $us = null, ?string $um = null, ?string $uy = null, ?string $uz = null, ?string $vu = null, ?string $ve = null, ?string $vn = null, ?string $vg = null, ?string $vi = null, ?string $wf = null, ?string $eh = null, ?string $ye = null, ?string $zm = null, ?string $zw = null, ?string $ax = null, ?string $bq = null, ?string $cw = null, ?string $gg = null, ?string $im = null, ?string $je = null, ?string $me = null, ?string $bl = null, ?string $mf = null, ?string $rs = null, ?string $sx = null, ?string $ss = null, ?string $xk = null) { - $this->af = null; - $this->al = null; - $this->dz = null; - $this->as = null; - $this->ad = null; - $this->ao = null; - $this->ai = null; - $this->aq = null; - $this->ag = null; - $this->ar = null; - $this->am = null; - $this->aw = null; - $this->au = null; - $this->at = null; - $this->az = null; - $this->bs = null; - $this->bh = null; - $this->bd = null; - $this->bb = null; - $this->by = null; - $this->be = null; - $this->bz = null; - $this->bj = null; - $this->bm = null; - $this->bt = null; - $this->bo = null; - $this->ba = null; - $this->bw = null; - $this->bv = null; - $this->br = null; - $this->io = null; - $this->bn = null; - $this->bg = null; - $this->bf = null; - $this->bi = null; - $this->kh = null; - $this->cm = null; - $this->ca = null; - $this->cv = null; - $this->ky = null; - $this->cf = null; - $this->td = null; - $this->cl = null; - $this->cn = null; - $this->cx = null; - $this->cc = null; - $this->co = null; - $this->km = null; - $this->cg = null; - $this->cd = null; - $this->ck = null; - $this->cr = null; - $this->ci = null; - $this->hr = null; - $this->cu = null; - $this->cy = null; - $this->cz = null; - $this->dk = null; - $this->dj = null; - $this->dm = null; - $this->do = null; - $this->ec = null; - $this->eg = null; - $this->sv = null; - $this->gq = null; - $this->er = null; - $this->ee = null; - $this->et = null; - $this->fk = null; - $this->fo = null; - $this->fj = null; - $this->fi = null; - $this->fr = null; - $this->gf = null; - $this->pf = null; - $this->tf = null; - $this->ga = null; - $this->gm = null; - $this->ge = null; - $this->de = null; - $this->gh = null; - $this->gi = null; - $this->gr = null; - $this->gl = null; - $this->gd = null; - $this->gp = null; - $this->gu = null; - $this->gt = null; - $this->gn = null; - $this->gw = null; - $this->gy = null; - $this->ht = null; - $this->hm = null; - $this->va = null; - $this->hn = null; - $this->hk = null; - $this->hu = null; - $this->is = null; - $this->in = null; - $this->id = null; - $this->ir = null; - $this->iq = null; - $this->ie = null; - $this->il = null; - $this->it = null; - $this->jm = null; - $this->jp = null; - $this->jo = null; - $this->kz = null; - $this->ke = null; - $this->ki = null; - $this->kp = null; - $this->kr = null; - $this->kw = null; - $this->kg = null; - $this->la = null; - $this->lv = null; - $this->lb = null; - $this->ls = null; - $this->lr = null; - $this->ly = null; - $this->li = null; - $this->lt = null; - $this->lu = null; - $this->mo = null; - $this->mg = null; - $this->mw = null; - $this->my = null; - $this->mv = null; - $this->ml = null; - $this->mt = null; - $this->mh = null; - $this->mq = null; - $this->mr = null; - $this->mu = null; - $this->yt = null; - $this->mx = null; - $this->fm = null; - $this->md = null; - $this->mc = null; - $this->mn = null; - $this->ms = null; - $this->ma = null; - $this->mz = null; - $this->mm = null; - $this->na = null; - $this->nr = null; - $this->np = null; - $this->nl = null; - $this->nc = null; - $this->nz = null; - $this->ni = null; - $this->ne = null; - $this->ng = null; - $this->nu = null; - $this->nf = null; - $this->mk = null; - $this->mp = null; - $this->no = null; - $this->om = null; - $this->pk = null; - $this->pw = null; - $this->ps = null; - $this->pa = null; - $this->pg = null; - $this->py = null; - $this->pe = null; - $this->ph = null; - $this->pn = null; - $this->pl = null; - $this->pt = null; - $this->pr = null; - $this->qa = null; - $this->re = null; - $this->ro = null; - $this->ru = null; - $this->rw = null; - $this->sh = null; - $this->kn = null; - $this->lc = null; - $this->pm = null; - $this->vc = null; - $this->ws = null; - $this->sm = null; - $this->st = null; - $this->sa = null; - $this->sn = null; - $this->sc = null; - $this->sl = null; - $this->sg = null; - $this->sk = null; - $this->si = null; - $this->sb = null; - $this->so = null; - $this->za = null; - $this->gs = null; - $this->es = null; - $this->lk = null; - $this->sd = null; - $this->sr = null; - $this->sj = null; - $this->sz = null; - $this->se = null; - $this->ch = null; - $this->sy = null; - $this->tw = null; - $this->tj = null; - $this->tz = null; - $this->th = null; - $this->tl = null; - $this->tg = null; - $this->tk = null; - $this->to = null; - $this->tt = null; - $this->tn = null; - $this->tr = null; - $this->tm = null; - $this->tc = null; - $this->tv = null; - $this->ug = null; - $this->ua = null; - $this->ae = null; - $this->gb = null; - $this->us = null; - $this->um = null; - $this->uy = null; - $this->uz = null; - $this->vu = null; - $this->ve = null; - $this->vn = null; - $this->vg = null; - $this->vi = null; - $this->wf = null; - $this->eh = null; - $this->ye = null; - $this->zm = null; - $this->zw = null; - $this->ax = null; - $this->bq = null; - $this->cw = null; - $this->gg = null; - $this->im = null; - $this->je = null; - $this->me = null; - $this->bl = null; - $this->mf = null; - $this->rs = null; - $this->sx = null; - $this->ss = null; - $this->xk = null; + $this->af = $af; + $this->al = $al; + $this->dz = $dz; + $this->as = $as; + $this->ad = $ad; + $this->ao = $ao; + $this->ai = $ai; + $this->aq = $aq; + $this->ag = $ag; + $this->ar = $ar; + $this->am = $am; + $this->aw = $aw; + $this->au = $au; + $this->at = $at; + $this->az = $az; + $this->bs = $bs; + $this->bh = $bh; + $this->bd = $bd; + $this->bb = $bb; + $this->by = $by; + $this->be = $be; + $this->bz = $bz; + $this->bj = $bj; + $this->bm = $bm; + $this->bt = $bt; + $this->bo = $bo; + $this->ba = $ba; + $this->bw = $bw; + $this->bv = $bv; + $this->br = $br; + $this->io = $io; + $this->bn = $bn; + $this->bg = $bg; + $this->bf = $bf; + $this->bi = $bi; + $this->kh = $kh; + $this->cm = $cm; + $this->ca = $ca; + $this->cv = $cv; + $this->ky = $ky; + $this->cf = $cf; + $this->td = $td; + $this->cl = $cl; + $this->cn = $cn; + $this->cx = $cx; + $this->cc = $cc; + $this->co = $co; + $this->km = $km; + $this->cg = $cg; + $this->cd = $cd; + $this->ck = $ck; + $this->cr = $cr; + $this->ci = $ci; + $this->hr = $hr; + $this->cu = $cu; + $this->cy = $cy; + $this->cz = $cz; + $this->dk = $dk; + $this->dj = $dj; + $this->dm = $dm; + $this->do = $do; + $this->ec = $ec; + $this->eg = $eg; + $this->sv = $sv; + $this->gq = $gq; + $this->er = $er; + $this->ee = $ee; + $this->et = $et; + $this->fk = $fk; + $this->fo = $fo; + $this->fj = $fj; + $this->fi = $fi; + $this->fr = $fr; + $this->gf = $gf; + $this->pf = $pf; + $this->tf = $tf; + $this->ga = $ga; + $this->gm = $gm; + $this->ge = $ge; + $this->de = $de; + $this->gh = $gh; + $this->gi = $gi; + $this->gr = $gr; + $this->gl = $gl; + $this->gd = $gd; + $this->gp = $gp; + $this->gu = $gu; + $this->gt = $gt; + $this->gn = $gn; + $this->gw = $gw; + $this->gy = $gy; + $this->ht = $ht; + $this->hm = $hm; + $this->va = $va; + $this->hn = $hn; + $this->hk = $hk; + $this->hu = $hu; + $this->is = $is; + $this->in = $in; + $this->id = $id; + $this->ir = $ir; + $this->iq = $iq; + $this->ie = $ie; + $this->il = $il; + $this->it = $it; + $this->jm = $jm; + $this->jp = $jp; + $this->jo = $jo; + $this->kz = $kz; + $this->ke = $ke; + $this->ki = $ki; + $this->kp = $kp; + $this->kr = $kr; + $this->kw = $kw; + $this->kg = $kg; + $this->la = $la; + $this->lv = $lv; + $this->lb = $lb; + $this->ls = $ls; + $this->lr = $lr; + $this->ly = $ly; + $this->li = $li; + $this->lt = $lt; + $this->lu = $lu; + $this->mo = $mo; + $this->mg = $mg; + $this->mw = $mw; + $this->my = $my; + $this->mv = $mv; + $this->ml = $ml; + $this->mt = $mt; + $this->mh = $mh; + $this->mq = $mq; + $this->mr = $mr; + $this->mu = $mu; + $this->yt = $yt; + $this->mx = $mx; + $this->fm = $fm; + $this->md = $md; + $this->mc = $mc; + $this->mn = $mn; + $this->ms = $ms; + $this->ma = $ma; + $this->mz = $mz; + $this->mm = $mm; + $this->na = $na; + $this->nr = $nr; + $this->np = $np; + $this->nl = $nl; + $this->nc = $nc; + $this->nz = $nz; + $this->ni = $ni; + $this->ne = $ne; + $this->ng = $ng; + $this->nu = $nu; + $this->nf = $nf; + $this->mk = $mk; + $this->mp = $mp; + $this->no = $no; + $this->om = $om; + $this->pk = $pk; + $this->pw = $pw; + $this->ps = $ps; + $this->pa = $pa; + $this->pg = $pg; + $this->py = $py; + $this->pe = $pe; + $this->ph = $ph; + $this->pn = $pn; + $this->pl = $pl; + $this->pt = $pt; + $this->pr = $pr; + $this->qa = $qa; + $this->re = $re; + $this->ro = $ro; + $this->ru = $ru; + $this->rw = $rw; + $this->sh = $sh; + $this->kn = $kn; + $this->lc = $lc; + $this->pm = $pm; + $this->vc = $vc; + $this->ws = $ws; + $this->sm = $sm; + $this->st = $st; + $this->sa = $sa; + $this->sn = $sn; + $this->sc = $sc; + $this->sl = $sl; + $this->sg = $sg; + $this->sk = $sk; + $this->si = $si; + $this->sb = $sb; + $this->so = $so; + $this->za = $za; + $this->gs = $gs; + $this->es = $es; + $this->lk = $lk; + $this->sd = $sd; + $this->sr = $sr; + $this->sj = $sj; + $this->sz = $sz; + $this->se = $se; + $this->ch = $ch; + $this->sy = $sy; + $this->tw = $tw; + $this->tj = $tj; + $this->tz = $tz; + $this->th = $th; + $this->tl = $tl; + $this->tg = $tg; + $this->tk = $tk; + $this->to = $to; + $this->tt = $tt; + $this->tn = $tn; + $this->tr = $tr; + $this->tm = $tm; + $this->tc = $tc; + $this->tv = $tv; + $this->ug = $ug; + $this->ua = $ua; + $this->ae = $ae; + $this->gb = $gb; + $this->us = $us; + $this->um = $um; + $this->uy = $uy; + $this->uz = $uz; + $this->vu = $vu; + $this->ve = $ve; + $this->vn = $vn; + $this->vg = $vg; + $this->vi = $vi; + $this->wf = $wf; + $this->eh = $eh; + $this->ye = $ye; + $this->zm = $zm; + $this->zw = $zw; + $this->ax = $ax; + $this->bq = $bq; + $this->cw = $cw; + $this->gg = $gg; + $this->im = $im; + $this->je = $je; + $this->me = $me; + $this->bl = $bl; + $this->mf = $mf; + $this->rs = $rs; + $this->sx = $sx; + $this->ss = $ss; + $this->xk = $xk; } } \ No newline at end of file diff --git a/src/Models/Components/LinkSchema.php b/src/Models/Components/LinkSchema.php index 16dace0..2d9d29b 100644 --- a/src/Models/Components/LinkSchema.php +++ b/src/Models/Components/LinkSchema.php @@ -17,7 +17,6 @@ class LinkSchema * @var string $id */ #[\JMS\Serializer\Annotation\SerializedName('id')] - #[\JMS\Serializer\Annotation\Type('string')] public string $id; /** @@ -26,7 +25,6 @@ class LinkSchema * @var string $domain */ #[\JMS\Serializer\Annotation\SerializedName('domain')] - #[\JMS\Serializer\Annotation\Type('string')] public string $domain; /** @@ -35,7 +33,6 @@ class LinkSchema * @var string $key */ #[\JMS\Serializer\Annotation\SerializedName('key')] - #[\JMS\Serializer\Annotation\Type('string')] public string $key; /** @@ -44,7 +41,6 @@ class LinkSchema * @var string $externalId */ #[\JMS\Serializer\Annotation\SerializedName('externalId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $externalId; /** @@ -53,7 +49,6 @@ class LinkSchema * @var string $url */ #[\JMS\Serializer\Annotation\SerializedName('url')] - #[\JMS\Serializer\Annotation\Type('string')] public string $url; /** @@ -62,7 +57,6 @@ class LinkSchema * @var bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $trackConversion; /** @@ -71,7 +65,6 @@ class LinkSchema * @var bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $archived; /** @@ -80,7 +73,6 @@ class LinkSchema * @var string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] public string $expiresAt; /** @@ -89,7 +81,6 @@ class LinkSchema * @var string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] public string $expiredUrl; /** @@ -98,7 +89,6 @@ class LinkSchema * @var string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] public string $password; /** @@ -107,7 +97,6 @@ class LinkSchema * @var bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $proxy; /** @@ -116,7 +105,6 @@ class LinkSchema * @var string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] public string $title; /** @@ -125,7 +113,6 @@ class LinkSchema * @var string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] public string $description; /** @@ -134,7 +121,6 @@ class LinkSchema * @var string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] public string $image; /** @@ -143,7 +129,6 @@ class LinkSchema * @var string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] public string $video; /** @@ -152,7 +137,6 @@ class LinkSchema * @var bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $rewrite; /** @@ -161,7 +145,6 @@ class LinkSchema * @var bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $doIndex; /** @@ -170,7 +153,6 @@ class LinkSchema * @var string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] public string $ios; /** @@ -179,16 +161,15 @@ class LinkSchema * @var string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] public string $android; /** * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo * - * @var \Dub\Models\Components\Geo $geo + * @var Geo $geo */ #[\JMS\Serializer\Annotation\SerializedName('geo')] - #[\JMS\Serializer\Annotation\Type('Dub\Models\Components\Geo')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\Geo')] public Geo $geo; /** @@ -197,7 +178,6 @@ class LinkSchema * @var bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - #[\JMS\Serializer\Annotation\Type('bool')] public bool $publicStats; /** @@ -207,16 +187,15 @@ class LinkSchema * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tagId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $tagId; /** * The tags assigned to the short link. * - * @var array<\Dub\Models\Components\TagSchema> $tags + * @var array $tags */ #[\JMS\Serializer\Annotation\SerializedName('tags')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array<\Dub\Models\Components\TagSchema>')] public array $tags; /** @@ -225,7 +204,6 @@ class LinkSchema * @var string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] public string $comments; /** @@ -234,7 +212,6 @@ class LinkSchema * @var string $shortLink */ #[\JMS\Serializer\Annotation\SerializedName('shortLink')] - #[\JMS\Serializer\Annotation\Type('string')] public string $shortLink; /** @@ -243,7 +220,6 @@ class LinkSchema * @var string $qrCode */ #[\JMS\Serializer\Annotation\SerializedName('qrCode')] - #[\JMS\Serializer\Annotation\Type('string')] public string $qrCode; /** @@ -252,7 +228,6 @@ class LinkSchema * @var string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] public string $utmSource; /** @@ -261,7 +236,6 @@ class LinkSchema * @var string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] public string $utmMedium; /** @@ -270,7 +244,6 @@ class LinkSchema * @var string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] public string $utmCampaign; /** @@ -279,7 +252,6 @@ class LinkSchema * @var string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] public string $utmTerm; /** @@ -288,7 +260,6 @@ class LinkSchema * @var string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] public string $utmContent; /** @@ -297,7 +268,6 @@ class LinkSchema * @var string $userId */ #[\JMS\Serializer\Annotation\SerializedName('userId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $userId; /** @@ -306,7 +276,6 @@ class LinkSchema * @var string $workspaceId */ #[\JMS\Serializer\Annotation\SerializedName('workspaceId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $workspaceId; /** @@ -315,7 +284,6 @@ class LinkSchema * @var float $clicks */ #[\JMS\Serializer\Annotation\SerializedName('clicks')] - #[\JMS\Serializer\Annotation\Type('float')] public float $clicks; /** @@ -324,7 +292,6 @@ class LinkSchema * @var string $lastClicked */ #[\JMS\Serializer\Annotation\SerializedName('lastClicked')] - #[\JMS\Serializer\Annotation\Type('string')] public string $lastClicked; /** @@ -333,7 +300,6 @@ class LinkSchema * @var float $leads */ #[\JMS\Serializer\Annotation\SerializedName('leads')] - #[\JMS\Serializer\Annotation\Type('float')] public float $leads; /** @@ -342,7 +308,6 @@ class LinkSchema * @var float $sales */ #[\JMS\Serializer\Annotation\SerializedName('sales')] - #[\JMS\Serializer\Annotation\Type('float')] public float $sales; /** @@ -351,7 +316,6 @@ class LinkSchema * @var string $createdAt */ #[\JMS\Serializer\Annotation\SerializedName('createdAt')] - #[\JMS\Serializer\Annotation\Type('string')] public string $createdAt; /** @@ -360,7 +324,6 @@ class LinkSchema * @var string $updatedAt */ #[\JMS\Serializer\Annotation\SerializedName('updatedAt')] - #[\JMS\Serializer\Annotation\Type('string')] public string $updatedAt; /** @@ -370,50 +333,91 @@ class LinkSchema * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('projectId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $projectId; - public function __construct() + /** + * @param ?string $id + * @param ?string $domain + * @param ?string $key + * @param ?string $externalId + * @param ?string $url + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?bool $doIndex + * @param ?string $ios + * @param ?string $android + * @param ?Geo $geo + * @param ?bool $publicStats + * @param ?string $tagId + * @param ?array $tags + * @param ?string $comments + * @param ?string $shortLink + * @param ?string $qrCode + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + * @param ?string $userId + * @param ?string $workspaceId + * @param ?float $clicks + * @param ?string $lastClicked + * @param ?float $leads + * @param ?float $sales + * @param ?string $createdAt + * @param ?string $updatedAt + * @param ?string $projectId + */ + public function __construct(?string $id = null, ?string $domain = null, ?string $key = null, ?string $externalId = null, ?string $url = null, ?bool $trackConversion = null, ?bool $archived = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?bool $doIndex = null, ?string $ios = null, ?string $android = null, ?Geo $geo = null, ?bool $publicStats = null, ?string $tagId = null, ?array $tags = null, ?string $comments = null, ?string $shortLink = null, ?string $qrCode = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null, ?string $userId = null, ?string $workspaceId = null, ?float $clicks = null, ?string $lastClicked = null, ?float $leads = null, ?float $sales = null, ?string $createdAt = null, ?string $updatedAt = null, ?string $projectId = null) { - $this->id = ''; - $this->domain = ''; - $this->key = ''; - $this->externalId = ''; - $this->url = ''; - $this->trackConversion = false; - $this->archived = false; - $this->expiresAt = ''; - $this->expiredUrl = ''; - $this->password = ''; - $this->proxy = false; - $this->title = ''; - $this->description = ''; - $this->image = ''; - $this->video = ''; - $this->rewrite = false; - $this->doIndex = false; - $this->ios = ''; - $this->android = ''; - $this->geo = new \Dub\Models\Components\Geo(); - $this->publicStats = false; - $this->tagId = ''; - $this->tags = []; - $this->comments = ''; - $this->shortLink = ''; - $this->qrCode = ''; - $this->utmSource = ''; - $this->utmMedium = ''; - $this->utmCampaign = ''; - $this->utmTerm = ''; - $this->utmContent = ''; - $this->userId = ''; - $this->workspaceId = ''; - $this->clicks = 0; - $this->lastClicked = ''; - $this->leads = 0; - $this->sales = 0; - $this->createdAt = ''; - $this->updatedAt = ''; - $this->projectId = ''; + $this->id = $id; + $this->domain = $domain; + $this->key = $key; + $this->externalId = $externalId; + $this->url = $url; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->doIndex = $doIndex; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tags = $tags; + $this->comments = $comments; + $this->shortLink = $shortLink; + $this->qrCode = $qrCode; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; + $this->userId = $userId; + $this->workspaceId = $workspaceId; + $this->clicks = $clicks; + $this->lastClicked = $lastClicked; + $this->leads = $leads; + $this->sales = $sales; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->projectId = $projectId; } } \ No newline at end of file diff --git a/src/Models/Components/NotFound.php b/src/Models/Components/NotFound.php deleted file mode 100644 index 1151256..0000000 --- a/src/Models/Components/NotFound.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\NotFoundError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/RateLimitExceeded.php b/src/Models/Components/RateLimitExceeded.php deleted file mode 100644 index 468fcca..0000000 --- a/src/Models/Components/RateLimitExceeded.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\RateLimitExceededError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/SalesBrowsers.php b/src/Models/Components/SalesBrowsers.php new file mode 100644 index 0000000..e1a0086 --- /dev/null +++ b/src/Models/Components/SalesBrowsers.php @@ -0,0 +1,49 @@ +browser = $browser; + $this->sales = $sales; + $this->amount = $amount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesCities.php b/src/Models/Components/SalesCities.php new file mode 100644 index 0000000..86665dd --- /dev/null +++ b/src/Models/Components/SalesCities.php @@ -0,0 +1,60 @@ +city = $city; + $this->country = $country; + $this->sales = $sales; + $this->amount = $amount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesCitiesCountry.php b/src/Models/Components/SalesCitiesCountry.php new file mode 100644 index 0000000..fc46c50 --- /dev/null +++ b/src/Models/Components/SalesCitiesCountry.php @@ -0,0 +1,265 @@ +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 new file mode 100644 index 0000000..bc95b23 --- /dev/null +++ b/src/Models/Components/SalesCountries.php @@ -0,0 +1,50 @@ +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 new file mode 100644 index 0000000..5b67a67 --- /dev/null +++ b/src/Models/Components/SalesCountriesCountry.php @@ -0,0 +1,265 @@ +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 new file mode 100644 index 0000000..8baae35 --- /dev/null +++ b/src/Models/Components/SalesOS.php @@ -0,0 +1,49 @@ +os = $os; + $this->sales = $sales; + $this->amount = $amount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesReferers.php b/src/Models/Components/SalesReferers.php new file mode 100644 index 0000000..1123249 --- /dev/null +++ b/src/Models/Components/SalesReferers.php @@ -0,0 +1,49 @@ +referer = $referer; + $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 new file mode 100644 index 0000000..066ff00 --- /dev/null +++ b/src/Models/Components/SalesTimeseries.php @@ -0,0 +1,49 @@ +start = $start; + $this->sales = $sales; + $this->amount = $amount; + } +} \ No newline at end of file diff --git a/src/Models/Components/SalesTopLinks.php b/src/Models/Components/SalesTopLinks.php new file mode 100644 index 0000000..4c6d16a --- /dev/null +++ b/src/Models/Components/SalesTopLinks.php @@ -0,0 +1,110 @@ +link = $link; + $this->id = $id; + $this->domain = $domain; + $this->key = $key; + $this->shortLink = $shortLink; + $this->url = $url; + $this->createdAt = $createdAt; + $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 new file mode 100644 index 0000000..966690b --- /dev/null +++ b/src/Models/Components/SalesTopUrls.php @@ -0,0 +1,49 @@ +url = $url; + $this->sales = $sales; + $this->amount = $amount; + } +} \ No newline at end of file diff --git a/src/Models/Components/Security.php b/src/Models/Components/Security.php index 4ba2bab..6dfa20a 100644 --- a/src/Models/Components/Security.php +++ b/src/Models/Components/Security.php @@ -11,11 +11,18 @@ use Dub\Utils\SpeakeasyMetadata; class Security { + /** + * + * @var string $token + */ #[SpeakeasyMetadata('security:scheme=true,type=http,subtype=bearer,name=Authorization')] - public ?string $token = null; + public string $token; - public function __construct() + /** + * @param ?string $token + */ + public function __construct(?string $token = null) { - $this->token = null; + $this->token = $token; } } \ No newline at end of file diff --git a/src/Models/Components/TagSchema.php b/src/Models/Components/TagSchema.php index 661f4fb..eeb728e 100644 --- a/src/Models/Components/TagSchema.php +++ b/src/Models/Components/TagSchema.php @@ -17,7 +17,6 @@ class TagSchema * @var string $id */ #[\JMS\Serializer\Annotation\SerializedName('id')] - #[\JMS\Serializer\Annotation\Type('string')] public string $id; /** @@ -26,22 +25,26 @@ class TagSchema * @var string $name */ #[\JMS\Serializer\Annotation\SerializedName('name')] - #[\JMS\Serializer\Annotation\Type('string')] public string $name; /** * The color of the tag. * - * @var \Dub\Models\Components\Color $color + * @var Color $color */ #[\JMS\Serializer\Annotation\SerializedName('color')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\Color')] public Color $color; - public function __construct() + /** + * @param ?string $id + * @param ?string $name + * @param ?Color $color + */ + public function __construct(?string $id = null, ?string $name = null, ?Color $color = null) { - $this->id = ''; - $this->name = ''; - $this->color = \Dub\Models\Components\Color::Red; + $this->id = $id; + $this->name = $name; + $this->color = $color; } } \ No newline at end of file diff --git a/src/Models/Components/Unauthorized.php b/src/Models/Components/Unauthorized.php deleted file mode 100644 index 1bcacaf..0000000 --- a/src/Models/Components/Unauthorized.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\UnauthorizedError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/UnprocessableEntity.php b/src/Models/Components/UnprocessableEntity.php deleted file mode 100644 index e3db387..0000000 --- a/src/Models/Components/UnprocessableEntity.php +++ /dev/null @@ -1,22 +0,0 @@ -error = new \Dub\Models\Components\UnprocessableEntityError(); - } -} \ No newline at end of file diff --git a/src/Models/Components/Users.php b/src/Models/Components/Users.php index c780cba..726b372 100644 --- a/src/Models/Components/Users.php +++ b/src/Models/Components/Users.php @@ -14,14 +14,17 @@ class Users /** * The role of the authenticated user in the workspace. * - * @var \Dub\Models\Components\Role $role + * @var Role $role */ #[\JMS\Serializer\Annotation\SerializedName('role')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\Role')] public Role $role; - public function __construct() + /** + * @param ?Role $role + */ + public function __construct(?Role $role = null) { - $this->role = \Dub\Models\Components\Role::Owner; + $this->role = $role; } } \ No newline at end of file diff --git a/src/Models/Components/WorkspaceSchema.php b/src/Models/Components/WorkspaceSchema.php index d4243d4..56b880b 100644 --- a/src/Models/Components/WorkspaceSchema.php +++ b/src/Models/Components/WorkspaceSchema.php @@ -17,7 +17,6 @@ class WorkspaceSchema * @var string $id */ #[\JMS\Serializer\Annotation\SerializedName('id')] - #[\JMS\Serializer\Annotation\Type('string')] public string $id; /** @@ -26,7 +25,6 @@ class WorkspaceSchema * @var string $name */ #[\JMS\Serializer\Annotation\SerializedName('name')] - #[\JMS\Serializer\Annotation\Type('string')] public string $name; /** @@ -35,7 +33,6 @@ class WorkspaceSchema * @var string $slug */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] public string $slug; /** @@ -44,7 +41,6 @@ class WorkspaceSchema * @var string $logo */ #[\JMS\Serializer\Annotation\SerializedName('logo')] - #[\JMS\Serializer\Annotation\Type('string')] public string $logo; /** @@ -53,7 +49,6 @@ class WorkspaceSchema * @var float $usage */ #[\JMS\Serializer\Annotation\SerializedName('usage')] - #[\JMS\Serializer\Annotation\Type('float')] public float $usage; /** @@ -62,7 +57,6 @@ class WorkspaceSchema * @var float $usageLimit */ #[\JMS\Serializer\Annotation\SerializedName('usageLimit')] - #[\JMS\Serializer\Annotation\Type('float')] public float $usageLimit; /** @@ -71,7 +65,6 @@ class WorkspaceSchema * @var float $linksUsage */ #[\JMS\Serializer\Annotation\SerializedName('linksUsage')] - #[\JMS\Serializer\Annotation\Type('float')] public float $linksUsage; /** @@ -80,7 +73,6 @@ class WorkspaceSchema * @var float $linksLimit */ #[\JMS\Serializer\Annotation\SerializedName('linksLimit')] - #[\JMS\Serializer\Annotation\Type('float')] public float $linksLimit; /** @@ -89,7 +81,6 @@ class WorkspaceSchema * @var float $domainsLimit */ #[\JMS\Serializer\Annotation\SerializedName('domainsLimit')] - #[\JMS\Serializer\Annotation\Type('float')] public float $domainsLimit; /** @@ -98,7 +89,6 @@ class WorkspaceSchema * @var float $tagsLimit */ #[\JMS\Serializer\Annotation\SerializedName('tagsLimit')] - #[\JMS\Serializer\Annotation\Type('float')] public float $tagsLimit; /** @@ -107,16 +97,15 @@ class WorkspaceSchema * @var float $usersLimit */ #[\JMS\Serializer\Annotation\SerializedName('usersLimit')] - #[\JMS\Serializer\Annotation\Type('float')] public float $usersLimit; /** * The plan of the workspace. * - * @var \Dub\Models\Components\Plan $plan + * @var Plan $plan */ #[\JMS\Serializer\Annotation\SerializedName('plan')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Components\Plan')] public Plan $plan; /** @@ -125,7 +114,6 @@ class WorkspaceSchema * @var string $stripeId */ #[\JMS\Serializer\Annotation\SerializedName('stripeId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $stripeId; /** @@ -134,7 +122,6 @@ class WorkspaceSchema * @var float $billingCycleStart */ #[\JMS\Serializer\Annotation\SerializedName('billingCycleStart')] - #[\JMS\Serializer\Annotation\Type('float')] public float $billingCycleStart; /** @@ -143,7 +130,6 @@ class WorkspaceSchema * @var string $stripeConnectId */ #[\JMS\Serializer\Annotation\SerializedName('stripeConnectId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $stripeConnectId; /** @@ -152,25 +138,24 @@ class WorkspaceSchema * @var string $createdAt */ #[\JMS\Serializer\Annotation\SerializedName('createdAt')] - #[\JMS\Serializer\Annotation\Type('string')] public string $createdAt; /** * The role of the authenticated user in the workspace. * - * @var array<\Dub\Models\Components\Users> $users + * @var array $users */ #[\JMS\Serializer\Annotation\SerializedName('users')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array<\Dub\Models\Components\Users>')] public array $users; /** * The domains of the workspace. * - * @var array<\Dub\Models\Components\Domains> $domains + * @var array $domains */ #[\JMS\Serializer\Annotation\SerializedName('domains')] - #[\JMS\Serializer\Annotation\Type('array')] + #[\JMS\Serializer\Annotation\Type('array<\Dub\Models\Components\Domains>')] public array $domains; /** @@ -179,7 +164,6 @@ class WorkspaceSchema * @var string $inviteCode */ #[\JMS\Serializer\Annotation\SerializedName('inviteCode')] - #[\JMS\Serializer\Annotation\Type('string')] public string $inviteCode; /** @@ -192,27 +176,49 @@ class WorkspaceSchema #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $flags = null; - public function __construct() + /** + * @param ?string $id + * @param ?string $name + * @param ?string $slug + * @param ?string $logo + * @param ?float $usage + * @param ?float $usageLimit + * @param ?float $linksUsage + * @param ?float $linksLimit + * @param ?float $domainsLimit + * @param ?float $tagsLimit + * @param ?float $usersLimit + * @param ?Plan $plan + * @param ?string $stripeId + * @param ?float $billingCycleStart + * @param ?string $stripeConnectId + * @param ?string $createdAt + * @param ?array $users + * @param ?array $domains + * @param ?string $inviteCode + * @param ?array $flags + */ + public function __construct(?string $id = null, ?string $name = null, ?string $slug = null, ?string $logo = null, ?float $usage = null, ?float $usageLimit = null, ?float $linksUsage = null, ?float $linksLimit = null, ?float $domainsLimit = null, ?float $tagsLimit = null, ?float $usersLimit = null, ?Plan $plan = null, ?string $stripeId = null, ?float $billingCycleStart = null, ?string $stripeConnectId = null, ?string $createdAt = null, ?array $users = null, ?array $domains = null, ?string $inviteCode = null, ?array $flags = null) { - $this->id = ''; - $this->name = ''; - $this->slug = ''; - $this->logo = ''; - $this->usage = 0; - $this->usageLimit = 0; - $this->linksUsage = 0; - $this->linksLimit = 0; - $this->domainsLimit = 0; - $this->tagsLimit = 0; - $this->usersLimit = 0; - $this->plan = \Dub\Models\Components\Plan::Free; - $this->stripeId = ''; - $this->billingCycleStart = 0; - $this->stripeConnectId = ''; - $this->createdAt = ''; - $this->users = []; - $this->domains = []; - $this->inviteCode = ''; - $this->flags = null; + $this->id = $id; + $this->name = $name; + $this->slug = $slug; + $this->logo = $logo; + $this->usage = $usage; + $this->usageLimit = $usageLimit; + $this->linksUsage = $linksUsage; + $this->linksLimit = $linksLimit; + $this->domainsLimit = $domainsLimit; + $this->tagsLimit = $tagsLimit; + $this->usersLimit = $usersLimit; + $this->plan = $plan; + $this->stripeId = $stripeId; + $this->billingCycleStart = $billingCycleStart; + $this->stripeConnectId = $stripeConnectId; + $this->createdAt = $createdAt; + $this->users = $users; + $this->domains = $domains; + $this->inviteCode = $inviteCode; + $this->flags = $flags; } } \ No newline at end of file diff --git a/src/Models/Errors/BadRequest.php b/src/Models/Errors/BadRequest.php new file mode 100644 index 0000000..d82ee86 --- /dev/null +++ b/src/Models/Errors/BadRequest.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/Code.php b/src/Models/Errors/Code.php similarity index 87% rename from src/Models/Components/Code.php rename to src/Models/Errors/Code.php index b538180..5f74d92 100644 --- a/src/Models/Components/Code.php +++ b/src/Models/Errors/Code.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Errors/Conflict.php b/src/Models/Errors/Conflict.php new file mode 100644 index 0000000..f34e7fa --- /dev/null +++ b/src/Models/Errors/Conflict.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/ConflictCode.php b/src/Models/Errors/ConflictCode.php similarity index 87% rename from src/Models/Components/ConflictCode.php rename to src/Models/Errors/ConflictCode.php index fefbbb9..b8120f2 100644 --- a/src/Models/Components/ConflictCode.php +++ b/src/Models/Errors/ConflictCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/ConflictError.php b/src/Models/Errors/ConflictError.php similarity index 63% rename from src/Models/Components/ConflictError.php rename to src/Models/Errors/ConflictError.php index d4b3a15..c7a9d52 100644 --- a/src/Models/Components/ConflictError.php +++ b/src/Models/Errors/ConflictError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class ConflictError @@ -14,10 +14,10 @@ class ConflictError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\ConflictCode $code + * @var ConflictCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\ConflictCode')] public ConflictCode $code; /** @@ -26,7 +26,6 @@ class ConflictError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class ConflictError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?ConflictCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?ConflictCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\ConflictCode::Conflict; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Components/Error.php b/src/Models/Errors/Error.php similarity index 64% rename from src/Models/Components/Error.php rename to src/Models/Errors/Error.php index 8eee206..6e2d63f 100644 --- a/src/Models/Components/Error.php +++ b/src/Models/Errors/Error.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class Error @@ -14,10 +14,10 @@ class Error /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\Code $code + * @var Code $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\Code')] public Code $code; /** @@ -26,7 +26,6 @@ class Error * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class Error * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?Code $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?Code $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\Code::BadRequest; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/Forbidden.php b/src/Models/Errors/Forbidden.php new file mode 100644 index 0000000..a57a251 --- /dev/null +++ b/src/Models/Errors/Forbidden.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/ForbiddenCode.php b/src/Models/Errors/ForbiddenCode.php similarity index 87% rename from src/Models/Components/ForbiddenCode.php rename to src/Models/Errors/ForbiddenCode.php index 5216060..bed4957 100644 --- a/src/Models/Components/ForbiddenCode.php +++ b/src/Models/Errors/ForbiddenCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/ForbiddenError.php b/src/Models/Errors/ForbiddenError.php similarity index 62% rename from src/Models/Components/ForbiddenError.php rename to src/Models/Errors/ForbiddenError.php index ad07a4e..c5f7528 100644 --- a/src/Models/Components/ForbiddenError.php +++ b/src/Models/Errors/ForbiddenError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class ForbiddenError @@ -14,10 +14,10 @@ class ForbiddenError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\ForbiddenCode $code + * @var ForbiddenCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\ForbiddenCode')] public ForbiddenCode $code; /** @@ -26,7 +26,6 @@ class ForbiddenError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class ForbiddenError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?ForbiddenCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?ForbiddenCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\ForbiddenCode::Forbidden; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/InternalServerError.php b/src/Models/Errors/InternalServerError.php new file mode 100644 index 0000000..b762bf7 --- /dev/null +++ b/src/Models/Errors/InternalServerError.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/InternalServerErrorCode.php b/src/Models/Errors/InternalServerErrorCode.php similarity index 88% rename from src/Models/Components/InternalServerErrorCode.php rename to src/Models/Errors/InternalServerErrorCode.php index 535f0f1..732fab9 100644 --- a/src/Models/Components/InternalServerErrorCode.php +++ b/src/Models/Errors/InternalServerErrorCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/InternalServerErrorError.php b/src/Models/Errors/InternalServerErrorError.php similarity index 61% rename from src/Models/Components/InternalServerErrorError.php rename to src/Models/Errors/InternalServerErrorError.php index 7f8fc84..9b58667 100644 --- a/src/Models/Components/InternalServerErrorError.php +++ b/src/Models/Errors/InternalServerErrorError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class InternalServerErrorError @@ -14,10 +14,10 @@ class InternalServerErrorError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\InternalServerErrorCode $code + * @var InternalServerErrorCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\InternalServerErrorCode')] public InternalServerErrorCode $code; /** @@ -26,7 +26,6 @@ class InternalServerErrorError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class InternalServerErrorError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?InternalServerErrorCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?InternalServerErrorCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\InternalServerErrorCode::InternalServerError; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/InviteExpired.php b/src/Models/Errors/InviteExpired.php new file mode 100644 index 0000000..23744cd --- /dev/null +++ b/src/Models/Errors/InviteExpired.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/InviteExpiredCode.php b/src/Models/Errors/InviteExpiredCode.php similarity index 88% rename from src/Models/Components/InviteExpiredCode.php rename to src/Models/Errors/InviteExpiredCode.php index f055e3f..91545fd 100644 --- a/src/Models/Components/InviteExpiredCode.php +++ b/src/Models/Errors/InviteExpiredCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/InviteExpiredError.php b/src/Models/Errors/InviteExpiredError.php similarity index 62% rename from src/Models/Components/InviteExpiredError.php rename to src/Models/Errors/InviteExpiredError.php index c6b8246..1ef9efa 100644 --- a/src/Models/Components/InviteExpiredError.php +++ b/src/Models/Errors/InviteExpiredError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class InviteExpiredError @@ -14,10 +14,10 @@ class InviteExpiredError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\InviteExpiredCode $code + * @var InviteExpiredCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\InviteExpiredCode')] public InviteExpiredCode $code; /** @@ -26,7 +26,6 @@ class InviteExpiredError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class InviteExpiredError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?InviteExpiredCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?InviteExpiredCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\InviteExpiredCode::InviteExpired; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/NotFound.php b/src/Models/Errors/NotFound.php new file mode 100644 index 0000000..2dbcde2 --- /dev/null +++ b/src/Models/Errors/NotFound.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/NotFoundCode.php b/src/Models/Errors/NotFoundCode.php similarity index 87% rename from src/Models/Components/NotFoundCode.php rename to src/Models/Errors/NotFoundCode.php index abe05ad..3dc7aa5 100644 --- a/src/Models/Components/NotFoundCode.php +++ b/src/Models/Errors/NotFoundCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/NotFoundError.php b/src/Models/Errors/NotFoundError.php similarity index 63% rename from src/Models/Components/NotFoundError.php rename to src/Models/Errors/NotFoundError.php index 8c292c6..eb4c97b 100644 --- a/src/Models/Components/NotFoundError.php +++ b/src/Models/Errors/NotFoundError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class NotFoundError @@ -14,10 +14,10 @@ class NotFoundError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\NotFoundCode $code + * @var NotFoundCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\NotFoundCode')] public NotFoundCode $code; /** @@ -26,7 +26,6 @@ class NotFoundError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class NotFoundError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?NotFoundCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?NotFoundCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\NotFoundCode::NotFound; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/RateLimitExceeded.php b/src/Models/Errors/RateLimitExceeded.php new file mode 100644 index 0000000..aa143f5 --- /dev/null +++ b/src/Models/Errors/RateLimitExceeded.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/RateLimitExceededCode.php b/src/Models/Errors/RateLimitExceededCode.php similarity index 88% rename from src/Models/Components/RateLimitExceededCode.php rename to src/Models/Errors/RateLimitExceededCode.php index 741efc9..b7588c6 100644 --- a/src/Models/Components/RateLimitExceededCode.php +++ b/src/Models/Errors/RateLimitExceededCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/RateLimitExceededError.php b/src/Models/Errors/RateLimitExceededError.php similarity index 61% rename from src/Models/Components/RateLimitExceededError.php rename to src/Models/Errors/RateLimitExceededError.php index 0f29320..e2661f8 100644 --- a/src/Models/Components/RateLimitExceededError.php +++ b/src/Models/Errors/RateLimitExceededError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class RateLimitExceededError @@ -14,10 +14,10 @@ class RateLimitExceededError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\RateLimitExceededCode $code + * @var RateLimitExceededCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\RateLimitExceededCode')] public RateLimitExceededCode $code; /** @@ -26,7 +26,6 @@ class RateLimitExceededError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class RateLimitExceededError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?RateLimitExceededCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?RateLimitExceededCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\RateLimitExceededCode::RateLimitExceeded; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/SDKException.php b/src/Models/Errors/SDKException.php new file mode 100644 index 0000000..5debdab --- /dev/null +++ b/src/Models/Errors/SDKException.php @@ -0,0 +1,32 @@ +message = $message; + $code = $statusCode; + $this->statusCode = $statusCode; + $this->body = $body; + $this->rawResponse = $rawResponse; + parent::__construct($message, $code, null); + } + + public function __toString(): string + { + return "$this->message: Status $this->statusCode $this->body"; + } + +} \ No newline at end of file diff --git a/src/Models/Errors/Unauthorized.php b/src/Models/Errors/Unauthorized.php new file mode 100644 index 0000000..4b194b1 --- /dev/null +++ b/src/Models/Errors/Unauthorized.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/UnauthorizedCode.php b/src/Models/Errors/UnauthorizedCode.php similarity index 88% rename from src/Models/Components/UnauthorizedCode.php rename to src/Models/Errors/UnauthorizedCode.php index 5f3433f..6d5da47 100644 --- a/src/Models/Components/UnauthorizedCode.php +++ b/src/Models/Errors/UnauthorizedCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/UnauthorizedError.php b/src/Models/Errors/UnauthorizedError.php similarity index 62% rename from src/Models/Components/UnauthorizedError.php rename to src/Models/Errors/UnauthorizedError.php index 492dc3b..d0ffea5 100644 --- a/src/Models/Components/UnauthorizedError.php +++ b/src/Models/Errors/UnauthorizedError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class UnauthorizedError @@ -14,10 +14,10 @@ class UnauthorizedError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\UnauthorizedCode $code + * @var UnauthorizedCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\UnauthorizedCode')] public UnauthorizedCode $code; /** @@ -26,7 +26,6 @@ class UnauthorizedError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class UnauthorizedError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?UnauthorizedCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?UnauthorizedCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\UnauthorizedCode::Unauthorized; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Errors/UnprocessableEntity.php b/src/Models/Errors/UnprocessableEntity.php new file mode 100644 index 0000000..b1620c7 --- /dev/null +++ b/src/Models/Errors/UnprocessableEntity.php @@ -0,0 +1,30 @@ +error = $error; + } +} \ No newline at end of file diff --git a/src/Models/Components/UnprocessableEntityCode.php b/src/Models/Errors/UnprocessableEntityCode.php similarity index 88% rename from src/Models/Components/UnprocessableEntityCode.php rename to src/Models/Errors/UnprocessableEntityCode.php index 7c368b4..b517c36 100644 --- a/src/Models/Components/UnprocessableEntityCode.php +++ b/src/Models/Errors/UnprocessableEntityCode.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; /** A short code indicating the error code returned. */ diff --git a/src/Models/Components/UnprocessableEntityError.php b/src/Models/Errors/UnprocessableEntityError.php similarity index 61% rename from src/Models/Components/UnprocessableEntityError.php rename to src/Models/Errors/UnprocessableEntityError.php index 275cf2b..fb0fd0d 100644 --- a/src/Models/Components/UnprocessableEntityError.php +++ b/src/Models/Errors/UnprocessableEntityError.php @@ -6,7 +6,7 @@ declare(strict_types=1); -namespace Dub\Models\Components; +namespace Dub\Models\Errors; class UnprocessableEntityError @@ -14,10 +14,10 @@ class UnprocessableEntityError /** * A short code indicating the error code returned. * - * @var \Dub\Models\Components\UnprocessableEntityCode $code + * @var UnprocessableEntityCode $code */ #[\JMS\Serializer\Annotation\SerializedName('code')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Errors\UnprocessableEntityCode')] public UnprocessableEntityCode $code; /** @@ -26,7 +26,6 @@ class UnprocessableEntityError * @var string $message */ #[\JMS\Serializer\Annotation\SerializedName('message')] - #[\JMS\Serializer\Annotation\Type('string')] public string $message; /** @@ -35,14 +34,18 @@ class UnprocessableEntityError * @var ?string $docUrl */ #[\JMS\Serializer\Annotation\SerializedName('doc_url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $docUrl = null; - public function __construct() + /** + * @param ?UnprocessableEntityCode $code + * @param ?string $message + * @param ?string $docUrl + */ + public function __construct(?UnprocessableEntityCode $code = null, ?string $message = null, ?string $docUrl = null) { - $this->code = \Dub\Models\Components\UnprocessableEntityCode::UnprocessableEntity; - $this->message = ''; - $this->docUrl = null; + $this->code = $code; + $this->message = $message; + $this->docUrl = $docUrl; } } \ No newline at end of file diff --git a/src/Models/Operations/BulkCreateLinksResponse.php b/src/Models/Operations/BulkCreateLinksResponse.php index 4215002..39eed46 100644 --- a/src/Models/Operations/BulkCreateLinksResponse.php +++ b/src/Models/Operations/BulkCreateLinksResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class BulkCreateLinksResponse { /** @@ -28,94 +28,28 @@ class BulkCreateLinksResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The created links * - * @var ?array<\Dub\Models\Components\LinkSchema> $linkSchemas + * @var ?array $linkSchemas */ public ?array $linkSchemas = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $linkSchemas */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $linkSchemas = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchemas = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchemas = $linkSchemas; } } \ No newline at end of file diff --git a/src/Models/Operations/BulkUpdateLinksRequestBody.php b/src/Models/Operations/BulkUpdateLinksRequestBody.php index 40d984c..f4a3980 100644 --- a/src/Models/Operations/BulkUpdateLinksRequestBody.php +++ b/src/Models/Operations/BulkUpdateLinksRequestBody.php @@ -20,13 +20,21 @@ class BulkUpdateLinksRequestBody #[\JMS\Serializer\Annotation\Type('array')] public array $linkIds; + /** + * + * @var Data $data + */ #[\JMS\Serializer\Annotation\SerializedName('data')] - #[\JMS\Serializer\Annotation\Type('Dub\Models\Operations\Data')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Data')] public Data $data; - public function __construct() + /** + * @param ?array $linkIds + * @param ?Data $data + */ + public function __construct(?array $linkIds = null, ?Data $data = null) { - $this->linkIds = []; - $this->data = new \Dub\Models\Operations\Data(); + $this->linkIds = $linkIds; + $this->data = $data; } } \ No newline at end of file diff --git a/src/Models/Operations/BulkUpdateLinksResponse.php b/src/Models/Operations/BulkUpdateLinksResponse.php index bd2b4d2..3217510 100644 --- a/src/Models/Operations/BulkUpdateLinksResponse.php +++ b/src/Models/Operations/BulkUpdateLinksResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class BulkUpdateLinksResponse { /** @@ -28,94 +28,28 @@ class BulkUpdateLinksResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The updated links * - * @var ?array<\Dub\Models\Components\LinkSchema> $linkSchemas + * @var ?array $linkSchemas */ public ?array $linkSchemas = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $linkSchemas */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $linkSchemas = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchemas = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchemas = $linkSchemas; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateDomainRequestBody.php b/src/Models/Operations/CreateDomainRequestBody.php index 65e5fdc..a9affc4 100644 --- a/src/Models/Operations/CreateDomainRequestBody.php +++ b/src/Models/Operations/CreateDomainRequestBody.php @@ -17,7 +17,6 @@ class CreateDomainRequestBody * @var string $slug */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] public string $slug; /** @@ -26,7 +25,6 @@ class CreateDomainRequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -36,7 +34,6 @@ class CreateDomainRequestBody * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -46,15 +43,20 @@ class CreateDomainRequestBody * @var ?string $placeholder */ #[\JMS\Serializer\Annotation\SerializedName('placeholder')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $placeholder = null; - public function __construct() + /** + * @param ?string $slug + * @param ?string $expiredUrl + * @param ?bool $archived + * @param ?string $placeholder + */ + public function __construct(?string $slug = null, ?string $expiredUrl = null, ?bool $archived = null, ?string $placeholder = null) { - $this->slug = ''; - $this->expiredUrl = null; - $this->archived = null; - $this->placeholder = null; + $this->slug = $slug; + $this->expiredUrl = $expiredUrl; + $this->archived = $archived; + $this->placeholder = $placeholder; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateDomainResponse.php b/src/Models/Operations/CreateDomainResponse.php index d881353..236ddc0 100644 --- a/src/Models/Operations/CreateDomainResponse.php +++ b/src/Models/Operations/CreateDomainResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class CreateDomainResponse { /** @@ -28,94 +28,28 @@ class CreateDomainResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The domain was created. * - * @var ?\Dub\Models\Components\DomainSchema $domainSchema - */ - public ?\Dub\Models\Components\DomainSchema $domainSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\DomainSchema $domainSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\DomainSchema $domainSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\DomainSchema $domainSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\DomainSchema $domainSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->domainSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->domainSchema = $domainSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateLinkRequestBody.php b/src/Models/Operations/CreateLinkRequestBody.php index dc22840..416a8e3 100644 --- a/src/Models/Operations/CreateLinkRequestBody.php +++ b/src/Models/Operations/CreateLinkRequestBody.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class CreateLinkRequestBody { /** @@ -17,7 +17,6 @@ class CreateLinkRequestBody * @var string $url */ #[\JMS\Serializer\Annotation\SerializedName('url')] - #[\JMS\Serializer\Annotation\Type('string')] public string $url; /** @@ -26,7 +25,6 @@ class CreateLinkRequestBody * @var ?string $domain */ #[\JMS\Serializer\Annotation\SerializedName('domain')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $domain = null; @@ -36,7 +34,6 @@ class CreateLinkRequestBody * @var ?string $key */ #[\JMS\Serializer\Annotation\SerializedName('key')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $key = null; @@ -46,7 +43,6 @@ class CreateLinkRequestBody * @var ?string $externalId */ #[\JMS\Serializer\Annotation\SerializedName('externalId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $externalId = null; @@ -56,7 +52,6 @@ class CreateLinkRequestBody * @var ?string $prefix */ #[\JMS\Serializer\Annotation\SerializedName('prefix')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $prefix = null; @@ -66,7 +61,6 @@ class CreateLinkRequestBody * @var ?bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $trackConversion = null; @@ -76,7 +70,6 @@ class CreateLinkRequestBody * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -86,7 +79,6 @@ class CreateLinkRequestBody * @var ?bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $publicStats = null; @@ -97,29 +89,28 @@ class CreateLinkRequestBody * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tagId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tagId = null; /** * The unique IDs of the tags assigned to the short link. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The comments for the short link. @@ -127,7 +118,6 @@ class CreateLinkRequestBody * @var ?string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $comments = null; @@ -137,7 +127,6 @@ class CreateLinkRequestBody * @var ?string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiresAt = null; @@ -147,7 +136,6 @@ class CreateLinkRequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -157,7 +145,6 @@ class CreateLinkRequestBody * @var ?string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $password = null; @@ -167,7 +154,6 @@ class CreateLinkRequestBody * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $proxy = null; @@ -177,7 +163,6 @@ class CreateLinkRequestBody * @var ?string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $title = null; @@ -187,7 +172,6 @@ class CreateLinkRequestBody * @var ?string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $description = null; @@ -197,7 +181,6 @@ class CreateLinkRequestBody * @var ?string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $image = null; @@ -207,7 +190,6 @@ class CreateLinkRequestBody * @var ?string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $video = null; @@ -217,7 +199,6 @@ class CreateLinkRequestBody * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $rewrite = null; @@ -227,7 +208,6 @@ class CreateLinkRequestBody * @var ?string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ios = null; @@ -237,19 +217,18 @@ class CreateLinkRequestBody * @var ?string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $android = null; /** * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * - * @var ?\Dub\Models\Components\LinkGeoTargeting $geo + * @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')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?\Dub\Models\Components\LinkGeoTargeting $geo = null; + public ?Components\LinkGeoTargeting $geo = null; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex @@ -257,7 +236,6 @@ class CreateLinkRequestBody * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $doIndex = null; @@ -267,7 +245,6 @@ class CreateLinkRequestBody * @var ?string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmSource = null; @@ -277,7 +254,6 @@ class CreateLinkRequestBody * @var ?string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmMedium = null; @@ -287,7 +263,6 @@ class CreateLinkRequestBody * @var ?string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmCampaign = null; @@ -297,7 +272,6 @@ class CreateLinkRequestBody * @var ?string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmTerm = null; @@ -307,41 +281,72 @@ class CreateLinkRequestBody * @var ?string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmContent = null; - public function __construct() + /** + * @param ?string $url + * @param ?string $domain + * @param ?string $key + * @param ?string $externalId + * @param ?string $prefix + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?bool $publicStats + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $comments + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?string $ios + * @param ?string $android + * @param ?Components\LinkGeoTargeting $geo + * @param ?bool $doIndex + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + */ + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $externalId = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?bool $doIndex = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null) { - $this->url = ''; - $this->domain = null; - $this->key = null; - $this->externalId = null; - $this->prefix = null; - $this->trackConversion = null; - $this->archived = null; - $this->publicStats = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->comments = null; - $this->expiresAt = null; - $this->expiredUrl = null; - $this->password = null; - $this->proxy = null; - $this->title = null; - $this->description = null; - $this->image = null; - $this->video = null; - $this->rewrite = null; - $this->ios = null; - $this->android = null; - $this->geo = null; - $this->doIndex = null; - $this->utmSource = null; - $this->utmMedium = null; - $this->utmCampaign = null; - $this->utmTerm = null; - $this->utmContent = null; + $this->url = $url; + $this->domain = $domain; + $this->key = $key; + $this->externalId = $externalId; + $this->prefix = $prefix; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->comments = $comments; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->doIndex = $doIndex; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateLinkResponse.php b/src/Models/Operations/CreateLinkResponse.php index d0a06c8..b727213 100644 --- a/src/Models/Operations/CreateLinkResponse.php +++ b/src/Models/Operations/CreateLinkResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class CreateLinkResponse { /** @@ -28,94 +28,28 @@ class CreateLinkResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The created link * - * @var ?\Dub\Models\Components\LinkSchema $linkSchema - */ - public ?\Dub\Models\Components\LinkSchema $linkSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\LinkSchema $linkSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\LinkSchema $linkSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchema = $linkSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateTagRequestBody.php b/src/Models/Operations/CreateTagRequestBody.php index 28ccbea..a0a288c 100644 --- a/src/Models/Operations/CreateTagRequestBody.php +++ b/src/Models/Operations/CreateTagRequestBody.php @@ -17,17 +17,16 @@ class CreateTagRequestBody * @var ?string $name */ #[\JMS\Serializer\Annotation\SerializedName('name')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $name = null; /** * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. * - * @var ?\Dub\Models\Operations\Color $color + * @var ?Color $color */ #[\JMS\Serializer\Annotation\SerializedName('color')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\Color')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?Color $color = null; @@ -38,14 +37,18 @@ class CreateTagRequestBody * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tag')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tag = null; - public function __construct() + /** + * @param ?string $name + * @param ?Color $color + * @param ?string $tag + */ + public function __construct(?string $name = null, ?Color $color = null, ?string $tag = null) { - $this->name = null; - $this->color = null; - $this->tag = null; + $this->name = $name; + $this->color = $color; + $this->tag = $tag; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateTagResponse.php b/src/Models/Operations/CreateTagResponse.php index 530d1f4..503f9ad 100644 --- a/src/Models/Operations/CreateTagResponse.php +++ b/src/Models/Operations/CreateTagResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class CreateTagResponse { /** @@ -28,94 +28,28 @@ class CreateTagResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The created tag * - * @var ?\Dub\Models\Components\TagSchema $tagSchema - */ - public ?\Dub\Models\Components\TagSchema $tagSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\TagSchema $tagSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\TagSchema $tagSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\TagSchema $tagSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\TagSchema $tagSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->tagSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->tagSchema = $tagSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/Data.php b/src/Models/Operations/Data.php index a503729..55cf87f 100644 --- a/src/Models/Operations/Data.php +++ b/src/Models/Operations/Data.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class Data { /** @@ -17,7 +17,6 @@ class Data * @var ?string $url */ #[\JMS\Serializer\Annotation\SerializedName('url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $url = null; @@ -27,7 +26,6 @@ class Data * @var ?bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $trackConversion = null; @@ -37,7 +35,6 @@ class Data * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -47,7 +44,6 @@ class Data * @var ?bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $publicStats = null; @@ -58,29 +54,28 @@ class Data * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tagId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tagId = null; /** * The unique IDs of the tags assigned to the short link. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The comments for the short link. @@ -88,7 +83,6 @@ class Data * @var ?string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $comments = null; @@ -98,7 +92,6 @@ class Data * @var ?string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiresAt = null; @@ -108,7 +101,6 @@ class Data * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -118,7 +110,6 @@ class Data * @var ?string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $password = null; @@ -128,7 +119,6 @@ class Data * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $proxy = null; @@ -138,7 +128,6 @@ class Data * @var ?string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $title = null; @@ -148,7 +137,6 @@ class Data * @var ?string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $description = null; @@ -158,7 +146,6 @@ class Data * @var ?string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $image = null; @@ -168,7 +155,6 @@ class Data * @var ?string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $video = null; @@ -178,7 +164,6 @@ class Data * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $rewrite = null; @@ -188,7 +173,6 @@ class Data * @var ?string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ios = null; @@ -198,19 +182,18 @@ class Data * @var ?string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $android = null; /** * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * - * @var ?\Dub\Models\Components\LinkGeoTargeting $geo + * @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')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?\Dub\Models\Components\LinkGeoTargeting $geo = null; + public ?Components\LinkGeoTargeting $geo = null; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex @@ -218,7 +201,6 @@ class Data * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $doIndex = null; @@ -228,7 +210,6 @@ class Data * @var ?string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmSource = null; @@ -238,7 +219,6 @@ class Data * @var ?string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmMedium = null; @@ -248,7 +228,6 @@ class Data * @var ?string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmCampaign = null; @@ -258,7 +237,6 @@ class Data * @var ?string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmTerm = null; @@ -268,37 +246,64 @@ class Data * @var ?string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmContent = null; - public function __construct() + /** + * @param ?string $url + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?bool $publicStats + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $comments + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?string $ios + * @param ?string $android + * @param ?Components\LinkGeoTargeting $geo + * @param ?bool $doIndex + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + */ + public function __construct(?string $url = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?bool $doIndex = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null) { - $this->url = null; - $this->trackConversion = null; - $this->archived = null; - $this->publicStats = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->comments = null; - $this->expiresAt = null; - $this->expiredUrl = null; - $this->password = null; - $this->proxy = null; - $this->title = null; - $this->description = null; - $this->image = null; - $this->video = null; - $this->rewrite = null; - $this->ios = null; - $this->android = null; - $this->geo = null; - $this->doIndex = null; - $this->utmSource = null; - $this->utmMedium = null; - $this->utmCampaign = null; - $this->utmTerm = null; - $this->utmContent = null; + $this->url = $url; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->comments = $comments; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->doIndex = $doIndex; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteDomainRequest.php b/src/Models/Operations/DeleteDomainRequest.php index 7a6fbf4..be3be5e 100644 --- a/src/Models/Operations/DeleteDomainRequest.php +++ b/src/Models/Operations/DeleteDomainRequest.php @@ -19,8 +19,11 @@ class DeleteDomainRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=slug')] public string $slug; - public function __construct() + /** + * @param ?string $slug + */ + public function __construct(?string $slug = null) { - $this->slug = ''; + $this->slug = $slug; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteDomainResponse.php b/src/Models/Operations/DeleteDomainResponse.php index 801c535..c507e43 100644 --- a/src/Models/Operations/DeleteDomainResponse.php +++ b/src/Models/Operations/DeleteDomainResponse.php @@ -28,94 +28,28 @@ class DeleteDomainResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The domain was deleted. * - * @var ?\Dub\Models\Operations\DeleteDomainResponseBody $object + * @var ?DeleteDomainResponseBody $object */ public ?DeleteDomainResponseBody $object = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?DeleteDomainResponseBody $object */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?DeleteDomainResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteDomainResponseBody.php b/src/Models/Operations/DeleteDomainResponseBody.php index 1b091b4..36f7d39 100644 --- a/src/Models/Operations/DeleteDomainResponseBody.php +++ b/src/Models/Operations/DeleteDomainResponseBody.php @@ -18,11 +18,13 @@ class DeleteDomainResponseBody * @var string $slug */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] public string $slug; - public function __construct() + /** + * @param ?string $slug + */ + public function __construct(?string $slug = null) { - $this->slug = ''; + $this->slug = $slug; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteLinkRequest.php b/src/Models/Operations/DeleteLinkRequest.php index b89ef4c..069a58a 100644 --- a/src/Models/Operations/DeleteLinkRequest.php +++ b/src/Models/Operations/DeleteLinkRequest.php @@ -19,8 +19,11 @@ class DeleteLinkRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=linkId')] public string $linkId; - public function __construct() + /** + * @param ?string $linkId + */ + public function __construct(?string $linkId = null) { - $this->linkId = ''; + $this->linkId = $linkId; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteLinkResponse.php b/src/Models/Operations/DeleteLinkResponse.php index 06511bf..389bf27 100644 --- a/src/Models/Operations/DeleteLinkResponse.php +++ b/src/Models/Operations/DeleteLinkResponse.php @@ -28,94 +28,28 @@ class DeleteLinkResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The deleted link * - * @var ?\Dub\Models\Operations\DeleteLinkResponseBody $object + * @var ?DeleteLinkResponseBody $object */ public ?DeleteLinkResponseBody $object = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?DeleteLinkResponseBody $object */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?DeleteLinkResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/DeleteLinkResponseBody.php b/src/Models/Operations/DeleteLinkResponseBody.php index a61faa0..6364e01 100644 --- a/src/Models/Operations/DeleteLinkResponseBody.php +++ b/src/Models/Operations/DeleteLinkResponseBody.php @@ -18,11 +18,13 @@ class DeleteLinkResponseBody * @var string $id */ #[\JMS\Serializer\Annotation\SerializedName('id')] - #[\JMS\Serializer\Annotation\Type('string')] public string $id; - public function __construct() + /** + * @param ?string $id + */ + public function __construct(?string $id = null) { - $this->id = ''; + $this->id = $id; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinkInfoRequest.php b/src/Models/Operations/GetLinkInfoRequest.php index ffb0de1..99c5b0b 100644 --- a/src/Models/Operations/GetLinkInfoRequest.php +++ b/src/Models/Operations/GetLinkInfoRequest.php @@ -11,6 +11,10 @@ use Dub\Utils\SpeakeasyMetadata; class GetLinkInfoRequest { + /** + * + * @var ?string $domain + */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=domain')] public ?string $domain = null; @@ -38,11 +42,17 @@ class GetLinkInfoRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=externalId')] public ?string $externalId = null; - public function __construct() + /** + * @param ?string $domain + * @param ?string $key + * @param ?string $linkId + * @param ?string $externalId + */ + public function __construct(?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null) { - $this->domain = null; - $this->key = null; - $this->linkId = null; - $this->externalId = null; + $this->domain = $domain; + $this->key = $key; + $this->linkId = $linkId; + $this->externalId = $externalId; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinkInfoResponse.php b/src/Models/Operations/GetLinkInfoResponse.php index ffb97cd..6184ff6 100644 --- a/src/Models/Operations/GetLinkInfoResponse.php +++ b/src/Models/Operations/GetLinkInfoResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class GetLinkInfoResponse { /** @@ -28,94 +28,28 @@ class GetLinkInfoResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The retrieved link * - * @var ?\Dub\Models\Components\LinkSchema $linkSchema - */ - public ?\Dub\Models\Components\LinkSchema $linkSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\LinkSchema $linkSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\LinkSchema $linkSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchema = $linkSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinksCountRequest.php b/src/Models/Operations/GetLinksCountRequest.php index 2b5d9bf..351e5bb 100644 --- a/src/Models/Operations/GetLinksCountRequest.php +++ b/src/Models/Operations/GetLinksCountRequest.php @@ -30,18 +30,18 @@ class GetLinksCountRequest /** * The tag IDs to filter the links by. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagIds')] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagNames')] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. @@ -78,21 +78,32 @@ class GetLinksCountRequest /** * The field to group the links by. * - * @var mixed $groupBy + * @var One|Two|Three|null $groupBy */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=groupBy')] - public mixed $groupBy = null; + public One|Two|Three|null $groupBy = null; - public function __construct() + /** + * @param ?string $domain + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $search + * @param ?string $userId + * @param ?bool $showArchived + * @param ?bool $withTags + * @param One|Two|Three|null $groupBy + */ + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?bool $showArchived = null, ?bool $withTags = null, One|Two|Three|null $groupBy = null) { - $this->domain = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->search = null; - $this->userId = null; - $this->showArchived = null; - $this->withTags = null; - $this->groupBy = null; + $this->domain = $domain; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->search = $search; + $this->userId = $userId; + $this->showArchived = $showArchived; + $this->withTags = $withTags; + $this->groupBy = $groupBy; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinksCountResponse.php b/src/Models/Operations/GetLinksCountResponse.php index 8e9cc14..d3e6401 100644 --- a/src/Models/Operations/GetLinksCountResponse.php +++ b/src/Models/Operations/GetLinksCountResponse.php @@ -28,9 +28,9 @@ class GetLinksCountResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A list of links @@ -40,82 +40,16 @@ class GetLinksCountResponse public ?float $number = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?float $number */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?float $number = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->number = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->number = $number; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinksRequest.php b/src/Models/Operations/GetLinksRequest.php index fe65d69..a0829ba 100644 --- a/src/Models/Operations/GetLinksRequest.php +++ b/src/Models/Operations/GetLinksRequest.php @@ -30,18 +30,18 @@ class GetLinksRequest /** * The tag IDs to filter the links by. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagIds')] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=tagNames')] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The search term to filter the links by. The search term will be matched against the short link slug and the destination url. @@ -78,7 +78,7 @@ class GetLinksRequest /** * The field to sort the links by. The default is `createdAt`, and sort order is always descending. * - * @var ?\Dub\Models\Operations\Sort $sort + * @var ?Sort $sort */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=sort')] public ?Sort $sort = null; @@ -99,18 +99,31 @@ class GetLinksRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=pageSize')] public ?float $pageSize = null; - public function __construct() + /** + * @param ?string $domain + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $search + * @param ?string $userId + * @param ?bool $showArchived + * @param ?bool $withTags + * @param ?Sort $sort + * @param ?float $page + * @param ?float $pageSize + */ + public function __construct(?string $domain = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $search = null, ?string $userId = null, ?bool $showArchived = null, ?bool $withTags = null, ?Sort $sort = null, ?float $page = null, ?float $pageSize = null) { - $this->domain = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->search = null; - $this->userId = null; - $this->showArchived = null; - $this->withTags = null; - $this->sort = null; - $this->page = null; - $this->pageSize = null; + $this->domain = $domain; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->search = $search; + $this->userId = $userId; + $this->showArchived = $showArchived; + $this->withTags = $withTags; + $this->sort = $sort; + $this->page = $page; + $this->pageSize = $pageSize; } } \ No newline at end of file diff --git a/src/Models/Operations/GetLinksResponse.php b/src/Models/Operations/GetLinksResponse.php index 177f131..c193a3b 100644 --- a/src/Models/Operations/GetLinksResponse.php +++ b/src/Models/Operations/GetLinksResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class GetLinksResponse { /** @@ -28,94 +28,28 @@ class GetLinksResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A list of links * - * @var ?array<\Dub\Models\Components\LinkSchema> $linkSchemas + * @var ?array $linkSchemas */ public ?array $linkSchemas = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $linkSchemas */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $linkSchemas = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchemas = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchemas = $linkSchemas; } } \ No newline at end of file diff --git a/src/Models/Operations/GetMetatagsRequest.php b/src/Models/Operations/GetMetatagsRequest.php index c21fd31..ada45eb 100644 --- a/src/Models/Operations/GetMetatagsRequest.php +++ b/src/Models/Operations/GetMetatagsRequest.php @@ -19,8 +19,11 @@ class GetMetatagsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=url')] public string $url; - public function __construct() + /** + * @param ?string $url + */ + public function __construct(?string $url = null) { - $this->url = ''; + $this->url = $url; } } \ No newline at end of file diff --git a/src/Models/Operations/GetMetatagsResponse.php b/src/Models/Operations/GetMetatagsResponse.php index bca6e3d..80cf685 100644 --- a/src/Models/Operations/GetMetatagsResponse.php +++ b/src/Models/Operations/GetMetatagsResponse.php @@ -28,22 +28,28 @@ class GetMetatagsResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The retrieved metatags * - * @var ?\Dub\Models\Operations\GetMetatagsResponseBody $object + * @var ?GetMetatagsResponseBody $object */ public ?GetMetatagsResponseBody $object = null; - public function __construct() + /** + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?GetMetatagsResponseBody $object + */ + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?GetMetatagsResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/GetMetatagsResponseBody.php b/src/Models/Operations/GetMetatagsResponseBody.php index a0f340a..ea89232 100644 --- a/src/Models/Operations/GetMetatagsResponseBody.php +++ b/src/Models/Operations/GetMetatagsResponseBody.php @@ -18,7 +18,6 @@ class GetMetatagsResponseBody * @var string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] public string $title; /** @@ -27,7 +26,6 @@ class GetMetatagsResponseBody * @var string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] public string $description; /** @@ -36,13 +34,17 @@ class GetMetatagsResponseBody * @var string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] public string $image; - public function __construct() + /** + * @param ?string $title + * @param ?string $description + * @param ?string $image + */ + public function __construct(?string $title = null, ?string $description = null, ?string $image = null) { - $this->title = ''; - $this->description = ''; - $this->image = ''; + $this->title = $title; + $this->description = $description; + $this->image = $image; } } \ No newline at end of file diff --git a/src/Models/Operations/GetQRCodeRequest.php b/src/Models/Operations/GetQRCodeRequest.php index 83d1038..27e5207 100644 --- a/src/Models/Operations/GetQRCodeRequest.php +++ b/src/Models/Operations/GetQRCodeRequest.php @@ -30,7 +30,7 @@ class GetQRCodeRequest /** * The level of error correction to use for the QR code. Defaults to `L` if not provided. * - * @var ?\Dub\Models\Operations\Level $level + * @var ?Level $level */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=level')] public ?Level $level = null; @@ -59,13 +59,21 @@ class GetQRCodeRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=includeMargin')] public ?bool $includeMargin = null; - public function __construct() + /** + * @param ?string $url + * @param ?float $size + * @param ?Level $level + * @param ?string $fgColor + * @param ?string $bgColor + * @param ?bool $includeMargin + */ + public function __construct(?string $url = null, ?float $size = null, ?Level $level = null, ?string $fgColor = null, ?string $bgColor = null, ?bool $includeMargin = null) { - $this->url = ''; - $this->size = null; - $this->level = null; - $this->fgColor = null; - $this->bgColor = null; - $this->includeMargin = null; + $this->url = $url; + $this->size = $size; + $this->level = $level; + $this->fgColor = $fgColor; + $this->bgColor = $bgColor; + $this->includeMargin = $includeMargin; } } \ No newline at end of file diff --git a/src/Models/Operations/GetQRCodeResponse.php b/src/Models/Operations/GetQRCodeResponse.php index 4fabfd4..afd5135 100644 --- a/src/Models/Operations/GetQRCodeResponse.php +++ b/src/Models/Operations/GetQRCodeResponse.php @@ -28,9 +28,9 @@ class GetQRCodeResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The QR code @@ -40,82 +40,16 @@ class GetQRCodeResponse public ?string $res = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?string $res */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?string $res = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->res = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->res = $res; } } \ No newline at end of file diff --git a/src/Models/Operations/GetTagsResponse.php b/src/Models/Operations/GetTagsResponse.php index f141c9c..ec1b7cb 100644 --- a/src/Models/Operations/GetTagsResponse.php +++ b/src/Models/Operations/GetTagsResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class GetTagsResponse { /** @@ -28,94 +28,28 @@ class GetTagsResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A list of tags * - * @var ?array<\Dub\Models\Components\TagSchema> $tagSchemas + * @var ?array $tagSchemas */ public ?array $tagSchemas = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $tagSchemas */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $tagSchemas = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->tagSchemas = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->tagSchemas = $tagSchemas; } } \ No newline at end of file diff --git a/src/Models/Operations/GetWorkspaceRequest.php b/src/Models/Operations/GetWorkspaceRequest.php index 29c7f6a..1754971 100644 --- a/src/Models/Operations/GetWorkspaceRequest.php +++ b/src/Models/Operations/GetWorkspaceRequest.php @@ -19,8 +19,11 @@ class GetWorkspaceRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=idOrSlug')] public string $idOrSlug; - public function __construct() + /** + * @param ?string $idOrSlug + */ + public function __construct(?string $idOrSlug = null) { - $this->idOrSlug = ''; + $this->idOrSlug = $idOrSlug; } } \ No newline at end of file diff --git a/src/Models/Operations/GetWorkspaceResponse.php b/src/Models/Operations/GetWorkspaceResponse.php index e2c60b7..f62aa31 100644 --- a/src/Models/Operations/GetWorkspaceResponse.php +++ b/src/Models/Operations/GetWorkspaceResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class GetWorkspaceResponse { /** @@ -28,94 +28,28 @@ class GetWorkspaceResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The retrieved workspace * - * @var ?\Dub\Models\Components\WorkspaceSchema $workspaceSchema - */ - public ?\Dub\Models\Components\WorkspaceSchema $workspaceSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\WorkspaceSchema $workspaceSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\WorkspaceSchema $workspaceSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\WorkspaceSchema $workspaceSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\WorkspaceSchema $workspaceSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->workspaceSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->workspaceSchema = $workspaceSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/ListDomainsRequest.php b/src/Models/Operations/ListDomainsRequest.php index 45e8817..a83773e 100644 --- a/src/Models/Operations/ListDomainsRequest.php +++ b/src/Models/Operations/ListDomainsRequest.php @@ -43,11 +43,17 @@ class ListDomainsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=pageSize')] public ?float $pageSize = null; - public function __construct() + /** + * @param ?bool $archived + * @param ?string $search + * @param ?float $page + * @param ?float $pageSize + */ + public function __construct(?bool $archived = null, ?string $search = null, ?float $page = null, ?float $pageSize = null) { - $this->archived = null; - $this->search = null; - $this->page = null; - $this->pageSize = null; + $this->archived = $archived; + $this->search = $search; + $this->page = $page; + $this->pageSize = $pageSize; } } \ No newline at end of file diff --git a/src/Models/Operations/ListDomainsResponse.php b/src/Models/Operations/ListDomainsResponse.php index 83421d7..8dd2190 100644 --- a/src/Models/Operations/ListDomainsResponse.php +++ b/src/Models/Operations/ListDomainsResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class ListDomainsResponse { /** @@ -28,94 +28,28 @@ class ListDomainsResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The domains were retrieved. * - * @var ?array<\Dub\Models\Components\DomainSchema> $domainSchemas + * @var ?array $domainSchemas */ public ?array $domainSchemas = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $domainSchemas */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $domainSchemas = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->domainSchemas = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->domainSchemas = $domainSchemas; } } \ No newline at end of file diff --git a/src/Models/Operations/ListEventsRequest.php b/src/Models/Operations/ListEventsRequest.php new file mode 100644 index 0000000..ff24446 --- /dev/null +++ b/src/Models/Operations/ListEventsRequest.php @@ -0,0 +1,256 @@ +event = $event; + $this->domain = $domain; + $this->key = $key; + $this->linkId = $linkId; + $this->externalId = $externalId; + $this->interval = $interval; + $this->start = $start; + $this->end = $end; + $this->timezone = $timezone; + $this->continent = $continent; + $this->country = $country; + $this->city = $city; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->referer = $referer; + $this->url = $url; + $this->tagId = $tagId; + $this->qr = $qr; + $this->root = $root; + $this->page = $page; + $this->limit = $limit; + $this->order = $order; + $this->sortBy = $sortBy; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListEventsResponse.php b/src/Models/Operations/ListEventsResponse.php new file mode 100644 index 0000000..1fa9142 --- /dev/null +++ b/src/Models/Operations/ListEventsResponse.php @@ -0,0 +1,55 @@ + $clickEvents + */ + public ?array $clickEvents = null; + + /** + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $clickEvents + */ + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?array $clickEvents = null) + { + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->clickEvents = $clickEvents; + } +} \ No newline at end of file diff --git a/src/Models/Operations/One.php b/src/Models/Operations/One.php new file mode 100644 index 0000000..17b4971 --- /dev/null +++ b/src/Models/Operations/One.php @@ -0,0 +1,15 @@ +|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The comments for the short link. @@ -127,7 +118,6 @@ class RequestBody * @var ?string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $comments = null; @@ -137,7 +127,6 @@ class RequestBody * @var ?string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiresAt = null; @@ -147,7 +136,6 @@ class RequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -157,7 +145,6 @@ class RequestBody * @var ?string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $password = null; @@ -167,7 +154,6 @@ class RequestBody * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $proxy = null; @@ -177,7 +163,6 @@ class RequestBody * @var ?string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $title = null; @@ -187,7 +172,6 @@ class RequestBody * @var ?string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $description = null; @@ -197,7 +181,6 @@ class RequestBody * @var ?string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $image = null; @@ -207,7 +190,6 @@ class RequestBody * @var ?string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $video = null; @@ -217,7 +199,6 @@ class RequestBody * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $rewrite = null; @@ -227,7 +208,6 @@ class RequestBody * @var ?string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ios = null; @@ -237,19 +217,18 @@ class RequestBody * @var ?string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $android = null; /** * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * - * @var ?\Dub\Models\Components\LinkGeoTargeting $geo + * @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')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?\Dub\Models\Components\LinkGeoTargeting $geo = null; + public ?Components\LinkGeoTargeting $geo = null; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex @@ -257,7 +236,6 @@ class RequestBody * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $doIndex = null; @@ -267,7 +245,6 @@ class RequestBody * @var ?string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmSource = null; @@ -277,7 +254,6 @@ class RequestBody * @var ?string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmMedium = null; @@ -287,7 +263,6 @@ class RequestBody * @var ?string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmCampaign = null; @@ -297,7 +272,6 @@ class RequestBody * @var ?string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmTerm = null; @@ -307,41 +281,72 @@ class RequestBody * @var ?string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmContent = null; - public function __construct() + /** + * @param ?string $url + * @param ?string $domain + * @param ?string $key + * @param ?string $externalId + * @param ?string $prefix + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?bool $publicStats + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $comments + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?string $ios + * @param ?string $android + * @param ?Components\LinkGeoTargeting $geo + * @param ?bool $doIndex + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + */ + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $externalId = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?bool $doIndex = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null) { - $this->url = ''; - $this->domain = null; - $this->key = null; - $this->externalId = null; - $this->prefix = null; - $this->trackConversion = null; - $this->archived = null; - $this->publicStats = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->comments = null; - $this->expiresAt = null; - $this->expiredUrl = null; - $this->password = null; - $this->proxy = null; - $this->title = null; - $this->description = null; - $this->image = null; - $this->video = null; - $this->rewrite = null; - $this->ios = null; - $this->android = null; - $this->geo = null; - $this->doIndex = null; - $this->utmSource = null; - $this->utmMedium = null; - $this->utmCampaign = null; - $this->utmTerm = null; - $this->utmContent = null; + $this->url = $url; + $this->domain = $domain; + $this->key = $key; + $this->externalId = $externalId; + $this->prefix = $prefix; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->comments = $comments; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->doIndex = $doIndex; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; } } \ No newline at end of file diff --git a/src/Models/Operations/RetrieveAnalyticsRequest.php b/src/Models/Operations/RetrieveAnalyticsRequest.php index b58dc7d..87fe488 100644 --- a/src/Models/Operations/RetrieveAnalyticsRequest.php +++ b/src/Models/Operations/RetrieveAnalyticsRequest.php @@ -8,13 +8,14 @@ namespace Dub\Models\Operations; +use Dub\Models\Components; use Dub\Utils\SpeakeasyMetadata; class RetrieveAnalyticsRequest { /** * The type of event to retrieve analytics for. Defaults to 'clicks'. * - * @var ?\Dub\Models\Operations\Event $event + * @var ?Event $event */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=event')] public ?Event $event = null; @@ -22,10 +23,10 @@ class RetrieveAnalyticsRequest /** * The parameter to group the analytics data points by. Defaults to 'count' if undefined. * - * @var ?\Dub\Models\Operations\GroupBy $groupBy + * @var ?QueryParamGroupBy $groupBy */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=groupBy')] - public ?GroupBy $groupBy = null; + public ?QueryParamGroupBy $groupBy = null; /** * The domain to filter analytics for. @@ -62,7 +63,7 @@ class RetrieveAnalyticsRequest /** * The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h. * - * @var ?\Dub\Models\Operations\Interval $interval + * @var ?Interval $interval */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=interval')] public ?Interval $interval = null; @@ -94,18 +95,18 @@ class RetrieveAnalyticsRequest /** * The continent to retrieve analytics for. * - * @var ?\Dub\Models\Components\ContinentCode $continent + * @var ?Components\ContinentCode $continent */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=continent')] - public ?\Dub\Models\Components\ContinentCode $continent = null; + public ?Components\ContinentCode $continent = null; /** * The country to retrieve analytics for. * - * @var ?\Dub\Models\Components\CountryCode $country + * @var ?Components\CountryCode $country */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=country')] - public ?\Dub\Models\Components\CountryCode $country = null; + public ?Components\CountryCode $country = null; /** * The city to retrieve analytics for. @@ -179,28 +180,51 @@ class RetrieveAnalyticsRequest #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=root')] public ?bool $root = null; - public function __construct() + /** + * @param ?Event $event + * @param ?QueryParamGroupBy $groupBy + * @param ?string $domain + * @param ?string $key + * @param ?string $linkId + * @param ?string $externalId + * @param ?Interval $interval + * @param ?string $start + * @param ?string $end + * @param ?string $timezone + * @param ?Components\ContinentCode $continent + * @param ?Components\CountryCode $country + * @param ?string $city + * @param ?string $device + * @param ?string $browser + * @param ?string $os + * @param ?string $referer + * @param ?string $url + * @param ?string $tagId + * @param ?bool $qr + * @param ?bool $root + */ + public function __construct(?Event $event = null, ?QueryParamGroupBy $groupBy = null, ?string $domain = null, ?string $key = null, ?string $linkId = null, ?string $externalId = null, ?Interval $interval = null, ?string $start = null, ?string $end = null, ?string $timezone = null, ?Components\ContinentCode $continent = null, ?Components\CountryCode $country = null, ?string $city = null, ?string $device = null, ?string $browser = null, ?string $os = null, ?string $referer = null, ?string $url = null, ?string $tagId = null, ?bool $qr = null, ?bool $root = null) { - $this->event = null; - $this->groupBy = null; - $this->domain = null; - $this->key = null; - $this->linkId = null; - $this->externalId = null; - $this->interval = null; - $this->start = null; - $this->end = null; - $this->timezone = null; - $this->continent = null; - $this->country = null; - $this->city = null; - $this->device = null; - $this->browser = null; - $this->os = null; - $this->referer = null; - $this->url = null; - $this->tagId = null; - $this->qr = null; - $this->root = null; + $this->event = $event; + $this->groupBy = $groupBy; + $this->domain = $domain; + $this->key = $key; + $this->linkId = $linkId; + $this->externalId = $externalId; + $this->interval = $interval; + $this->start = $start; + $this->end = $end; + $this->timezone = $timezone; + $this->continent = $continent; + $this->country = $country; + $this->city = $city; + $this->device = $device; + $this->browser = $browser; + $this->os = $os; + $this->referer = $referer; + $this->url = $url; + $this->tagId = $tagId; + $this->qr = $qr; + $this->root = $root; } } \ No newline at end of file diff --git a/src/Models/Operations/RetrieveAnalyticsResponse.php b/src/Models/Operations/RetrieveAnalyticsResponse.php index 76e1e0a..d9afe85 100644 --- a/src/Models/Operations/RetrieveAnalyticsResponse.php +++ b/src/Models/Operations/RetrieveAnalyticsResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class RetrieveAnalyticsResponse { /** @@ -28,94 +28,28 @@ class RetrieveAnalyticsResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * Analytics data * - * @var mixed $oneOf - */ - public mixed $oneOf = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @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 */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public Components\ClicksCount|array|Components\LeadsCount|Components\SalesCount|null $oneOf = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @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 */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + 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) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->oneOf = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->oneOf = $oneOf; } } \ No newline at end of file diff --git a/src/Models/Operations/SortBy.php b/src/Models/Operations/SortBy.php new file mode 100644 index 0000000..4c9c3a6 --- /dev/null +++ b/src/Models/Operations/SortBy.php @@ -0,0 +1,17 @@ +customerId = ''; - $this->customerName = null; - $this->customerEmail = null; - $this->customerAvatar = null; + $this->customerId = $customerId; + $this->customerName = $customerName; + $this->customerEmail = $customerEmail; + $this->customerAvatar = $customerAvatar; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackCustomerResponse.php b/src/Models/Operations/TrackCustomerResponse.php index a8e8c91..dd36d32 100644 --- a/src/Models/Operations/TrackCustomerResponse.php +++ b/src/Models/Operations/TrackCustomerResponse.php @@ -28,94 +28,28 @@ class TrackCustomerResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A customer was tracked. * - * @var ?\Dub\Models\Operations\TrackCustomerResponseBody $object + * @var ?TrackCustomerResponseBody $object */ public ?TrackCustomerResponseBody $object = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?TrackCustomerResponseBody $object */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?TrackCustomerResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackCustomerResponseBody.php b/src/Models/Operations/TrackCustomerResponseBody.php index 2fa09a5..b267c73 100644 --- a/src/Models/Operations/TrackCustomerResponseBody.php +++ b/src/Models/Operations/TrackCustomerResponseBody.php @@ -12,27 +12,45 @@ /** TrackCustomerResponseBody - A customer was tracked. */ class TrackCustomerResponseBody { + /** + * + * @var string $customerId + */ #[\JMS\Serializer\Annotation\SerializedName('customerId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerId; + /** + * + * @var string $customerName + */ #[\JMS\Serializer\Annotation\SerializedName('customerName')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerName; + /** + * + * @var string $customerEmail + */ #[\JMS\Serializer\Annotation\SerializedName('customerEmail')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerEmail; + /** + * + * @var string $customerAvatar + */ #[\JMS\Serializer\Annotation\SerializedName('customerAvatar')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerAvatar; - public function __construct() + /** + * @param ?string $customerId + * @param ?string $customerName + * @param ?string $customerEmail + * @param ?string $customerAvatar + */ + public function __construct(?string $customerId = null, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null) { - $this->customerId = ''; - $this->customerName = ''; - $this->customerEmail = ''; - $this->customerAvatar = ''; + $this->customerId = $customerId; + $this->customerName = $customerName; + $this->customerEmail = $customerEmail; + $this->customerAvatar = $customerAvatar; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackLeadRequestBody.php b/src/Models/Operations/TrackLeadRequestBody.php index 617b089..50763fe 100644 --- a/src/Models/Operations/TrackLeadRequestBody.php +++ b/src/Models/Operations/TrackLeadRequestBody.php @@ -17,7 +17,6 @@ class TrackLeadRequestBody * @var string $clickId */ #[\JMS\Serializer\Annotation\SerializedName('clickId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $clickId; /** @@ -26,7 +25,6 @@ class TrackLeadRequestBody * @var string $eventName */ #[\JMS\Serializer\Annotation\SerializedName('eventName')] - #[\JMS\Serializer\Annotation\Type('string')] public string $eventName; /** @@ -35,7 +33,6 @@ class TrackLeadRequestBody * @var string $customerId */ #[\JMS\Serializer\Annotation\SerializedName('customerId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerId; /** @@ -44,7 +41,6 @@ class TrackLeadRequestBody * @var ?string $customerName */ #[\JMS\Serializer\Annotation\SerializedName('customerName')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $customerName = null; @@ -54,7 +50,6 @@ class TrackLeadRequestBody * @var ?string $customerEmail */ #[\JMS\Serializer\Annotation\SerializedName('customerEmail')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $customerEmail = null; @@ -64,7 +59,6 @@ class TrackLeadRequestBody * @var ?string $customerAvatar */ #[\JMS\Serializer\Annotation\SerializedName('customerAvatar')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $customerAvatar = null; @@ -78,14 +72,23 @@ class TrackLeadRequestBody #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $metadata = null; - public function __construct() + /** + * @param ?string $clickId + * @param ?string $eventName + * @param ?string $customerId + * @param ?string $customerName + * @param ?string $customerEmail + * @param ?string $customerAvatar + * @param ?array $metadata + */ + public function __construct(?string $clickId = null, ?string $eventName = null, ?string $customerId = null, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null, ?array $metadata = null) { - $this->clickId = ''; - $this->eventName = ''; - $this->customerId = ''; - $this->customerName = null; - $this->customerEmail = null; - $this->customerAvatar = null; - $this->metadata = null; + $this->clickId = $clickId; + $this->eventName = $eventName; + $this->customerId = $customerId; + $this->customerName = $customerName; + $this->customerEmail = $customerEmail; + $this->customerAvatar = $customerAvatar; + $this->metadata = $metadata; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackLeadResponse.php b/src/Models/Operations/TrackLeadResponse.php index 3d27992..279241f 100644 --- a/src/Models/Operations/TrackLeadResponse.php +++ b/src/Models/Operations/TrackLeadResponse.php @@ -28,94 +28,28 @@ class TrackLeadResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A lead was tracked. * - * @var ?\Dub\Models\Operations\TrackLeadResponseBody $object + * @var ?TrackLeadResponseBody $object */ public ?TrackLeadResponseBody $object = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?TrackLeadResponseBody $object */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?TrackLeadResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackLeadResponseBody.php b/src/Models/Operations/TrackLeadResponseBody.php index 0202895..0092b67 100644 --- a/src/Models/Operations/TrackLeadResponseBody.php +++ b/src/Models/Operations/TrackLeadResponseBody.php @@ -12,28 +12,46 @@ /** TrackLeadResponseBody - A lead was tracked. */ class TrackLeadResponseBody { + /** + * + * @var string $clickId + */ #[\JMS\Serializer\Annotation\SerializedName('clickId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $clickId; + /** + * + * @var string $eventName + */ #[\JMS\Serializer\Annotation\SerializedName('eventName')] - #[\JMS\Serializer\Annotation\Type('string')] public string $eventName; + /** + * + * @var string $customerId + */ #[\JMS\Serializer\Annotation\SerializedName('customerId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerId; + /** + * + * @var string $customerName + */ #[\JMS\Serializer\Annotation\SerializedName('customerName')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerName; + /** + * + * @var string $customerEmail + */ #[\JMS\Serializer\Annotation\SerializedName('customerEmail')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerEmail; + /** + * + * @var string $customerAvatar + */ #[\JMS\Serializer\Annotation\SerializedName('customerAvatar')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerAvatar; /** @@ -46,14 +64,23 @@ class TrackLeadResponseBody #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $metadata = null; - public function __construct() + /** + * @param ?string $clickId + * @param ?string $eventName + * @param ?string $customerId + * @param ?string $customerName + * @param ?string $customerEmail + * @param ?string $customerAvatar + * @param ?array $metadata + */ + public function __construct(?string $clickId = null, ?string $eventName = null, ?string $customerId = null, ?string $customerName = null, ?string $customerEmail = null, ?string $customerAvatar = null, ?array $metadata = null) { - $this->clickId = ''; - $this->eventName = ''; - $this->customerId = ''; - $this->customerName = ''; - $this->customerEmail = ''; - $this->customerAvatar = ''; - $this->metadata = null; + $this->clickId = $clickId; + $this->eventName = $eventName; + $this->customerId = $customerId; + $this->customerName = $customerName; + $this->customerEmail = $customerEmail; + $this->customerAvatar = $customerAvatar; + $this->metadata = $metadata; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackSaleRequestBody.php b/src/Models/Operations/TrackSaleRequestBody.php index 9dd3e01..35ae89e 100644 --- a/src/Models/Operations/TrackSaleRequestBody.php +++ b/src/Models/Operations/TrackSaleRequestBody.php @@ -17,7 +17,6 @@ class TrackSaleRequestBody * @var string $customerId */ #[\JMS\Serializer\Annotation\SerializedName('customerId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerId; /** @@ -26,16 +25,15 @@ class TrackSaleRequestBody * @var int $amount */ #[\JMS\Serializer\Annotation\SerializedName('amount')] - #[\JMS\Serializer\Annotation\Type('int')] public int $amount; /** * The payment processor via which the sale was made. * - * @var \Dub\Models\Operations\PaymentProcessor $paymentProcessor + * @var PaymentProcessor $paymentProcessor */ #[\JMS\Serializer\Annotation\SerializedName('paymentProcessor')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\PaymentProcessor')] public PaymentProcessor $paymentProcessor; /** @@ -44,7 +42,6 @@ class TrackSaleRequestBody * @var ?string $eventName */ #[\JMS\Serializer\Annotation\SerializedName('eventName')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $eventName = null; @@ -54,7 +51,6 @@ class TrackSaleRequestBody * @var ?string $invoiceId */ #[\JMS\Serializer\Annotation\SerializedName('invoiceId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $invoiceId = null; @@ -64,7 +60,6 @@ class TrackSaleRequestBody * @var ?string $currency */ #[\JMS\Serializer\Annotation\SerializedName('currency')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $currency = null; @@ -78,14 +73,23 @@ class TrackSaleRequestBody #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?array $metadata = null; - public function __construct() + /** + * @param ?string $customerId + * @param ?int $amount + * @param ?PaymentProcessor $paymentProcessor + * @param ?string $eventName + * @param ?string $invoiceId + * @param ?string $currency + * @param ?array $metadata + */ + public function __construct(?string $customerId = null, ?int $amount = null, ?PaymentProcessor $paymentProcessor = null, ?string $eventName = null, ?string $invoiceId = null, ?string $currency = null, ?array $metadata = null) { - $this->customerId = ''; - $this->amount = 0; - $this->paymentProcessor = \Dub\Models\Operations\PaymentProcessor::Stripe; - $this->eventName = null; - $this->invoiceId = null; - $this->currency = null; - $this->metadata = null; + $this->customerId = $customerId; + $this->amount = $amount; + $this->paymentProcessor = $paymentProcessor; + $this->eventName = $eventName; + $this->invoiceId = $invoiceId; + $this->currency = $currency; + $this->metadata = $metadata; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackSaleResponse.php b/src/Models/Operations/TrackSaleResponse.php index 85321a6..ec407ac 100644 --- a/src/Models/Operations/TrackSaleResponse.php +++ b/src/Models/Operations/TrackSaleResponse.php @@ -28,94 +28,28 @@ class TrackSaleResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * A sale was tracked. * - * @var ?\Dub\Models\Operations\TrackSaleResponseBody $object + * @var ?TrackSaleResponseBody $object */ public ?TrackSaleResponseBody $object = null; /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized - */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; - - /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?TrackSaleResponseBody $object */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?TrackSaleResponseBody $object = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->object = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; } } \ No newline at end of file diff --git a/src/Models/Operations/TrackSaleResponseBody.php b/src/Models/Operations/TrackSaleResponseBody.php index 49841c2..bb62c80 100644 --- a/src/Models/Operations/TrackSaleResponseBody.php +++ b/src/Models/Operations/TrackSaleResponseBody.php @@ -12,28 +12,46 @@ /** TrackSaleResponseBody - A sale was tracked. */ class TrackSaleResponseBody { + /** + * + * @var string $eventName + */ #[\JMS\Serializer\Annotation\SerializedName('eventName')] - #[\JMS\Serializer\Annotation\Type('string')] public string $eventName; + /** + * + * @var string $customerId + */ #[\JMS\Serializer\Annotation\SerializedName('customerId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $customerId; + /** + * + * @var float $amount + */ #[\JMS\Serializer\Annotation\SerializedName('amount')] - #[\JMS\Serializer\Annotation\Type('float')] public float $amount; + /** + * + * @var string $paymentProcessor + */ #[\JMS\Serializer\Annotation\SerializedName('paymentProcessor')] - #[\JMS\Serializer\Annotation\Type('string')] public string $paymentProcessor; + /** + * + * @var string $invoiceId + */ #[\JMS\Serializer\Annotation\SerializedName('invoiceId')] - #[\JMS\Serializer\Annotation\Type('string')] public string $invoiceId; + /** + * + * @var string $currency + */ #[\JMS\Serializer\Annotation\SerializedName('currency')] - #[\JMS\Serializer\Annotation\Type('string')] public string $currency; /** @@ -45,14 +63,23 @@ class TrackSaleResponseBody #[\JMS\Serializer\Annotation\Type('array')] public array $metadata; - public function __construct() + /** + * @param ?string $eventName + * @param ?string $customerId + * @param ?float $amount + * @param ?string $paymentProcessor + * @param ?string $invoiceId + * @param ?string $currency + * @param ?array $metadata + */ + public function __construct(?string $eventName = null, ?string $customerId = null, ?float $amount = null, ?string $paymentProcessor = null, ?string $invoiceId = null, ?string $currency = null, ?array $metadata = null) { - $this->eventName = ''; - $this->customerId = ''; - $this->amount = 0; - $this->paymentProcessor = ''; - $this->invoiceId = ''; - $this->currency = ''; - $this->metadata = []; + $this->eventName = $eventName; + $this->customerId = $customerId; + $this->amount = $amount; + $this->paymentProcessor = $paymentProcessor; + $this->invoiceId = $invoiceId; + $this->currency = $currency; + $this->metadata = $metadata; } } \ No newline at end of file diff --git a/src/Models/Operations/Two.php b/src/Models/Operations/Two.php new file mode 100644 index 0000000..d2c1c9f --- /dev/null +++ b/src/Models/Operations/Two.php @@ -0,0 +1,15 @@ +slug = ''; - $this->requestBody = null; + $this->slug = $slug; + $this->requestBody = $requestBody; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateDomainRequestBody.php b/src/Models/Operations/UpdateDomainRequestBody.php index 6c63e2c..9d5f2b4 100644 --- a/src/Models/Operations/UpdateDomainRequestBody.php +++ b/src/Models/Operations/UpdateDomainRequestBody.php @@ -17,7 +17,6 @@ class UpdateDomainRequestBody * @var ?string $slug */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $slug = null; @@ -27,7 +26,6 @@ class UpdateDomainRequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -37,7 +35,6 @@ class UpdateDomainRequestBody * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -47,15 +44,20 @@ class UpdateDomainRequestBody * @var ?string $placeholder */ #[\JMS\Serializer\Annotation\SerializedName('placeholder')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $placeholder = null; - public function __construct() + /** + * @param ?string $slug + * @param ?string $expiredUrl + * @param ?bool $archived + * @param ?string $placeholder + */ + public function __construct(?string $slug = null, ?string $expiredUrl = null, ?bool $archived = null, ?string $placeholder = null) { - $this->slug = null; - $this->expiredUrl = null; - $this->archived = null; - $this->placeholder = null; + $this->slug = $slug; + $this->expiredUrl = $expiredUrl; + $this->archived = $archived; + $this->placeholder = $placeholder; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateDomainResponse.php b/src/Models/Operations/UpdateDomainResponse.php index 04f5d80..eb8844b 100644 --- a/src/Models/Operations/UpdateDomainResponse.php +++ b/src/Models/Operations/UpdateDomainResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpdateDomainResponse { /** @@ -28,94 +28,28 @@ class UpdateDomainResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The domain was updated. * - * @var ?\Dub\Models\Components\DomainSchema $domainSchema - */ - public ?\Dub\Models\Components\DomainSchema $domainSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\DomainSchema $domainSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\DomainSchema $domainSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\DomainSchema $domainSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\DomainSchema $domainSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->domainSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->domainSchema = $domainSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateLinkRequest.php b/src/Models/Operations/UpdateLinkRequest.php index 4a42b8c..0605b58 100644 --- a/src/Models/Operations/UpdateLinkRequest.php +++ b/src/Models/Operations/UpdateLinkRequest.php @@ -19,12 +19,20 @@ class UpdateLinkRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=linkId')] public string $linkId; + /** + * + * @var ?UpdateLinkRequestBody $requestBody + */ #[SpeakeasyMetadata('request:mediaType=application/json')] public ?UpdateLinkRequestBody $requestBody = null; - public function __construct() + /** + * @param ?string $linkId + * @param ?UpdateLinkRequestBody $requestBody + */ + public function __construct(?string $linkId = null, ?UpdateLinkRequestBody $requestBody = null) { - $this->linkId = ''; - $this->requestBody = null; + $this->linkId = $linkId; + $this->requestBody = $requestBody; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateLinkRequestBody.php b/src/Models/Operations/UpdateLinkRequestBody.php index 6f449b9..1445519 100644 --- a/src/Models/Operations/UpdateLinkRequestBody.php +++ b/src/Models/Operations/UpdateLinkRequestBody.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpdateLinkRequestBody { /** @@ -17,7 +17,6 @@ class UpdateLinkRequestBody * @var ?string $url */ #[\JMS\Serializer\Annotation\SerializedName('url')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $url = null; @@ -27,7 +26,6 @@ class UpdateLinkRequestBody * @var ?string $domain */ #[\JMS\Serializer\Annotation\SerializedName('domain')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $domain = null; @@ -37,7 +35,6 @@ class UpdateLinkRequestBody * @var ?string $key */ #[\JMS\Serializer\Annotation\SerializedName('key')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $key = null; @@ -47,7 +44,6 @@ class UpdateLinkRequestBody * @var ?string $externalId */ #[\JMS\Serializer\Annotation\SerializedName('externalId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $externalId = null; @@ -57,7 +53,6 @@ class UpdateLinkRequestBody * @var ?string $prefix */ #[\JMS\Serializer\Annotation\SerializedName('prefix')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $prefix = null; @@ -67,7 +62,6 @@ class UpdateLinkRequestBody * @var ?bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $trackConversion = null; @@ -77,7 +71,6 @@ class UpdateLinkRequestBody * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -87,7 +80,6 @@ class UpdateLinkRequestBody * @var ?bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $publicStats = null; @@ -98,29 +90,28 @@ class UpdateLinkRequestBody * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tagId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tagId = null; /** * The unique IDs of the tags assigned to the short link. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The comments for the short link. @@ -128,7 +119,6 @@ class UpdateLinkRequestBody * @var ?string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $comments = null; @@ -138,7 +128,6 @@ class UpdateLinkRequestBody * @var ?string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiresAt = null; @@ -148,7 +137,6 @@ class UpdateLinkRequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -158,7 +146,6 @@ class UpdateLinkRequestBody * @var ?string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $password = null; @@ -168,7 +155,6 @@ class UpdateLinkRequestBody * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $proxy = null; @@ -178,7 +164,6 @@ class UpdateLinkRequestBody * @var ?string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $title = null; @@ -188,7 +173,6 @@ class UpdateLinkRequestBody * @var ?string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $description = null; @@ -198,7 +182,6 @@ class UpdateLinkRequestBody * @var ?string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $image = null; @@ -208,7 +191,6 @@ class UpdateLinkRequestBody * @var ?string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $video = null; @@ -218,7 +200,6 @@ class UpdateLinkRequestBody * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $rewrite = null; @@ -228,7 +209,6 @@ class UpdateLinkRequestBody * @var ?string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ios = null; @@ -238,14 +218,17 @@ class UpdateLinkRequestBody * @var ?string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $android = null; + /** + * + * @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')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?\Dub\Models\Components\LinkGeoTargeting $geo = null; + public ?Components\LinkGeoTargeting $geo = null; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex @@ -253,7 +236,6 @@ class UpdateLinkRequestBody * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $doIndex = null; @@ -263,7 +245,6 @@ class UpdateLinkRequestBody * @var ?string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmSource = null; @@ -273,7 +254,6 @@ class UpdateLinkRequestBody * @var ?string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmMedium = null; @@ -283,7 +263,6 @@ class UpdateLinkRequestBody * @var ?string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmCampaign = null; @@ -293,7 +272,6 @@ class UpdateLinkRequestBody * @var ?string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmTerm = null; @@ -303,41 +281,72 @@ class UpdateLinkRequestBody * @var ?string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmContent = null; - public function __construct() + /** + * @param ?string $url + * @param ?string $domain + * @param ?string $key + * @param ?string $externalId + * @param ?string $prefix + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?bool $publicStats + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $comments + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?string $ios + * @param ?string $android + * @param ?Components\LinkGeoTargeting $geo + * @param ?bool $doIndex + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + */ + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $externalId = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?bool $doIndex = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null) { - $this->url = null; - $this->domain = null; - $this->key = null; - $this->externalId = null; - $this->prefix = null; - $this->trackConversion = null; - $this->archived = null; - $this->publicStats = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->comments = null; - $this->expiresAt = null; - $this->expiredUrl = null; - $this->password = null; - $this->proxy = null; - $this->title = null; - $this->description = null; - $this->image = null; - $this->video = null; - $this->rewrite = null; - $this->ios = null; - $this->android = null; - $this->geo = null; - $this->doIndex = null; - $this->utmSource = null; - $this->utmMedium = null; - $this->utmCampaign = null; - $this->utmTerm = null; - $this->utmContent = null; + $this->url = $url; + $this->domain = $domain; + $this->key = $key; + $this->externalId = $externalId; + $this->prefix = $prefix; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->comments = $comments; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->doIndex = $doIndex; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateLinkResponse.php b/src/Models/Operations/UpdateLinkResponse.php index 19c4ee4..c36c458 100644 --- a/src/Models/Operations/UpdateLinkResponse.php +++ b/src/Models/Operations/UpdateLinkResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpdateLinkResponse { /** @@ -28,94 +28,28 @@ class UpdateLinkResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The updated link * - * @var ?\Dub\Models\Components\LinkSchema $linkSchema - */ - public ?\Dub\Models\Components\LinkSchema $linkSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\LinkSchema $linkSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\LinkSchema $linkSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchema = $linkSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateTagRequest.php b/src/Models/Operations/UpdateTagRequest.php index 520759f..fb4ac4c 100644 --- a/src/Models/Operations/UpdateTagRequest.php +++ b/src/Models/Operations/UpdateTagRequest.php @@ -19,12 +19,20 @@ class UpdateTagRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=id')] public string $id; + /** + * + * @var ?UpdateTagRequestBody $requestBody + */ #[SpeakeasyMetadata('request:mediaType=application/json')] public ?UpdateTagRequestBody $requestBody = null; - public function __construct() + /** + * @param ?string $id + * @param ?UpdateTagRequestBody $requestBody + */ + public function __construct(?string $id = null, ?UpdateTagRequestBody $requestBody = null) { - $this->id = ''; - $this->requestBody = null; + $this->id = $id; + $this->requestBody = $requestBody; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateTagRequestBody.php b/src/Models/Operations/UpdateTagRequestBody.php index 29f5ff0..b359f86 100644 --- a/src/Models/Operations/UpdateTagRequestBody.php +++ b/src/Models/Operations/UpdateTagRequestBody.php @@ -17,17 +17,16 @@ class UpdateTagRequestBody * @var ?string $name */ #[\JMS\Serializer\Annotation\SerializedName('name')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $name = null; /** * The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown. * - * @var ?\Dub\Models\Operations\UpdateTagColor $color + * @var ?UpdateTagColor $color */ #[\JMS\Serializer\Annotation\SerializedName('color')] - #[\JMS\Serializer\Annotation\Type('enum')] + #[\JMS\Serializer\Annotation\Type('\Dub\Models\Operations\UpdateTagColor')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?UpdateTagColor $color = null; @@ -38,14 +37,18 @@ class UpdateTagRequestBody * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tag')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tag = null; - public function __construct() + /** + * @param ?string $name + * @param ?UpdateTagColor $color + * @param ?string $tag + */ + public function __construct(?string $name = null, ?UpdateTagColor $color = null, ?string $tag = null) { - $this->name = null; - $this->color = null; - $this->tag = null; + $this->name = $name; + $this->color = $color; + $this->tag = $tag; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateTagResponse.php b/src/Models/Operations/UpdateTagResponse.php index 74d2a0c..28ddd02 100644 --- a/src/Models/Operations/UpdateTagResponse.php +++ b/src/Models/Operations/UpdateTagResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpdateTagResponse { /** @@ -28,94 +28,28 @@ class UpdateTagResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The updated tag. * - * @var ?\Dub\Models\Components\TagSchema $tagSchema - */ - public ?\Dub\Models\Components\TagSchema $tagSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\TagSchema $tagSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\TagSchema $tagSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\TagSchema $tagSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\TagSchema $tagSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->tagSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->tagSchema = $tagSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateWorkspaceRequest.php b/src/Models/Operations/UpdateWorkspaceRequest.php index 9eddfa0..0f9293e 100644 --- a/src/Models/Operations/UpdateWorkspaceRequest.php +++ b/src/Models/Operations/UpdateWorkspaceRequest.php @@ -19,12 +19,20 @@ class UpdateWorkspaceRequest #[SpeakeasyMetadata('pathParam:style=simple,explode=false,name=idOrSlug')] public string $idOrSlug; + /** + * + * @var ?UpdateWorkspaceRequestBody $requestBody + */ #[SpeakeasyMetadata('request:mediaType=application/json')] public ?UpdateWorkspaceRequestBody $requestBody = null; - public function __construct() + /** + * @param ?string $idOrSlug + * @param ?UpdateWorkspaceRequestBody $requestBody + */ + public function __construct(?string $idOrSlug = null, ?UpdateWorkspaceRequestBody $requestBody = null) { - $this->idOrSlug = ''; - $this->requestBody = null; + $this->idOrSlug = $idOrSlug; + $this->requestBody = $requestBody; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateWorkspaceRequestBody.php b/src/Models/Operations/UpdateWorkspaceRequestBody.php index 8cfcd2c..eb8be6e 100644 --- a/src/Models/Operations/UpdateWorkspaceRequestBody.php +++ b/src/Models/Operations/UpdateWorkspaceRequestBody.php @@ -11,19 +11,29 @@ class UpdateWorkspaceRequestBody { + /** + * + * @var ?string $name + */ #[\JMS\Serializer\Annotation\SerializedName('name')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $name = null; + /** + * + * @var ?string $slug + */ #[\JMS\Serializer\Annotation\SerializedName('slug')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $slug = null; - public function __construct() + /** + * @param ?string $name + * @param ?string $slug + */ + public function __construct(?string $name = null, ?string $slug = null) { - $this->name = null; - $this->slug = null; + $this->name = $name; + $this->slug = $slug; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateWorkspaceResponse.php b/src/Models/Operations/UpdateWorkspaceResponse.php index 86969f8..b1d8cbd 100644 --- a/src/Models/Operations/UpdateWorkspaceResponse.php +++ b/src/Models/Operations/UpdateWorkspaceResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpdateWorkspaceResponse { /** @@ -28,94 +28,28 @@ class UpdateWorkspaceResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The updated workspace. * - * @var ?\Dub\Models\Components\WorkspaceSchema $workspaceSchema - */ - public ?\Dub\Models\Components\WorkspaceSchema $workspaceSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\WorkspaceSchema $workspaceSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\WorkspaceSchema $workspaceSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\WorkspaceSchema $workspaceSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\WorkspaceSchema $workspaceSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->workspaceSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->workspaceSchema = $workspaceSchema; } } \ No newline at end of file diff --git a/src/Models/Operations/UpsertLinkRequestBody.php b/src/Models/Operations/UpsertLinkRequestBody.php index 67641fa..4548554 100644 --- a/src/Models/Operations/UpsertLinkRequestBody.php +++ b/src/Models/Operations/UpsertLinkRequestBody.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpsertLinkRequestBody { /** @@ -17,7 +17,6 @@ class UpsertLinkRequestBody * @var string $url */ #[\JMS\Serializer\Annotation\SerializedName('url')] - #[\JMS\Serializer\Annotation\Type('string')] public string $url; /** @@ -26,7 +25,6 @@ class UpsertLinkRequestBody * @var ?string $domain */ #[\JMS\Serializer\Annotation\SerializedName('domain')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $domain = null; @@ -36,7 +34,6 @@ class UpsertLinkRequestBody * @var ?string $key */ #[\JMS\Serializer\Annotation\SerializedName('key')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $key = null; @@ -46,7 +43,6 @@ class UpsertLinkRequestBody * @var ?string $externalId */ #[\JMS\Serializer\Annotation\SerializedName('externalId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $externalId = null; @@ -56,7 +52,6 @@ class UpsertLinkRequestBody * @var ?string $prefix */ #[\JMS\Serializer\Annotation\SerializedName('prefix')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $prefix = null; @@ -66,7 +61,6 @@ class UpsertLinkRequestBody * @var ?bool $trackConversion */ #[\JMS\Serializer\Annotation\SerializedName('trackConversion')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $trackConversion = null; @@ -76,7 +70,6 @@ class UpsertLinkRequestBody * @var ?bool $archived */ #[\JMS\Serializer\Annotation\SerializedName('archived')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $archived = null; @@ -86,7 +79,6 @@ class UpsertLinkRequestBody * @var ?bool $publicStats */ #[\JMS\Serializer\Annotation\SerializedName('publicStats')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $publicStats = null; @@ -97,29 +89,28 @@ class UpsertLinkRequestBody * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. */ #[\JMS\Serializer\Annotation\SerializedName('tagId')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $tagId = null; /** * The unique IDs of the tags assigned to the short link. * - * @var mixed $tagIds + * @var string|array|null $tagIds */ #[\JMS\Serializer\Annotation\SerializedName('tagIds')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagIds = null; + public string|array|null $tagIds = null; /** * The unique name of the tags assigned to the short link (case insensitive). * - * @var mixed $tagNames + * @var string|array|null $tagNames */ #[\JMS\Serializer\Annotation\SerializedName('tagNames')] - #[\JMS\Serializer\Annotation\Type('mixed')] + #[\JMS\Serializer\Annotation\Type('string|array')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public mixed $tagNames = null; + public string|array|null $tagNames = null; /** * The comments for the short link. @@ -127,7 +118,6 @@ class UpsertLinkRequestBody * @var ?string $comments */ #[\JMS\Serializer\Annotation\SerializedName('comments')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $comments = null; @@ -137,7 +127,6 @@ class UpsertLinkRequestBody * @var ?string $expiresAt */ #[\JMS\Serializer\Annotation\SerializedName('expiresAt')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiresAt = null; @@ -147,7 +136,6 @@ class UpsertLinkRequestBody * @var ?string $expiredUrl */ #[\JMS\Serializer\Annotation\SerializedName('expiredUrl')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $expiredUrl = null; @@ -157,7 +145,6 @@ class UpsertLinkRequestBody * @var ?string $password */ #[\JMS\Serializer\Annotation\SerializedName('password')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $password = null; @@ -167,7 +154,6 @@ class UpsertLinkRequestBody * @var ?bool $proxy */ #[\JMS\Serializer\Annotation\SerializedName('proxy')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $proxy = null; @@ -177,7 +163,6 @@ class UpsertLinkRequestBody * @var ?string $title */ #[\JMS\Serializer\Annotation\SerializedName('title')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $title = null; @@ -187,7 +172,6 @@ class UpsertLinkRequestBody * @var ?string $description */ #[\JMS\Serializer\Annotation\SerializedName('description')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $description = null; @@ -197,7 +181,6 @@ class UpsertLinkRequestBody * @var ?string $image */ #[\JMS\Serializer\Annotation\SerializedName('image')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $image = null; @@ -207,7 +190,6 @@ class UpsertLinkRequestBody * @var ?string $video */ #[\JMS\Serializer\Annotation\SerializedName('video')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $video = null; @@ -217,7 +199,6 @@ class UpsertLinkRequestBody * @var ?bool $rewrite */ #[\JMS\Serializer\Annotation\SerializedName('rewrite')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $rewrite = null; @@ -227,7 +208,6 @@ class UpsertLinkRequestBody * @var ?string $ios */ #[\JMS\Serializer\Annotation\SerializedName('ios')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $ios = null; @@ -237,19 +217,18 @@ class UpsertLinkRequestBody * @var ?string $android */ #[\JMS\Serializer\Annotation\SerializedName('android')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $android = null; /** * Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. * - * @var ?\Dub\Models\Components\LinkGeoTargeting $geo + * @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')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] - public ?\Dub\Models\Components\LinkGeoTargeting $geo = null; + public ?Components\LinkGeoTargeting $geo = null; /** * Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex @@ -257,7 +236,6 @@ class UpsertLinkRequestBody * @var ?bool $doIndex */ #[\JMS\Serializer\Annotation\SerializedName('doIndex')] - #[\JMS\Serializer\Annotation\Type('bool')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?bool $doIndex = null; @@ -267,7 +245,6 @@ class UpsertLinkRequestBody * @var ?string $utmSource */ #[\JMS\Serializer\Annotation\SerializedName('utm_source')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmSource = null; @@ -277,7 +254,6 @@ class UpsertLinkRequestBody * @var ?string $utmMedium */ #[\JMS\Serializer\Annotation\SerializedName('utm_medium')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmMedium = null; @@ -287,7 +263,6 @@ class UpsertLinkRequestBody * @var ?string $utmCampaign */ #[\JMS\Serializer\Annotation\SerializedName('utm_campaign')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmCampaign = null; @@ -297,7 +272,6 @@ class UpsertLinkRequestBody * @var ?string $utmTerm */ #[\JMS\Serializer\Annotation\SerializedName('utm_term')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmTerm = null; @@ -307,41 +281,72 @@ class UpsertLinkRequestBody * @var ?string $utmContent */ #[\JMS\Serializer\Annotation\SerializedName('utm_content')] - #[\JMS\Serializer\Annotation\Type('string')] #[\JMS\Serializer\Annotation\SkipWhenEmpty] public ?string $utmContent = null; - public function __construct() + /** + * @param ?string $url + * @param ?string $domain + * @param ?string $key + * @param ?string $externalId + * @param ?string $prefix + * @param ?bool $trackConversion + * @param ?bool $archived + * @param ?bool $publicStats + * @param ?string $tagId + * @param string|array|null $tagIds + * @param string|array|null $tagNames + * @param ?string $comments + * @param ?string $expiresAt + * @param ?string $expiredUrl + * @param ?string $password + * @param ?bool $proxy + * @param ?string $title + * @param ?string $description + * @param ?string $image + * @param ?string $video + * @param ?bool $rewrite + * @param ?string $ios + * @param ?string $android + * @param ?Components\LinkGeoTargeting $geo + * @param ?bool $doIndex + * @param ?string $utmSource + * @param ?string $utmMedium + * @param ?string $utmCampaign + * @param ?string $utmTerm + * @param ?string $utmContent + */ + public function __construct(?string $url = null, ?string $domain = null, ?string $key = null, ?string $externalId = null, ?string $prefix = null, ?bool $trackConversion = null, ?bool $archived = null, ?bool $publicStats = null, ?string $tagId = null, string|array|null $tagIds = null, string|array|null $tagNames = null, ?string $comments = null, ?string $expiresAt = null, ?string $expiredUrl = null, ?string $password = null, ?bool $proxy = null, ?string $title = null, ?string $description = null, ?string $image = null, ?string $video = null, ?bool $rewrite = null, ?string $ios = null, ?string $android = null, ?Components\LinkGeoTargeting $geo = null, ?bool $doIndex = null, ?string $utmSource = null, ?string $utmMedium = null, ?string $utmCampaign = null, ?string $utmTerm = null, ?string $utmContent = null) { - $this->url = ''; - $this->domain = null; - $this->key = null; - $this->externalId = null; - $this->prefix = null; - $this->trackConversion = null; - $this->archived = null; - $this->publicStats = null; - $this->tagId = null; - $this->tagIds = null; - $this->tagNames = null; - $this->comments = null; - $this->expiresAt = null; - $this->expiredUrl = null; - $this->password = null; - $this->proxy = null; - $this->title = null; - $this->description = null; - $this->image = null; - $this->video = null; - $this->rewrite = null; - $this->ios = null; - $this->android = null; - $this->geo = null; - $this->doIndex = null; - $this->utmSource = null; - $this->utmMedium = null; - $this->utmCampaign = null; - $this->utmTerm = null; - $this->utmContent = null; + $this->url = $url; + $this->domain = $domain; + $this->key = $key; + $this->externalId = $externalId; + $this->prefix = $prefix; + $this->trackConversion = $trackConversion; + $this->archived = $archived; + $this->publicStats = $publicStats; + $this->tagId = $tagId; + $this->tagIds = $tagIds; + $this->tagNames = $tagNames; + $this->comments = $comments; + $this->expiresAt = $expiresAt; + $this->expiredUrl = $expiredUrl; + $this->password = $password; + $this->proxy = $proxy; + $this->title = $title; + $this->description = $description; + $this->image = $image; + $this->video = $video; + $this->rewrite = $rewrite; + $this->ios = $ios; + $this->android = $android; + $this->geo = $geo; + $this->doIndex = $doIndex; + $this->utmSource = $utmSource; + $this->utmMedium = $utmMedium; + $this->utmCampaign = $utmCampaign; + $this->utmTerm = $utmTerm; + $this->utmContent = $utmContent; } } \ No newline at end of file diff --git a/src/Models/Operations/UpsertLinkResponse.php b/src/Models/Operations/UpsertLinkResponse.php index bd90b8d..8ebd6be 100644 --- a/src/Models/Operations/UpsertLinkResponse.php +++ b/src/Models/Operations/UpsertLinkResponse.php @@ -8,7 +8,7 @@ namespace Dub\Models\Operations; - +use Dub\Models\Components; class UpsertLinkResponse { /** @@ -28,94 +28,28 @@ class UpsertLinkResponse /** * Raw HTTP response; suitable for custom response parsing * - * @var ?\Psr\Http\Message\ResponseInterface $rawResponse + * @var \Psr\Http\Message\ResponseInterface $rawResponse */ - public ?\Psr\Http\Message\ResponseInterface $rawResponse; + public \Psr\Http\Message\ResponseInterface $rawResponse; /** * The upserted link * - * @var ?\Dub\Models\Components\LinkSchema $linkSchema - */ - public ?\Dub\Models\Components\LinkSchema $linkSchema = null; - - /** - * 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). - * - * @var ?\Dub\Models\Components\BadRequest $badRequest - */ - public ?\Dub\Models\Components\BadRequest $badRequest = null; - - /** - * Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response. - * - * @var ?\Dub\Models\Components\Unauthorized $unauthorized + * @var ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Unauthorized $unauthorized = null; + public ?Components\LinkSchema $linkSchema = null; /** - * 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. - * - * @var ?\Dub\Models\Components\Forbidden $forbidden - */ - public ?\Dub\Models\Components\Forbidden $forbidden = null; - - /** - * The server cannot find the requested resource. - * - * @var ?\Dub\Models\Components\NotFound $notFound - */ - public ?\Dub\Models\Components\NotFound $notFound = null; - - /** - * This response is sent when a request conflicts with the current state of the server. - * - * @var ?\Dub\Models\Components\Conflict $conflict + * @param ?string $contentType + * @param ?int $statusCode + * @param ?\Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\LinkSchema $linkSchema */ - public ?\Dub\Models\Components\Conflict $conflict = null; - - /** - * This response is sent when the requested content has been permanently deleted from server, with no forwarding address. - * - * @var ?\Dub\Models\Components\InviteExpired $inviteExpired - */ - public ?\Dub\Models\Components\InviteExpired $inviteExpired = null; - - /** - * The request was well-formed but was unable to be followed due to semantic errors. - * - * @var ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity - */ - public ?\Dub\Models\Components\UnprocessableEntity $unprocessableEntity = null; - - /** - * The user has sent too many requests in a given amount of time ("rate limiting") - * - * @var ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded - */ - public ?\Dub\Models\Components\RateLimitExceeded $rateLimitExceeded = null; - - /** - * The server has encountered a situation it does not know how to handle. - * - * @var ?\Dub\Models\Components\InternalServerError $internalServerError - */ - public ?\Dub\Models\Components\InternalServerError $internalServerError = null; - - public function __construct() + public function __construct(?string $contentType = null, ?int $statusCode = null, ?\Psr\Http\Message\ResponseInterface $rawResponse = null, ?Components\LinkSchema $linkSchema = null) { - $this->contentType = ''; - $this->statusCode = 0; - $this->rawResponse = null; - $this->linkSchema = null; - $this->badRequest = null; - $this->unauthorized = null; - $this->forbidden = null; - $this->notFound = null; - $this->conflict = null; - $this->inviteExpired = null; - $this->unprocessableEntity = null; - $this->rateLimitExceeded = null; - $this->internalServerError = null; + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->linkSchema = $linkSchema; } } \ No newline at end of file diff --git a/src/QRCodes.php b/src/QRCodes.php index 15b3fe2..e793fa8 100644 --- a/src/QRCodes.php +++ b/src/QRCodes.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class QRCodes { private SDKConfiguration $sdkConfiguration; @@ -25,79 +28,114 @@ public function __construct(SDKConfiguration $sdkConfig) * * Retrieve a QR code for a link. * - * @param \Dub\Models\Operations\GetQRCodeRequest $request - * @return \Dub\Models\Operations\GetQRCodeResponse + * @param Operations\GetQRCodeRequest $request + * @return Operations\GetQRCodeResponse + * @throws \Dub\Models\Errors\SDKException */ public function get( - ?\Dub\Models\Operations\GetQRCodeRequest $request, - ): \Dub\Models\Operations\GetQRCodeResponse { + ?Operations\GetQRCodeRequest $request, + ): Operations\GetQRCodeResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/qr'); $options = ['http_errors' => false]; - $options = array_merge_recursive($options, Utils\Utils::getQueryParams(\Dub\Models\Operations\GetQRCodeRequest::class, $request, null)); - $options['headers']['Accept'] = 'application/json;q=1, image/png;q=0'; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetQRCodeRequest::class, $request, null)); + $options['headers']['Accept'] = 'image/png'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetQRCodeResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'image/png')) { - $response->res = $httpResponse->getBody()->getContents(); + $obj = $httpResponse->getBody()->getContents(); + + return new Operations\GetQRCodeResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + res: $obj); + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index adbfc9a..03ae1ac 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -15,6 +15,7 @@ class SDKConfiguration public ?\GuzzleHttp\ClientInterface $securityClient = null; public ?Models\Components\Security $security = null; + /** @var pure-Closure(): string */ public ?\Closure $securitySource = null; @@ -26,11 +27,11 @@ class SDKConfiguration public string $openapiDocVersion = '0.0.1'; - public string $sdkVersion = '0.2.6'; + public string $sdkVersion = '0.3.0'; - public string $genVersion = '2.380.1'; + public string $genVersion = '2.402.5'; - public string $userAgent = 'speakeasy-sdk/php 0.2.6 2.380.1 0.0.1 dub/dub-php'; + public string $userAgent = 'speakeasy-sdk/php 0.3.0 2.402.5 0.0.1 dub/dub-php'; public function getServerUrl(): string { @@ -49,8 +50,9 @@ public function hasSecurity(): bool public function getSecurity(): ?Models\Components\Security { if ($this->securitySource !== null) { - $security = new Models\Components\Security(); - $security->token = $this->securitySource->call($this); + $security = new Models\Components\Security( + token: $this->securitySource->call($this) + ); return $security; } else { diff --git a/src/Tags.php b/src/Tags.php index 47e96d4..d7b6c0d 100644 --- a/src/Tags.php +++ b/src/Tags.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Tags { private SDKConfiguration $sdkConfiguration; @@ -25,78 +28,114 @@ public function __construct(SDKConfiguration $sdkConfig) * * Retrieve a list of tags for the authenticated workspace. * - * @return \Dub\Models\Operations\GetTagsResponse + * @return Operations\GetTagsResponse + * @throws \Dub\Models\Errors\SDKException */ public function list( - ): \Dub\Models\Operations\GetTagsResponse { + ): Operations\GetTagsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/tags'); $options = ['http_errors' => false]; $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetTagsResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->tagSchemas = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Dub\Models\Components\TagSchema>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetTagsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + tagSchemas: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -104,12 +143,13 @@ public function list( * * Create a new tag for the authenticated workspace. * - * @param \Dub\Models\Operations\CreateTagRequestBody $request - * @return \Dub\Models\Operations\CreateTagResponse + * @param Operations\CreateTagRequestBody $request + * @return Operations\CreateTagResponse + * @throws \Dub\Models\Errors\SDKException */ public function create( - ?\Dub\Models\Operations\CreateTagRequestBody $request, - ): \Dub\Models\Operations\CreateTagResponse { + ?Operations\CreateTagRequestBody $request, + ): Operations\CreateTagResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/tags'); $options = ['http_errors' => false]; @@ -119,69 +159,104 @@ public function create( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\CreateTagResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 201) { + if ($statusCode == 201) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->tagSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\TagSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\TagSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateTagResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + tagSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -190,18 +265,20 @@ public function create( * Update a tag in the workspace. * * @param string $id - * @param ?\Dub\Models\Operations\UpdateTagRequestBody $requestBody - * @return \Dub\Models\Operations\UpdateTagResponse + * @param ?Operations\UpdateTagRequestBody $requestBody + * @return Operations\UpdateTagResponse + * @throws \Dub\Models\Errors\SDKException */ public function update( string $id, - ?\Dub\Models\Operations\UpdateTagRequestBody $requestBody = null, - ): \Dub\Models\Operations\UpdateTagResponse { - $request = new \Dub\Models\Operations\UpdateTagRequest(); - $request->id = $id; - $request->requestBody = $requestBody; + ?Operations\UpdateTagRequestBody $requestBody = null, + ): Operations\UpdateTagResponse { + $request = new Operations\UpdateTagRequest( + id: $id, + requestBody: $requestBody, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/tags/{id}', \Dub\Models\Operations\UpdateTagRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/tags/{id}', Operations\UpdateTagRequest::class, $request); $options = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); if ($body !== null) { @@ -209,68 +286,103 @@ public function update( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('PATCH', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\UpdateTagResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->tagSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\TagSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\TagSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateTagResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + tagSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/Track.php b/src/Track.php index f4593af..fa3155e 100644 --- a/src/Track.php +++ b/src/Track.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Track { private SDKConfiguration $sdkConfiguration; @@ -25,12 +28,13 @@ public function __construct(SDKConfiguration $sdkConfig) * * Track a lead for a short link. * - * @param \Dub\Models\Operations\TrackLeadRequestBody $request - * @return \Dub\Models\Operations\TrackLeadResponse + * @param Operations\TrackLeadRequestBody $request + * @return Operations\TrackLeadResponse + * @throws \Dub\Models\Errors\SDKException */ public function lead( - ?\Dub\Models\Operations\TrackLeadRequestBody $request, - ): \Dub\Models\Operations\TrackLeadResponse { + ?Operations\TrackLeadRequestBody $request, + ): Operations\TrackLeadResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/track/lead'); $options = ['http_errors' => false]; @@ -40,69 +44,104 @@ public function lead( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\TrackLeadResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\TrackLeadResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\TrackLeadResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\TrackLeadResponse( + 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 ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -110,12 +149,13 @@ public function lead( * * Track a sale for a short link. * - * @param \Dub\Models\Operations\TrackSaleRequestBody $request - * @return \Dub\Models\Operations\TrackSaleResponse + * @param Operations\TrackSaleRequestBody $request + * @return Operations\TrackSaleResponse + * @throws \Dub\Models\Errors\SDKException */ public function sale( - ?\Dub\Models\Operations\TrackSaleRequestBody $request, - ): \Dub\Models\Operations\TrackSaleResponse { + ?Operations\TrackSaleRequestBody $request, + ): Operations\TrackSaleResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/track/sale'); $options = ['http_errors' => false]; @@ -125,69 +165,104 @@ public function sale( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\TrackSaleResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\TrackSaleResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\TrackSaleResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\TrackSaleResponse( + 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 ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -195,12 +270,13 @@ public function sale( * * Track a customer for an authenticated workspace. * - * @param \Dub\Models\Operations\TrackCustomerRequestBody $request - * @return \Dub\Models\Operations\TrackCustomerResponse + * @param Operations\TrackCustomerRequestBody $request + * @return Operations\TrackCustomerResponse + * @throws \Dub\Models\Errors\SDKException */ public function customer( - ?\Dub\Models\Operations\TrackCustomerRequestBody $request, - ): \Dub\Models\Operations\TrackCustomerResponse { + ?Operations\TrackCustomerRequestBody $request, + ): Operations\TrackCustomerResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/track/customer'); $options = ['http_errors' => false]; @@ -210,68 +286,103 @@ public function customer( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('POST', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\TrackCustomerResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->object = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Operations\TrackCustomerResponseBody', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Operations\TrackCustomerResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\TrackCustomerResponse( + 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 ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file diff --git a/src/Utils/DateHandler.php b/src/Utils/DateHandler.php new file mode 100644 index 0000000..a054392 --- /dev/null +++ b/src/Utils/DateHandler.php @@ -0,0 +1,49 @@ + GraphNavigator::DIRECTION_SERIALIZATION, + 'format' => 'json', + 'type' => '\\Brick\\DateTime\\LocalDate', + 'method' => 'serializeDateTimeToJson', + ], + [ + 'direction' => GraphNavigator::DIRECTION_DESERIALIZATION, + 'format' => 'json', + 'type' => '\\Brick\\DateTime\\LocalDate', + 'method' => 'deserializeDateTimeToJson', + ], + ]; + } + + /** @phpstan-ignore-next-line */ + public function serializeDateTimeToJson(JsonSerializationVisitor $visitor, \Brick\DateTime\LocalDate $any, array $type, Context $context): string + { + return $any->jsonSerialize(); + } + + /** @phpstan-ignore-next-line */ + public function deserializeDateTimeToJson(JsonDeserializationVisitor $visitor, string $data, array $type, Context $context): mixed + { + return \Brick\DateTime\LocalDate::parse($data); + } +} diff --git a/src/Utils/DateTimeHandler.php b/src/Utils/DateTimeHandler.php new file mode 100644 index 0000000..b40607c --- /dev/null +++ b/src/Utils/DateTimeHandler.php @@ -0,0 +1,49 @@ + GraphNavigator::DIRECTION_SERIALIZATION, + 'format' => 'json', + 'type' => '\DateTime', + 'method' => 'serializeDateTimeToJson', + ], + [ + 'direction' => GraphNavigator::DIRECTION_DESERIALIZATION, + 'format' => 'json', + 'type' => '\DateTime', + 'method' => 'deserializeDateTimeToJson', + ], + ]; + } + + /** @phpstan-ignore-next-line */ + public function serializeDateTimeToJson(JsonSerializationVisitor $visitor, \DateTime $any, array $type, Context $context): string + { + return $any->format('Y-m-d\TH:i:s.up'); + } + + /** @phpstan-ignore-next-line */ + public function deserializeDateTimeToJson(JsonDeserializationVisitor $visitor, string $data, array $type, Context $context): mixed + { + return new \DateTime($data); + } +} diff --git a/src/Utils/DefaultResponse.php b/src/Utils/DefaultResponse.php new file mode 100644 index 0000000..31324b2 --- /dev/null +++ b/src/Utils/DefaultResponse.php @@ -0,0 +1,88 @@ +getMessage()); + } } } diff --git a/src/Utils/Headers.php b/src/Utils/Headers.php index c663495..def5763 100644 --- a/src/Utils/Headers.php +++ b/src/Utils/Headers.php @@ -65,10 +65,10 @@ private function serializeHeader(ParamsMetadata $metadata, mixed $value): string } if ($metadata->explode) { - $items[] = $fieldMetadata->name.'='.valToString($fieldValue); + $items[] = $fieldMetadata->name.'='.valToString($fieldValue, $fieldMetadata->dateTimeFormat); } else { $items[] = $fieldMetadata->name; - $items[] = valToString($fieldValue); + $items[] = valToString($fieldValue, $fieldMetadata->dateTimeFormat); } } diff --git a/src/Utils/JSON.php b/src/Utils/JSON.php index 0b5f01d..badf5c0 100644 --- a/src/Utils/JSON.php +++ b/src/Utils/JSON.php @@ -8,18 +8,29 @@ namespace Dub\Utils; + +use JMS\Serializer\Handler\ArrayCollectionHandler; use JMS\Serializer\Handler\HandlerRegistry; +use JMS\Serializer\Handler\IteratorHandler; +use JMS\Serializer\Handler\StdClassHandler; use JMS\Serializer\SerializerBuilder; + class JSON { public static function createSerializer(): \JMS\Serializer\Serializer { return SerializerBuilder::create()->configureHandlers( static function (HandlerRegistry $registry): void { + $registry->registerSubscribingHandler(new StdClassHandler()); + $registry->registerSubscribingHandler(new ArrayCollectionHandler()); + $registry->registerSubscribingHandler(new IteratorHandler()); $registry->registerSubscribingHandler(new MixedJSONHandler()); $registry->registerSubscribingHandler(new EnumHandler()); + $registry->registerSubscribingHandler(new DateTimeHandler()); + $registry->registerSubscribingHandler(new DateHandler()); + $registry->registerSubscribingHandler(new UnionHandler()); }, - )->addDefaultHandlers()->build(); + )->setTypeParser(new PhpDocTypeParser())->build(); } -} \ No newline at end of file +} diff --git a/src/Utils/MixedJSONHandler.php b/src/Utils/MixedJSONHandler.php index fe41484..fa4c1cb 100644 --- a/src/Utils/MixedJSONHandler.php +++ b/src/Utils/MixedJSONHandler.php @@ -4,6 +4,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ + declare(strict_types=1); namespace Dub\Utils; @@ -60,4 +61,4 @@ public function deserializeMixedToJson(JsonDeserializationVisitor $visitor, mixe return $data; } -} +} \ No newline at end of file diff --git a/src/Utils/PathParameters.php b/src/Utils/PathParameters.php index ff69ee2..0c48fdd 100644 --- a/src/Utils/PathParameters.php +++ b/src/Utils/PathParameters.php @@ -79,9 +79,9 @@ private function parseSimplePathParams(ParamsMetadata $metadata, mixed $value): } if ($metadata->explode) { - $vals[] = sprintf('%s=%s', $fieldMetadata->name, valToString($fieldValue)); + $vals[] = sprintf('%s=%s', $fieldMetadata->name, valToString($fieldValue, $fieldMetadata->dateTimeFormat)); } else { - $vals[] = sprintf('%s,%s', $fieldMetadata->name, valToString($fieldValue)); + $vals[] = sprintf('%s,%s', $fieldMetadata->name, valToString($fieldValue, $fieldMetadata->dateTimeFormat)); } } diff --git a/src/Utils/PhpDocTypeParser.php b/src/Utils/PhpDocTypeParser.php new file mode 100644 index 0000000..8e444d3 --- /dev/null +++ b/src/Utils/PhpDocTypeParser.php @@ -0,0 +1,95 @@ +typeResolver = new \phpDocumentor\Reflection\TypeResolver(); + } + + /** + * @param string $typeString + * @return array + */ + public function parse(string $typeString): array + { + $type = $this->typeResolver->resolve($typeString); + + return $this->convertRecursive($type); + } + + /** + * @param Type $type + * @return array + */ + public function convertRecursive(Type $type): array + { + if (\is_a($type, \phpDocumentor\Reflection\Types\AggregatedType::class)) { + return [ + 'name' => 'union', + 'params' => \array_map(function ($type) { + return $this->convertRecursive($type); + }, iterator_to_array($type->getIterator())), + ]; + } elseif (\is_a($type, \phpDocumentor\Reflection\Types\Array_::class)) { + $params = []; + $keyType = $type->getKeyType(); + if (\is_a($keyType, \phpDocumentor\Reflection\Types\AggregatedType::class)) { + // The Default key that the phpdoc type system returns for *maps* is string|int, so if we see that, exclude it (which is the JMS/Serializer default). + if (! ($keyType->getIterator()->count() == 2 && $keyType->contains(new \phpDocumentor\Reflection\Types\String_()) && $keyType->contains(new \phpDocumentor\Reflection\Types\Integer()))) { + $params[] = $this->convertRecursive($keyType); + } + } else { + $params[] = $this->convertRecursive($keyType); + } + $valueType = $type->getValueType(); + $params[] = $this->convertRecursive($valueType); + + return [ + 'name' => 'array', + 'params' => $params, + ]; + } elseif (\is_a($type, \phpDocumentor\Reflection\Types\Object_::class)) { + $className = $type->__toString(); + if (class_exists($className)) { + $objectClass = new \ReflectionClass($className); + if ($objectClass->isEnum()) { + return [ + 'name' => 'enum', + 'params' => [ + [ + 'name' => $objectClass->getName(), + 'params' => [], + ], + ], + ]; + } + } + } + + return [ + 'name' => $type->__toString(), + 'params' => [], + ]; + } +} \ No newline at end of file diff --git a/src/Utils/RequestBodies.php b/src/Utils/RequestBodies.php index d02bf78..6e1209f 100644 --- a/src/Utils/RequestBodies.php +++ b/src/Utils/RequestBodies.php @@ -250,6 +250,7 @@ private function serializeForm(FormMetadata $metadata, mixed $value): array switch (gettype($value)) { case 'object': switch ($value::class) { + case 'Brick\DateTime\LocalDate': case 'DateTime': $values[$metadata->name] = valToString($value, $dateTimeFormat); break; diff --git a/src/Utils/UnionHandler.php b/src/Utils/UnionHandler.php new file mode 100644 index 0000000..c62f05e --- /dev/null +++ b/src/Utils/UnionHandler.php @@ -0,0 +1,270 @@ +> + */ + public static function getSubscribingMethods(): array + { + $methods = []; + $formats = ['json', 'xml']; + + foreach ($formats as $format) { + $methods[] = [ + 'type' => 'union', + 'format' => $format, + 'direction' => GraphNavigatorInterface::DIRECTION_DESERIALIZATION, + 'method' => 'deserializeUnion', + ]; + $methods[] = [ + 'type' => 'union', + 'format' => $format, + 'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION, + 'method' => 'serializeUnion', + ]; + } + + return $methods; + } + + /** + * @param SerializationVisitorInterface $visitor + * @param mixed $data + * @param array $type + * @param SerializationContext $context + * @return mixed + */ + public function serializeUnion( + SerializationVisitorInterface $visitor, + mixed $data, + array $type, + SerializationContext $context + ): mixed { + if ($this->isPrimitiveType(gettype($data))) { + return $this->matchSimpleType($data, $type, $context); + } else { + $resolvedType = [ + 'name' => get_class($data), + 'params' => [], + ]; + + return $context->getNavigator()->accept($data, $resolvedType); + } + } + + /** + * @param DeserializationVisitorInterface $visitor + * @param mixed $data + * @param array $type + * @param DeserializationContext $context + * @return mixed + */ + public function deserializeUnion(DeserializationVisitorInterface $visitor, mixed $data, array $type, DeserializationContext $context): mixed + { + if ($data instanceof \SimpleXMLElement) { + throw new RuntimeException('XML deserialisation into union types is not supported yet.'); + } + + + $alternativeName = null; + + 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.'\''); + } + } else { + $finalType = [ + 'name' => $lkup, + 'params' => [], + ]; + } + } + + 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; + } + + $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 mixed $data + * @param array $type + * @param Context $context + */ + 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; + } + + try { + return $context->getNavigator()->accept($data, $possibleType); + } catch (NonVisitableTypeException $e) { + continue; + } catch (PropertyMissingException $e) { + continue; + } + } + + return null; + } + + /** + * @param string $type + * @return bool + */ + private function isPrimitiveType(string $type): bool + { + return in_array($type, ['int', 'integer', 'float', 'double', 'bool', 'boolean', 'string']); + } + + /** + * @param mixed $data + * @param string $type + * @return bool + */ + private function testPrimitive(mixed $data, string $type): bool + { + switch ($type) { + case 'integer': + case 'int': + return (string) (int) $data === (string) $data; + + case 'double': + case 'float': + return (string) (float) $data === (string) $data; + + case 'bool': + case 'boolean': + return (string) (bool) $data === (string) $data; + + case 'string': + return (string) $data === (string) $data; + } + + return false; + } + + /** + * @param array $type + * @return array + */ + private function reorderTypes(array $type): array + { + if ($type['params']) { + uasort($type['params'], static function ($a, $b) { + if (\class_exists($a['name']) && \class_exists($b['name'])) { + $aClass = new \ReflectionClass($a['name']); + $bClass = new \ReflectionClass($b['name']); + $aRequiredPropertyCount = 0; + $bRequiredPropertyCount = 0; + foreach ($aClass->getProperties() as $property) { + if (! $property->getType()->allowsNull()) { + $aRequiredPropertyCount++; + } + } + + foreach ($bClass->getProperties() as $property) { + if (! $property->getType()->allowsNull()) { + $bRequiredPropertyCount++; + } + } + + return $bRequiredPropertyCount <=> $aRequiredPropertyCount; + } + + if (\class_exists($a['name'])) { + return 1; + } + + if (\class_exists($b['name'])) { + return -1; + } + + $order = ['null' => 0, 'true' => 1, 'false' => 2, 'bool' => 3, 'int' => 4, 'float' => 5, 'string' => 6]; + + return ($order[$a['name']] ?? 7) <=> ($order[$b['name']] ?? 7); + }); + } + + return $type; + } +} diff --git a/src/Utils/Utils.php b/src/Utils/Utils.php index f0192f5..74abfda 100644 --- a/src/Utils/Utils.php +++ b/src/Utils/Utils.php @@ -12,6 +12,19 @@ class Utils { + /** + * little function to adjust the return type from DateTime|false to DateTime|null + */ + public static function parseDateTime(string $dateTimeString): ?\DateTime + { + $val = \DateTime::createFromFormat('Y-m-d\\TH:i:s.uP', $dateTimeString); + if ($val === false) { + return null; + } + + return $val; + } + /** * configureClient configures the client with the given security. * @@ -190,10 +203,12 @@ function valToString(mixed $val, string $dateTimeFormat = ''): string switch (get_class($val)) { case 'DateTime': if (empty($dateTimeFormat)) { - $dateTimeFormat = 'Y-m-d\TH:i:s.uP'; + $dateTimeFormat = 'Y-m-d\TH:i:s.up'; } return $val->format($dateTimeFormat); + case 'Brick\DateTime\LocalDate': + return $val->jsonSerialize(); default: if (is_a($val, \BackedEnum::class, true)) { $enumVal = $val->value; diff --git a/src/Workspaces.php b/src/Workspaces.php index 047d4d8..0057d2e 100644 --- a/src/Workspaces.php +++ b/src/Workspaces.php @@ -8,6 +8,9 @@ namespace Dub; +use Dub\Models\Operations; +use JMS\Serializer\DeserializationContext; + class Workspaces { private SDKConfiguration $sdkConfiguration; @@ -26,81 +29,118 @@ public function __construct(SDKConfiguration $sdkConfig) * Retrieve a workspace for the authenticated user. * * @param string $idOrSlug - * @return \Dub\Models\Operations\GetWorkspaceResponse + * @return Operations\GetWorkspaceResponse + * @throws \Dub\Models\Errors\SDKException */ public function get( string $idOrSlug, - ): \Dub\Models\Operations\GetWorkspaceResponse { - $request = new \Dub\Models\Operations\GetWorkspaceRequest(); - $request->idOrSlug = $idOrSlug; + ): Operations\GetWorkspaceResponse { + $request = new Operations\GetWorkspaceRequest( + idOrSlug: $idOrSlug, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/workspaces/{idOrSlug}', \Dub\Models\Operations\GetWorkspaceRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/workspaces/{idOrSlug}', Operations\GetWorkspaceRequest::class, $request); $options = ['http_errors' => false]; $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + - $httpResponse = $this->sdkConfiguration->securityClient->request('GET', $url, $options); + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\GetWorkspaceResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->workspaceSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\WorkspaceSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\WorkspaceSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetWorkspaceResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + workspaceSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } /** @@ -109,18 +149,20 @@ public function get( * Update a workspace by ID or slug. * * @param string $idOrSlug - * @param ?\Dub\Models\Operations\UpdateWorkspaceRequestBody $requestBody - * @return \Dub\Models\Operations\UpdateWorkspaceResponse + * @param ?Operations\UpdateWorkspaceRequestBody $requestBody + * @return Operations\UpdateWorkspaceResponse + * @throws \Dub\Models\Errors\SDKException */ public function update( string $idOrSlug, - ?\Dub\Models\Operations\UpdateWorkspaceRequestBody $requestBody = null, - ): \Dub\Models\Operations\UpdateWorkspaceResponse { - $request = new \Dub\Models\Operations\UpdateWorkspaceRequest(); - $request->idOrSlug = $idOrSlug; - $request->requestBody = $requestBody; + ?Operations\UpdateWorkspaceRequestBody $requestBody = null, + ): Operations\UpdateWorkspaceResponse { + $request = new Operations\UpdateWorkspaceRequest( + idOrSlug: $idOrSlug, + requestBody: $requestBody, + ); $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/workspaces/{idOrSlug}', \Dub\Models\Operations\UpdateWorkspaceRequest::class, $request); + $url = Utils\Utils::generateUrl($baseUrl, '/workspaces/{idOrSlug}', Operations\UpdateWorkspaceRequest::class, $request); $options = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); if ($body !== null) { @@ -128,68 +170,103 @@ public function update( } $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); - $httpResponse = $this->sdkConfiguration->securityClient->request('PATCH', $url, $options); + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; $statusCode = $httpResponse->getStatusCode(); - - $response = new \Dub\Models\Operations\UpdateWorkspaceResponse(); - $response->statusCode = $statusCode; - $response->contentType = $contentType; - $response->rawResponse = $httpResponse; - if ($httpResponse->getStatusCode() === 200) { + if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->workspaceSchema = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\WorkspaceSchema', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Components\WorkspaceSchema', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateWorkspaceResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + workspaceSchema: $obj); + + return $response; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 400) { + } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->badRequest = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\BadRequest', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\BadRequest', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 401) { + } elseif ($statusCode == 401) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unauthorized = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Unauthorized', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Unauthorized', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 403) { + } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->forbidden = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Forbidden', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Forbidden', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 404) { + } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->notFound = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\NotFound', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\NotFound', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 409) { + } elseif ($statusCode == 409) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->conflict = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\Conflict', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\Conflict', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 410) { + } elseif ($statusCode == 410) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->inviteExpired = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InviteExpired', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InviteExpired', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 422) { + } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->unprocessableEntity = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\UnprocessableEntity', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\UnprocessableEntity', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 429) { + } elseif ($statusCode == 429) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->rateLimitExceeded = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\RateLimitExceeded', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\RateLimitExceeded', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } else { + throw new \Dub\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } - } elseif ($httpResponse->getStatusCode() === 500) { + } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $response->internalServerError = $serializer->deserialize((string) $httpResponse->getBody(), 'Dub\Models\Components\InternalServerError', 'json'); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Dub\Models\Errors\InternalServerError', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj; + } 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); } - - return $response; } } \ No newline at end of file