From 6a917cce8a4d4dc1109ef0c1e0fa26f56dcc4d1e Mon Sep 17 00:00:00 2001 From: Doug Miller Date: Wed, 19 Feb 2020 11:46:01 -0600 Subject: [PATCH] Re-generating code with generator updates --- .phpcs.xml.dist | 1 + composer.json | 1 + lib/recurly/base_client.php | 6 +- lib/recurly/client.php | 515 ++++++++++++++++++------------- lib/recurly/pager.php | 2 +- lib/recurly/recurly_error.php | 4 +- lib/recurly/recurly_resource.php | 17 +- lib/recurly/request.php | 2 +- 8 files changed, 326 insertions(+), 222 deletions(-) diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 0daeca84..e43b708b 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -17,6 +17,7 @@ + diff --git a/composer.json b/composer.json index c1940a2b..df977f81 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,7 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, diff --git a/lib/recurly/base_client.php b/lib/recurly/base_client.php index ae5cc587..454cc312 100644 --- a/lib/recurly/base_client.php +++ b/lib/recurly/base_client.php @@ -34,7 +34,7 @@ abstract protected function apiVersion(): string; * * @return \Recurly\RecurlyResource A Recurly Resource */ - protected function makeRequest(string $method, string $path, ?array $body = [], ?array $params = []): \Recurly\RecurlyResource // phpcs:ignore Generic.Files.LineLength.TooLong + protected function makeRequest(string $method, string $path, ?array $body = [], ?array $params = []): \Recurly\RecurlyResource { $response = $this->_getResponse($method, $path, $body, $params); $resource = $response->toResource(); @@ -168,11 +168,11 @@ private function _headers(): string */ public function setApiUrl(string $url): void { - echo "[SECURITY WARNING] setApiUrl is for testing only and not supported in production." . PHP_EOL; // phpcs:ignore Generic.Files.LineLength.TooLong + echo "[SECURITY WARNING] setApiUrl is for testing only and not supported in production." . PHP_EOL; if (getenv("RECURLY_INSECURE") == "true") { $this->_baseUrl = $url; } else { - echo "ApiUrl not changed. To change, set the environment variable RECURLY_INSECURE to true" . PHP_EOL; // phpcs:ignore Generic.Files.LineLength.TooLong + echo "ApiUrl not changed. To change, set the environment variable RECURLY_INSECURE to true" . PHP_EOL; } } diff --git a/lib/recurly/client.php b/lib/recurly/client.php index 34e29cd3..80d70dd6 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -46,10 +46,11 @@ protected function apiVersion(): string * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_sites */ - public function listSites(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listSites(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/sites", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/sites", []); return new \Recurly\Pager($this, $path, $options); } @@ -59,10 +60,11 @@ public function listSites(array $options = []): \Recurly\Pager // phpcs:ignore G * @param string $site_id Site ID or subdomain. For ID no prefix is used e.g. `e28zov4fw0v2`. For subdomain use prefix `subdomain-`, e.g. `subdomain-recurly`. * * @return \Recurly\Resources\Site + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_site */ - public function getSite(string $site_id): \Recurly\Resources\Site // phpcs:ignore Generic.Files.LineLength.TooLong + public function getSite(string $site_id): \Recurly\Resources\Site { - $path = $this->interpolatePath("/sites/{site_id}", ['site_id' => $site_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/sites/{site_id}", ['site_id' => $site_id]); return $this->makeRequest('GET', $path, null, null); } @@ -104,10 +106,11 @@ public function getSite(string $site_id): \Recurly\Resources\Site // phpcs:ignor * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_accounts */ - public function listAccounts(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccounts(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts", []); return new \Recurly\Pager($this, $path, $options); } @@ -117,10 +120,11 @@ public function listAccounts(array $options = []): \Recurly\Pager // phpcs:ignor * @param array $body The body of the request. * * @return \Recurly\Resources\Account + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_account */ - public function createAccount(array $body): \Recurly\Resources\Account // phpcs:ignore Generic.Files.LineLength.TooLong + public function createAccount(array $body): \Recurly\Resources\Account { - $path = $this->interpolatePath("/accounts", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts", []); return $this->makeRequest('POST', $path, $body, null); } @@ -130,10 +134,11 @@ public function createAccount(array $body): \Recurly\Resources\Account // phpcs: * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\Account + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_account */ - public function getAccount(string $account_id): \Recurly\Resources\Account // phpcs:ignore Generic.Files.LineLength.TooLong + public function getAccount(string $account_id): \Recurly\Resources\Account { - $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); return $this->makeRequest('GET', $path, null, null); } @@ -144,10 +149,11 @@ public function getAccount(string $account_id): \Recurly\Resources\Account // ph * @param array $body The body of the request. * * @return \Recurly\Resources\Account + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_account */ - public function updateAccount(string $account_id, array $body): \Recurly\Resources\Account // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateAccount(string $account_id, array $body): \Recurly\Resources\Account { - $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -157,10 +163,11 @@ public function updateAccount(string $account_id, array $body): \Recurly\Resourc * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\Account + * @link https://developers.recurly.com/api/v2019-10-10#operation/deactivate_account */ - public function deactivateAccount(string $account_id): \Recurly\Resources\Account // phpcs:ignore Generic.Files.LineLength.TooLong + public function deactivateAccount(string $account_id): \Recurly\Resources\Account { - $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}", ['account_id' => $account_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -170,10 +177,11 @@ public function deactivateAccount(string $account_id): \Recurly\Resources\Accoun * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\AccountAcquisition + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_account_acquisition */ - public function getAccountAcquisition(string $account_id): \Recurly\Resources\AccountAcquisition // phpcs:ignore Generic.Files.LineLength.TooLong + public function getAccountAcquisition(string $account_id): \Recurly\Resources\AccountAcquisition { - $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); return $this->makeRequest('GET', $path, null, null); } @@ -184,10 +192,11 @@ public function getAccountAcquisition(string $account_id): \Recurly\Resources\Ac * @param array $body The body of the request. * * @return \Recurly\Resources\AccountAcquisition + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_account_acquisition */ - public function updateAccountAcquisition(string $account_id, array $body): \Recurly\Resources\AccountAcquisition // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateAccountAcquisition(string $account_id, array $body): \Recurly\Resources\AccountAcquisition { - $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -197,10 +206,11 @@ public function updateAccountAcquisition(string $account_id, array $body): \Recu * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\EmptyResource + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_account_acquisition */ - public function removeAccountAcquisition(string $account_id): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeAccountAcquisition(string $account_id): \Recurly\EmptyResource { - $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/acquisition", ['account_id' => $account_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -210,10 +220,11 @@ public function removeAccountAcquisition(string $account_id): \Recurly\EmptyReso * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\Account + * @link https://developers.recurly.com/api/v2019-10-10#operation/reactivate_account */ - public function reactivateAccount(string $account_id): \Recurly\Resources\Account // phpcs:ignore Generic.Files.LineLength.TooLong + public function reactivateAccount(string $account_id): \Recurly\Resources\Account { - $path = $this->interpolatePath("/accounts/{account_id}/reactivate", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/reactivate", ['account_id' => $account_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -223,10 +234,11 @@ public function reactivateAccount(string $account_id): \Recurly\Resources\Accoun * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\AccountBalance + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_account_balance */ - public function getAccountBalance(string $account_id): \Recurly\Resources\AccountBalance // phpcs:ignore Generic.Files.LineLength.TooLong + public function getAccountBalance(string $account_id): \Recurly\Resources\AccountBalance { - $path = $this->interpolatePath("/accounts/{account_id}/balance", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/balance", ['account_id' => $account_id]); return $this->makeRequest('GET', $path, null, null); } @@ -236,10 +248,11 @@ public function getAccountBalance(string $account_id): \Recurly\Resources\Accoun * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\BillingInfo + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_billing_info */ - public function getBillingInfo(string $account_id): \Recurly\Resources\BillingInfo // phpcs:ignore Generic.Files.LineLength.TooLong + public function getBillingInfo(string $account_id): \Recurly\Resources\BillingInfo { - $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); return $this->makeRequest('GET', $path, null, null); } @@ -250,10 +263,11 @@ public function getBillingInfo(string $account_id): \Recurly\Resources\BillingIn * @param array $body The body of the request. * * @return \Recurly\Resources\BillingInfo + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_billing_info */ - public function updateBillingInfo(string $account_id, array $body): \Recurly\Resources\BillingInfo // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateBillingInfo(string $account_id, array $body): \Recurly\Resources\BillingInfo { - $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -263,10 +277,11 @@ public function updateBillingInfo(string $account_id, array $body): \Recurly\Res * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\EmptyResource + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_billing_info */ - public function removeBillingInfo(string $account_id): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeBillingInfo(string $account_id): \Recurly\EmptyResource { - $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/billing_info", ['account_id' => $account_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -301,10 +316,11 @@ public function removeBillingInfo(string $account_id): \Recurly\EmptyResource // * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_coupon_redemptions */ - public function listAccountCouponRedemptions(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountCouponRedemptions(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -314,10 +330,11 @@ public function listAccountCouponRedemptions(string $account_id, array $options * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\CouponRedemption + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_active_coupon_redemption */ - public function getActiveCouponRedemption(string $account_id): \Recurly\Resources\CouponRedemption // phpcs:ignore Generic.Files.LineLength.TooLong + public function getActiveCouponRedemption(string $account_id): \Recurly\Resources\CouponRedemption { - $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); return $this->makeRequest('GET', $path, null, null); } @@ -328,10 +345,11 @@ public function getActiveCouponRedemption(string $account_id): \Recurly\Resource * @param array $body The body of the request. * * @return \Recurly\Resources\CouponRedemption + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_coupon_redemption */ - public function createCouponRedemption(string $account_id, array $body): \Recurly\Resources\CouponRedemption // phpcs:ignore Generic.Files.LineLength.TooLong + public function createCouponRedemption(string $account_id, array $body): \Recurly\Resources\CouponRedemption { - $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -341,10 +359,11 @@ public function createCouponRedemption(string $account_id, array $body): \Recurl * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * * @return \Recurly\Resources\CouponRedemption + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_coupon_redemption */ - public function removeCouponRedemption(string $account_id): \Recurly\Resources\CouponRedemption // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeCouponRedemption(string $account_id): \Recurly\Resources\CouponRedemption { - $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/coupon_redemptions/active", ['account_id' => $account_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -369,10 +388,11 @@ public function removeCouponRedemption(string $account_id): \Recurly\Resources\C * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_credit_payments */ - public function listAccountCreditPayments(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountCreditPayments(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/credit_payments", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/credit_payments", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -415,10 +435,11 @@ public function listAccountCreditPayments(string $account_id, array $options = [ * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_invoices */ - public function listAccountInvoices(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountInvoices(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/invoices", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/invoices", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -429,10 +450,11 @@ public function listAccountInvoices(string $account_id, array $options = []): \R * @param array $body The body of the request. * * @return \Recurly\Resources\InvoiceCollection + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_invoice */ - public function createInvoice(string $account_id, array $body): \Recurly\Resources\InvoiceCollection // phpcs:ignore Generic.Files.LineLength.TooLong + public function createInvoice(string $account_id, array $body): \Recurly\Resources\InvoiceCollection { - $path = $this->interpolatePath("/accounts/{account_id}/invoices", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/invoices", ['account_id' => $account_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -443,10 +465,11 @@ public function createInvoice(string $account_id, array $body): \Recurly\Resourc * @param array $body The body of the request. * * @return \Recurly\Resources\InvoiceCollection + * @link https://developers.recurly.com/api/v2019-10-10#operation/preview_invoice */ - public function previewInvoice(string $account_id, array $body): \Recurly\Resources\InvoiceCollection // phpcs:ignore Generic.Files.LineLength.TooLong + public function previewInvoice(string $account_id, array $body): \Recurly\Resources\InvoiceCollection { - $path = $this->interpolatePath("/accounts/{account_id}/invoices/preview", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/invoices/preview", ['account_id' => $account_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -487,10 +510,11 @@ public function previewInvoice(string $account_id, array $body): \Recurly\Resour * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_line_items */ - public function listAccountLineItems(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountLineItems(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/line_items", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/line_items", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -501,10 +525,11 @@ public function listAccountLineItems(string $account_id, array $options = []): \ * @param array $body The body of the request. * * @return \Recurly\Resources\LineItem + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_line_item */ - public function createLineItem(string $account_id, array $body): \Recurly\Resources\LineItem // phpcs:ignore Generic.Files.LineLength.TooLong + public function createLineItem(string $account_id, array $body): \Recurly\Resources\LineItem { - $path = $this->interpolatePath("/accounts/{account_id}/line_items", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/line_items", ['account_id' => $account_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -529,10 +554,11 @@ public function createLineItem(string $account_id, array $body): \Recurly\Resour * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_notes */ - public function listAccountNotes(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountNotes(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/notes", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/notes", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -543,10 +569,11 @@ public function listAccountNotes(string $account_id, array $options = []): \Recu * @param string $account_note_id Account Note ID. * * @return \Recurly\Resources\AccountNote + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_account_note */ - public function getAccountNote(string $account_id, string $account_note_id): \Recurly\Resources\AccountNote // phpcs:ignore Generic.Files.LineLength.TooLong + public function getAccountNote(string $account_id, string $account_note_id): \Recurly\Resources\AccountNote { - $path = $this->interpolatePath("/accounts/{account_id}/notes/{account_note_id}", ['account_id' => $account_id, 'account_note_id' => $account_note_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/notes/{account_note_id}", ['account_id' => $account_id, 'account_note_id' => $account_note_id]); return $this->makeRequest('GET', $path, null, null); } @@ -583,10 +610,11 @@ public function getAccountNote(string $account_id, string $account_note_id): \Re * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_shipping_addresses */ - public function listShippingAddresses(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listShippingAddresses(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -597,10 +625,11 @@ public function listShippingAddresses(string $account_id, array $options = []): * @param array $body The body of the request. * * @return \Recurly\Resources\ShippingAddress + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_shipping_address */ - public function createShippingAddress(string $account_id, array $body): \Recurly\Resources\ShippingAddress // phpcs:ignore Generic.Files.LineLength.TooLong + public function createShippingAddress(string $account_id, array $body): \Recurly\Resources\ShippingAddress { - $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses", ['account_id' => $account_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -611,10 +640,11 @@ public function createShippingAddress(string $account_id, array $body): \Recurly * @param string $shipping_address_id Shipping Address ID. * * @return \Recurly\Resources\ShippingAddress + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_shipping_address */ - public function getShippingAddress(string $account_id, string $shipping_address_id): \Recurly\Resources\ShippingAddress // phpcs:ignore Generic.Files.LineLength.TooLong + public function getShippingAddress(string $account_id, string $shipping_address_id): \Recurly\Resources\ShippingAddress { - $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); return $this->makeRequest('GET', $path, null, null); } @@ -626,10 +656,11 @@ public function getShippingAddress(string $account_id, string $shipping_address_ * @param array $body The body of the request. * * @return \Recurly\Resources\ShippingAddress + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_shipping_address */ - public function updateShippingAddress(string $account_id, string $shipping_address_id, array $body): \Recurly\Resources\ShippingAddress // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateShippingAddress(string $account_id, string $shipping_address_id, array $body): \Recurly\Resources\ShippingAddress { - $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -640,10 +671,11 @@ public function updateShippingAddress(string $account_id, string $shipping_addre * @param string $shipping_address_id Shipping Address ID. * * @return \Recurly\EmptyResource + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_shipping_address */ - public function removeShippingAddress(string $account_id, string $shipping_address_id): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeShippingAddress(string $account_id, string $shipping_address_id): \Recurly\EmptyResource { - $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/shipping_addresses/{shipping_address_id}", ['account_id' => $account_id, 'shipping_address_id' => $shipping_address_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -686,10 +718,11 @@ public function removeShippingAddress(string $account_id, string $shipping_addre * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_subscriptions */ - public function listAccountSubscriptions(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountSubscriptions(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/subscriptions", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/subscriptions", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -729,10 +762,11 @@ public function listAccountSubscriptions(string $account_id, array $options = [] * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_transactions */ - public function listAccountTransactions(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountTransactions(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/transactions", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/transactions", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -775,10 +809,11 @@ public function listAccountTransactions(string $account_id, array $options = []) * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_child_accounts */ - public function listChildAccounts(string $account_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listChildAccounts(string $account_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/accounts/{account_id}/accounts", ['account_id' => $account_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/accounts/{account_id}/accounts", ['account_id' => $account_id]); return new \Recurly\Pager($this, $path, $options); } @@ -814,10 +849,11 @@ public function listChildAccounts(string $account_id, array $options = []): \Rec * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_account_acquisition */ - public function listAccountAcquisition(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAccountAcquisition(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/acquisitions", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/acquisitions", []); return new \Recurly\Pager($this, $path, $options); } @@ -853,10 +889,11 @@ public function listAccountAcquisition(array $options = []): \Recurly\Pager // p * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_coupons */ - public function listCoupons(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listCoupons(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/coupons", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/coupons", []); return new \Recurly\Pager($this, $path, $options); } @@ -866,10 +903,11 @@ public function listCoupons(array $options = []): \Recurly\Pager // phpcs:ignore * @param array $body The body of the request. * * @return \Recurly\Resources\Coupon + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_coupon */ - public function createCoupon(array $body): \Recurly\Resources\Coupon // phpcs:ignore Generic.Files.LineLength.TooLong + public function createCoupon(array $body): \Recurly\Resources\Coupon { - $path = $this->interpolatePath("/coupons", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/coupons", []); return $this->makeRequest('POST', $path, $body, null); } @@ -879,10 +917,11 @@ public function createCoupon(array $body): \Recurly\Resources\Coupon // phpcs:ig * @param string $coupon_id Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. * * @return \Recurly\Resources\Coupon + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_coupon */ - public function getCoupon(string $coupon_id): \Recurly\Resources\Coupon // phpcs:ignore Generic.Files.LineLength.TooLong + public function getCoupon(string $coupon_id): \Recurly\Resources\Coupon { - $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); return $this->makeRequest('GET', $path, null, null); } @@ -893,10 +932,11 @@ public function getCoupon(string $coupon_id): \Recurly\Resources\Coupon // phpcs * @param array $body The body of the request. * * @return \Recurly\Resources\Coupon + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_coupon */ - public function updateCoupon(string $coupon_id, array $body): \Recurly\Resources\Coupon // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateCoupon(string $coupon_id, array $body): \Recurly\Resources\Coupon { - $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -933,10 +973,11 @@ public function updateCoupon(string $coupon_id, array $body): \Recurly\Resources * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_unique_coupon_codes */ - public function listUniqueCouponCodes(string $coupon_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listUniqueCouponCodes(string $coupon_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/coupons/{coupon_id}/unique_coupon_codes", ['coupon_id' => $coupon_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/coupons/{coupon_id}/unique_coupon_codes", ['coupon_id' => $coupon_id]); return new \Recurly\Pager($this, $path, $options); } @@ -960,10 +1001,11 @@ public function listUniqueCouponCodes(string $coupon_id, array $options = []): \ * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_credit_payments */ - public function listCreditPayments(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listCreditPayments(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/credit_payments", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/credit_payments", []); return new \Recurly\Pager($this, $path, $options); } @@ -973,10 +1015,11 @@ public function listCreditPayments(array $options = []): \Recurly\Pager // phpcs * @param string $credit_payment_id Credit Payment ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\CreditPayment + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_credit_payment */ - public function getCreditPayment(string $credit_payment_id): \Recurly\Resources\CreditPayment // phpcs:ignore Generic.Files.LineLength.TooLong + public function getCreditPayment(string $credit_payment_id): \Recurly\Resources\CreditPayment { - $path = $this->interpolatePath("/credit_payments/{credit_payment_id}", ['credit_payment_id' => $credit_payment_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/credit_payments/{credit_payment_id}", ['credit_payment_id' => $credit_payment_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1014,10 +1057,11 @@ public function getCreditPayment(string $credit_payment_id): \Recurly\Resources\ * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_custom_field_definitions */ - public function listCustomFieldDefinitions(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listCustomFieldDefinitions(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/custom_field_definitions", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/custom_field_definitions", []); return new \Recurly\Pager($this, $path, $options); } @@ -1027,10 +1071,11 @@ public function listCustomFieldDefinitions(array $options = []): \Recurly\Pager * @param string $custom_field_definition_id Custom Field Definition ID * * @return \Recurly\Resources\CustomFieldDefinition + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_custom_field_definition */ - public function getCustomFieldDefinition(string $custom_field_definition_id): \Recurly\Resources\CustomFieldDefinition // phpcs:ignore Generic.Files.LineLength.TooLong + public function getCustomFieldDefinition(string $custom_field_definition_id): \Recurly\Resources\CustomFieldDefinition { - $path = $this->interpolatePath("/custom_field_definitions/{custom_field_definition_id}", ['custom_field_definition_id' => $custom_field_definition_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/custom_field_definitions/{custom_field_definition_id}", ['custom_field_definition_id' => $custom_field_definition_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1068,10 +1113,11 @@ public function getCustomFieldDefinition(string $custom_field_definition_id): \R * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_items */ - public function listItems(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listItems(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/items", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items", []); return new \Recurly\Pager($this, $path, $options); } @@ -1081,10 +1127,11 @@ public function listItems(array $options = []): \Recurly\Pager // phpcs:ignore G * @param array $body The body of the request. * * @return \Recurly\Resources\Item + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_item */ - public function createItem(array $body): \Recurly\Resources\Item // phpcs:ignore Generic.Files.LineLength.TooLong + public function createItem(array $body): \Recurly\Resources\Item { - $path = $this->interpolatePath("/items", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items", []); return $this->makeRequest('POST', $path, $body, null); } @@ -1094,10 +1141,11 @@ public function createItem(array $body): \Recurly\Resources\Item // phpcs:ignore * @param string $item_id Item ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-red`. * * @return \Recurly\Resources\Item + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_item */ - public function getItem(string $item_id): \Recurly\Resources\Item // phpcs:ignore Generic.Files.LineLength.TooLong + public function getItem(string $item_id): \Recurly\Resources\Item { - $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1108,10 +1156,11 @@ public function getItem(string $item_id): \Recurly\Resources\Item // phpcs:ignor * @param array $body The body of the request. * * @return \Recurly\Resources\Item + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_item */ - public function updateItem(string $item_id, array $body): \Recurly\Resources\Item // phpcs:ignore Generic.Files.LineLength.TooLong + public function updateItem(string $item_id, array $body): \Recurly\Resources\Item { - $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1121,10 +1170,11 @@ public function updateItem(string $item_id, array $body): \Recurly\Resources\Ite * @param string $item_id Item ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-red`. * * @return \Recurly\Resources\Item + * @link https://developers.recurly.com/api/v2019-10-10#operation/deactivate_item */ - public function deactivateItem(string $item_id): \Recurly\Resources\Item // phpcs:ignore Generic.Files.LineLength.TooLong + public function deactivateItem(string $item_id): \Recurly\Resources\Item { - $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -1134,10 +1184,11 @@ public function deactivateItem(string $item_id): \Recurly\Resources\Item // phpc * @param string $item_id Item ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-red`. * * @return \Recurly\Resources\Item + * @link https://developers.recurly.com/api/v2019-10-10#operation/reactivate_item */ - public function reactivateItem(string $item_id): \Recurly\Resources\Item // phpcs:ignore Generic.Files.LineLength.TooLong + public function reactivateItem(string $item_id): \Recurly\Resources\Item { - $path = $this->interpolatePath("/items/{item_id}/reactivate", ['item_id' => $item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/items/{item_id}/reactivate", ['item_id' => $item_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1179,10 +1230,11 @@ public function reactivateItem(string $item_id): \Recurly\Resources\Item // phpc * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_invoices */ - public function listInvoices(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listInvoices(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/invoices", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices", []); return new \Recurly\Pager($this, $path, $options); } @@ -1192,10 +1244,11 @@ public function listInvoices(array $options = []): \Recurly\Pager // phpcs:ignor * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_invoice */ - public function getInvoice(string $invoice_id): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function getInvoice(string $invoice_id): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1206,10 +1259,11 @@ public function getInvoice(string $invoice_id): \Recurly\Resources\Invoice // ph * @param array $body The body of the request. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/put_invoice */ - public function putInvoice(string $invoice_id, array $body): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function putInvoice(string $invoice_id, array $body): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1219,10 +1273,11 @@ public function putInvoice(string $invoice_id, array $body): \Recurly\Resources\ * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\BinaryFile + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_invoice_pdf */ - public function getInvoicePdf(string $invoice_id): \Recurly\Resources\BinaryFile // phpcs:ignore Generic.Files.LineLength.TooLong + public function getInvoicePdf(string $invoice_id): \Recurly\Resources\BinaryFile { - $path = $this->interpolatePath("/invoices/{invoice_id}.pdf", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}.pdf", ['invoice_id' => $invoice_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1233,10 +1288,11 @@ public function getInvoicePdf(string $invoice_id): \Recurly\Resources\BinaryFile * @param array $body The body of the request. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/collect_invoice */ - public function collectInvoice(string $invoice_id, array $body = []): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function collectInvoice(string $invoice_id, array $body = []): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/collect", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/collect", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1246,10 +1302,11 @@ public function collectInvoice(string $invoice_id, array $body = []): \Recurly\R * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/fail_invoice */ - public function failInvoice(string $invoice_id): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function failInvoice(string $invoice_id): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/mark_failed", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/mark_failed", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1259,10 +1316,11 @@ public function failInvoice(string $invoice_id): \Recurly\Resources\Invoice // p * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/mark_invoice_successful */ - public function markInvoiceSuccessful(string $invoice_id): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function markInvoiceSuccessful(string $invoice_id): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/mark_successful", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/mark_successful", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1272,10 +1330,11 @@ public function markInvoiceSuccessful(string $invoice_id): \Recurly\Resources\In * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/reopen_invoice */ - public function reopenInvoice(string $invoice_id): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function reopenInvoice(string $invoice_id): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/reopen", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/reopen", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1285,10 +1344,11 @@ public function reopenInvoice(string $invoice_id): \Recurly\Resources\Invoice // * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/void_invoice */ - public function voidInvoice(string $invoice_id): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function voidInvoice(string $invoice_id): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/void", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/void", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1329,10 +1389,11 @@ public function voidInvoice(string $invoice_id): \Recurly\Resources\Invoice // p * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_invoice_line_items */ - public function listInvoiceLineItems(string $invoice_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listInvoiceLineItems(string $invoice_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/invoices/{invoice_id}/line_items", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/line_items", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, $options); } @@ -1367,10 +1428,11 @@ public function listInvoiceLineItems(string $invoice_id, array $options = []): \ * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_invoice_coupon_redemptions */ - public function listInvoiceCouponRedemptions(string $invoice_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listInvoiceCouponRedemptions(string $invoice_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/invoices/{invoice_id}/coupon_redemptions", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/coupon_redemptions", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, $options); } @@ -1380,10 +1442,11 @@ public function listInvoiceCouponRedemptions(string $invoice_id, array $options * @param string $invoice_id Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_related_invoices */ - public function listRelatedInvoices(string $invoice_id): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listRelatedInvoices(string $invoice_id): \Recurly\Pager { - $path = $this->interpolatePath("/invoices/{invoice_id}/related_invoices", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/related_invoices", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, null); } @@ -1394,10 +1457,11 @@ public function listRelatedInvoices(string $invoice_id): \Recurly\Pager // phpcs * @param array $body The body of the request. * * @return \Recurly\Resources\Invoice + * @link https://developers.recurly.com/api/v2019-10-10#operation/refund_invoice */ - public function refundInvoice(string $invoice_id, array $body): \Recurly\Resources\Invoice // phpcs:ignore Generic.Files.LineLength.TooLong + public function refundInvoice(string $invoice_id, array $body): \Recurly\Resources\Invoice { - $path = $this->interpolatePath("/invoices/{invoice_id}/refund", ['invoice_id' => $invoice_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/invoices/{invoice_id}/refund", ['invoice_id' => $invoice_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -1437,10 +1501,11 @@ public function refundInvoice(string $invoice_id, array $body): \Recurly\Resourc * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_line_items */ - public function listLineItems(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listLineItems(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/line_items", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/line_items", []); return new \Recurly\Pager($this, $path, $options); } @@ -1450,10 +1515,11 @@ public function listLineItems(array $options = []): \Recurly\Pager // phpcs:igno * @param string $line_item_id Line Item ID. * * @return \Recurly\Resources\LineItem + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_line_item */ - public function getLineItem(string $line_item_id): \Recurly\Resources\LineItem // phpcs:ignore Generic.Files.LineLength.TooLong + public function getLineItem(string $line_item_id): \Recurly\Resources\LineItem { - $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1463,10 +1529,11 @@ public function getLineItem(string $line_item_id): \Recurly\Resources\LineItem / * @param string $line_item_id Line Item ID. * * @return \Recurly\EmptyResource + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_line_item */ - public function removeLineItem(string $line_item_id): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeLineItem(string $line_item_id): \Recurly\EmptyResource { - $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -1504,10 +1571,11 @@ public function removeLineItem(string $line_item_id): \Recurly\EmptyResource // * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_plans */ - public function listPlans(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listPlans(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/plans", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans", []); return new \Recurly\Pager($this, $path, $options); } @@ -1517,10 +1585,11 @@ public function listPlans(array $options = []): \Recurly\Pager // phpcs:ignore G * @param array $body The body of the request. * * @return \Recurly\Resources\Plan + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_plan */ - public function createPlan(array $body): \Recurly\Resources\Plan // phpcs:ignore Generic.Files.LineLength.TooLong + public function createPlan(array $body): \Recurly\Resources\Plan { - $path = $this->interpolatePath("/plans", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans", []); return $this->makeRequest('POST', $path, $body, null); } @@ -1530,10 +1599,11 @@ public function createPlan(array $body): \Recurly\Resources\Plan // phpcs:ignore * @param string $plan_id Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. * * @return \Recurly\Resources\Plan + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_plan */ - public function getPlan(string $plan_id): \Recurly\Resources\Plan // phpcs:ignore Generic.Files.LineLength.TooLong + public function getPlan(string $plan_id): \Recurly\Resources\Plan { - $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1544,10 +1614,11 @@ public function getPlan(string $plan_id): \Recurly\Resources\Plan // phpcs:ignor * @param array $body The body of the request. * * @return \Recurly\Resources\Plan + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_plan */ - public function updatePlan(string $plan_id, array $body): \Recurly\Resources\Plan // phpcs:ignore Generic.Files.LineLength.TooLong + public function updatePlan(string $plan_id, array $body): \Recurly\Resources\Plan { - $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1557,10 +1628,11 @@ public function updatePlan(string $plan_id, array $body): \Recurly\Resources\Pla * @param string $plan_id Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. * * @return \Recurly\Resources\Plan + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_plan */ - public function removePlan(string $plan_id): \Recurly\Resources\Plan // phpcs:ignore Generic.Files.LineLength.TooLong + public function removePlan(string $plan_id): \Recurly\Resources\Plan { - $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -1599,10 +1671,11 @@ public function removePlan(string $plan_id): \Recurly\Resources\Plan // phpcs:ig * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_plan_add_ons */ - public function listPlanAddOns(string $plan_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listPlanAddOns(string $plan_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/plans/{plan_id}/add_ons", ['plan_id' => $plan_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}/add_ons", ['plan_id' => $plan_id]); return new \Recurly\Pager($this, $path, $options); } @@ -1613,10 +1686,11 @@ public function listPlanAddOns(string $plan_id, array $options = []): \Recurly\P * @param array $body The body of the request. * * @return \Recurly\Resources\AddOn + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_plan_add_on */ - public function createPlanAddOn(string $plan_id, array $body): \Recurly\Resources\AddOn // phpcs:ignore Generic.Files.LineLength.TooLong + public function createPlanAddOn(string $plan_id, array $body): \Recurly\Resources\AddOn { - $path = $this->interpolatePath("/plans/{plan_id}/add_ons", ['plan_id' => $plan_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}/add_ons", ['plan_id' => $plan_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -1627,10 +1701,11 @@ public function createPlanAddOn(string $plan_id, array $body): \Recurly\Resource * @param string $add_on_id Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. * * @return \Recurly\Resources\AddOn + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_plan_add_on */ - public function getPlanAddOn(string $plan_id, string $add_on_id): \Recurly\Resources\AddOn // phpcs:ignore Generic.Files.LineLength.TooLong + public function getPlanAddOn(string $plan_id, string $add_on_id): \Recurly\Resources\AddOn { - $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1642,10 +1717,11 @@ public function getPlanAddOn(string $plan_id, string $add_on_id): \Recurly\Resou * @param array $body The body of the request. * * @return \Recurly\Resources\AddOn + * @link https://developers.recurly.com/api/v2019-10-10#operation/update_plan_add_on */ - public function updatePlanAddOn(string $plan_id, string $add_on_id, array $body): \Recurly\Resources\AddOn // phpcs:ignore Generic.Files.LineLength.TooLong + public function updatePlanAddOn(string $plan_id, string $add_on_id, array $body): \Recurly\Resources\AddOn { - $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1656,10 +1732,11 @@ public function updatePlanAddOn(string $plan_id, string $add_on_id, array $body) * @param string $add_on_id Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. * * @return \Recurly\Resources\AddOn + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_plan_add_on */ - public function removePlanAddOn(string $plan_id, string $add_on_id): \Recurly\Resources\AddOn // phpcs:ignore Generic.Files.LineLength.TooLong + public function removePlanAddOn(string $plan_id, string $add_on_id): \Recurly\Resources\AddOn { - $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/plans/{plan_id}/add_ons/{add_on_id}", ['plan_id' => $plan_id, 'add_on_id' => $add_on_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -1697,10 +1774,11 @@ public function removePlanAddOn(string $plan_id, string $add_on_id): \Recurly\Re * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_add_ons */ - public function listAddOns(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listAddOns(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/add_ons", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/add_ons", []); return new \Recurly\Pager($this, $path, $options); } @@ -1710,10 +1788,11 @@ public function listAddOns(array $options = []): \Recurly\Pager // phpcs:ignore * @param string $add_on_id Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. * * @return \Recurly\Resources\AddOn + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_add_on */ - public function getAddOn(string $add_on_id): \Recurly\Resources\AddOn // phpcs:ignore Generic.Files.LineLength.TooLong + public function getAddOn(string $add_on_id): \Recurly\Resources\AddOn { - $path = $this->interpolatePath("/add_ons/{add_on_id}", ['add_on_id' => $add_on_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/add_ons/{add_on_id}", ['add_on_id' => $add_on_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1749,10 +1828,11 @@ public function getAddOn(string $add_on_id): \Recurly\Resources\AddOn // phpcs:i * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_shipping_methods */ - public function listShippingMethods(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listShippingMethods(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/shipping_methods", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/shipping_methods", []); return new \Recurly\Pager($this, $path, $options); } @@ -1762,10 +1842,11 @@ public function listShippingMethods(array $options = []): \Recurly\Pager // phpc * @param string $id Shipping Method ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-usps_2-day`. * * @return \Recurly\Resources\ShippingMethod + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_shipping_method */ - public function getShippingMethod(string $id): \Recurly\Resources\ShippingMethod // phpcs:ignore Generic.Files.LineLength.TooLong + public function getShippingMethod(string $id): \Recurly\Resources\ShippingMethod { - $path = $this->interpolatePath("/shipping_methods/{id}", ['id' => $id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/shipping_methods/{id}", ['id' => $id]); return $this->makeRequest('GET', $path, null, null); } @@ -1807,10 +1888,11 @@ public function getShippingMethod(string $id): \Recurly\Resources\ShippingMethod * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_subscriptions */ - public function listSubscriptions(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listSubscriptions(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/subscriptions", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions", []); return new \Recurly\Pager($this, $path, $options); } @@ -1820,10 +1902,11 @@ public function listSubscriptions(array $options = []): \Recurly\Pager // phpcs: * @param array $body The body of the request. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_subscription */ - public function createSubscription(array $body): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function createSubscription(array $body): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions", []); return $this->makeRequest('POST', $path, $body, null); } @@ -1833,10 +1916,11 @@ public function createSubscription(array $body): \Recurly\Resources\Subscription * @param string $subscription_id Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_subscription */ - public function getSubscription(string $subscription_id): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function getSubscription(string $subscription_id): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1847,10 +1931,11 @@ public function getSubscription(string $subscription_id): \Recurly\Resources\Sub * @param array $body The body of the request. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/modify_subscription */ - public function modifySubscription(string $subscription_id, array $body): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function modifySubscription(string $subscription_id, array $body): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1873,10 +1958,11 @@ public function modifySubscription(string $subscription_id, array $body): \Recur * @param array $options Associative array of optional parameters: * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/terminate_subscription */ - public function terminateSubscription(string $subscription_id, array $options = []): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function terminateSubscription(string $subscription_id, array $options = []): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}", ['subscription_id' => $subscription_id]); return $this->makeRequest('DELETE', $path, null, $options); } @@ -1887,10 +1973,11 @@ public function terminateSubscription(string $subscription_id, array $options = * @param array $body The body of the request. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/cancel_subscription */ - public function cancelSubscription(string $subscription_id, array $body = []): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function cancelSubscription(string $subscription_id, array $body = []): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/cancel", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/cancel", ['subscription_id' => $subscription_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1900,10 +1987,11 @@ public function cancelSubscription(string $subscription_id, array $body = []): \ * @param string $subscription_id Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/reactivate_subscription */ - public function reactivateSubscription(string $subscription_id): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function reactivateSubscription(string $subscription_id): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/reactivate", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/reactivate", ['subscription_id' => $subscription_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1914,10 +2002,11 @@ public function reactivateSubscription(string $subscription_id): \Recurly\Resour * @param array $body The body of the request. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/pause_subscription */ - public function pauseSubscription(string $subscription_id, array $body): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function pauseSubscription(string $subscription_id, array $body): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/pause", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/pause", ['subscription_id' => $subscription_id]); return $this->makeRequest('PUT', $path, $body, null); } @@ -1927,10 +2016,11 @@ public function pauseSubscription(string $subscription_id, array $body): \Recurl * @param string $subscription_id Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\Subscription + * @link https://developers.recurly.com/api/v2019-10-10#operation/resume_subscription */ - public function resumeSubscription(string $subscription_id): \Recurly\Resources\Subscription // phpcs:ignore Generic.Files.LineLength.TooLong + public function resumeSubscription(string $subscription_id): \Recurly\Resources\Subscription { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/resume", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/resume", ['subscription_id' => $subscription_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -1940,10 +2030,11 @@ public function resumeSubscription(string $subscription_id): \Recurly\Resources\ * @param string $subscription_id Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\SubscriptionChange + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_subscription_change */ - public function getSubscriptionChange(string $subscription_id): \Recurly\Resources\SubscriptionChange // phpcs:ignore Generic.Files.LineLength.TooLong + public function getSubscriptionChange(string $subscription_id): \Recurly\Resources\SubscriptionChange { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); return $this->makeRequest('GET', $path, null, null); } @@ -1954,10 +2045,11 @@ public function getSubscriptionChange(string $subscription_id): \Recurly\Resourc * @param array $body The body of the request. * * @return \Recurly\Resources\SubscriptionChange + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_subscription_change */ - public function createSubscriptionChange(string $subscription_id, array $body): \Recurly\Resources\SubscriptionChange // phpcs:ignore Generic.Files.LineLength.TooLong + public function createSubscriptionChange(string $subscription_id, array $body): \Recurly\Resources\SubscriptionChange { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); return $this->makeRequest('POST', $path, $body, null); } @@ -1967,10 +2059,11 @@ public function createSubscriptionChange(string $subscription_id, array $body): * @param string $subscription_id Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\EmptyResource + * @link https://developers.recurly.com/api/v2019-10-10#operation/remove_subscription_change */ - public function removeSubscriptionChange(string $subscription_id): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public function removeSubscriptionChange(string $subscription_id): \Recurly\EmptyResource { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -2013,10 +2106,11 @@ public function removeSubscriptionChange(string $subscription_id): \Recurly\Empt * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_subscription_invoices */ - public function listSubscriptionInvoices(string $subscription_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listSubscriptionInvoices(string $subscription_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/invoices", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/invoices", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } @@ -2057,10 +2151,11 @@ public function listSubscriptionInvoices(string $subscription_id, array $options * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_subscription_line_items */ - public function listSubscriptionLineItems(string $subscription_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listSubscriptionLineItems(string $subscription_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/line_items", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/line_items", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } @@ -2095,10 +2190,11 @@ public function listSubscriptionLineItems(string $subscription_id, array $option * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_subscription_coupon_redemptions */ - public function listSubscriptionCouponRedemptions(string $subscription_id, array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listSubscriptionCouponRedemptions(string $subscription_id, array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/subscriptions/{subscription_id}/coupon_redemptions", ['subscription_id' => $subscription_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/subscriptions/{subscription_id}/coupon_redemptions", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } @@ -2137,10 +2233,11 @@ public function listSubscriptionCouponRedemptions(string $subscription_id, array * @param array $options Associative array of optional parameters: * * @return \Recurly\Pager + * @link https://developers.recurly.com/api/v2019-10-10#operation/list_transactions */ - public function listTransactions(array $options = []): \Recurly\Pager // phpcs:ignore Generic.Files.LineLength.TooLong + public function listTransactions(array $options = []): \Recurly\Pager { - $path = $this->interpolatePath("/transactions", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/transactions", []); return new \Recurly\Pager($this, $path, $options); } @@ -2150,10 +2247,11 @@ public function listTransactions(array $options = []): \Recurly\Pager // phpcs:i * @param string $transaction_id Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. * * @return \Recurly\Resources\Transaction + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_transaction */ - public function getTransaction(string $transaction_id): \Recurly\Resources\Transaction // phpcs:ignore Generic.Files.LineLength.TooLong + public function getTransaction(string $transaction_id): \Recurly\Resources\Transaction { - $path = $this->interpolatePath("/transactions/{transaction_id}", ['transaction_id' => $transaction_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/transactions/{transaction_id}", ['transaction_id' => $transaction_id]); return $this->makeRequest('GET', $path, null, null); } @@ -2163,10 +2261,11 @@ public function getTransaction(string $transaction_id): \Recurly\Resources\Trans * @param string $unique_coupon_code_id Unique Coupon Code ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-abc-8dh2-def`. * * @return \Recurly\Resources\UniqueCouponCode + * @link https://developers.recurly.com/api/v2019-10-10#operation/get_unique_coupon_code */ - public function getUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode // phpcs:ignore Generic.Files.LineLength.TooLong + public function getUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode { - $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('GET', $path, null, null); } @@ -2176,10 +2275,11 @@ public function getUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Res * @param string $unique_coupon_code_id Unique Coupon Code ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-abc-8dh2-def`. * * @return \Recurly\Resources\UniqueCouponCode + * @link https://developers.recurly.com/api/v2019-10-10#operation/deactivate_unique_coupon_code */ - public function deactivateUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode // phpcs:ignore Generic.Files.LineLength.TooLong + public function deactivateUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode { - $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('DELETE', $path, null, null); } @@ -2189,10 +2289,11 @@ public function deactivateUniqueCouponCode(string $unique_coupon_code_id): \Recu * @param string $unique_coupon_code_id Unique Coupon Code ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-abc-8dh2-def`. * * @return \Recurly\Resources\UniqueCouponCode + * @link https://developers.recurly.com/api/v2019-10-10#operation/reactivate_unique_coupon_code */ - public function reactivateUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode // phpcs:ignore Generic.Files.LineLength.TooLong + public function reactivateUniqueCouponCode(string $unique_coupon_code_id): \Recurly\Resources\UniqueCouponCode { - $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}/restore", ['unique_coupon_code_id' => $unique_coupon_code_id]); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}/restore", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('PUT', $path, null, null); } @@ -2202,10 +2303,11 @@ public function reactivateUniqueCouponCode(string $unique_coupon_code_id): \Recu * @param array $body The body of the request. * * @return \Recurly\Resources\InvoiceCollection + * @link https://developers.recurly.com/api/v2019-10-10#operation/create_purchase */ - public function createPurchase(array $body): \Recurly\Resources\InvoiceCollection // phpcs:ignore Generic.Files.LineLength.TooLong + public function createPurchase(array $body): \Recurly\Resources\InvoiceCollection { - $path = $this->interpolatePath("/purchases", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/purchases", []); return $this->makeRequest('POST', $path, $body, null); } @@ -2215,10 +2317,11 @@ public function createPurchase(array $body): \Recurly\Resources\InvoiceCollectio * @param array $body The body of the request. * * @return \Recurly\Resources\InvoiceCollection + * @link https://developers.recurly.com/api/v2019-10-10#operation/preview_purchase */ - public function previewPurchase(array $body): \Recurly\Resources\InvoiceCollection // phpcs:ignore Generic.Files.LineLength.TooLong + public function previewPurchase(array $body): \Recurly\Resources\InvoiceCollection { - $path = $this->interpolatePath("/purchases/preview", []); // phpcs:ignore Generic.Files.LineLength.TooLong + $path = $this->interpolatePath("/purchases/preview", []); return $this->makeRequest('POST', $path, $body, null); } diff --git a/lib/recurly/pager.php b/lib/recurly/pager.php index d922b753..2dcffb7d 100644 --- a/lib/recurly/pager.php +++ b/lib/recurly/pager.php @@ -17,7 +17,7 @@ class Pager implements \Iterator * @param string $path Tokenized path to request * @param array $params (optional) Query string parameters */ - public function __construct(\Recurly\BaseClient $client, string $path, ?array $params = []) // phpcs:ignore Generic.Files.LineLength.TooLong + public function __construct(\Recurly\BaseClient $client, string $path, ?array $params = []) { $this->_client = $client; $this->_path = $path; diff --git a/lib/recurly/recurly_error.php b/lib/recurly/recurly_error.php index 1ebbed54..e924e48f 100644 --- a/lib/recurly/recurly_error.php +++ b/lib/recurly/recurly_error.php @@ -15,7 +15,7 @@ class RecurlyError extends \Error * @param string $message The error message from the API response * @param \Recurly\Resources\ErrorMayHaveTransaction $api_error The error from the API response */ - public function __construct(string $message, \Recurly\Resources\ErrorMayHaveTransaction $api_error = null) // phpcs:ignore Generic.Files.LineLength.TooLong + public function __construct(string $message, \Recurly\Resources\ErrorMayHaveTransaction $api_error = null) { parent::__construct($message); $this->_api_error = $api_error; @@ -39,7 +39,7 @@ public function getApiError(): \Recurly\Resources\ErrorMayHaveTransaction * * @return \Recurly\RecurlyError */ - public static function fromResponse(\Recurly\Response $response): \Recurly\RecurlyError // phpcs:ignore Generic.Files.LineLength.TooLong + public static function fromResponse(\Recurly\Response $response): \Recurly\RecurlyError { if ($response->getContentType() == 'application/json') { diff --git a/lib/recurly/recurly_resource.php b/lib/recurly/recurly_resource.php index a0ec39e8..fb69e330 100644 --- a/lib/recurly/recurly_resource.php +++ b/lib/recurly/recurly_resource.php @@ -62,7 +62,7 @@ public function __set(string $key, $value): void * * @return \Recurly\EmptyResource */ - public static function fromEmpty(\Recurly\Response $response): \Recurly\EmptyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public static function fromEmpty(\Recurly\Response $response): \Recurly\EmptyResource { $klass = new \Recurly\EmptyResource(); @@ -79,7 +79,7 @@ public static function fromEmpty(\Recurly\Response $response): \Recurly\EmptyRes * * @return \Recurly\RecurlyResource An instance of a Recurly Resource */ - public static function fromResponse(\Recurly\Response $response, object $json = null): \Recurly\RecurlyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public static function fromResponse(\Recurly\Response $response, object $json = null): \Recurly\RecurlyResource { $json = is_null($json) ? $response->getJsonResponse() : $json; $klass_name = static::resourceClass($json->object); @@ -96,7 +96,7 @@ public static function fromResponse(\Recurly\Response $response, object $json = * * @return \Recurly\RecurlyResource An instance of a Recurly Resource */ - public static function cast(object $data): \Recurly\RecurlyResource // phpcs:ignore Generic.Files.LineLength.TooLong + public static function cast(object $data): \Recurly\RecurlyResource { $klass = new static(); foreach ($data as $key => $value) { @@ -111,7 +111,7 @@ public static function cast(object $data): \Recurly\RecurlyResource // phpcs:ign array_map( function ($item) use ($setter) { if (property_exists($item, 'object')) { - $item_class = static::resourceClass($item->object); // phpcs:ignore Generic.Files.LineLength.TooLong + $item_class = static::resourceClass($item->object); } else { // TODO: Ensure that there is a hintArrayType method $item_class = static::hintArrayType($setter); @@ -137,7 +137,7 @@ function ($item) use ($setter) { } elseif (\Recurly\STRICT_MODE) { // @codeCoverageIgnoreStart $klass_name = static::class; - trigger_error("$klass_name encountered json attribute $key but it's unknown to it's schema", E_USER_ERROR); // phpcs:ignore Generic.Files.LineLength.TooLong + trigger_error("$klass_name encountered json attribute $key but it's unknown to it's schema", E_USER_ERROR); // @codeCoverageIgnoreEnd } } @@ -168,7 +168,7 @@ protected static function setterParamClass(string $method) * * @return \Recurly\Resources\BinaryFile An instance of a Recurly BinaryFile */ - public static function fromBinary(string $data, \Recurly\Response $response): \Recurly\Resources\BinaryFile // phpcs:ignore Generic.Files.LineLength.TooLong + public static function fromBinary(string $data, \Recurly\Response $response): \Recurly\Resources\BinaryFile { $klass = new \Recurly\Resources\BinaryFile(); $klass->setData($data); @@ -191,10 +191,9 @@ protected static function resourceClass(string $type): string $klass = static::titleize($type, "\\Recurly\\Resources\\"); if (!class_exists($klass)) { - // phpcs:ignore Generic.Files.LineLength.TooLong // @codeCoverageIgnoreStart if (\Recurly\STRICT_MODE) { - trigger_error("Could not find the Recurly class for key {$type}", E_USER_ERROR); // phpcs:ignore Generic.Files.LineLength.TooLong + trigger_error("Could not find the Recurly class for key {$type}", E_USER_ERROR); } // @codeCoverageIgnoreEnd } @@ -234,7 +233,7 @@ function ($carry, $property) { if ($private) { $property->setAccessible(true); } - $display_name = $private ? substr($property->name, 1) : $property->name; // phpcs:ignore Generic.Files.LineLength.TooLong + $display_name = $private ? substr($property->name, 1) : $property->name; $carry[$display_name] = $property->getValue($this); if ($private) { $property->setAccessible(false); diff --git a/lib/recurly/request.php b/lib/recurly/request.php index bd053092..cf82863f 100644 --- a/lib/recurly/request.php +++ b/lib/recurly/request.php @@ -17,7 +17,7 @@ class Request * @param array $body The request body * @param array $params Query string parameters */ - public function __construct(string $method, string $path, ?array $body, ?array $params) // phpcs:ignore Generic.Files.LineLength.TooLong + public function __construct(string $method, string $path, ?array $body, ?array $params) { $this->_method = $method; $this->_path = $path;