Skip to content

Commit

Permalink
Moving comments and fixing validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasmiller committed Feb 20, 2020
1 parent 6a917cc commit a3f12ea
Show file tree
Hide file tree
Showing 60 changed files with 1,120 additions and 578 deletions.
2 changes: 1 addition & 1 deletion lib/recurly/error_traits.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected static function errorFromStatus(int $status_code): string
{
$error_map = array(
500 => 'internal_server_error',
502 => 'gateway_error',
502 => 'bad_gateway',
503 => 'service_unavailable',
304 => 'not_modified',
400 => 'bad_request',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
*/
namespace Recurly\Errors;

class GatewayError extends \Recurly\Errors\ServerError
class BadGateway extends \Recurly\Errors\ServerError
{
}
2 changes: 1 addition & 1 deletion lib/recurly/errors/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
*/
namespace Recurly\Errors;

class Validation extends \Recurly\RecurlyError
class Validation extends \Recurly\Errors\UnprocessableEntity
{
}
12 changes: 0 additions & 12 deletions lib/recurly/errors/validation_error.php

This file was deleted.

90 changes: 60 additions & 30 deletions lib/recurly/resources/account.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ class Account extends RecurlyResource

/**
* Getter method for the address attribute.
*
*
* @return \Recurly\Resources\Address
* @return \Recurly\Resources\Address
*/
public function getAddress(): \Recurly\Resources\Address
{
Expand All @@ -73,8 +74,9 @@ public function setAddress(\Recurly\Resources\Address $address): void

/**
* Getter method for the bill_to attribute.
* An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
*
* @return string An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.
* @return string
*/
public function getBillTo(): string
{
Expand All @@ -95,8 +97,9 @@ public function setBillTo(string $bill_to): void

/**
* Getter method for the billing_info attribute.
*
*
* @return \Recurly\Resources\BillingInfo
* @return \Recurly\Resources\BillingInfo
*/
public function getBillingInfo(): \Recurly\Resources\BillingInfo
{
Expand All @@ -117,8 +120,9 @@ public function setBillingInfo(\Recurly\Resources\BillingInfo $billing_info): vo

/**
* Getter method for the cc_emails attribute.
* Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
*
* @return string Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.
* @return string
*/
public function getCcEmails(): string
{
Expand All @@ -139,8 +143,9 @@ public function setCcEmails(string $cc_emails): void

/**
* Getter method for the code attribute.
* The unique identifier of the account. This cannot be changed once the account is created.
*
* @return string The unique identifier of the account. This cannot be changed once the account is created.
* @return string
*/
public function getCode(): string
{
Expand All @@ -161,8 +166,9 @@ public function setCode(string $code): void

/**
* Getter method for the company attribute.
*
*
* @return string
* @return string
*/
public function getCompany(): string
{
Expand All @@ -183,8 +189,9 @@ public function setCompany(string $company): void

/**
* Getter method for the created_at attribute.
* When the account was created.
*
* @return string When the account was created.
* @return string
*/
public function getCreatedAt(): string
{
Expand All @@ -205,8 +212,9 @@ public function setCreatedAt(string $created_at): void

/**
* Getter method for the custom_fields attribute.
* The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
*
* @return array The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
* @return array
*/
public function getCustomFields(): array
{
Expand All @@ -227,8 +235,9 @@ public function setCustomFields(array $custom_fields): void

/**
* Getter method for the deleted_at attribute.
* If present, when the account was last marked inactive.
*
* @return string If present, when the account was last marked inactive.
* @return string
*/
public function getDeletedAt(): string
{
Expand All @@ -249,8 +258,9 @@ public function setDeletedAt(string $deleted_at): void

/**
* Getter method for the email attribute.
* The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
*
* @return string The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.
* @return string
*/
public function getEmail(): string
{
Expand All @@ -271,8 +281,9 @@ public function setEmail(string $email): void

/**
* Getter method for the exemption_certificate attribute.
* The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
*
* @return string The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.
* @return string
*/
public function getExemptionCertificate(): string
{
Expand All @@ -293,8 +304,9 @@ public function setExemptionCertificate(string $exemption_certificate): void

/**
* Getter method for the first_name attribute.
*
*
* @return string
* @return string
*/
public function getFirstName(): string
{
Expand All @@ -315,8 +327,9 @@ public function setFirstName(string $first_name): void

/**
* Getter method for the has_active_subscription attribute.
* Indicates if the account has an active subscription.
*
* @return bool Indicates if the account has an active subscription.
* @return bool
*/
public function getHasActiveSubscription(): bool
{
Expand All @@ -337,8 +350,9 @@ public function setHasActiveSubscription(bool $has_active_subscription): void

/**
* Getter method for the has_canceled_subscription attribute.
* Indicates if the account has a canceled subscription.
*
* @return bool Indicates if the account has a canceled subscription.
* @return bool
*/
public function getHasCanceledSubscription(): bool
{
Expand All @@ -359,8 +373,9 @@ public function setHasCanceledSubscription(bool $has_canceled_subscription): voi

/**
* Getter method for the has_future_subscription attribute.
* Indicates if the account has a future subscription.
*
* @return bool Indicates if the account has a future subscription.
* @return bool
*/
public function getHasFutureSubscription(): bool
{
Expand All @@ -381,8 +396,9 @@ public function setHasFutureSubscription(bool $has_future_subscription): void

/**
* Getter method for the has_live_subscription attribute.
* Indicates if the account has a subscription that is either active, canceled, future, or paused.
*
* @return bool Indicates if the account has a subscription that is either active, canceled, future, or paused.
* @return bool
*/
public function getHasLiveSubscription(): bool
{
Expand All @@ -403,8 +419,9 @@ public function setHasLiveSubscription(bool $has_live_subscription): void

/**
* Getter method for the has_past_due_invoice attribute.
* Indicates if the account has a past due invoice.
*
* @return bool Indicates if the account has a past due invoice.
* @return bool
*/
public function getHasPastDueInvoice(): bool
{
Expand All @@ -425,8 +442,9 @@ public function setHasPastDueInvoice(bool $has_past_due_invoice): void

/**
* Getter method for the has_paused_subscription attribute.
* Indicates if the account has a paused subscription.
*
* @return bool Indicates if the account has a paused subscription.
* @return bool
*/
public function getHasPausedSubscription(): bool
{
Expand All @@ -447,8 +465,9 @@ public function setHasPausedSubscription(bool $has_paused_subscription): void

/**
* Getter method for the hosted_login_token attribute.
* The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: `https://{subdomain}.recurly.com/account/{hosted_login_token}`.
*
* @return string The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: `https://{subdomain}.recurly.com/account/{hosted_login_token}`.
* @return string
*/
public function getHostedLoginToken(): string
{
Expand All @@ -469,8 +488,9 @@ public function setHostedLoginToken(string $hosted_login_token): void

/**
* Getter method for the id attribute.
*
*
* @return string
* @return string
*/
public function getId(): string
{
Expand All @@ -491,8 +511,9 @@ public function setId(string $id): void

/**
* Getter method for the last_name attribute.
*
*
* @return string
* @return string
*/
public function getLastName(): string
{
Expand All @@ -513,8 +534,9 @@ public function setLastName(string $last_name): void

/**
* Getter method for the object attribute.
* Object type
*
* @return string Object type
* @return string
*/
public function getObject(): string
{
Expand All @@ -535,8 +557,9 @@ public function setObject(string $object): void

/**
* Getter method for the parent_account_id attribute.
* The UUID of the parent account associated with this account.
*
* @return string The UUID of the parent account associated with this account.
* @return string
*/
public function getParentAccountId(): string
{
Expand All @@ -557,8 +580,9 @@ public function setParentAccountId(string $parent_account_id): void

/**
* Getter method for the preferred_locale attribute.
* Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
*
* @return string Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
* @return string
*/
public function getPreferredLocale(): string
{
Expand All @@ -579,8 +603,9 @@ public function setPreferredLocale(string $preferred_locale): void

/**
* Getter method for the shipping_addresses attribute.
* The shipping addresses on the account.
*
* @return array The shipping addresses on the account.
* @return array
*/
public function getShippingAddresses(): array
{
Expand All @@ -601,8 +626,9 @@ public function setShippingAddresses(array $shipping_addresses): void

/**
* Getter method for the state attribute.
* Accounts can be either active or inactive.
*
* @return string Accounts can be either active or inactive.
* @return string
*/
public function getState(): string
{
Expand All @@ -623,8 +649,9 @@ public function setState(string $state): void

/**
* Getter method for the tax_exempt attribute.
* The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
*
* @return bool The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
* @return bool
*/
public function getTaxExempt(): bool
{
Expand All @@ -645,8 +672,9 @@ public function setTaxExempt(bool $tax_exempt): void

/**
* Getter method for the updated_at attribute.
* When the account was last changed.
*
* @return string When the account was last changed.
* @return string
*/
public function getUpdatedAt(): string
{
Expand All @@ -667,8 +695,9 @@ public function setUpdatedAt(string $updated_at): void

/**
* Getter method for the username attribute.
* A secondary value for the account.
*
* @return string A secondary value for the account.
* @return string
*/
public function getUsername(): string
{
Expand All @@ -689,8 +718,9 @@ public function setUsername(string $username): void

/**
* Getter method for the vat_number attribute.
* The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
*
* @return string The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.
* @return string
*/
public function getVatNumber(): string
{
Expand Down
Loading

0 comments on commit a3f12ea

Please sign in to comment.