├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── build.sh ├── composer.json ├── example ├── certificate │ ├── CertificateCreate.php │ ├── CertificateCreateRealtime.php │ ├── CertificateDelete.php │ ├── CertificateInfo.php │ ├── CertificateList.php │ └── CertificatePrepareOrder.php ├── contact │ ├── ContactCreate.php │ ├── ContactDelete.php │ ├── ContactInfo.php │ ├── ContactList.php │ └── ContactUpdate.php ├── document │ └── DocumentInfo.php ├── domain │ ├── DomainBuy.php │ ├── DomainCancelationList.php │ ├── DomainCreate.php │ ├── DomainCreateAuthinfo1.php │ ├── DomainCreateAuthinfo2.php │ ├── DomainCreatePremium.php │ ├── DomainDeleteAuthinfo1.php │ ├── DomainInfo.php │ ├── DomainList.php │ ├── DomainOwnerChange.php │ ├── DomainRenew.php │ ├── DomainRestore.php │ ├── DomainRestoreList.php │ ├── DomainTrade.php │ ├── DomainTransfer.php │ ├── DomainUpdateForSubuser.php │ ├── DomainUpdateStatus.php │ └── DomainWhois.php ├── domainstudio │ └── DomainStudioSearch.php ├── pc_domains │ ├── Alexa.php │ ├── Estimation.php │ ├── Keyword.php │ ├── Majestic.php │ ├── Meta.php │ ├── Sistrix.php │ ├── SocialMediaUsernameCheck.php │ └── Wayback.php ├── poll │ └── ConfirmPollMessage.php ├── redirect │ ├── RedirectCreateDomain.php │ └── RedirectCreateEmail.php ├── user │ ├── UserInfo.php │ └── UserList.php ├── whois │ └── WhoisMulti.php └── zone │ └── ZoneCreate.php ├── gitInfo.json ├── pc_domains.yaml ├── src ├── Domainrobot.php ├── DomainrobotConstants.php ├── Lib │ ├── ArrayHelper.php │ ├── DomainrobotAuth.php │ ├── DomainrobotConfig.php │ ├── DomainrobotException.php │ ├── DomainrobotHeaders.php │ ├── DomainrobotPromise.php │ ├── DomainrobotResult.php │ └── specs.json ├── Model │ ├── .php_cs │ ├── .swagger-codegen-ignore │ ├── .swagger-codegen │ │ └── VERSION │ ├── .travis.yml │ ├── ACLRestriction.php │ ├── Account.php │ ├── AccountManager.php │ ├── AccountingDocumentTypeConstants.php │ ├── AdoptExpiration.php │ ├── AlexaSiteInfo.php │ ├── AlexaSiteInfoHighestRankedIncountry.php │ ├── AlexaSiteInfoPageViewsPerDay.php │ ├── AlexaSiteInfoSiteData.php │ ├── ApiAlexaSiteInfoResponse.php │ ├── ApiDomainStudioResponse.php │ ├── ApiEstimationErrorResponse.php │ ├── ApiEstimationResponse.php │ ├── ApiExchangeRateResponse.php │ ├── ApiHistoryUserResponse.php │ ├── ApiKeywordResponse.php │ ├── ApiMajesticResponse.php │ ├── ApiMetaResponse.php │ ├── ApiResponseMessages.php │ ├── ApiResponseObject.php │ ├── ApiSistrixResponse.php │ ├── ApiSocialMediaResponse.php │ ├── ApiStatisticsResponse.php │ ├── ApiUserStatisticsResponse.php │ ├── ApiV1EstimationResponse.php │ ├── ApiWaybackResponse.php │ ├── Application.php │ ├── Article.php │ ├── AuEligibilityIdTypeConstants.php │ ├── AuEligibilityTypeConstants.php │ ├── AuRegistrantIdTypeConstants.php │ ├── AuthInfo.php │ ├── AuthInfo1Location.php │ ├── AuthMethodConstants.php │ ├── AuthSession.php │ ├── AuthType.php │ ├── AuthenticateStatus.php │ ├── AuthenticationStep.php │ ├── AutoDeleteDomain.php │ ├── AutoDeleteStatus.php │ ├── AutoRenewStatusConstants.php │ ├── BackupMx.php │ ├── BasicCertificate.php │ ├── BasicCustomer.php │ ├── BasicCustomerContact.php │ ├── BasicCustomerSpoolVerification.php │ ├── BasicDocument.php │ ├── BasicUser.php │ ├── BillingEvent.php │ ├── BillingEventExtensions.php │ ├── BillingLimit.php │ ├── BillingObjectLimit.php │ ├── BillingObjectTerm.php │ ├── BillingObjectTerms.php │ ├── BillingStatus.php │ ├── BillingTerm.php │ ├── BillingTldTerm.php │ ├── BulkBackupMxDeleteRequest.php │ ├── BulkBackupMxPostRequest.php │ ├── BulkBillingEventDeleteRequest.php │ ├── BulkBillingEventDropRequest.php │ ├── BulkBillingEventReactivateRequest.php │ ├── BulkBillingEventRejectRequest.php │ ├── BulkCertificateDeleteRequest.php │ ├── BulkCertificatePatchRequest.php │ ├── BulkCertificatePostRequest.php │ ├── BulkContactDeleteRequest.php │ ├── BulkCustomerPriceListDeleteRequest.php │ ├── BulkCustomerPriceListPostRequest.php │ ├── BulkDomainCancelationDeleteRequest.php │ ├── BulkDomainCancelationPatchRequest.php │ ├── BulkDomainCancelationPostRequest.php │ ├── BulkDomainCommentRequest.php │ ├── BulkDomainDeleteRequest.php │ ├── BulkDomainPatchRequest.php │ ├── BulkDomainPostRequest.php │ ├── BulkDomainPreregDeleteRequest.php │ ├── BulkDomainPreregPatchRequest.php │ ├── BulkDomainPreregPostRequest.php │ ├── BulkDomainSafeContactRequest.php │ ├── BulkDomainSafeDomainRequest.php │ ├── BulkDomainSafeZoneRequest.php │ ├── BulkExternalCustomerDeleteRequest.php │ ├── BulkExternalCustomerPostRequest.php │ ├── BulkMailProxyDeleteRequest.php │ ├── BulkMailProxyPatchRequest.php │ ├── BulkMailProxyPostRequest.php │ ├── BulkObjectUserAssignmentPatchRequest.php │ ├── BulkPriceDeleteRequest.php │ ├── BulkPricePatchRequest.php │ ├── BulkPricePostRequest.php │ ├── BulkRedirectDeleteRequest.php │ ├── BulkRedirectPatchRequest.php │ ├── BulkRedirectPostRequest.php │ ├── BulkSslContactDeleteRequest.php │ ├── BulkZoneCommentRequest.php │ ├── BulkZoneDeleteRequest.php │ ├── BulkZonePatchRequest.php │ ├── BulkZonePostRequest.php │ ├── BusinessCase.php │ ├── BusinessCategory.php │ ├── CaCertificate.php │ ├── CancelationStatusConstants.php │ ├── CancelationTypeConstants.php │ ├── Card.php │ ├── CardStatus.php │ ├── CertAuthentication.php │ ├── CertAuthenticationStatus.php │ ├── Certificate.php │ ├── CertificateData.php │ ├── CertificateHistory.php │ ├── CertificateInstallCheckData.php │ ├── CertificateInstallCheckNotice.php │ ├── CertificateInstallCheckRequest.php │ ├── CertificateInstallCheckResult.php │ ├── CertificateTransparencyPrivacyConstants.php │ ├── CertificateType.php │ ├── Charset.php │ ├── CiraCprConstants.php │ ├── ClearAccountPeriod.php │ ├── CodeSigningType.php │ ├── Comment.php │ ├── Condition.php │ ├── ConditionType.php │ ├── Configuration.php │ ├── Contact.php │ ├── ContactAeroExtensions.php │ ├── ContactAuExtensions.php │ ├── ContactBankExtensions.php │ ├── ContactBarcelonaExtensions.php │ ├── ContactBirthExtensions.php │ ├── ContactCaExtensions.php │ ├── ContactCatExtensions.php │ ├── ContactDocument.php │ ├── ContactDocumentType.php │ ├── ContactEsExtensions.php │ ├── ContactExtensions.php │ ├── ContactGeneralExtensions.php │ ├── ContactHkExtensions.php │ ├── ContactIdentificationExtensions.php │ ├── ContactIeExtensions.php │ ├── ContactItExtensions.php │ ├── ContactJobsExtensions.php │ ├── ContactJpExtensions.php │ ├── ContactLuxeExtensions.php │ ├── ContactMadridExtensions.php │ ├── ContactNzExtensions.php │ ├── ContactProtectionConstants.php │ ├── ContactReference.php │ ├── ContactReferenceType.php │ ├── ContactRoExtensions.php │ ├── ContactRuExtensions.php │ ├── ContactScotExtensions.php │ ├── ContactSportExtensions.php │ ├── ContactSwissExtensions.php │ ├── ContactTrademarkExtensions.php │ ├── ContactType.php │ ├── ContactTypeConstants.php │ ├── ContactUkExtensions.php │ ├── ContactVerification.php │ ├── ContactVerificationDomain.php │ ├── ContactVerificationMessage.php │ ├── ContactXxxExtensions.php │ ├── ContactZuerichExtensions.php │ ├── ContextHost.php │ ├── ContextHostZone.php │ ├── Country.php │ ├── CreditCardVendor.php │ ├── CryptoFormatConstants.php │ ├── CsrHashAlgorithmConstants.php │ ├── Currency.php │ ├── CurrencyRate.php │ ├── Custom.php │ ├── CustomerContract.php │ ├── CustomerPriceList.php │ ├── CustomerTag.php │ ├── CustomerType.php │ ├── DNSSec.php │ ├── DNSSecJob.php │ ├── DcvValidationScope.php │ ├── DeliveryStatus.php │ ├── DigiCertCodeSigningHardwarePlatform.php │ ├── DigiCertCodeSigningProvisioningMethod.php │ ├── Document.php │ ├── DocumentType.php │ ├── DocumentTypeConstants.php │ ├── Domain.php │ ├── DomainActionConstants.php │ ├── DomainAutodeleteExtensions.php │ ├── DomainBuyExtensions.php │ ├── DomainCancelation.php │ ├── DomainCancelationExtensions.php │ ├── DomainControllValidationStatus.php │ ├── DomainEnvelope.php │ ├── DomainEnvelopeSearchRequest.php │ ├── DomainEnvelopeSearchService.php │ ├── DomainExtensions.php │ ├── DomainMonitoring.php │ ├── DomainMonitoringSetup.php │ ├── DomainParkingExtensions.php │ ├── DomainPremium.php │ ├── DomainPrereg.php │ ├── DomainPreregAddon.php │ ├── DomainPreregStatusConstants.php │ ├── DomainRestore.php │ ├── DomainSafeAccount.php │ ├── DomainSafeObject.php │ ├── DomainSafeUser.php │ ├── DomainSellExtensions.php │ ├── DomainServices.php │ ├── DomainServicesUpdate.php │ ├── DomainStudio.php │ ├── DomainStudioClassifyRequest.php │ ├── DomainStudioDomainSource.php │ ├── DomainStudioDomainStatus.php │ ├── DomainStudioItem.php │ ├── DomainStudioService.php │ ├── DomainStudioServiceStatus.php │ ├── DomainStudioSourceCustom.php │ ├── DomainStudioSourceDomainsBot.php │ ├── DomainStudioSourceGeo.php │ ├── DomainStudioSourceInitial.php │ ├── DomainStudioSourceMarket.php │ ├── DomainStudioSourceOnlinePresence.php │ ├── DomainStudioSourcePersonalNames.php │ ├── DomainStudioSourcePlacementPlus.php │ ├── DomainStudioSourcePrefixSuffix.php │ ├── DomainStudioSourcePremium.php │ ├── DomainStudioSourceRecommended.php │ ├── DomainStudioSourceSimilar.php │ ├── DomainStudioSourceSpinWord.php │ ├── DomainStudioSourceSuggestion.php │ ├── DomainStudioSourceSuggestion2.php │ ├── DomainStudioSourceUpcoming.php │ ├── DomainStudioSources.php │ ├── DomainTmchClaimNoticeExtensions.php │ ├── Domains.php │ ├── DomainstudioSocialMediaRequest.php │ ├── Estimation.php │ ├── EstimationData.php │ ├── EstimationParameters.php │ ├── EstimationParametersV1.php │ ├── EstimationParametersV1KeywordBased.php │ ├── EstimationParametersV1Language.php │ ├── EstimationParametersV1NameBased.php │ ├── EstimationParametersV1Pagerank.php │ ├── EstimationParametersV1TldBased.php │ ├── EstimationParametersV1WikipediaPageview.php │ ├── EstimationServiceData.php │ ├── EstimationStatistics.php │ ├── EstimationV1.php │ ├── ExchangeRate.php │ ├── ExchangedPrice.php │ ├── ExecutionTypeConstants.php │ ├── ExtendedValidationExtension.php │ ├── ExternalAccounting.php │ ├── ExternalCustomer.php │ ├── GenderConstants.php │ ├── GenericCustomer.php │ ├── GenericLabelEntity.php │ ├── GenericObject.php │ ├── GenericStatusConstants.php │ ├── GlobalSignPickupMethod.php │ ├── HistoryUser.php │ ├── HkDocumentTypeConstants.php │ ├── HkIndustryTypeConstants.php │ ├── HostSubZone.php │ ├── InetAddress.php │ ├── Invoice.php │ ├── InvoiceStatusConstants.php │ ├── IpRestriction.php │ ├── IpRestrictionTypeConstants.php │ ├── IpRestrictions.php │ ├── ItEntityTypeConstants.php │ ├── Job.php │ ├── JobStatusConstants.php │ ├── JsonNoData.php │ ├── JsonResponseData.php │ ├── JsonResponseDataAccount.php │ ├── JsonResponseDataAuthSession.php │ ├── JsonResponseDataAutoDeleteDomain.php │ ├── JsonResponseDataBackupMx.php │ ├── JsonResponseDataBasicUser.php │ ├── JsonResponseDataBillingEvent.php │ ├── JsonResponseDataBillingLimit.php │ ├── JsonResponseDataBillingObjectTerms.php │ ├── JsonResponseDataCertificate.php │ ├── JsonResponseDataCertificateData.php │ ├── JsonResponseDataCertificateInstallCheckResult.php │ ├── JsonResponseDataContact.php │ ├── JsonResponseDataContactDocument.php │ ├── JsonResponseDataContactVerification.php │ ├── JsonResponseDataContextHost.php │ ├── JsonResponseDataCustomerPriceList.php │ ├── JsonResponseDataDomain.php │ ├── JsonResponseDataDomainCancelation.php │ ├── JsonResponseDataDomainEnvelope.php │ ├── JsonResponseDataDomainPremium.php │ ├── JsonResponseDataDomainPrereg.php │ ├── JsonResponseDataDomainRestore.php │ ├── JsonResponseDataDomainSafeAccount.php │ ├── JsonResponseDataDomainSafeObject.php │ ├── JsonResponseDataDomainSafeUser.php │ ├── JsonResponseDataExternalCustomer.php │ ├── JsonResponseDataInvoice.php │ ├── JsonResponseDataJob.php │ ├── JsonResponseDataJsonNoData.php │ ├── JsonResponseDataListJsonResponseDataBackupMx.php │ ├── JsonResponseDataListJsonResponseDataBillingEvent.php │ ├── JsonResponseDataListJsonResponseDataCertificate.php │ ├── JsonResponseDataListJsonResponseDataContact.php │ ├── JsonResponseDataListJsonResponseDataCustomerPriceList.php │ ├── JsonResponseDataListJsonResponseDataDomain.php │ ├── JsonResponseDataListJsonResponseDataDomainCancelation.php │ ├── JsonResponseDataListJsonResponseDataDomainPrereg.php │ ├── JsonResponseDataListJsonResponseDataExternalCustomer.php │ ├── JsonResponseDataListJsonResponseDataMailProxy.php │ ├── JsonResponseDataListJsonResponseDataObjectUserAssignment.php │ ├── JsonResponseDataListJsonResponseDataPrice.php │ ├── JsonResponseDataListJsonResponseDataRedirect.php │ ├── JsonResponseDataListJsonResponseDataSslContact.php │ ├── JsonResponseDataListJsonResponseDataZone.php │ ├── JsonResponseDataMailProxy.php │ ├── JsonResponseDataMailServiceMessage.php │ ├── JsonResponseDataOTPAuth.php │ ├── JsonResponseDataObjectJob.php │ ├── JsonResponseDataObjectUserAssignment.php │ ├── JsonResponseDataPeriodicBilling.php │ ├── JsonResponseDataPollMessage.php │ ├── JsonResponseDataPrice.php │ ├── JsonResponseDataRedirect.php │ ├── JsonResponseDataServiceUsersProfile.php │ ├── JsonResponseDataSiteSealInformation.php │ ├── JsonResponseDataSslContact.php │ ├── JsonResponseDataString.php │ ├── JsonResponseDataSubjectProduct.php │ ├── JsonResponseDataTaskUserLimit.php │ ├── JsonResponseDataTldProduct.php │ ├── JsonResponseDataTldStatistic.php │ ├── JsonResponseDataTmchClaimsNotice.php │ ├── JsonResponseDataTmchMark.php │ ├── JsonResponseDataTmchMarkDocument.php │ ├── JsonResponseDataTransfer.php │ ├── JsonResponseDataTransferOut.php │ ├── JsonResponseDataUser.php │ ├── JsonResponseDataUserProfileViews.php │ ├── JsonResponseDataUserSalesReport.php │ ├── JsonResponseDataVmcCheckData.php │ ├── JsonResponseDataVoid.php │ ├── JsonResponseDataZone.php │ ├── JsonResponseDataZoneQuery.php │ ├── Keyword.php │ ├── Keywords.php │ ├── LoginData.php │ ├── MailList.php │ ├── MailProxy.php │ ├── MailServiceMessage.php │ ├── MainIp.php │ ├── Majestic.php │ ├── Message.php │ ├── MessageTypeConstants.php │ ├── Meta.php │ ├── Metric.php │ ├── ModelInterface.php │ ├── Modifier.php │ ├── ModifierConstants.php │ ├── Name.php │ ├── NameServer.php │ ├── NameServerMode.php │ ├── NameserverActionConstants.php │ ├── NewPassword.php │ ├── NicMember.php │ ├── NiccomLog.php │ ├── NiccomSourceConstants.php │ ├── Notification.php │ ├── NotifyMessage.php │ ├── OTPAuth.php │ ├── ObjectAssignmentMode.php │ ├── ObjectJob.php │ ├── ObjectStatus.php │ ├── ObjectUserAssignment.php │ ├── Operator.php │ ├── Order.php │ ├── OrderType.php │ ├── ParkingProviderConstants.php │ ├── PaymentConstants.php │ ├── PeriodicBilling.php │ ├── Phone.php │ ├── PhysicalNameServerGroup.php │ ├── Platform.php │ ├── PolicyMode.php │ ├── PollMessage.php │ ├── PremiumStatusConstants.php │ ├── PreregConfig.php │ ├── PreregInformation.php │ ├── Price.php │ ├── PriceChange.php │ ├── PriceChangeExclude.php │ ├── PriceChangeStatusConstants.php │ ├── PriceChangeTypeConstants.php │ ├── PriceClassTemplate.php │ ├── PriceData.php │ ├── PriceList.php │ ├── PriceListEntity.php │ ├── PriceMarkupType.php │ ├── PriceRoundingConstants.php │ ├── PriceServiceData.php │ ├── PriceServiceEntity.php │ ├── PriceTypeConstants.php │ ├── PriorityConstants.php │ ├── Product.php │ ├── ProductPriceTemplate.php │ ├── ProtectionConstants.php │ ├── ProtocolTypeConstants.php │ ├── Provider.php │ ├── ProviderEntity.php │ ├── PurgeTypes.php │ ├── Query.php │ ├── QueryFilter.php │ ├── QueryView.php │ ├── README.md │ ├── RddsOptInConstants.php │ ├── Recipient.php │ ├── RecipientLog.php │ ├── RecipientRole.php │ ├── Redirect.php │ ├── RedirectModeConstants.php │ ├── RedirectTypeConstants.php │ ├── Registrar.php │ ├── RegistrationTypeConstants.php │ ├── RegistryStatusConstants.php │ ├── RelativeConstants.php │ ├── RenewStatusConstants.php │ ├── ResourceRecord.php │ ├── ResponseObject.php │ ├── ResponseStatus.php │ ├── RoPersonTypeConstants.php │ ├── SEPAMandate.php │ ├── SanType.php │ ├── SectigoHsmType.php │ ├── SellMode.php │ ├── SepaStatus.php │ ├── ServerSoftwareTypeConstants.php │ ├── ServiceEntity.php │ ├── ServiceProfiles.php │ ├── ServiceUsersProfile.php │ ├── SignatureHashAlgorithmConstants.php │ ├── SimilarDomain.php │ ├── SimplePrice.php │ ├── Sistrix.php │ ├── SiteSealInformation.php │ ├── Soa.php │ ├── SocialMedia.php │ ├── SocialMediaPlatform.php │ ├── SpamPolicy.php │ ├── SslContact.php │ ├── SslContactExtensions.php │ ├── SslContactGeneralExtensions.php │ ├── SslContactReference.php │ ├── StatisticsParameters.php │ ├── StatusType.php │ ├── Subject.php │ ├── SubjectAlternativeName.php │ ├── SubjectProduct.php │ ├── Subscription.php │ ├── TaskGroup.php │ ├── TaskLimit.php │ ├── TaskUserLimit.php │ ├── TechnicalCustomer.php │ ├── TimePeriod.php │ ├── TimeUnitConstants.php │ ├── TldContinent.php │ ├── TldDataController.php │ ├── TldDns.php │ ├── TldPeriod.php │ ├── TldProduct.php │ ├── TldStatistic.php │ ├── TldTask.php │ ├── TldTaskProcessing.php │ ├── TldType.php │ ├── TlsData.php │ ├── TmchClaimsNotice.php │ ├── TmchClaimsNoticeMessage.php │ ├── TmchContact.php │ ├── TmchMark.php │ ├── TmchMarkAddon.php │ ├── TmchMarkComment.php │ ├── TmchMarkDocument.php │ ├── TmchMarkHolderConstants.php │ ├── TmchMarkStatusConstants.php │ ├── TmchMarkTypeConstants.php │ ├── Transfer.php │ ├── TransferAnswer.php │ ├── TransferOut.php │ ├── TransferStatusConstants.php │ ├── TrustedApplication.php │ ├── TrustedApplicationFunctions.php │ ├── TrusteeContact.php │ ├── Type.php │ ├── UkTypeConstants.php │ ├── User.php │ ├── UserAcl.php │ ├── UserAcls.php │ ├── UserDetails.php │ ├── UserEstimationStatistics.php │ ├── UserEstimationStatisticsLast12MonthsDevelopment.php │ ├── UserLock.php │ ├── UserProfile.php │ ├── UserProfileFlag.php │ ├── UserProfileView.php │ ├── UserProfileViews.php │ ├── UserSalesReport.php │ ├── VirtualNameServer.php │ ├── VirtualNameServerGroup.php │ ├── VmcCheckData.php │ ├── VmcTrademarkCountryOrRegion.php │ ├── VoidResponse.php │ ├── Wayback.php │ ├── WaybackWayback.php │ ├── WaybackWaybackArchivedSnapshots.php │ ├── WaybackWaybackArchivedSnapshotsClosest.php │ ├── WhoisServiceData.php │ ├── WhoisStatus.php │ ├── WorkflowEvent.php │ ├── X509CertificateData.php │ ├── X509CertificateIssuer.php │ ├── X509CertificatePublicKeyData.php │ ├── X509CertificateSubject.php │ ├── X509CertificateValidity.php │ ├── Zone.php │ ├── ZoneBasePatchRequest.php │ ├── ZoneQuery.php │ ├── ZoneStream.php │ ├── composer.json │ ├── git_push.sh │ └── phpunit.xml.dist ├── ObjectSerializer.php └── Service │ ├── CertificateService.php │ ├── ContactService.php │ ├── DocumentService.php │ ├── DomainBulkService.php │ ├── DomainCancelationService.php │ ├── DomainPremiumService.php │ ├── DomainService.php │ ├── DomainStudioService.php │ ├── DomainrobotService.php │ ├── JobService.php │ ├── LoginService.php │ ├── PcDomainsService.php │ ├── PollMessageService.php │ ├── PriceClassService.php │ ├── PriceService.php │ ├── RedirectService.php │ ├── RestoreService.php │ ├── SslContactService.php │ ├── TransferOutService.php │ ├── TrustedApplicationService.php │ ├── User2faService.php │ ├── UserService.php │ ├── WhoisService.php │ └── ZoneService.php ├── swagger-codegen-cli.jar ├── swagger.conf └── test ├── AtoumTestSuite.php ├── README.md ├── mock-data └── Certificate │ ├── CreateResponse.json │ ├── PrepareOrderCertificateModel.json │ └── PrepareOrderResponse.json └── units ├── Domainrobot.php └── Service └── CertificateService.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.code-workspace 3 | vendor 4 | /node_modules/* 5 | .vscode 6 | composer.lock 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 InterNetX GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # domainrobot.json contains a definition for a class named Void 4 | # in php Void is a reserved word which cannot be used as a class name 5 | # we will fix that definition with sed 6 | 7 | sed 's/ "Void" : {/ "VoidResponse" : {/' vendor/internetx/internetx-swagger-files/src/domainrobot.json > vendor/internetx/internetx-swagger-files/src/tmp_domainrobot.json 8 | mv vendor/internetx/internetx-swagger-files/src/tmp_domainrobot.json vendor/internetx/internetx-swagger-files/src/domainrobot.json 9 | sed 's/"#\/definitions\/Void"/"#\/definitions\/VoidResponse"/' vendor/internetx/internetx-swagger-files/src/domainrobot.json > vendor/internetx/internetx-swagger-files/src/tmp_domainrobot.json 10 | mv vendor/internetx/internetx-swagger-files/src/tmp_domainrobot.json vendor/internetx/internetx-swagger-files/src/domainrobot.json 11 | 12 | cd src/Model 13 | java -jar -Dmodels -DsupportingFiles -DmodelDocs=false -DmodelTests=false ../../swagger-codegen-cli.jar generate -l php -i ../../vendor/internetx/internetx-swagger-files/src/domainrobot.json -c ../../swagger.conf 14 | java -jar -Dmodels -DsupportingFiles -DmodelDocs=false -DmodelTests=false ../../swagger-codegen-cli.jar generate -l php -i ../../pc_domains.yaml -c ../../swagger.conf 15 | mv lib/Model/*.php . 16 | rm -rf lib 17 | cd ../.. -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "internetx/php-domainrobot-sdk", 3 | "version": "0.9.26", 4 | "description": "A php package for easy integration of the domainrobot API powered by InterNetX GmbH.", 5 | "type": "library", 6 | "license": "MIT", 7 | "autoload": { 8 | "psr-4": { 9 | "Domainrobot\\": "src/", 10 | "Domainrobot\\Model\\": "src/Model" 11 | } 12 | }, 13 | "require-dev": { 14 | "internetx/internetx-swagger-files": "dev-master", 15 | "atoum/atoum": "^4.0", 16 | "atoum/stubs": "^2.6", 17 | "friendsofphp/php-cs-fixer": "^3.65" 18 | }, 19 | "require": { 20 | "guzzlehttp/guzzle": "^7.2.0" 21 | }, 22 | "repositories": { 23 | "internetx/internetx-swagger-files": { 24 | "type": "git", 25 | "url": "git@github.com:InterNetX/internetx-swagger-files.git" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /example/certificate/CertificateDelete.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 20 | 'auth' => new DomainrobotAuth([ 21 | 'user' => 'username', 22 | 'password' => 'password', 23 | 'context' => 4 24 | ]) 25 | ]); 26 | 27 | try { 28 | 29 | $objectJob = $domainrobot->certificate->delete(234234234); 30 | 31 | } catch (DomainrobotException $exception) { 32 | return $exception; 33 | } 34 | 35 | return Domainrobot::getLastDomainrobotResult()->getResult(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/certificate/CertificateInfo.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 21 | 'auth' => new DomainrobotAuth([ 22 | 'user' => 'username', 23 | 'password' => 'password', 24 | 'context' => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $certificate = $domainrobot->certificate->info(234234234); 30 | } catch (DomainrobotException $exception) { 31 | return $exception->getError(); 32 | } 33 | 34 | return $certificate; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/certificate/CertificateList.php: -------------------------------------------------------------------------------- 1 | "https://api.demo.autodns.com/v1", 25 | "auth" => new DomainrobotAuth([ 26 | "user" => "username", 27 | "password" => "password", 28 | "context" => 4 29 | ]) 30 | ]); 31 | 32 | try { 33 | $query = new Query([ 34 | 'filters' => [ new QueryFilter([ 35 | 'key' => 'name', 36 | 'value' => 'Test%', 37 | 'operator' => 'LIKE' 38 | ])], 39 | 'view' => new QueryView([ 40 | 'children' => 1, 41 | 'limit' => 10 42 | ]) 43 | ]); 44 | $certificateList = $domainrobot->certificate->list($query); 45 | } catch (DomainrobotException $exception) { 46 | return $exception; 47 | } 48 | 49 | // if you want to get the raw result of the request 50 | Domainrobot::getLastDomainrobotResult()->getResult(); 51 | // if you need the http status code of the last request/response 52 | Domainrobot::getLastDomainrobotResult()->getStatusCode(); 53 | 54 | return $certificateList; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /example/certificate/CertificatePrepareOrder.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 23 | 'auth' => new DomainrobotAuth([ 24 | 'user' => 'username', 25 | 'password' => 'password', 26 | 'context' => 4 27 | ]) 28 | ]); 29 | 30 | try { 31 | $certificateData = new CertificateData(); 32 | $certificateData->setName('www.example.com'); 33 | 34 | $certificateData->setProduct('SSL123'); 35 | $certificateData->setPlain( 36 | ' 37 | -----BEGIN CERTIFICATE REQUEST----- 38 | MIIC4zCCAcsCAQAwgZ0xCzAJBgNVO..............+fM+gd6K8HvPkCk6C9dQ= 39 | -----END CERTIFICATE REQUEST-----' 40 | ); 41 | 42 | 43 | $certificateData = $domainrobot->certificate->prepareOrder($certificateData); 44 | } catch (DomainrobotException $exception) { 45 | return $exception->getError(); 46 | } 47 | 48 | return $certificateData; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /example/contact/ContactDelete.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 20 | 'auth' => new DomainrobotAuth([ 21 | 'user' => 'username', 22 | 'password' => 'password', 23 | 'context' => 4 24 | ]) 25 | ]); 26 | 27 | try { 28 | 29 | $domainrobot->contact->delete(234234234); 30 | 31 | } catch (DomainrobotException $exception) { 32 | return $exception; 33 | } 34 | 35 | return Domainrobot::getLastDomainrobotResult()->getResult(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/contact/ContactInfo.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 21 | 'auth' => new DomainrobotAuth([ 22 | 'user' => 'username', 23 | 'password' => 'password', 24 | 'context' => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $contact = $domainrobot->contact->info(234234234); 30 | } catch (DomainrobotException $exception) { 31 | return $exception; 32 | } 33 | 34 | return $contact; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/contact/ContactList.php: -------------------------------------------------------------------------------- 1 | "https://api.demo.autodns.com/v1", 25 | "auth" => new DomainrobotAuth([ 26 | "user" => "username", 27 | "password" => "password", 28 | "context" => 4 29 | ]) 30 | ]); 31 | 32 | try { 33 | $query = new Query([ 34 | 'filters' => [ new QueryFilter([ 35 | 'key' => 'fname', 36 | 'value' => 'Test%', 37 | 'operator' => 'LIKE' 38 | ]), new QueryFilter([ 39 | 'key' => 'lname', 40 | 'value' => 'Test%', 41 | 'operator' => 'LIKE' 42 | ])], 43 | 'view' => new QueryView([ 44 | 'children' => 1, 45 | 'limit' => 10 46 | ]) 47 | ]); 48 | $contactList = $domainrobot->contact->list($query); 49 | } catch (DomainrobotException $exception) { 50 | return $exception; 51 | } 52 | 53 | // if you want to get the raw result of the request 54 | Domainrobot::getLastDomainrobotResult()->getResult(); 55 | // if you need the http status code of the last request/response 56 | Domainrobot::getLastDomainrobotResult()->getStatusCode(); 57 | 58 | return $contactList; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /example/document/DocumentInfo.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 9 | 'auth' => new DomainrobotAuth([ 10 | 'user' => 'USER', 11 | 'password' => 'PASS', 12 | 'context' => 4 13 | ]) 14 | ]); 15 | 16 | 17 | $targetFolder = 'path/to/folder/'; 18 | $targetFile = 'price_list.xml'; 19 | 20 | $domainrobot->document->info('price_list.xml', $targetFolder . $targetFile); -------------------------------------------------------------------------------- /example/domain/DomainCancelationList.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 11 | 'auth' => new DomainrobotAuth([ 12 | 'user' => 'USER', 13 | 'password' => 'PASS', 14 | 'context' => 4 15 | ]) 16 | ]); 17 | 18 | $query = new Query([ 19 | 'filters' => [], 20 | 'view' => new QueryView([ 21 | 'children' => true, 22 | 'limit' => 10, 23 | 'offset' => 0 24 | ]) 25 | ]); 26 | 27 | $domainList = $domainrobot->domainCancelation->list($query); 28 | ?> -------------------------------------------------------------------------------- /example/domain/DomainCreate.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 23 | "auth" => new DomainrobotAuth([ 24 | "user" => "username", 25 | "password" => "password", 26 | "context" => 4 27 | ]) 28 | ]); 29 | 30 | try { 31 | $domain = new Domain(); 32 | $domain->setName("php-sdk-test".uniqid().".de"); 33 | $domain->setNameServers([ 34 | new NameServer([ 35 | "name" => "ns1.example.com" 36 | ]), 37 | new NameServer([ 38 | "name" => "ns2.example.com" 39 | ]) 40 | ]); 41 | $contact = $domainrobot->contact->info(23194139); 42 | $domain->setAdminc($contact); 43 | $domain->setOwnerc($contact); 44 | $domain->setTechc($contact); 45 | $domain->setZonec($contact); 46 | //$domain->setIgnoreWhois(true); 47 | 48 | $objectJob = $domainrobot->domain->create($domain); 49 | 50 | } catch (DomainrobotException $exception) { 51 | return $exception; 52 | } 53 | 54 | return $objectJob; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /example/domain/DomainCreateAuthinfo1.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $domain = $domainrobot->domain->createAuthinfo1("example.de"); 30 | } catch (DomainrobotException $exception) { 31 | return $exception; 32 | } 33 | 34 | return $domain; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/domain/DomainCreateAuthinfo2.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $domain = $domainrobot->domain->createAuthinfo2("example.de"); 30 | } catch (DomainrobotException $exception) { 31 | return $exception; 32 | } 33 | 34 | return $domain; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/domain/DomainDeleteAuthinfo1.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $domain = $domainrobot->domain->deleteAuthinfo1("example.de"); 30 | } catch (DomainrobotException $exception) { 31 | return $exception; 32 | } 33 | 34 | return $domain; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/domain/DomainInfo.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | $domain = $domainrobot->domain->info("example.com"); 30 | } catch (DomainrobotException $exception) { 31 | return $exception; 32 | } 33 | 34 | return $domain; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/domain/DomainOwnerChange.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 27 | "auth" => new DomainrobotAuth([ 28 | "user" => "username", 29 | "password" => "password", 30 | "context" => 4 31 | ]) 32 | ]); 33 | 34 | try { 35 | 36 | // Domainrobot\Model\Domain 37 | $domain = new Domain(); 38 | 39 | // Set the name of the domain 40 | $domain->setName("example.com"); 41 | 42 | // Confirm the consent of the owner 43 | $domain->setConfirmOwnerConsent(true); 44 | 45 | // Domainrobot\Model\Contact 46 | $contact = $domainrobot->contact->info(23372784); 47 | 48 | // Set the new OwnerC 49 | $domain->setOwnerc($contact); 50 | 51 | // Domainrobot\Model\ObjectJob 52 | $objectJob = $domainrobot->domain->ownerChange($domain); 53 | 54 | } catch (DomainrobotException $exception) { 55 | return $exception; 56 | } 57 | 58 | return $objectJob; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /example/domain/DomainRenew.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 26 | "auth" => new DomainrobotAuth([ 27 | "user" => "username", 28 | "password" => "password", 29 | "context" => 4 30 | ]) 31 | ]); 32 | 33 | try { 34 | // Domainrobot/Model/Domain 35 | $domain = $domainrobot->domain->info("example.com"); 36 | 37 | $job = $domainrobot->domain->renew($domain); 38 | } catch (DomainrobotException $exception) { 39 | return$exception; 40 | } 41 | 42 | return $job; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /example/domain/DomainRestore.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 24 | "auth" => new DomainrobotAuth([ 25 | "user" => "username", 26 | "password" => "password", 27 | "context" => 4 28 | ]) 29 | ]); 30 | 31 | try { 32 | $domain = new DomainRestore(); 33 | $domain->setName("php-sdk-test".uniqid().".de"); 34 | $domain->setNameServers([ 35 | new NameServer([ 36 | "name" => "ns1.example.com" 37 | ]), 38 | new NameServer([ 39 | "name" => "ns2.example.com" 40 | ]) 41 | ]); 42 | $contact = $domainrobot->contact->info(23194139); 43 | $domain->setAdminc($contact); 44 | $domain->setOwnerc($contact); 45 | $domain->setTechc($contact); 46 | $domain->setZonec($contact); 47 | 48 | $objectJob = $domainrobot->domain->restore($domain); 49 | 50 | } catch (DomainrobotException $exception) { 51 | return $exception; 52 | } 53 | 54 | return $objectJob; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /example/domain/DomainRestoreList.php: -------------------------------------------------------------------------------- 1 | "https://api.demo.autodns.com/v1", 26 | "auth" => new DomainrobotAuth([ 27 | "user" => "username", 28 | "password" => "password", 29 | "context" => 4 30 | ]) 31 | ]); 32 | 33 | try { 34 | $query = new Query([ 35 | 'filters' => [ new QueryFilter([ 36 | 'key' => 'name', 37 | 'value' => 'example%', 38 | 'operator' => 'LIKE' 39 | ])], 40 | 'view' => new QueryView([ 41 | 'children' => 1, 42 | 'limit' => 10 43 | ]) 44 | ]); 45 | $domainList = $domainrobot->domain->restoreList($query); 46 | } catch (DomainrobotException $exception) { 47 | return $exception; 48 | } 49 | 50 | // if you want to get the raw result of the request 51 | Domainrobot::getLastDomainrobotResult()->getResult(); 52 | // if you need the http status code of the last request/response 53 | Domainrobot::getLastDomainrobotResult()->getStatusCode(); 54 | 55 | return $domainList; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /example/domain/DomainUpdateForSubuser.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 27 | "auth" => new DomainrobotAuth([ 28 | "user" => "username", 29 | "password" => "password", 30 | "context" => 4 31 | ]) 32 | ]); 33 | 34 | try { 35 | $domain = $domainrobot->domain->info("example.com"); 36 | 37 | // update the domain model with the new data 38 | // for example set a new admin contact 39 | $domain->setAdminc(new Contact(["id" => 21365838])); 40 | 41 | // to update the domain for the subuser set the following headers 42 | $job = $domainrobot->domain->addHeaders([ 43 | DomainrobotHeaders::DOMAINROBOT_HEADER_OWNER => "ownername", 44 | DomainrobotHeaders::DOMAINROBOT_HEADER_OWNER_CONTEXT => 797095 //owner context 45 | 46 | ])->update($domain); 47 | 48 | } catch (DomainrobotException $exception) { 49 | return$exception; 50 | } 51 | 52 | return $job; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /example/domain/DomainUpdateStatus.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 27 | "auth" => new DomainrobotAuth([ 28 | "user" => "username", 29 | "password" => "password", 30 | "context" => 4 31 | ]) 32 | ]); 33 | 34 | try { 35 | // Domainrobot/Model/Domain 36 | $domain = $domainrobot->domain->info("example.com"); 37 | 38 | // update the domain model with the new data 39 | $domain->setRegistryStatus(RegistryStatusConstants::HOLD_LOCK); 40 | 41 | // to update the domain for the subuser set the following headers 42 | $job = $domainrobot->domain->updateStatus($domain); 43 | 44 | } catch (DomainrobotException $exception) { 45 | return$exception; 46 | } 47 | 48 | return $job; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /example/domain/DomainWhois.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 19 | "auth" => new DomainrobotAuth([ 20 | "user" => "username", 21 | "password" => "password", 22 | "context" => 4 23 | ]) 24 | ]); 25 | 26 | try { 27 | $domain = $domainrobot->domain->whois("example.com"); 28 | } catch (DomainrobotException $exception) { 29 | return $exception; 30 | } 31 | 32 | return $domainrobot::getLastDomainrobotResult()->getResult(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example/pc_domains/Alexa.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 20 | "auth" => new DomainrobotAuth([ 21 | "user" => "username", 22 | "password" => "password", 23 | "context" => 4 24 | ]) 25 | ]); 26 | 27 | try { 28 | 29 | $domain = "example.com"; // Name of the Domain to check 30 | 31 | $apiAlexaSiteInfoResponse = $domainrobot->pcDomains->alexa($domain); 32 | 33 | } catch (DomainrobotException $exception) { 34 | return $exception; 35 | } 36 | 37 | return $apiAlexaSiteInfoResponse; 38 | } 39 | } -------------------------------------------------------------------------------- /example/pc_domains/Estimation.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 22 | "auth" => new DomainrobotAuth([ 23 | "user" => "username", 24 | "password" => "password", 25 | "context" => 4 26 | ]) 27 | ]); 28 | 29 | try { 30 | 31 | $estimation = new Estimation(); 32 | $estimation->setDomains(["internetx.com", "example.com"]); // Domains to estimate the Value of 33 | $estimation->setCurrency("EUR"); // The Currency in which the Price Prediction is made 34 | 35 | $apiEstimationResponse = $domainrobot->pcDomains->estimation($estimation); 36 | 37 | } catch (DomainrobotException $exception) { 38 | return $exception; 39 | } 40 | 41 | return $apiEstimationResponse; 42 | } 43 | } -------------------------------------------------------------------------------- /example/pc_domains/Keyword.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 22 | "auth" => new DomainrobotAuth([ 23 | "user" => "username", 24 | "password" => "password", 25 | "context" => 4 26 | ]) 27 | ]); 28 | 29 | try { 30 | 31 | $keywords = new Keywords(); 32 | $keywords->setKeywords(["programming", "development"]); 33 | 34 | $apiKeywordResponse = $domainrobot->pcDomains->keyword($keywords); 35 | 36 | } catch (DomainrobotException $exception) { 37 | return $exception; 38 | } 39 | 40 | return $apiKeywordResponse; 41 | } 42 | } -------------------------------------------------------------------------------- /example/pc_domains/Majestic.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | 30 | $domains = new Domains(); 31 | $domains->setDomains(["internetx.com", "example.com"]); 32 | 33 | $domainrobot->pcDomains->majestic($domains); 34 | 35 | } catch (DomainrobotException $exception) { 36 | return $exception; 37 | } 38 | 39 | return [ 40 | $domainrobot::getLastDomainrobotResult()->getResult(), 41 | $domainrobot::getLastDomainrobotResult()->getStatusCode() 42 | ]; 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /example/pc_domains/Meta.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | 30 | $domain = "internetx.com"; // Name of the Domain to check 31 | 32 | $apiMetaResponse = $domainrobot->pcDomains->meta($domain); 33 | 34 | } catch (DomainrobotException $exception) { 35 | return $exception; 36 | } 37 | 38 | return $apiMetaResponse; 39 | } 40 | } -------------------------------------------------------------------------------- /example/pc_domains/Sistrix.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 20 | "auth" => new DomainrobotAuth([ 21 | "user" => "username", 22 | "password" => "password", 23 | "context" => 4 24 | ]) 25 | ]); 26 | 27 | try { 28 | 29 | $domain = "internetx.com"; // Name of the Domain to check 30 | $country = "de"; // Country ISO Code 31 | 32 | $apiSistrixResponse = $domainrobot->pcDomains->sistrix($domain, $country); 33 | 34 | } catch (DomainrobotException $exception) { 35 | return $exception; 36 | } 37 | 38 | // Instead of returning the $apiSistrixResponse Object we also can 39 | // instead return the last Result of the Domainrobot directly 40 | return $domainrobot::getLastDomainrobotResult()->getResult(); 41 | } 42 | } -------------------------------------------------------------------------------- /example/pc_domains/SocialMediaUsernameCheck.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | 30 | $user = "InterNetX"; // User to search after 31 | 32 | $apiSocialMediaResponse = $domainrobot->pcDomains->smuCheck($user); 33 | 34 | } catch (DomainrobotException $exception) { 35 | return $exception; 36 | } 37 | 38 | return $apiSocialMediaResponse; 39 | } 40 | } -------------------------------------------------------------------------------- /example/pc_domains/Wayback.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1/service/pricer", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | 30 | $domain = "example.com"; // Name of the Domain to check 31 | 32 | $apiWaybackResponse = $domainrobot->pcDomains->wayback($domain); 33 | 34 | } catch (DomainrobotException $exception) { 35 | return $exception; 36 | } 37 | 38 | return $apiWaybackResponse; 39 | } 40 | } -------------------------------------------------------------------------------- /example/redirect/RedirectCreateDomain.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 22 | "auth" => new DomainrobotAuth([ 23 | "user" => "username", 24 | "password" => "password", 25 | "context" => 4 26 | ]) 27 | ]); 28 | 29 | try { 30 | 31 | // Domainrobot\Model\Redirect 32 | $redirect = new Redirect(); 33 | 34 | // Set the source domain 35 | $redirect->setSource("example-1.com"); 36 | 37 | // Set the target path 38 | $redirect->setTarget("example-2.com/test"); 39 | 40 | // Set type DOMAIN 41 | $redirect->setType("DOMAIN"); 42 | 43 | // Set mode HTTP 44 | $redirect->setMode("HTTP"); 45 | 46 | // Domainrobot\Model\Redirect 47 | $object = $domainrobot->redirect->create($redirect); 48 | 49 | } catch (DomainrobotException $exception) { 50 | return $exception; 51 | } 52 | 53 | return $object; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /example/redirect/RedirectCreateEmail.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 22 | "auth" => new DomainrobotAuth([ 23 | "user" => "username", 24 | "password" => "password", 25 | "context" => 4 26 | ]) 27 | ]); 28 | 29 | try { 30 | 31 | // Domainrobot\Model\Redirect 32 | $redirect = new Redirect(); 33 | 34 | // Set the source email 35 | $redirect->setSource("webmaster@example-1.com"); 36 | 37 | // Set the target email 38 | $redirect->setTarget("webmaster@example-2.com"); 39 | 40 | // Set type EMAIL 41 | $redirect->setType("EMAIL"); 42 | 43 | // Set mode SINGLE 44 | $redirect->setMode("SINGLE"); 45 | 46 | // Domainrobot\Model\Redirect 47 | $object = $domainrobot->redirect->create($redirect); 48 | 49 | } catch (DomainrobotException $exception) { 50 | return $exception; 51 | } 52 | 53 | return $object; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /example/user/UserInfo.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 21 | "auth" => new DomainrobotAuth([ 22 | "user" => "username", 23 | "password" => "password", 24 | "context" => 4 25 | ]) 26 | ]); 27 | 28 | try { 29 | // pass username and context to info command 30 | // returns Domainrobot\Model\User 31 | $user = $domainrobot->user->info("username", 4); 32 | } catch (DomainrobotException $exception) { 33 | return $exception; 34 | } 35 | 36 | return $user; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/user/UserList.php: -------------------------------------------------------------------------------- 1 | "https://api.autodns.com/v1", 25 | "auth" => new DomainrobotAuth([ 26 | "user" => "username", 27 | "password" => "password", 28 | "context" => 4 29 | ]) 30 | ]); 31 | 32 | try { 33 | $query = new Query([ 34 | 'filters' => [ new QueryFilter([ 35 | 'key' => 'user', 36 | 'value' => 'username', 37 | 'operator' => 'EQUAL' 38 | ])], 39 | 'view' => new QueryView([ 40 | 'children' => 1, 41 | 'limit' => 10 42 | ]) 43 | ]); 44 | $userList = $domainrobot->user->list($query); 45 | 46 | } catch (DomainrobotException $exception) { 47 | return $exception; 48 | } 49 | 50 | return $userList; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /example/whois/WhoisMulti.php: -------------------------------------------------------------------------------- 1 | 'https://api.autodns.com/v1', 21 | 'auth' => new DomainrobotAuth([ 22 | 'user' => 'username', 23 | 'password' => 'password', 24 | 'context' => 4 25 | ]) 26 | ]); 27 | 28 | // Set an array of Domains to search 29 | // after the Whois Information 30 | $domains = [ 'example.com', 'example.xyz' ]; 31 | 32 | try { 33 | $whoisStatus = $domainrobot->whois->multi($domains); 34 | } catch (DomainrobotException $exception) { 35 | return $exception->getError(); 36 | } 37 | 38 | return $whoisStatus; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /gitInfo.json: -------------------------------------------------------------------------------- 1 | { "version": "master-d1367b0ed908324931f7faee4a769b09d77167f5", "date": "20200820-145617" } 2 | -------------------------------------------------------------------------------- /src/DomainrobotConstants.php: -------------------------------------------------------------------------------- 1 | setUser(ArrayHelper::getValueFromArray($config, 'user', '')); 33 | $this->setPassword(ArrayHelper::getValueFromArray($config, 'password', '')); 34 | $this->setContext(ArrayHelper::getValueFromArray($config, 'context', DomainrobotConstants::AUTODNS_CONTEXT)); 35 | } 36 | 37 | private function setUser($user) 38 | { 39 | $this->user = $user; 40 | } 41 | private function setPassword($password) 42 | { 43 | $this->password = $password; 44 | } 45 | private function setContext($context) 46 | { 47 | $this->context = $context; 48 | } 49 | 50 | public function getUser() :string 51 | { 52 | return $this->user; 53 | } 54 | public function getPassword() :string 55 | { 56 | return $this->password; 57 | } 58 | public function getContext() :int 59 | { 60 | return $this->context; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/Lib/DomainrobotException.php: -------------------------------------------------------------------------------- 1 | error = $error; 12 | $this->statusCode = $statusCode; 13 | parent::__construct($message, $code, $previous); 14 | } 15 | 16 | public function getError() 17 | { 18 | return $this->error; 19 | } 20 | 21 | public function getStatusCode() 22 | { 23 | return $this->statusCode; 24 | } 25 | 26 | public function setError($error) 27 | { 28 | $this->error = $error; 29 | } 30 | 31 | public function setStatusCode($statusCode) 32 | { 33 | return $this->statusCode = $statusCode; 34 | } 35 | } -------------------------------------------------------------------------------- /src/Lib/DomainrobotHeaders.php: -------------------------------------------------------------------------------- 1 | promise = $promise; 11 | } 12 | 13 | /** 14 | * Undocumented function 15 | * 16 | * @return DomainrobotResult 17 | */ 18 | public function wait(){ 19 | return $this->promise->wait(); 20 | } 21 | } -------------------------------------------------------------------------------- /src/Lib/DomainrobotResult.php: -------------------------------------------------------------------------------- 1 | setResult($result); 14 | $this->setStatusCode($statusCode); 15 | $this->setHeaders($headers); 16 | } 17 | 18 | public function getStatusCode() 19 | { 20 | return $this->statusCode; 21 | } 22 | 23 | public function setStatusCode($statusCode) 24 | { 25 | $this->statusCode = $statusCode; 26 | } 27 | 28 | public function getResult() 29 | { 30 | return $this->result; 31 | } 32 | 33 | public function setResult($result) 34 | { 35 | return $this->result = $result; 36 | } 37 | 38 | public function getHeaders() 39 | { 40 | return $this->headers; 41 | } 42 | 43 | public function setHeaders($headers) 44 | { 45 | return $this->headers = $headers; 46 | } 47 | 48 | public function isSuccess(){ 49 | return ArrayHelper::getValueFromArray($this->result, 'status.type', 'ERROR') === 'SUCCESS'; 50 | } 51 | } -------------------------------------------------------------------------------- /src/Model/.php_cs: -------------------------------------------------------------------------------- 1 | setUsingCache(true) 5 | ->setRules([ 6 | '@PSR2' => true, 7 | 'ordered_imports' => true, 8 | 'phpdoc_order' => true, 9 | 'array_syntax' => [ 'syntax' => 'short' ], 10 | 'strict_comparison' => true, 11 | 'strict_param' => true, 12 | 'no_trailing_whitespace' => false, 13 | 'no_trailing_whitespace_in_comment' => false, 14 | 'braces' => false, 15 | 'single_blank_line_at_eof' => false, 16 | 'blank_line_after_namespace' => false, 17 | ]) 18 | ->setFinder( 19 | PhpCsFixer\Finder::create() 20 | ->exclude('test') 21 | ->exclude('tests') 22 | ->in(__DIR__) 23 | ); 24 | -------------------------------------------------------------------------------- /src/Model/.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /src/Model/.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.16-SNAPSHOT -------------------------------------------------------------------------------- /src/Model/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | sudo: false 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - 7.0 8 | - hhvm 9 | before_install: "composer install" 10 | script: "vendor/bin/phpunit" 11 | -------------------------------------------------------------------------------- /src/Model/ACLRestriction.php: -------------------------------------------------------------------------------- 1 | Every request expects the following headers: 17 | * 18 | * OpenAPI spec version: 1.2.0 19 | * 20 | * Generated by: https://github.com/swagger-api/swagger-codegen.git 21 | * Swagger Codegen version: 2.4.16-SNAPSHOT 22 | */ 23 | 24 | /** 25 | * NOTE: This class is auto generated by the swagger code generator program. 26 | * https://github.com/swagger-api/swagger-codegen 27 | * Do not edit the class manually. 28 | */ 29 | 30 | namespace Domainrobot\Model; 31 | use \Domainrobot\ObjectSerializer; 32 | 33 | /** 34 | * Platform Class Doc Comment 35 | * 36 | * @category Class 37 | * @package Domainrobot 38 | * @author Swagger Codegen team 39 | * @link https://github.com/swagger-api/swagger-codegen 40 | */ 41 | class Platform 42 | { 43 | /** 44 | * Possible values of this enum 45 | */ 46 | const FACEBOOK = 'FACEBOOK'; 47 | const TWITTER = 'TWITTER'; 48 | const PINTEREST = 'PINTEREST'; 49 | const YOUTUBE = 'YOUTUBE'; 50 | const TIKTOK = 'TIKTOK'; 51 | const GITHUB = 'GITHUB'; 52 | const TWITCH = 'TWITCH'; 53 | const VIMEO = 'VIMEO'; 54 | const VK = 'VK'; 55 | 56 | /** 57 | * Gets allowable values of the enum 58 | * @return string[] 59 | */ 60 | public static function getAllowableEnumValues() 61 | { 62 | return [ 63 | self::FACEBOOK, 64 | self::TWITTER, 65 | self::PINTEREST, 66 | self::YOUTUBE, 67 | self::TIKTOK, 68 | self::GITHUB, 69 | self::TWITCH, 70 | self::VIMEO, 71 | self::VK, 72 | ]; 73 | } 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/Model/PolicyMode.php: -------------------------------------------------------------------------------- 1 | =5.5", 20 | "ext-curl": "*", 21 | "ext-json": "*", 22 | "ext-mbstring": "*", 23 | "guzzlehttp/guzzle": "^6.2" 24 | }, 25 | "require-dev": { 26 | "phpunit/phpunit": "^4.8", 27 | "squizlabs/php_codesniffer": "~2.6", 28 | "friendsofphp/php-cs-fixer": "~2.12" 29 | }, 30 | "autoload": { 31 | "psr-4": { "Domainrobot\\" : "lib/" } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { "Domainrobot\\" : "test/" } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Model/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="internetx" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="php-domainrobot-sdk" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="Minor update" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /src/Model/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | ./test/Api 11 | ./test/Model 12 | 13 | 14 | 15 | 16 | 17 | ./lib/Api 18 | ./lib/Model 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Service/DocumentService.php: -------------------------------------------------------------------------------- 1 | infoAsync($id, $targetFileURI); 14 | $domainrobotResult = $domainrobotPromise->wait(); 15 | 16 | Domainrobot::setLastDomainrobotResult($domainrobotResult); 17 | 18 | return $domainrobotResult->getStatusCode(); 19 | } 20 | 21 | public function infoAsync($id, $targetFileURI) 22 | { 23 | return $this->sendRequest( 24 | $this->domainrobotConfig->getUrl() . "/document/$id", 25 | 'GET', 26 | ['sink' => $targetFileURI] 27 | ); 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/Service/DomainPremiumService.php: -------------------------------------------------------------------------------- 1 | infoAsync($name); 23 | $domainrobotResult = $domainrobotPromise->wait(); 24 | 25 | Domainrobot::setLastDomainrobotResult($domainrobotResult); 26 | 27 | return new DomainPremium(ArrayHelper::getValueFromArray($domainrobotResult->getResult(), 'data.0', [])); 28 | } 29 | 30 | /** 31 | * Sends a domainpremium info request. 32 | * 33 | * @param string $name 34 | * @return DomainrobotPromise 35 | */ 36 | public function infoAsync($name) 37 | { 38 | return $this->sendRequest( 39 | $this->domainrobotConfig->getUrl() . "/domainpremium/$name", 40 | 'GET' 41 | ); 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /src/Service/LoginService.php: -------------------------------------------------------------------------------- 1 | 0 ) { 30 | $keysString = '?keys[]=' . implode('&keys[]=', $keys); 31 | } 32 | 33 | $domainrobotPromise = $this->createAsync($body, $keysString); 34 | $domainrobotResult = $domainrobotPromise->wait(); 35 | 36 | Domainrobot::setLastDomainrobotResult($domainrobotResult); 37 | 38 | return new JsonResponseDataUser(ArrayHelper::getValueFromArray($domainrobotResult->getResult(), 'data.0', [])); 39 | } 40 | 41 | /** 42 | // * @return DomainrobotPromise 43 | */ 44 | public function createAsync(LoginData $body, $keysString) 45 | { 46 | return $this->sendRequest( 47 | $this->domainrobotConfig->getUrl() . "/login" . $keysString, 48 | 'POST', 49 | ["json" => $body->toArray()] 50 | ); 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /src/Service/PriceClassService.php: -------------------------------------------------------------------------------- 1 | listAsync($body); 23 | $domainrobotResult = $domainrobotPromise->wait(); 24 | 25 | Domainrobot::setLastDomainrobotResult($domainrobotResult); 26 | 27 | $data = $domainrobotResult->getResult()['data']; 28 | 29 | return $data; 30 | 31 | // $priceClassArticles = array(); 32 | // foreach ($data as $d) { 33 | // $p = new PriceClassArticle($d); 34 | // array_push($priceClassArticles, $p); 35 | // } 36 | 37 | // return $priceClassArticles; 38 | } 39 | 40 | public function listAsync(?Query $body = null) 41 | { 42 | $data = null; 43 | if ($body != null) { 44 | $data = $body->toArray(); 45 | } 46 | 47 | return new DomainrobotPromise($this->sendRequest( 48 | $this->domainrobotConfig->getUrl() . "/priceClass/article/_search", 49 | 'POST', 50 | ["json" => $data] 51 | )); 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /src/Service/PriceService.php: -------------------------------------------------------------------------------- 1 | sendRequest( 28 | $this->domainrobotConfig->getUrl() . "/price/article/_search", 29 | 'POST', 30 | ["json" => $query] 31 | )); 32 | } 33 | 34 | public function list(?Query $body = null) 35 | { 36 | $domainrobotPromise = $this->listAsync($body); 37 | $domainrobotResult = $domainrobotPromise->wait(); 38 | 39 | Domainrobot::setLastDomainrobotResult($domainrobotResult); 40 | 41 | $data = $domainrobotResult->getResult()['data']; 42 | 43 | return $data; 44 | 45 | // $priceArticles = array(); 46 | // foreach ($data as $d) { 47 | // $p = new PriceArticle($d); 48 | // array_push($priceArticles, $p); 49 | // } 50 | 51 | // return $priceArticles; 52 | } 53 | 54 | public function listAsync(?Query $body = null) 55 | { 56 | $data = null; 57 | if ($body != null) { 58 | $data = $body->toArray(); 59 | } 60 | 61 | return new DomainrobotPromise($this->sendRequest( 62 | $this->domainrobotConfig->getUrl() . "/price/article/_search", 63 | 'POST', 64 | ["json" => $data] 65 | )); 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /swagger-codegen-cli.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InterNetX/php-domainrobot-sdk/5c9e107b6b2a7982848fb405a901e5ebd504753c/swagger-codegen-cli.jar -------------------------------------------------------------------------------- /swagger.conf: -------------------------------------------------------------------------------- 1 | { 2 | "npmName": "@swagger/typescript-fetch-petstore", 3 | "npmVersion": "1.0.0", 4 | "npmRepository" : "https://skimdb.npmjs.com/registry", 5 | "snapshot" : false, 6 | "supportsES6": true, 7 | 8 | "sortParamsByRequiredFlag": true, 9 | "ensureUniqueParams": true, 10 | "modelPackage": "Model", 11 | "variableNamingConvention": "camelCase", 12 | "invokerPackage":"Domainrobot", 13 | "packagePath": ".", 14 | 15 | "composerVendorName": "internetx/php-domainrobot-sdk", 16 | "gitUserId": "internetx", 17 | "composerProjectName": "internetx/php-domainrobot-sdk", 18 | "gitRepoId" : "php-domainrobot-sdk" 19 | } 20 | -------------------------------------------------------------------------------- /test/AtoumTestSuite.php: -------------------------------------------------------------------------------- 1 | "api.autodns.com", 18 | "auth" => new DomainrobotAuth([ 19 | "user" => "user", 20 | "password" => "pass", 21 | "context" => 1 22 | ]) 23 | ]; 24 | if ($asArray) { 25 | return $config; 26 | } 27 | return new DomainrobotConfig($config); 28 | } 29 | 30 | public function loadMockDataAsJsonString($fileName) 31 | { 32 | return file_get_contents('test/mock-data/'.$fileName); 33 | } 34 | 35 | 36 | public function loadMockDataAsArray($fileName) 37 | { 38 | $json = file_get_contents('test/mock-data/'.$fileName); 39 | return json_decode($json, true); 40 | } 41 | 42 | /** 43 | * Undocumented function 44 | * 45 | * @param DomainrobotService $service 46 | * @param array $responses 47 | * response in array 48 | * @return void 49 | */ 50 | public function registerGuzzleMockHandler($service, $responses = []) 51 | { 52 | foreach($responses as &$response){ 53 | $response = new Response(200, [], $response); 54 | } 55 | $mock = new MockHandler($responses); 56 | $handlerStack = HandlerStack::create($mock); 57 | 58 | $service->addGuzzleClientConfig([ 59 | 'handler' => $handlerStack 60 | ]); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # Writing tests with atoum 2 | 3 | Atoum Documentation: [https://docs.atoum.org/](https://docs.atoum.org/) 4 | 5 | ## Execute tests 6 | 7 | ```bash 8 | vendor/bin/atoum -d test/units 9 | ``` -------------------------------------------------------------------------------- /test/mock-data/Certificate/CreateResponse.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "stid": "20200311-app3-dev-3257", 4 | "status": { 5 | "code": "N400101", 6 | "text": "Certificate order was started successfully.", 7 | "type": "NOTIFY" 8 | }, 9 | "object": { 10 | "type": "Certificate", 11 | "value": "junkdragons.de" 12 | }, 13 | "data": [ 14 | { 15 | "id": 4297939738 16 | } 17 | ] 18 | } 19 | --------------------------------------------------------------------------------