| | @@ -75,7 +75,7 @@ |
| 75 | 75 | * @return Result 結果
|
| 76 | 76 | */
|
| 77 | 77 | public function login(): Result {
|
| 78 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 78 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 79 | 79 | $cacheName = 'login';
|
| 80 | 80 | $cache = $this->cache->get($cacheName);
|
| 81 | 81 | if (time() < ($this->lastAuth + $this->tokenDuration)) {
|
| | @@ -133,7 +133,7 @@ |
| 133 | 133 | * @return Result
|
| 134 | 134 | */
|
| 135 | 135 | public function generateLoginUrlSpamExpert(array $payload = []): Result {
|
| 136 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 136 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 137 | 137 |
|
| 138 | 138 | $uri = '/spam-expert-generate-login-url';
|
| 139 | 139 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -155,7 +155,7 @@ |
| 155 | 155 | * @return Result 結果。
|
| 156 | 156 | */
|
| 157 | 157 | public function listDomains(array $query = []): Result {
|
| 158 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 158 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 159 | 159 | $cacheName = 'listdomains';
|
| 160 | 160 | $cache = $this->cache->get($cacheName);
|
| 161 | 161 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -181,7 +181,7 @@ |
| 181 | 181 | * @return Result 結果。配列の場合:'activation_date'(リアルタイムで成功したのみ), 'auth_code'(TLDが対応している場合のみ), 'expiration_date', 'id', 'renewal_date', 'status'(ACT又はREQ)
|
| 182 | 182 | */
|
| 183 | 183 | public function createDomain(string $name, array $info, int $period = 1): Result {
|
| 184 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 184 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 185 | 185 | if (!isset($info['owner_handle']) || $info['owner_handle'] === '') $info['owner_handle'] = OPENPROVIDER['owner_handle'];
|
| 186 | 186 | if (!isset($info['admin_handle']) || $info['admin_handle'] === '') $info['admin_handle'] = OPENPROVIDER['owner_handle'];
|
| 187 | 187 | if (!isset($info['tech_handle']) || $info['tech_handle'] === '') $info['tech_handle'] = OPENPROVIDER['owner_handle'];
|
| | @@ -234,7 +234,7 @@ |
| 234 | 234 | * @return Result 結果。配列の場合:'domain'と'status'はいつでもあり、'reason', 'premium', 'is_premium'が多分あり、そして'price'が「with_price」が「true」の場合のみ。
|
| 235 | 235 | */
|
| 236 | 236 | public function checkDomainAvailable(array $domains, bool $with_price = false): Result {
|
| 237 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 237 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 238 | 238 | $domainList = [];
|
| 239 | 239 | foreach ($domains as $d) {
|
| 240 | 240 | $domain = explode('.', $d);
|
| | @@ -271,7 +271,7 @@ |
| 271 | 271 | * @return Result 結果。
|
| 272 | 272 | */
|
| 273 | 273 | public function suggestDomainname(array $payload = []): Result {
|
| 274 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 274 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 275 | 275 |
|
| 276 | 276 | $uri = '/domains/suggest-name';
|
| 277 | 277 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -291,7 +291,7 @@ |
| 291 | 291 | * @return Result 結果。
|
| 292 | 292 | */
|
| 293 | 293 | public function tradeDomainname(array $payload = []): Result {
|
| 294 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 294 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 295 | 295 |
|
| 296 | 296 | $uri = '/domains/trade';
|
| 297 | 297 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -312,7 +312,7 @@ |
| 312 | 312 | * @return Result 結果。
|
| 313 | 313 | */
|
| 314 | 314 | public function transferDomainname(array $payload = []): Result {
|
| 315 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 315 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 316 | 316 |
|
| 317 | 317 | $uri = '/domains/transfer';
|
| 318 | 318 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -334,7 +334,7 @@ |
| 334 | 334 | * @return Result 結果。
|
| 335 | 335 | */
|
| 336 | 336 | public function getDomainname(int $id, array $payload = []): Result {
|
| 337 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 337 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 338 | 338 | $cacheName = "getdomain-{$id}";
|
| 339 | 339 | $cache = $this->cache->get($cacheName);
|
| 340 | 340 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -358,7 +358,7 @@ |
| 358 | 358 | * @return Result
|
| 359 | 359 | */
|
| 360 | 360 | public function updateDomainname(int $id, array $payload = []): Result {
|
| 361 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 361 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 362 | 362 |
|
| 363 | 363 | $uri = "/domains/{$id}";
|
| 364 | 364 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -381,7 +381,7 @@ |
| 381 | 381 | * @return Result
|
| 382 | 382 | */
|
| 383 | 383 | public function deleteDomainname(int $id, array $payload = []): Result {
|
| 384 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 384 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 385 | 385 |
|
| 386 | 386 | $uri = "/domains/{$id}";
|
| 387 | 387 | $curl = $this->setupCurl($uri, 'DELETE', $payload);
|
| | @@ -404,7 +404,7 @@ |
| 404 | 404 | * @return Result 結果。
|
| 405 | 405 | */
|
| 406 | 406 | public function retryLastDomainnameOperation(int $id, array $payload = []): Result {
|
| 407 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 407 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 408 | 408 |
|
| 409 | 409 | $curl = $this->setupCurl("/domains/{$id}/last-operation/restart", 'POST', $payload);
|
| 410 | 410 | $res = $this->curlResult($curl);
|
| | @@ -426,7 +426,7 @@ |
| 426 | 426 | * @return Result 結果。
|
| 427 | 427 | */
|
| 428 | 428 | public function renewDomainname(int $id, array $payload = []): Result {
|
| 429 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 429 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 430 | 430 |
|
| 431 | 431 | $curl = $this->setupCurl("/domains/{$id}/renew", 'POST', $payload);
|
| 432 | 432 | $res = $this->curlResult($curl);
|
| | @@ -448,7 +448,7 @@ |
| 448 | 448 | * @return Result 結果。
|
| 449 | 449 | */
|
| 450 | 450 | public function restoreDomainname(int $id, array $payload = []): Result {
|
| 451 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 451 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 452 | 452 |
|
| 453 | 453 | $curl = $this->setupCurl("/domains/{$id}/restore", 'POST', $payload);
|
| 454 | 454 | $res = $this->curlResult($curl);
|
| | @@ -470,7 +470,7 @@ |
| 470 | 470 | * @return Result 結果。
|
| 471 | 471 | */
|
| 472 | 472 | public function approveDomainnameTransfer(int $id, array $payload = []): Result {
|
| 473 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 473 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 474 | 474 |
|
| 475 | 475 | $curl = $this->setupCurl("/domains/{$id}/transfer/approve", 'POST', $payload);
|
| 476 | 476 | $res = $this->curlResult($curl);
|
| | @@ -492,7 +492,7 @@ |
| 492 | 492 | * @return Result 結果。
|
| 493 | 493 | */
|
| 494 | 494 | public function sendDomainnameFoa1(int $id, array $payload = []): Result {
|
| 495 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 495 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 496 | 496 |
|
| 497 | 497 | $curl = $this->setupCurl("/domains/{$id}/transfer/send-foa1", 'POST', $payload);
|
| 498 | 498 | $res = $this->curlResult($curl);
|
| | @@ -515,7 +515,7 @@ |
| 515 | 515 | * @return Result
|
| 516 | 516 | */
|
| 517 | 517 | public function getDomainAdditionalData(array $query): Result {
|
| 518 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 518 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 519 | 519 | $name = '';
|
| 520 | 520 | $ext = '';
|
| 521 | 521 | if (isset($query['domain.name'])) $name = $query['domain.name'];
|
| | @@ -546,7 +546,7 @@ |
| 546 | 546 | * @return Result
|
| 547 | 547 | */
|
| 548 | 548 | public function getDomainCustomerAdditionalData(array $query): Result {
|
| 549 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 549 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 550 | 550 | $name = '';
|
| 551 | 551 | $ext = '';
|
| 552 | 552 | if (isset($query['domain.name'])) $name = $query['domain.name'];
|
| | @@ -577,7 +577,7 @@ |
| 577 | 577 | * @return Result
|
| 578 | 578 | */
|
| 579 | 579 | public function getDomainPrices(array $query): Result {
|
| 580 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 580 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 581 | 581 | $name = '';
|
| 582 | 582 | $ext = '';
|
| 583 | 583 | if (isset($query['domain.name'])) $name = $query['domain.name'];
|
| | @@ -609,7 +609,7 @@ |
| 609 | 609 | * @return Result
|
| 610 | 610 | */
|
| 611 | 611 | public function getAuthCode(int $id, array $query = []): Result {
|
| 612 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 612 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 613 | 613 |
|
| 614 | 614 | $uri = "/domains/{$id}/authcode?".http_build_query($query, '', '&', PHP_QUERY_RFC3986);
|
| 615 | 615 | $curl = $this->setupCurl($uri);
|
| | @@ -630,7 +630,7 @@ |
| 630 | 630 | * @return Result
|
| 631 | 631 | */
|
| 632 | 632 | public function resetAuthCode(int $id, array $payload = []): Result {
|
| 633 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 633 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 634 | 634 |
|
| 635 | 635 | $uri = "/domains/{$id}/authcode/reset";
|
| 636 | 636 | $curl->setupCurl($uri, 'POST', $payload);
|
| | @@ -652,7 +652,7 @@ |
| 652 | 652 | * @return Result
|
| 653 | 653 | */
|
| 654 | 654 | public function listTlds(array $query = []): Result {
|
| 655 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 655 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 656 | 656 | $cacheName = 'listtlds';
|
| 657 | 657 | $cache = $this->cache->get($cacheName);
|
| 658 | 658 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -679,7 +679,7 @@ |
| 679 | 679 | * @return Result
|
| 680 | 680 | */
|
| 681 | 681 | public function getTld(string $tld, array $query = []): Result {
|
| 682 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 682 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 683 | 683 | $cacheName = "gettld-{$tld}";
|
| 684 | 684 | $cache = $this->cache->get($cacheName);
|
| 685 | 685 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -708,7 +708,7 @@ |
| 708 | 708 | * @return Result
|
| 709 | 709 | */
|
| 710 | 710 | public function listInvoices(array $query = []): Result {
|
| 711 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 711 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 712 | 712 | $cacheName = 'listinvoices';
|
| 713 | 713 | $cache = $this->cache->get($cacheName);
|
| 714 | 714 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -736,7 +736,7 @@ |
| 736 | 736 | * @return Result
|
| 737 | 737 | */
|
| 738 | 738 | public function listPayments(array $query = []): Result {
|
| 739 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 739 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 740 | 740 | $cacheName = 'listpayments';
|
| 741 | 741 | $cache = $this->cache->get($cacheName);
|
| 742 | 742 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -764,7 +764,7 @@ |
| 764 | 764 | * @return Result
|
| 765 | 765 | */
|
| 766 | 766 | public function listTransactions(array $query = []): Result {
|
| 767 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 767 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 768 | 768 | $cacheName = 'listtransactions';
|
| 769 | 769 | $cache = $this->cache->get($cacheName);
|
| 770 | 770 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -794,7 +794,7 @@ |
| 794 | 794 | * @return Result
|
| 795 | 795 | */
|
| 796 | 796 | public function createDomainToken(array $payload = []): Result {
|
| 797 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 797 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 798 | 798 |
|
| 799 | 799 | $uri = '/dns/domain-token';
|
| 800 | 800 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -816,7 +816,7 @@ |
| 816 | 816 | * @return Result
|
| 817 | 817 | */
|
| 818 | 818 | public function listNameservers(array $query = []): Result {
|
| 819 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 819 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 820 | 820 | $cacheName = 'listnameservers';
|
| 821 | 821 | $cache = $this->cache->get($cacheName);
|
| 822 | 822 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -843,7 +843,7 @@ |
| 843 | 843 | * @return Result
|
| 844 | 844 | */
|
| 845 | 845 | public function createNameserver(array $payload = []): Result {
|
| 846 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 846 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 847 | 847 |
|
| 848 | 848 | $uri = '/dns/nameservers';
|
| 849 | 849 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -865,7 +865,7 @@ |
| 865 | 865 | * @return Result
|
| 866 | 866 | */
|
| 867 | 867 | public function getNameserver(string $domain, array $query = []): Result {
|
| 868 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 868 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 869 | 869 | $cacheName = "listnameserver-{$domain}";
|
| 870 | 870 | $cache = $this->cache->get($cacheName);
|
| 871 | 871 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -893,7 +893,7 @@ |
| 893 | 893 | * @return Result
|
| 894 | 894 | */
|
| 895 | 895 | public function updateNameserver(string $domain, array $payload = []): Result {
|
| 896 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 896 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 897 | 897 |
|
| 898 | 898 | $uri = "/dns/nameservers/{$domain}";
|
| 899 | 899 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -915,7 +915,7 @@ |
| 915 | 915 | * @return Result
|
| 916 | 916 | */
|
| 917 | 917 | public function deleteNameserver(string $domain): Result {
|
| 918 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 918 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 919 | 919 |
|
| 920 | 920 | $uri = "/dns/nameservers/{$domain}";
|
| 921 | 921 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -939,7 +939,7 @@ |
| 939 | 939 | * @return Result
|
| 940 | 940 | */
|
| 941 | 941 | public function listNsGroups(array $query = []): Result {
|
| 942 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 942 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 943 | 943 | $cacheName = 'listnsgroups';
|
| 944 | 944 | $cache = $this->cache->get($cacheName);
|
| 945 | 945 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -966,7 +966,7 @@ |
| 966 | 966 | * @return Result
|
| 967 | 967 | */
|
| 968 | 968 | public function createNsGroup(array $payload = []): Result {
|
| 969 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 969 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 970 | 970 |
|
| 971 | 971 | $uri = '/dns/nameservers/groups';
|
| 972 | 972 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -988,7 +988,7 @@ |
| 988 | 988 | * @return Result
|
| 989 | 989 | */
|
| 990 | 990 | public function getNsGroup(string $nsGroup, array $query = []): Result {
|
| 991 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 991 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 992 | 992 | $cacheName = "listnsgroup-{$nsGroup}";
|
| 993 | 993 | $cache = $this->cache->get($cacheName);
|
| 994 | 994 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1016,7 +1016,7 @@ |
| 1016 | 1016 | * @return Result
|
| 1017 | 1017 | */
|
| 1018 | 1018 | public function updateNsGroup(string $nsGroup, array $payload = []): Result {
|
| 1019 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1019 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1020 | 1020 |
|
| 1021 | 1021 | $uri = "/dns/nameservers/groups/{$nsGroup}";
|
| 1022 | 1022 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -1038,7 +1038,7 @@ |
| 1038 | 1038 | * @return Result
|
| 1039 | 1039 | */
|
| 1040 | 1040 | public function deleteNsGroup(string $nsGroup): Result {
|
| 1041 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1041 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1042 | 1042 |
|
| 1043 | 1043 | $uri = "/dns/nameservers/groups/{$nsGroup}";
|
| 1044 | 1044 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1062,7 +1062,7 @@ |
| 1062 | 1062 | * @return Result
|
| 1063 | 1063 | */
|
| 1064 | 1064 | public function listDnsTemplate(array $query = []): Result {
|
| 1065 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1065 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1066 | 1066 | $cacheName = 'listdnstemplates';
|
| 1067 | 1067 | $cache = $this->cache->get($cacheName);
|
| 1068 | 1068 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1088,7 +1088,7 @@ |
| 1088 | 1088 | * @return Result
|
| 1089 | 1089 | */
|
| 1090 | 1090 | public function createDnsTemplate(array $payload = []): Result {
|
| 1091 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1091 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1092 | 1092 |
|
| 1093 | 1093 | $uri = '/dns/templates';
|
| 1094 | 1094 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1109,7 +1109,7 @@ |
| 1109 | 1109 | * @return Result
|
| 1110 | 1110 | */
|
| 1111 | 1111 | public function getDnsTemplate(int $id): Result {
|
| 1112 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1112 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1113 | 1113 | $cacheName = "getdnstemplate-{$id}";
|
| 1114 | 1114 | $cache = $this->cache->get($cacheName);
|
| 1115 | 1115 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1133,7 +1133,7 @@ |
| 1133 | 1133 | * @return Result
|
| 1134 | 1134 | */
|
| 1135 | 1135 | public function deleteDnsTemplate(int $id): Result {
|
| 1136 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1136 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1137 | 1137 |
|
| 1138 | 1138 | $uri = "/dns/templates/{$id}";
|
| 1139 | 1139 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1156,7 +1156,7 @@ |
| 1156 | 1156 | * @return Result
|
| 1157 | 1157 | */
|
| 1158 | 1158 | public function listDnsZones(array $query = []): Result {
|
| 1159 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1159 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1160 | 1160 | $cacheName = 'listdnszones';
|
| 1161 | 1161 | $cache = $this->cache->get($cacheName);
|
| 1162 | 1162 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1183,7 +1183,7 @@ |
| 1183 | 1183 | * @return Result
|
| 1184 | 1184 | */
|
| 1185 | 1185 | public function createDnsZone(array $payload = []): Result {
|
| 1186 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1186 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1187 | 1187 |
|
| 1188 | 1188 | $uri = '/dns/zones';
|
| 1189 | 1189 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1204,7 +1204,7 @@ |
| 1204 | 1204 | * @return Result
|
| 1205 | 1205 | */
|
| 1206 | 1206 | public function getDnsZone(string $domain, array $query = []): Result {
|
| 1207 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1207 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1208 | 1208 | $cacheName = "getdnszone-{$domain}";
|
| 1209 | 1209 | $cache = $this->cache->get($cacheName);
|
| 1210 | 1210 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1232,7 +1232,7 @@ |
| 1232 | 1232 | * @return Result
|
| 1233 | 1233 | */
|
| 1234 | 1234 | public function updateDnsZone(string $domain, array $payload = []): Result {
|
| 1235 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1235 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1236 | 1236 |
|
| 1237 | 1237 | $uri = "/dns/zones/{$domain}";
|
| 1238 | 1238 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -1254,7 +1254,7 @@ |
| 1254 | 1254 | * @return Result
|
| 1255 | 1255 | */
|
| 1256 | 1256 | public function deleteDnsZone(string $domain): Result {
|
| 1257 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1257 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1258 | 1258 |
|
| 1259 | 1259 | $uri = "/dns/zones/{$domain}";
|
| 1260 | 1260 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1277,7 +1277,7 @@ |
| 1277 | 1277 | * @return Result
|
| 1278 | 1278 | */
|
| 1279 | 1279 | public function listZoneRecords(string $domain): Result {
|
| 1280 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1280 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1281 | 1281 | $cacheName = "getzonerecords-{$domain}";
|
| 1282 | 1282 | $cache = $this->cache->get($cacheName);
|
| 1283 | 1283 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1302,7 +1302,7 @@ |
| 1302 | 1302 | * @return Result
|
| 1303 | 1303 | */
|
| 1304 | 1304 | public function getEasydmarc(string $domain): Result {
|
| 1305 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1305 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1306 | 1306 | $cacheName = "listeasydmarc-{$domain}";
|
| 1307 | 1307 | $cache = $this->cache->get($cacheName);
|
| 1308 | 1308 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1331,7 +1331,7 @@ |
| 1331 | 1331 | * @return Result
|
| 1332 | 1332 | */
|
| 1333 | 1333 | public function createEasydmarc(string $domain): Result {
|
| 1334 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1334 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1335 | 1335 |
|
| 1336 | 1336 | $parts = explode('.', $domain, 2);
|
| 1337 | 1337 | assert_exists($parts[0]);
|
| | @@ -1357,7 +1357,7 @@ |
| 1357 | 1357 | * @return Result
|
| 1358 | 1358 | */
|
| 1359 | 1359 | public function listEasydmarcs(array $query = []): Result {
|
| 1360 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1360 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1361 | 1361 | $cacheName = 'listeasydmarcs';
|
| 1362 | 1362 | $cache = $this->cache->get($cacheName);
|
| 1363 | 1363 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1392,7 +1392,7 @@ |
| 1392 | 1392 | * @return Result
|
| 1393 | 1393 | */
|
| 1394 | 1394 | public function deleteEasydmarc(int $orderId): Result {
|
| 1395 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1395 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1396 | 1396 |
|
| 1397 | 1397 | $uri = "/dns/easydmarcs/{$domain}";
|
| 1398 | 1398 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1415,7 +1415,7 @@ |
| 1415 | 1415 | * @return Result
|
| 1416 | 1416 | */
|
| 1417 | 1417 | public function retryEasydmarc(int $orderId): Result {
|
| 1418 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1418 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1419 | 1419 |
|
| 1420 | 1420 | $uri = "/dns/easydmarcs/{$domain}/retry";
|
| 1421 | 1421 | $curl = $this->setupCurl($uri, 'POST');
|
| | @@ -1438,7 +1438,7 @@ |
| 1438 | 1438 | * @return Result
|
| 1439 | 1439 | */
|
| 1440 | 1440 | public function getEasydmarcSso(int $orderId): Result {
|
| 1441 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1441 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1442 | 1442 | $cacheName = "geteasydmarcssso-{$orderId}";
|
| 1443 | 1443 | $cache = $this->cache->get($cacheName);
|
| 1444 | 1444 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1468,7 +1468,7 @@ |
| 1468 | 1468 | * @return Result
|
| 1469 | 1469 | */
|
| 1470 | 1470 | public function listEmails(array $query = []): Result {
|
| 1471 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1471 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1472 | 1472 | $cacheName = 'listemails';
|
| 1473 | 1473 | $cache = $this->cache->get($cacheName);
|
| 1474 | 1474 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1494,7 +1494,7 @@ |
| 1494 | 1494 | * @return Result
|
| 1495 | 1495 | */
|
| 1496 | 1496 | public function createEmail(array $payload = []): Result {
|
| 1497 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1497 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1498 | 1498 |
|
| 1499 | 1499 | $uri = '/emails';
|
| 1500 | 1500 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1516,7 +1516,7 @@ |
| 1516 | 1516 | * @return Result
|
| 1517 | 1517 | */
|
| 1518 | 1518 | public function updateEmail(int $id, array $payload = []): Result {
|
| 1519 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1519 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1520 | 1520 |
|
| 1521 | 1521 | $uri = "/emails/{$id}";
|
| 1522 | 1522 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -1537,7 +1537,7 @@ |
| 1537 | 1537 | * @return Result
|
| 1538 | 1538 | */
|
| 1539 | 1539 | public function deleteEmail(int $id): Result {
|
| 1540 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1540 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1541 | 1541 |
|
| 1542 | 1542 | $uri = "/emails/{$id}";
|
| 1543 | 1543 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1560,7 +1560,7 @@ |
| 1560 | 1560 | * @return Result
|
| 1561 | 1561 | */
|
| 1562 | 1562 | public function listLicenses(array $query = []): Result {
|
| 1563 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1563 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1564 | 1564 | $cacheName = 'listlicenses';
|
| 1565 | 1565 | $cache = $this->cache->get($cacheName);
|
| 1566 | 1566 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1587,7 +1587,7 @@ |
| 1587 | 1587 | * @return Result
|
| 1588 | 1588 | */
|
| 1589 | 1589 | public function resetLicenseHwid(string $product, int $keyId): Result {
|
| 1590 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1590 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1591 | 1591 |
|
| 1592 | 1592 | $payload = ['key_id' => $keyId, 'product' => $product];
|
| 1593 | 1593 | $uri = "/licenses/hwids/reset/{$product}/{$keyId}";
|
| | @@ -1609,7 +1609,7 @@ |
| 1609 | 1609 | * @return Result
|
| 1610 | 1610 | */
|
| 1611 | 1611 | public function listLicenseItems(array $query = []): Result {
|
| 1612 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1612 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1613 | 1613 | $cacheName = 'listitems';
|
| 1614 | 1614 | $cache = $this->cache->get($cacheName);
|
| 1615 | 1615 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1635,7 +1635,7 @@ |
| 1635 | 1635 | * @return Result
|
| 1636 | 1636 | */
|
| 1637 | 1637 | public function listPleskLicenses(array $query = []): Result {
|
| 1638 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1638 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1639 | 1639 | $cacheName = 'listplesklicenses';
|
| 1640 | 1640 | $cache = $this->cache->get($cacheName);
|
| 1641 | 1641 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1661,7 +1661,7 @@ |
| 1661 | 1661 | * @return Result
|
| 1662 | 1662 | */
|
| 1663 | 1663 | public function createPleskLicense(array $payload): Result {
|
| 1664 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1664 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1665 | 1665 |
|
| 1666 | 1666 | $uri = "/licenses/plesk";
|
| 1667 | 1667 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1683,7 +1683,7 @@ |
| 1683 | 1683 | * @return Result
|
| 1684 | 1684 | */
|
| 1685 | 1685 | public function getPleskKey(int $keyId): Result {
|
| 1686 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1686 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1687 | 1687 | $cacheName = "getpleskkey-{$keyId}";
|
| 1688 | 1688 | $cache = $this->cache->get($cacheName);
|
| 1689 | 1689 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1708,7 +1708,7 @@ |
| 1708 | 1708 | * @return Result
|
| 1709 | 1709 | */
|
| 1710 | 1710 | public function getPleskLicense(int $keyId): Result {
|
| 1711 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1711 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1712 | 1712 | $cacheName = "getplesklicense-{$keyId}";
|
| 1713 | 1713 | $cache = $this->cache->get($cacheName);
|
| 1714 | 1714 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -1734,7 +1734,7 @@ |
| 1734 | 1734 | * @return Result
|
| 1735 | 1735 | */
|
| 1736 | 1736 | public function updatePleskLicense(int $keyId, array $payload = []): Result {
|
| 1737 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1737 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1738 | 1738 |
|
| 1739 | 1739 | $uri = "/licenses/plesk/{$keyId}";
|
| 1740 | 1740 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -1758,7 +1758,7 @@ |
| 1758 | 1758 | * @return Result
|
| 1759 | 1759 | */
|
| 1760 | 1760 | public function deletePleskLicense(int $keyId): Result {
|
| 1761 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1761 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1762 | 1762 |
|
| 1763 | 1763 | $uri = "/licenses/plesk/{$keyId}";
|
| 1764 | 1764 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1786,7 +1786,7 @@ |
| 1786 | 1786 | * @return Result
|
| 1787 | 1787 | */
|
| 1788 | 1788 | public function listContacts(array $query = []): Result {
|
| 1789 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1789 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1790 | 1790 | $cacheName = 'listcontacts';
|
| 1791 | 1791 | $cache = $this->cache->get($cacheName);
|
| 1792 | 1792 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1812,7 +1812,7 @@ |
| 1812 | 1812 | * @return Result
|
| 1813 | 1813 | */
|
| 1814 | 1814 | public function createContact(array $payload): Result {
|
| 1815 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1815 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1816 | 1816 |
|
| 1817 | 1817 | $uri = '/contacts';
|
| 1818 | 1818 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1834,7 +1834,7 @@ |
| 1834 | 1834 | * @return Result
|
| 1835 | 1835 | */
|
| 1836 | 1836 | public function getContact(int $id, bool $withAdditionalData = false): Result {
|
| 1837 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1837 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1838 | 1838 | $cacheName = "getcontact-{$id}";
|
| 1839 | 1839 | $cache = $this->cache->get($cacheName);
|
| 1840 | 1840 | if ($this->cache->resurrect($cache, $id, 'id')) return Result::Success('', $cache);
|
| | @@ -1862,7 +1862,7 @@ |
| 1862 | 1862 | * @return Result
|
| 1863 | 1863 | */
|
| 1864 | 1864 | public function updateContact(int $id, array $payload = []): Result {
|
| 1865 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1865 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1866 | 1866 |
|
| 1867 | 1867 | $uri = "/contacts/{$id}";
|
| 1868 | 1868 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -1884,7 +1884,7 @@ |
| 1884 | 1884 | * @return Result
|
| 1885 | 1885 | */
|
| 1886 | 1886 | public function deleteContact(int $id): Result {
|
| 1887 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1887 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1888 | 1888 |
|
| 1889 | 1889 | $uri = "/contacts/{$id}";
|
| 1890 | 1890 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -1907,7 +1907,7 @@ |
| 1907 | 1907 | * @return Result
|
| 1908 | 1908 | */
|
| 1909 | 1909 | public function listCustomers(array $query = []): Result {
|
| 1910 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1910 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1911 | 1911 | $cacheName = 'listcustomers';
|
| 1912 | 1912 | $cache = $this->cache->get($cacheName);
|
| 1913 | 1913 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -1932,7 +1932,7 @@ |
| 1932 | 1932 | * @return Result
|
| 1933 | 1933 | */
|
| 1934 | 1934 | public function createCustomer(array $payload): Result {
|
| 1935 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1935 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1936 | 1936 |
|
| 1937 | 1937 | $uri = '/customers';
|
| 1938 | 1938 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -1953,7 +1953,7 @@ |
| 1953 | 1953 | * @return Result
|
| 1954 | 1954 | */
|
| 1955 | 1955 | public function getCustomer(string $handle, bool $withAdditionalData = false): Result {
|
| 1956 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1956 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1957 | 1957 | $cacheName = "getcustomer-{$handle}";
|
| 1958 | 1958 | $cache = $this->cache->get($cacheName);
|
| 1959 | 1959 | if ($this->cache->resurrect($cache, $handle, 'handle')) return Result::Success('', $cache);
|
| | @@ -1981,7 +1981,7 @@ |
| 1981 | 1981 | * @return Result
|
| 1982 | 1982 | */
|
| 1983 | 1983 | public function updateCustomer(string $handle, array $payload = []): Result {
|
| 1984 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 1984 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 1985 | 1985 |
|
| 1986 | 1986 | $uri = "/customers/{$handle}";
|
| 1987 | 1987 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -2002,7 +2002,7 @@ |
| 2002 | 2002 | * @return Result
|
| 2003 | 2003 | */
|
| 2004 | 2004 | public function deleteCustomer(string $handle): Result {
|
| 2005 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2005 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2006 | 2006 |
|
| 2007 | 2007 | $uri = "/customers/{$handle}";
|
| 2008 | 2008 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -2026,7 +2026,7 @@ |
| 2026 | 2026 | * @return Result
|
| 2027 | 2027 | */
|
| 2028 | 2028 | public function listEmailVerifications(array $query = []): Result {
|
| 2029 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2029 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2030 | 2030 | $cacheName = 'listemailverifications';
|
| 2031 | 2031 | $cache = $this->cache->get($cacheName);
|
| 2032 | 2032 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2052,7 +2052,7 @@ |
| 2052 | 2052 | * @return Result
|
| 2053 | 2053 | */
|
| 2054 | 2054 | public function restartEmailVerifications(string $email, string $language = '', string $tag = ''): Result {
|
| 2055 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2055 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2056 | 2056 |
|
| 2057 | 2057 | $uri = '/customers/verifications/emails/restart';
|
| 2058 | 2058 | $curl = $this->setupCurl($uri, 'POST', ['email' => $email, 'language' => $language, 'tag' => $tag]);
|
| | @@ -2076,7 +2076,7 @@ |
| 2076 | 2076 | * @return Result
|
| 2077 | 2077 | */
|
| 2078 | 2078 | public function startEmailVerifications(string $email, string $handle = '', string $language = '', string $tag = ''): Result {
|
| 2079 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2079 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2080 | 2080 |
|
| 2081 | 2081 | $uri = '/customers/verifications/emails/start';
|
| 2082 | 2082 | $curl = $this->setupCurl($uri, 'POST', ['email' => $email, 'handle' => $handle, 'language' => $language, 'tag' => $tag]);
|
| | @@ -2098,7 +2098,7 @@ |
| 2098 | 2098 | * @return Result
|
| 2099 | 2099 | */
|
| 2100 | 2100 | public function getReseller(array $query = []): Result {
|
| 2101 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2101 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2102 | 2102 | $cacheName = 'getreseller';
|
| 2103 | 2103 | $cache = $this->cache->get($cacheName);
|
| 2104 | 2104 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2125,7 +2125,7 @@ |
| 2125 | 2125 | * @return Result
|
| 2126 | 2126 | */
|
| 2127 | 2127 | public function updateReseller(int $id, array $payload = []): Result {
|
| 2128 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2128 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2129 | 2129 |
|
| 2130 | 2130 | $uri = "/resellers/{$id}";
|
| 2131 | 2131 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -2147,7 +2147,7 @@ |
| 2147 | 2147 | * @return Result
|
| 2148 | 2148 | */
|
| 2149 | 2149 | public function listSettings(): Result {
|
| 2150 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2150 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2151 | 2151 | $cacheName = 'listsettings';
|
| 2152 | 2152 | $cache = $this->cache->get($cacheName);
|
| 2153 | 2153 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2172,7 +2172,7 @@ |
| 2172 | 2172 | * @return Result
|
| 2173 | 2173 | */
|
| 2174 | 2174 | public function listStatistics(array $query = []): Result {
|
| 2175 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2175 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2176 | 2176 | $cacheName = 'liststatistics';
|
| 2177 | 2177 | $cache = $this->cache->get($cacheName);
|
| 2178 | 2178 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2199,7 +2199,7 @@ |
| 2199 | 2199 | * @return Result
|
| 2200 | 2200 | */
|
| 2201 | 2201 | public function listTags(array $query = []): Result {
|
| 2202 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2202 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2203 | 2203 | $cacheName = 'listtags';
|
| 2204 | 2204 | $cache = $this->cache->get($cacheName);
|
| 2205 | 2205 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2225,7 +2225,7 @@ |
| 2225 | 2225 | * @return Result
|
| 2226 | 2226 | */
|
| 2227 | 2227 | public function createTag(array $payload = []): Result {
|
| 2228 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2228 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2229 | 2229 |
|
| 2230 | 2230 | $uri = '/tags';
|
| 2231 | 2231 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2246,7 +2246,7 @@ |
| 2246 | 2246 | * @return Result
|
| 2247 | 2247 | */
|
| 2248 | 2248 | public function deleteTag(array $payload = []): Result {
|
| 2249 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2249 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2250 | 2250 |
|
| 2251 | 2251 | $uri = "/tags/{$id}";
|
| 2252 | 2252 | $curl = $this->setupCurl($uri, 'DELETE', $payload);
|
| | @@ -2271,7 +2271,7 @@ |
| 2271 | 2271 | * @return Result
|
| 2272 | 2272 | */
|
| 2273 | 2273 | public function createSeDomain(array $payload): Result {
|
| 2274 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2274 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2275 | 2275 |
|
| 2276 | 2276 | $uri = '/spam-expert/domains';
|
| 2277 | 2277 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2293,7 +2293,7 @@ |
| 2293 | 2293 | * @return Result
|
| 2294 | 2294 | */
|
| 2295 | 2295 | public function getSeDomain(string $domain, array $query = []): Result {
|
| 2296 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2296 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2297 | 2297 | $cacheName = "getsedomain-{$domain}";
|
| 2298 | 2298 | $cache = $this->cache->get($cacheName);
|
| 2299 | 2299 | if ($this->cache->resurrect($cache, $domain, 'domain')) return Result::Success('', $cache);
|
| | @@ -2320,7 +2320,7 @@ |
| 2320 | 2320 | * @return Result
|
| 2321 | 2321 | */
|
| 2322 | 2322 | public function updateSeDomain(string $domain, array $payload = []): Result {
|
| 2323 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2323 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2324 | 2324 |
|
| 2325 | 2325 | $uri = "/spam-expert/domains/{$domain}";
|
| 2326 | 2326 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -2342,7 +2342,7 @@ |
| 2342 | 2342 | * @return Result
|
| 2343 | 2343 | */
|
| 2344 | 2344 | public function deleteSeDomain(string $domain): Result {
|
| 2345 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2345 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2346 | 2346 |
|
| 2347 | 2347 | $uri = "/spam-expert/domains/{$domain}";
|
| 2348 | 2348 | $curl = $this->setupCurl($uri, 'DELETE');
|
| | @@ -2368,7 +2368,7 @@ |
| 2368 | 2368 | * @return Result
|
| 2369 | 2369 | */
|
| 2370 | 2370 | public function listApproverEmails(array $query = []): Result {
|
| 2371 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2371 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2372 | 2372 | $cacheName = 'listapproveremails';
|
| 2373 | 2373 | $cache = $this->cache->get($cacheName);
|
| 2374 | 2374 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2396,7 +2396,7 @@ |
| 2396 | 2396 | * @return Result
|
| 2397 | 2397 | */
|
| 2398 | 2398 | public function createCsr(array $payload): Result {
|
| 2399 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2399 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2400 | 2400 |
|
| 2401 | 2401 | $uri = '/ssl/csr';
|
| 2402 | 2402 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2416,7 +2416,7 @@ |
| 2416 | 2416 | * @return Result
|
| 2417 | 2417 | */
|
| 2418 | 2418 | public function decodeCsr(string $csr): Result {
|
| 2419 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2419 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2420 | 2420 |
|
| 2421 | 2421 | $uri = '/ssl/csr/decode';
|
| 2422 | 2422 | $curl = $this->setupCurl($uri, 'POST', ['csr' => $csr]);
|
| | @@ -2438,7 +2438,7 @@ |
| 2438 | 2438 | * @return Result
|
| 2439 | 2439 | */
|
| 2440 | 2440 | public function listSslOrders(array $query = []): Result {
|
| 2441 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2441 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2442 | 2442 | $cacheName = 'listsslorders';
|
| 2443 | 2443 | $cache = $this->cache->get($cacheName);
|
| 2444 | 2444 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2464,7 +2464,7 @@ |
| 2464 | 2464 | * @return Result
|
| 2465 | 2465 | */
|
| 2466 | 2466 | public function createSslOrder(array $payload): Result {
|
| 2467 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2467 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2468 | 2468 |
|
| 2469 | 2469 | $uri = '/ssl/orders';
|
| 2470 | 2470 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2485,7 +2485,7 @@ |
| 2485 | 2485 | * @return Result
|
| 2486 | 2486 | */
|
| 2487 | 2487 | public function getSslOrder(int $id): Result {
|
| 2488 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2488 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2489 | 2489 | $cacheName = "getsslorder-{$id}";
|
| 2490 | 2490 | $cache = $this->cache->get($cacheName);
|
| 2491 | 2491 | if ($this->cache->resurrect($cache)) return Result::Success('', $cache);
|
| | @@ -2512,7 +2512,7 @@ |
| 2512 | 2512 | * @return Result
|
| 2513 | 2513 | */
|
| 2514 | 2514 | public function updateSslOrder(int $id, array $payload = []): Result {
|
| 2515 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2515 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2516 | 2516 |
|
| 2517 | 2517 | $uri = "/ssl/orders/{$id}";
|
| 2518 | 2518 | $curl = $this->setupCurl($uri, 'PUT', $payload);
|
| | @@ -2534,7 +2534,7 @@ |
| 2534 | 2534 | * @return Result
|
| 2535 | 2535 | */
|
| 2536 | 2536 | public function cancelSslOrder(int $id): Result {
|
| 2537 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2537 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2538 | 2538 |
|
| 2539 | 2539 | $payload = ['id' => $id];
|
| 2540 | 2540 | $uri = "/ssl/orders/{$id}/cancel";
|
| | @@ -2558,7 +2558,7 @@ |
| 2558 | 2558 | * @return Result
|
| 2559 | 2559 | */
|
| 2560 | 2560 | public function reissueSslOrder(int $id, array $payload = []): Result {
|
| 2561 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2561 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2562 | 2562 |
|
| 2563 | 2563 | $uri = "/ssl/orders/{$id}/reissue";
|
| 2564 | 2564 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2581,7 +2581,7 @@ |
| 2581 | 2581 | * @return Result
|
| 2582 | 2582 | */
|
| 2583 | 2583 | public function renewSslOrder(int $id, array $payload = []): Result {
|
| 2584 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2584 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2585 | 2585 |
|
| 2586 | 2586 | $uri = "/ssl/orders/{$id}/renew";
|
| 2587 | 2587 | $curl = $this->setupCurl($uri, 'POST', $payload);
|
| | @@ -2606,7 +2606,7 @@ |
| 2606 | 2606 | * @return Result
|
| 2607 | 2607 | */
|
| 2608 | 2608 | public function updateSslApproverEmail(int $id, string $approverEmail): Result {
|
| 2609 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2609 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2610 | 2610 |
|
| 2611 | 2611 | $uri = "/ssl/orders/{$id}/approver-email";
|
| 2612 | 2612 | $curl = $this->setupCurl($uri, 'PUT', ['id' => $id, 'approver_email' => $approverEmail]);
|
| | @@ -2627,7 +2627,7 @@ |
| 2627 | 2627 | * @return Result
|
| 2628 | 2628 | */
|
| 2629 | 2629 | public function resendSslApproverEmail(int $id): Result {
|
| 2630 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2630 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2631 | 2631 |
|
| 2632 | 2632 | $uri = "/ssl/orders/{$id}/approver-email/resend";
|
| 2633 | 2633 | $curl = $this->setupCurl($uri, 'POST', ['id' => $id]);
|
| | @@ -2650,7 +2650,7 @@ |
| 2650 | 2650 | * @return Result
|
| 2651 | 2651 | */
|
| 2652 | 2652 | public function createSslOtpToken(int $id): Result {
|
| 2653 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2653 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2654 | 2654 |
|
| 2655 | 2655 | $uri = "/ssl/orders/{$id}/otp-tokens";
|
| 2656 | 2656 | $curl = $this->setupCurl($uri, 'POST');
|
| | @@ -2672,7 +2672,7 @@ |
| 2672 | 2672 | * @return Result
|
| 2673 | 2673 | */
|
| 2674 | 2674 | public function listSslProducts(array $query = []): Result {
|
| 2675 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2675 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2676 | 2676 | $cacheName = 'listsslproducts';
|
| 2677 | 2677 | $cache = $this->cache->get($cacheName);
|
| 2678 | 2678 | if ($this->cache->resurrect($cache, $query)) return Result::Success('', $cache);
|
| | @@ -2698,7 +2698,7 @@ |
| 2698 | 2698 | * @return Result
|
| 2699 | 2699 | */
|
| 2700 | 2700 | public function getSslProduct(int $id): Result {
|
| 2701 | | - if (!OPENPROVIDER_ENABLED) return Result::error('エラー:OpenProviderは無効です。');
|
| 2701 | + if (!OPENPROVIDER_ENABLED) return Result::Error('エラー:OpenProviderは無効です。');
|
| 2702 | 2702 | $cacheName = "getsslproduct-{$id}";
|
| 2703 | 2703 | $cache = $this->cache->get($cacheName);
|
| 2704 | 2704 | if ($this->cache->resurrect($cache, $id, 'id')) return Result::Success('', $cache);
|