repo
string
commit
string
message
string
diff
string
recurly/recurly-client-php
902e44ce5f4672f9ff34a3925d12239649e30cb2
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/account.php b/lib/recurly/resources/account.php index f922a85..d503370 100644 --- a/lib/recurly/resources/account.php +++ b/lib/recurly/resources/account.php @@ -54,809 +54,809 @@ class Account extends RecurlyResource 'setShippingAddresses' => '\Recurly\Resources\ShippingAddress', ]; /** * Getter method for the address attribute. * * * @return ?\Recurly\Resources\Address */ public function getAddress(): ?\Recurly\Resources\Address { return $this->_address; } /** * Setter method for the address attribute. * * @param \Recurly\Resources\Address $address * * @return void */ public function setAddress(\Recurly\Resources\Address $address): void { $this->_address = $address; } /** * 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 */ public function getBillTo(): ?string { return $this->_bill_to; } /** * Setter method for the bill_to attribute. * * @param string $bill_to * * @return void */ public function setBillTo(string $bill_to): void { $this->_bill_to = $bill_to; } /** * Getter method for the billing_info attribute. * * * @return ?\Recurly\Resources\BillingInfo */ public function getBillingInfo(): ?\Recurly\Resources\BillingInfo { return $this->_billing_info; } /** * Setter method for the billing_info attribute. * * @param \Recurly\Resources\BillingInfo $billing_info * * @return void */ public function setBillingInfo(\Recurly\Resources\BillingInfo $billing_info): void { $this->_billing_info = $billing_info; } /** * 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 */ public function getCcEmails(): ?string { return $this->_cc_emails; } /** * Setter method for the cc_emails attribute. * * @param string $cc_emails * * @return void */ public function setCcEmails(string $cc_emails): void { $this->_cc_emails = $cc_emails; } /** * Getter method for the code attribute. * The unique identifier of the account. This cannot be changed once the account is created. * * @return ?string */ public function getCode(): ?string { return $this->_code; } /** * Setter method for the code attribute. * * @param string $code * * @return void */ public function setCode(string $code): void { $this->_code = $code; } /** * Getter method for the company attribute. * * * @return ?string */ public function getCompany(): ?string { return $this->_company; } /** * Setter method for the company attribute. * * @param string $company * * @return void */ public function setCompany(string $company): void { $this->_company = $company; } /** * Getter method for the created_at attribute. * When the account was created. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * 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 */ public function getCustomFields(): array { return $this->_custom_fields ?? [] ; } /** * Setter method for the custom_fields attribute. * * @param array $custom_fields * * @return void */ public function setCustomFields(array $custom_fields): void { $this->_custom_fields = $custom_fields; } /** * Getter method for the deleted_at attribute. * If present, when the account was last marked inactive. * * @return ?string */ public function getDeletedAt(): ?string { return $this->_deleted_at; } /** * Setter method for the deleted_at attribute. * * @param string $deleted_at * * @return void */ public function setDeletedAt(string $deleted_at): void { $this->_deleted_at = $deleted_at; } /** * Getter method for the dunning_campaign_id attribute. * Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. * * @return ?string */ public function getDunningCampaignId(): ?string { return $this->_dunning_campaign_id; } /** * Setter method for the dunning_campaign_id attribute. * * @param string $dunning_campaign_id * * @return void */ public function setDunningCampaignId(string $dunning_campaign_id): void { $this->_dunning_campaign_id = $dunning_campaign_id; } /** * 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 */ public function getEmail(): ?string { return $this->_email; } /** * Setter method for the email attribute. * * @param string $email * * @return void */ public function setEmail(string $email): void { $this->_email = $email; } /** * 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 */ public function getExemptionCertificate(): ?string { return $this->_exemption_certificate; } /** * Setter method for the exemption_certificate attribute. * * @param string $exemption_certificate * * @return void */ public function setExemptionCertificate(string $exemption_certificate): void { $this->_exemption_certificate = $exemption_certificate; } /** * Getter method for the external_accounts attribute. * The external accounts belonging to this account * * @return array */ public function getExternalAccounts(): array { return $this->_external_accounts ?? [] ; } /** * Setter method for the external_accounts attribute. * * @param array $external_accounts * * @return void */ public function setExternalAccounts(array $external_accounts): void { $this->_external_accounts = $external_accounts; } /** * Getter method for the first_name attribute. * * * @return ?string */ public function getFirstName(): ?string { return $this->_first_name; } /** * Setter method for the first_name attribute. * * @param string $first_name * * @return void */ public function setFirstName(string $first_name): void { $this->_first_name = $first_name; } /** * Getter method for the has_active_subscription attribute. * Indicates if the account has an active subscription. * * @return ?bool */ public function getHasActiveSubscription(): ?bool { return $this->_has_active_subscription; } /** * Setter method for the has_active_subscription attribute. * * @param bool $has_active_subscription * * @return void */ public function setHasActiveSubscription(bool $has_active_subscription): void { $this->_has_active_subscription = $has_active_subscription; } /** * Getter method for the has_canceled_subscription attribute. * Indicates if the account has a canceled subscription. * * @return ?bool */ public function getHasCanceledSubscription(): ?bool { return $this->_has_canceled_subscription; } /** * Setter method for the has_canceled_subscription attribute. * * @param bool $has_canceled_subscription * * @return void */ public function setHasCanceledSubscription(bool $has_canceled_subscription): void { $this->_has_canceled_subscription = $has_canceled_subscription; } /** * Getter method for the has_future_subscription attribute. * Indicates if the account has a future subscription. * * @return ?bool */ public function getHasFutureSubscription(): ?bool { return $this->_has_future_subscription; } /** * Setter method for the has_future_subscription attribute. * * @param bool $has_future_subscription * * @return void */ public function setHasFutureSubscription(bool $has_future_subscription): void { $this->_has_future_subscription = $has_future_subscription; } /** * 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 */ public function getHasLiveSubscription(): ?bool { return $this->_has_live_subscription; } /** * Setter method for the has_live_subscription attribute. * * @param bool $has_live_subscription * * @return void */ public function setHasLiveSubscription(bool $has_live_subscription): void { $this->_has_live_subscription = $has_live_subscription; } /** * Getter method for the has_past_due_invoice attribute. * Indicates if the account has a past due invoice. * * @return ?bool */ public function getHasPastDueInvoice(): ?bool { return $this->_has_past_due_invoice; } /** * Setter method for the has_past_due_invoice attribute. * * @param bool $has_past_due_invoice * * @return void */ public function setHasPastDueInvoice(bool $has_past_due_invoice): void { $this->_has_past_due_invoice = $has_past_due_invoice; } /** * Getter method for the has_paused_subscription attribute. * Indicates if the account has a paused subscription. * * @return ?bool */ public function getHasPausedSubscription(): ?bool { return $this->_has_paused_subscription; } /** * Setter method for the has_paused_subscription attribute. * * @param bool $has_paused_subscription * * @return void */ public function setHasPausedSubscription(bool $has_paused_subscription): void { $this->_has_paused_subscription = $has_paused_subscription; } /** * 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 */ public function getHostedLoginToken(): ?string { return $this->_hosted_login_token; } /** * Setter method for the hosted_login_token attribute. * * @param string $hosted_login_token * * @return void */ public function setHostedLoginToken(string $hosted_login_token): void { $this->_hosted_login_token = $hosted_login_token; } /** * Getter method for the id attribute. * * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the invoice_template_id attribute. - * Unique ID to identify an invoice template. Available when the site is on a Pro or Enterprise plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used. + * Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used. * * @return ?string */ public function getInvoiceTemplateId(): ?string { return $this->_invoice_template_id; } /** * Setter method for the invoice_template_id attribute. * * @param string $invoice_template_id * * @return void */ public function setInvoiceTemplateId(string $invoice_template_id): void { $this->_invoice_template_id = $invoice_template_id; } /** * Getter method for the last_name attribute. * * * @return ?string */ public function getLastName(): ?string { return $this->_last_name; } /** * Setter method for the last_name attribute. * * @param string $last_name * * @return void */ public function setLastName(string $last_name): void { $this->_last_name = $last_name; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the override_business_entity_id attribute. * Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled. * * @return ?string */ public function getOverrideBusinessEntityId(): ?string { return $this->_override_business_entity_id; } /** * Setter method for the override_business_entity_id attribute. * * @param string $override_business_entity_id * * @return void */ public function setOverrideBusinessEntityId(string $override_business_entity_id): void { $this->_override_business_entity_id = $override_business_entity_id; } /** * Getter method for the parent_account_id attribute. * The UUID of the parent account associated with this account. * * @return ?string */ public function getParentAccountId(): ?string { return $this->_parent_account_id; } /** * Setter method for the parent_account_id attribute. * * @param string $parent_account_id * * @return void */ public function setParentAccountId(string $parent_account_id): void { $this->_parent_account_id = $parent_account_id; } /** * 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 */ public function getPreferredLocale(): ?string { return $this->_preferred_locale; } /** * Setter method for the preferred_locale attribute. * * @param string $preferred_locale * * @return void */ public function setPreferredLocale(string $preferred_locale): void { $this->_preferred_locale = $preferred_locale; } /** * Getter method for the preferred_time_zone attribute. * The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer. * * @return ?string */ public function getPreferredTimeZone(): ?string { return $this->_preferred_time_zone; } /** * Setter method for the preferred_time_zone attribute. * * @param string $preferred_time_zone * * @return void */ public function setPreferredTimeZone(string $preferred_time_zone): void { $this->_preferred_time_zone = $preferred_time_zone; } /** * Getter method for the shipping_addresses attribute. * The shipping addresses on the account. * * @return array */ public function getShippingAddresses(): array { return $this->_shipping_addresses ?? [] ; } /** * Setter method for the shipping_addresses attribute. * * @param array $shipping_addresses * * @return void */ public function setShippingAddresses(array $shipping_addresses): void { $this->_shipping_addresses = $shipping_addresses; } /** * Getter method for the state attribute. * Accounts can be either active or inactive. * * @return ?string */ public function getState(): ?string { return $this->_state; } /** * Setter method for the state attribute. * * @param string $state * * @return void */ public function setState(string $state): void { $this->_state = $state; } /** * 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 */ public function getTaxExempt(): ?bool { return $this->_tax_exempt; } /** * Setter method for the tax_exempt attribute. * * @param bool $tax_exempt * * @return void */ public function setTaxExempt(bool $tax_exempt): void { $this->_tax_exempt = $tax_exempt; } /** * Getter method for the updated_at attribute. * When the account was last changed. * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } /** * Getter method for the username attribute. * A secondary value for the account. * * @return ?string */ public function getUsername(): ?string { return $this->_username; } /** * Setter method for the username attribute. * * @param string $username * * @return void */ public function setUsername(string $username): void { $this->_username = $username; } /** * 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 */ public function getVatNumber(): ?string { return $this->_vat_number; } /** * Setter method for the vat_number attribute. * * @param string $vat_number * * @return void */ public function setVatNumber(string $vat_number): void { $this->_vat_number = $vat_number; } } \ No newline at end of file diff --git a/lib/recurly/resources/address.php b/lib/recurly/resources/address.php index 3de1c81..51bed7c 100644 --- a/lib/recurly/resources/address.php +++ b/lib/recurly/resources/address.php @@ -1,187 +1,211 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class Address extends RecurlyResource { private $_city; private $_country; + private $_geo_code; private $_phone; private $_postal_code; private $_region; private $_street1; private $_street2; protected static $array_hints = [ ]; /** * Getter method for the city attribute. * City * * @return ?string */ public function getCity(): ?string { return $this->_city; } /** * Setter method for the city attribute. * * @param string $city * * @return void */ public function setCity(string $city): void { $this->_city = $city; } /** * Getter method for the country attribute. * Country, 2-letter ISO 3166-1 alpha-2 code. * * @return ?string */ public function getCountry(): ?string { return $this->_country; } /** * Setter method for the country attribute. * * @param string $country * * @return void */ public function setCountry(string $country): void { $this->_country = $country; } + /** + * Getter method for the geo_code attribute. + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + * + * @return ?string + */ + public function getGeoCode(): ?string + { + return $this->_geo_code; + } + + /** + * Setter method for the geo_code attribute. + * + * @param string $geo_code + * + * @return void + */ + public function setGeoCode(string $geo_code): void + { + $this->_geo_code = $geo_code; + } + /** * Getter method for the phone attribute. * Phone number * * @return ?string */ public function getPhone(): ?string { return $this->_phone; } /** * Setter method for the phone attribute. * * @param string $phone * * @return void */ public function setPhone(string $phone): void { $this->_phone = $phone; } /** * Getter method for the postal_code attribute. * Zip or postal code. * * @return ?string */ public function getPostalCode(): ?string { return $this->_postal_code; } /** * Setter method for the postal_code attribute. * * @param string $postal_code * * @return void */ public function setPostalCode(string $postal_code): void { $this->_postal_code = $postal_code; } /** * Getter method for the region attribute. * State or province. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the street1 attribute. * Street 1 * * @return ?string */ public function getStreet1(): ?string { return $this->_street1; } /** * Setter method for the street1 attribute. * * @param string $street1 * * @return void */ public function setStreet1(string $street1): void { $this->_street1 = $street1; } /** * Getter method for the street2 attribute. * Street 2 * * @return ?string */ public function getStreet2(): ?string { return $this->_street2; } /** * Setter method for the street2 attribute. * * @param string $street2 * * @return void */ public function setStreet2(string $street2): void { $this->_street2 = $street2; } } \ No newline at end of file diff --git a/lib/recurly/resources/address_with_name.php b/lib/recurly/resources/address_with_name.php index fc0b707..eb27e56 100644 --- a/lib/recurly/resources/address_with_name.php +++ b/lib/recurly/resources/address_with_name.php @@ -1,235 +1,259 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class AddressWithName extends RecurlyResource { private $_city; private $_country; private $_first_name; + private $_geo_code; private $_last_name; private $_phone; private $_postal_code; private $_region; private $_street1; private $_street2; protected static $array_hints = [ ]; /** * Getter method for the city attribute. * City * * @return ?string */ public function getCity(): ?string { return $this->_city; } /** * Setter method for the city attribute. * * @param string $city * * @return void */ public function setCity(string $city): void { $this->_city = $city; } /** * Getter method for the country attribute. * Country, 2-letter ISO 3166-1 alpha-2 code. * * @return ?string */ public function getCountry(): ?string { return $this->_country; } /** * Setter method for the country attribute. * * @param string $country * * @return void */ public function setCountry(string $country): void { $this->_country = $country; } /** * Getter method for the first_name attribute. * First name * * @return ?string */ public function getFirstName(): ?string { return $this->_first_name; } /** * Setter method for the first_name attribute. * * @param string $first_name * * @return void */ public function setFirstName(string $first_name): void { $this->_first_name = $first_name; } + /** + * Getter method for the geo_code attribute. + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + * + * @return ?string + */ + public function getGeoCode(): ?string + { + return $this->_geo_code; + } + + /** + * Setter method for the geo_code attribute. + * + * @param string $geo_code + * + * @return void + */ + public function setGeoCode(string $geo_code): void + { + $this->_geo_code = $geo_code; + } + /** * Getter method for the last_name attribute. * Last name * * @return ?string */ public function getLastName(): ?string { return $this->_last_name; } /** * Setter method for the last_name attribute. * * @param string $last_name * * @return void */ public function setLastName(string $last_name): void { $this->_last_name = $last_name; } /** * Getter method for the phone attribute. * Phone number * * @return ?string */ public function getPhone(): ?string { return $this->_phone; } /** * Setter method for the phone attribute. * * @param string $phone * * @return void */ public function setPhone(string $phone): void { $this->_phone = $phone; } /** * Getter method for the postal_code attribute. * Zip or postal code. * * @return ?string */ public function getPostalCode(): ?string { return $this->_postal_code; } /** * Setter method for the postal_code attribute. * * @param string $postal_code * * @return void */ public function setPostalCode(string $postal_code): void { $this->_postal_code = $postal_code; } /** * Getter method for the region attribute. * State or province. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the street1 attribute. * Street 1 * * @return ?string */ public function getStreet1(): ?string { return $this->_street1; } /** * Setter method for the street1 attribute. * * @param string $street1 * * @return void */ public function setStreet1(string $street1): void { $this->_street1 = $street1; } /** * Getter method for the street2 attribute. * Street 2 * * @return ?string */ public function getStreet2(): ?string { return $this->_street2; } /** * Setter method for the street2 attribute. * * @param string $street2 * * @return void */ public function setStreet2(string $street2): void { $this->_street2 = $street2; } } \ No newline at end of file diff --git a/lib/recurly/resources/invoice_address.php b/lib/recurly/resources/invoice_address.php index 5ded46b..ee05fe0 100644 --- a/lib/recurly/resources/invoice_address.php +++ b/lib/recurly/resources/invoice_address.php @@ -1,283 +1,307 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class InvoiceAddress extends RecurlyResource { private $_city; private $_company; private $_country; private $_first_name; + private $_geo_code; private $_last_name; private $_name_on_account; private $_phone; private $_postal_code; private $_region; private $_street1; private $_street2; protected static $array_hints = [ ]; /** * Getter method for the city attribute. * City * * @return ?string */ public function getCity(): ?string { return $this->_city; } /** * Setter method for the city attribute. * * @param string $city * * @return void */ public function setCity(string $city): void { $this->_city = $city; } /** * Getter method for the company attribute. * Company * * @return ?string */ public function getCompany(): ?string { return $this->_company; } /** * Setter method for the company attribute. * * @param string $company * * @return void */ public function setCompany(string $company): void { $this->_company = $company; } /** * Getter method for the country attribute. * Country, 2-letter ISO 3166-1 alpha-2 code. * * @return ?string */ public function getCountry(): ?string { return $this->_country; } /** * Setter method for the country attribute. * * @param string $country * * @return void */ public function setCountry(string $country): void { $this->_country = $country; } /** * Getter method for the first_name attribute. * First name * * @return ?string */ public function getFirstName(): ?string { return $this->_first_name; } /** * Setter method for the first_name attribute. * * @param string $first_name * * @return void */ public function setFirstName(string $first_name): void { $this->_first_name = $first_name; } + /** + * Getter method for the geo_code attribute. + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + * + * @return ?string + */ + public function getGeoCode(): ?string + { + return $this->_geo_code; + } + + /** + * Setter method for the geo_code attribute. + * + * @param string $geo_code + * + * @return void + */ + public function setGeoCode(string $geo_code): void + { + $this->_geo_code = $geo_code; + } + /** * Getter method for the last_name attribute. * Last name * * @return ?string */ public function getLastName(): ?string { return $this->_last_name; } /** * Setter method for the last_name attribute. * * @param string $last_name * * @return void */ public function setLastName(string $last_name): void { $this->_last_name = $last_name; } /** * Getter method for the name_on_account attribute. * Name on account * * @return ?string */ public function getNameOnAccount(): ?string { return $this->_name_on_account; } /** * Setter method for the name_on_account attribute. * * @param string $name_on_account * * @return void */ public function setNameOnAccount(string $name_on_account): void { $this->_name_on_account = $name_on_account; } /** * Getter method for the phone attribute. * Phone number * * @return ?string */ public function getPhone(): ?string { return $this->_phone; } /** * Setter method for the phone attribute. * * @param string $phone * * @return void */ public function setPhone(string $phone): void { $this->_phone = $phone; } /** * Getter method for the postal_code attribute. * Zip or postal code. * * @return ?string */ public function getPostalCode(): ?string { return $this->_postal_code; } /** * Setter method for the postal_code attribute. * * @param string $postal_code * * @return void */ public function setPostalCode(string $postal_code): void { $this->_postal_code = $postal_code; } /** * Getter method for the region attribute. * State or province. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the street1 attribute. * Street 1 * * @return ?string */ public function getStreet1(): ?string { return $this->_street1; } /** * Setter method for the street1 attribute. * * @param string $street1 * * @return void */ public function setStreet1(string $street1): void { $this->_street1 = $street1; } /** * Getter method for the street2 attribute. * Street 2 * * @return ?string */ public function getStreet2(): ?string { return $this->_street2; } /** * Setter method for the street2 attribute. * * @param string $street2 * * @return void */ public function setStreet2(string $street2): void { $this->_street2 = $street2; } } \ No newline at end of file diff --git a/lib/recurly/resources/shipping_address.php b/lib/recurly/resources/shipping_address.php index fd78910..e12f361 100644 --- a/lib/recurly/resources/shipping_address.php +++ b/lib/recurly/resources/shipping_address.php @@ -1,451 +1,475 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ShippingAddress extends RecurlyResource { private $_account_id; private $_city; private $_company; private $_country; private $_created_at; private $_email; private $_first_name; + private $_geo_code; private $_id; private $_last_name; private $_nickname; private $_object; private $_phone; private $_postal_code; private $_region; private $_street1; private $_street2; private $_updated_at; private $_vat_number; protected static $array_hints = [ ]; /** * Getter method for the account_id attribute. * Account ID * * @return ?string */ public function getAccountId(): ?string { return $this->_account_id; } /** * Setter method for the account_id attribute. * * @param string $account_id * * @return void */ public function setAccountId(string $account_id): void { $this->_account_id = $account_id; } /** * Getter method for the city attribute. * * * @return ?string */ public function getCity(): ?string { return $this->_city; } /** * Setter method for the city attribute. * * @param string $city * * @return void */ public function setCity(string $city): void { $this->_city = $city; } /** * Getter method for the company attribute. * * * @return ?string */ public function getCompany(): ?string { return $this->_company; } /** * Setter method for the company attribute. * * @param string $company * * @return void */ public function setCompany(string $company): void { $this->_company = $company; } /** * Getter method for the country attribute. * Country, 2-letter ISO 3166-1 alpha-2 code. * * @return ?string */ public function getCountry(): ?string { return $this->_country; } /** * Setter method for the country attribute. * * @param string $country * * @return void */ public function setCountry(string $country): void { $this->_country = $country; } /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the email attribute. * * * @return ?string */ public function getEmail(): ?string { return $this->_email; } /** * Setter method for the email attribute. * * @param string $email * * @return void */ public function setEmail(string $email): void { $this->_email = $email; } /** * Getter method for the first_name attribute. * * * @return ?string */ public function getFirstName(): ?string { return $this->_first_name; } /** * Setter method for the first_name attribute. * * @param string $first_name * * @return void */ public function setFirstName(string $first_name): void { $this->_first_name = $first_name; } + /** + * Getter method for the geo_code attribute. + * Code that represents a geographic entity (location or object). Only returned for Sling Vertex Integration + * + * @return ?string + */ + public function getGeoCode(): ?string + { + return $this->_geo_code; + } + + /** + * Setter method for the geo_code attribute. + * + * @param string $geo_code + * + * @return void + */ + public function setGeoCode(string $geo_code): void + { + $this->_geo_code = $geo_code; + } + /** * Getter method for the id attribute. * Shipping Address ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the last_name attribute. * * * @return ?string */ public function getLastName(): ?string { return $this->_last_name; } /** * Setter method for the last_name attribute. * * @param string $last_name * * @return void */ public function setLastName(string $last_name): void { $this->_last_name = $last_name; } /** * Getter method for the nickname attribute. * * * @return ?string */ public function getNickname(): ?string { return $this->_nickname; } /** * Setter method for the nickname attribute. * * @param string $nickname * * @return void */ public function setNickname(string $nickname): void { $this->_nickname = $nickname; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the phone attribute. * * * @return ?string */ public function getPhone(): ?string { return $this->_phone; } /** * Setter method for the phone attribute. * * @param string $phone * * @return void */ public function setPhone(string $phone): void { $this->_phone = $phone; } /** * Getter method for the postal_code attribute. * Zip or postal code. * * @return ?string */ public function getPostalCode(): ?string { return $this->_postal_code; } /** * Setter method for the postal_code attribute. * * @param string $postal_code * * @return void */ public function setPostalCode(string $postal_code): void { $this->_postal_code = $postal_code; } /** * Getter method for the region attribute. * State or province. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the street1 attribute. * * * @return ?string */ public function getStreet1(): ?string { return $this->_street1; } /** * Setter method for the street1 attribute. * * @param string $street1 * * @return void */ public function setStreet1(string $street1): void { $this->_street1 = $street1; } /** * Getter method for the street2 attribute. * * * @return ?string */ public function getStreet2(): ?string { return $this->_street2; } /** * Setter method for the street2 attribute. * * @param string $street2 * * @return void */ public function setStreet2(string $street2): void { $this->_street2 = $street2; } /** * Getter method for the updated_at attribute. * Updated at * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } /** * Getter method for the vat_number attribute. * * * @return ?string */ public function getVatNumber(): ?string { return $this->_vat_number; } /** * Setter method for the vat_number attribute. * * @param string $vat_number * * @return void */ public function setVatNumber(string $vat_number): void { $this->_vat_number = $vat_number; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 0e0dbda..fe2608a 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -16747,1983 +16747,1991 @@ components: BillingInfoList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/BillingInfo" CreditPaymentList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CreditPayment" CouponList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Coupon" CouponRedemptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CouponRedemption" CustomFieldDefinitionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CustomFieldDefinition" ItemList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Item" InvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Invoice" MeasuredUnitList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/MeasuredUnit" LineItemList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/LineItem" PlanList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Plan" SiteList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Site" ShippingMethodList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ShippingMethod" SubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Subscription" TransactionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Transaction" Account: allOf: - "$ref": "#/components/schemas/AccountReadOnly" - "$ref": "#/components/schemas/AccountResponse" AccountAcquisition: allOf: - "$ref": "#/components/schemas/AccountAcquisitionUpdate" - "$ref": "#/components/schemas/AccountAcquisitionReadOnly" AccountAcquisitionUpdate: type: object properties: cost: type: object x-class-name: AccountAcquisitionCost title: Account balance items: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: The amount of the corresponding currency used to acquire the account. channel: description: The channel through which the account was acquired. "$ref": "#/components/schemas/ChannelEnum" subchannel: type: string description: An arbitrary subchannel string representing a distinction/subcategory within a broader channel. campaign: type: string description: An arbitrary identifier for the marketing campaign that led to the acquisition of this account. AccountAcquisitionReadOnly: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account: "$ref": "#/components/schemas/AccountMini" created_at: type: string format: date-time description: When the account acquisition data was created. readOnly: true updated_at: type: string format: date-time description: When the account acquisition data was last changed. readOnly: true AccountReadOnly: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true state: description: Accounts can be either active or inactive. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" hosted_login_token: type: string description: '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}`.' readOnly: true maxLength: 32 shipping_addresses: type: array description: The shipping addresses on the account. items: "$ref": "#/components/schemas/ShippingAddress" has_live_subscription: type: boolean description: Indicates if the account has a subscription that is either active, canceled, future, or paused. has_active_subscription: type: boolean description: Indicates if the account has an active subscription. has_future_subscription: type: boolean description: Indicates if the account has a future subscription. has_canceled_subscription: type: boolean description: Indicates if the account has a canceled subscription. has_paused_subscription: type: boolean description: Indicates if the account has a paused subscription. has_past_due_invoice: type: boolean description: Indicates if the account has a past due invoice. created_at: type: string format: date-time description: When the account was created. readOnly: true updated_at: type: string format: date-time description: When the account was last changed. readOnly: true deleted_at: type: string format: date-time description: If present, when the account was last marked inactive. readOnly: true AccountCreate: allOf: - type: object properties: code: type: string description: The unique identifier of the account. This cannot be changed once the account is created. maxLength: 50 acquisition: "$ref": "#/components/schemas/AccountAcquisitionUpdate" external_accounts: type: array title: External Accounts items: "$ref": "#/components/schemas/ExternalAccountCreate" shipping_addresses: type: array items: "$ref": "#/components/schemas/ShippingAddressCreate" required: - code - "$ref": "#/components/schemas/AccountUpdate" AccountPurchase: allOf: - type: object properties: id: type: string description: Optional, but if present allows an existing account to be used and updated as part of the purchase. maxLength: 13 code: type: string description: The unique identifier of the account. This cannot be changed once the account is created. maxLength: 50 acquisition: "$ref": "#/components/schemas/AccountAcquisitionUpdate" required: - code - "$ref": "#/components/schemas/AccountUpdate" AccountReference: type: object properties: id: type: string maxLength: 13 code: type: string maxLength: 50 AccountUpdate: type: object properties: username: type: string description: A secondary value for the account. maxLength: 255 email: type: string format: email description: 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. maxLength: 255 preferred_locale: description: Used to determine the language and locale of emails sent on behalf of the merchant to the customer. The list of locales is restricted to those the merchant has enabled on the site. "$ref": "#/components/schemas/PreferredLocaleEnum" preferred_time_zone: type: string example: America/Los_Angeles description: Used to determine the time zone of emails sent on behalf of the merchant to the customer. Must be a [supported IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) cc_emails: type: string description: 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. maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 100 vat_number: type: string description: The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices. maxLength: 20 tax_exempt: type: boolean description: The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account. exemption_certificate: type: string description: 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. maxLength: 30 override_business_entity_id: type: string title: Override Business Entity ID description: Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled. parent_account_code: type: string maxLength: 50 description: The account code of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account. parent_account_id: type: string maxLength: 13 description: The UUID of the parent account to be associated with this account. Passing an empty value removes any existing parent association from this account. If both `parent_account_code` and `parent_account_id` are passed, the non-blank value in `parent_account_id` will be used. Only one level of parent child relationship is allowed. You cannot assign a parent account that itself has a parent account. bill_to: maxLength: 6 description: 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. "$ref": "#/components/schemas/BillToEnum" transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. invoice_template_id: type: string title: Invoice Template ID description: Unique ID to identify an invoice template. Available when - the site is on a Pro or Enterprise plan. Used to specify which invoice - template, if any, should be used to generate invoices for the account. + the site is on a Pro or Elite plan. Used to specify which invoice template, + if any, should be used to generate invoices for the account. address: "$ref": "#/components/schemas/Address" billing_info: "$ref": "#/components/schemas/BillingInfoCreate" custom_fields: "$ref": "#/components/schemas/CustomFields" AccountResponse: type: object properties: code: type: string description: The unique identifier of the account. This cannot be changed once the account is created. maxLength: 50 readOnly: true username: type: string description: A secondary value for the account. maxLength: 255 email: type: string format: email description: 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. maxLength: 255 override_business_entity_id: type: string title: Override Business Entity ID description: Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled. preferred_locale: description: Used to determine the language and locale of emails sent on behalf of the merchant to the customer. "$ref": "#/components/schemas/PreferredLocaleEnum" preferred_time_zone: type: string example: America/Los_Angeles description: The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer. cc_emails: type: string description: 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. maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 50 vat_number: type: string description: The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices. maxLength: 20 tax_exempt: type: boolean description: The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account. exemption_certificate: type: string description: 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. maxLength: 30 external_accounts: type: array description: The external accounts belonging to this account items: "$ref": "#/components/schemas/ExternalAccount" parent_account_id: type: string maxLength: 13 description: The UUID of the parent account associated with this account. bill_to: maxLength: 6 description: 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. "$ref": "#/components/schemas/BillToEnum" dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. invoice_template_id: type: string title: Invoice Template ID description: Unique ID to identify an invoice template. Available when the - site is on a Pro or Enterprise plan. Used to specify if a non-default - invoice template will be used to generate invoices for the account. For - sites without multiple invoice templates enabled, the default template - will always be used. + site is on a Pro or Elite plan. Used to specify if a non-default invoice + template will be used to generate invoices for the account. For sites + without multiple invoice templates enabled, the default template will + always be used. address: "$ref": "#/components/schemas/Address" billing_info: "$ref": "#/components/schemas/BillingInfo" custom_fields: "$ref": "#/components/schemas/CustomFields" AccountNote: type: object required: - message properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string user: "$ref": "#/components/schemas/User" message: type: string created_at: type: string format: date-time readOnly: true AccountMini: type: object title: Account mini details properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string description: The unique identifier of the account. maxLength: 50 email: type: string format: email description: The email address used for communicating with this customer. maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 255 parent_account_id: type: string maxLength: 13 bill_to: type: string maxLength: 6 dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. AccountBalance: type: object properties: object: type: string title: Object type readOnly: true account: "$ref": "#/components/schemas/AccountMini" past_due: type: boolean balances: type: array items: "$ref": "#/components/schemas/AccountBalanceAmount" AccountBalanceAmount: type: object title: Balance Amount properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: Total amount the account is past due. processing_prepayment_amount: type: number format: float title: Processing Prepayment Amount description: Total amount for the prepayment credit invoices in a `processing` state on the account. available_credit_amount: type: number format: float title: Available Credit Amount description: Total amount of the open balances on credit invoices for the account. InvoiceAddress: allOf: - "$ref": "#/components/schemas/Address" - "$ref": "#/components/schemas/AddressWithName" type: object properties: name_on_account: type: string title: Name on account company: type: string title: Company Address: type: object properties: phone: type: string title: Phone number street1: type: string title: Street 1 street2: type: string title: Street 2 city: type: string title: City region: type: string title: State/Province description: State or province. postal_code: type: string title: Zip/Postal code description: Zip or postal code. country: type: string title: Country description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration AddressWithName: allOf: - "$ref": "#/components/schemas/Address" type: object properties: first_name: type: string title: First name last_name: type: string title: Last name AddOnMini: type: object title: Add-on mini details description: Just the important parts. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeEnum" usage_type: "$ref": "#/components/schemas/UsageTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for an measured unit associated with the add-on. maxLength: 13 item_id: type: string title: Item ID maxLength: 13 readOnly: true external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 readOnly: true accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 AddOn: type: object title: Add-on description: Full add-on details. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true plan_id: type: string title: Plan ID maxLength: 13 readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. maxLength: 50 state: title: State description: Add-ons can be either active or inactive. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeEnum" usage_type: "$ref": "#/components/schemas/UsageTypeEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for an measured unit associated with the add-on. maxLength: 13 accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 item: "$ref": "#/components/schemas/ItemMini" readOnly: true tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" percentage_tiers: type: array title: Percentage Tiers description: This feature is currently in development and requires approval and enablement, please contact support. items: "$ref": "#/components/schemas/PercentageTiersByCurrency" external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 readOnly: true created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true required: - code - name AddOnCreate: type: object title: Add-on description: Full add-on details. properties: item_code: type: string title: Item Code description: Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used. maxLength: 13 code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeCreateEnum" usage_type: "$ref": "#/components/schemas/UsageTypeCreateEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. plan_id: type: string title: Plan ID maxLength: 13 readOnly: true accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent. maxLength: 50 currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeCreateEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. required: - code - name AddOnUpdate: type: object title: Add-on description: Full add-on details. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent. maxLength: 255 usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then currencies must be absent. Must also be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. BillingInfo: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string maxLength: 13 readOnly: true first_name: type: string maxLength: 50 last_name: type: string maxLength: 50 company: type: string maxLength: 100 address: "$ref": "#/components/schemas/Address" vat_number: type: string description: Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices. valid: type: boolean readOnly: true payment_method: "$ref": "#/components/schemas/PaymentMethod" fraud: type: object x-class-name: FraudInfo title: Fraud information description: Most recent fraud result. readOnly: true properties: score: type: integer title: Kount score minimum: 1 maximum: 99 decision: title: Kount decision maxLength: 10 "$ref": "#/components/schemas/KountDecisionEnum" risk_rules_triggered: type: object title: Kount rules primary_payment_method: type: boolean description: The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used backup_payment_method: type: boolean description: The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. created_at: type: string format: date-time description: When the billing information was created. readOnly: true updated_at: type: string format: date-time description: When the billing information was last changed. readOnly: true updated_by: type: object x-class-name: BillingInfoUpdatedBy readOnly: true properties: ip: type: string description: Customer's IP address when updating their billing information. maxLength: 20 country: type: string description: Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly. maxLength: 2 BillingInfoCreate: type: object properties: token_id: type: string title: Token ID description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token). maxLength: 22 first_name: type: string title: First name maxLength: 50 last_name: type: string title: Last name maxLength: 50 company: type: string title: Company name maxLength: 100 address: "$ref": "#/components/schemas/Address" number: type: string title: Credit card number description: Credit card number, spaces and dashes are accepted. month: type: string title: Expiration month maxLength: 2 year: type: string title: Expiration year maxLength: 4 cvv: type: string title: Security code or CVV description: "*STRONGLY RECOMMENDED*" maxLength: 4 currency: type: string description: 3-letter ISO 4217 currency code. vat_number: type: string title: VAT number ip_address: type: string title: IP address description: "*STRONGLY RECOMMENDED* Customer's IP address when updating their billing information." maxLength: 20 gateway_token: type: string title: A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`. maxLength: 50 gateway_code: type: string title: An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. maxLength: 12 gateway_attributes: type: object description: Additional attributes to send to the gateway. x-class-name: GatewayAttributes properties: account_reference: type: string description: Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response. maxLength: 264 amazon_billing_agreement_id: type: string title: Amazon billing agreement ID paypal_billing_agreement_id: type: string title: PayPal billing agreement ID + roku_billing_agreement_id: + type: string + title: Roku's CIB if billing through Roku fraud_session_id: type: string title: Fraud Session ID transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 iban: type: string maxLength: 34 description: The International Bank Account Number, up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, and potential routing information name_on_account: type: string maxLength: 255 description: The name associated with the bank account (ACH, SEPA, Bacs only) account_number: type: string maxLength: 255 description: The bank account number. (ACH, Bacs only) routing_number: type: string maxLength: 15 description: The bank's rounting number. (ACH only) sort_code: type: string maxLength: 15 description: Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only) type: "$ref": "#/components/schemas/AchTypeEnum" account_type: "$ref": "#/components/schemas/AchAccountTypeEnum" tax_identifier: type: string description: Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively. tax_identifier_type: description: This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina. "$ref": "#/components/schemas/TaxIdentifierTypeEnum" primary_payment_method: type: boolean title: Primary Payment Method description: The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided. backup_payment_method: type: boolean description: The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such. external_hpp_type: "$ref": "#/components/schemas/ExternalHppTypeEnum" online_banking_payment_type: "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum" deprecated: true card_type: "$ref": "#/components/schemas/CardTypeEnum" BillingInfoVerify: type: object properties: gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 BillingInfoVerifyCVV: type: object properties: verification_value: type: string description: Unique security code for a credit card. Coupon: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" max_redemptions: type: integer title: Max redemptions description: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. max_redemptions_per_account: type: integer title: Max redemptions per account description: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. unique_coupon_codes_count: type: integer title: Unique coupon codes count description: When this number reaches `max_redemptions` the coupon will no longer be redeemable. readOnly: true unique_code_template: type: string title: Unique code template description: On a bulk coupon, the template from which unique coupon codes are generated. unique_coupon_code: allOf: - "$ref": "#/components/schemas/UniqueCouponCode" type: object description: Will be populated when the Coupon being returned is a `UniqueCouponCode`. duration: title: Duration description: | - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. minimum: 1 maximum: 9999 applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | The coupon is valid for all items if true. If false then `items` will list the applicable items. default: false applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false plans: type: array title: Plans description: A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`. items: "$ref": "#/components/schemas/PlanMini" items: type: array title: Items description: | A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`. items: "$ref": "#/components/schemas/ItemMini" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" hosted_page_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. format: date-time created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponCreate: allOf: - "$ref": "#/components/schemas/CouponUpdate" - type: object properties: code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. discount_type: title: Discount type description: The type of discount provided by the coupon (how the amount discounted is calculated) "$ref": "#/components/schemas/DiscountTypeEnum" discount_percent: type: integer title: Discount percent description: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`. free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`. minimum: 1 maximum: 9999 currencies: title: Currencies description: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values type: array items: "$ref": "#/components/schemas/CouponPricing" applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`. default: false plan_codes: type: array title: Plan codes description: | List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true. items: type: string item_codes: type: array title: Item codes description: | List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`. items: type: string duration: title: Duration description: | This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever. default: forever "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" coupon_type: title: Coupon type description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" unique_code_template: type: string title: Unique code template description: | On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" required: - code - discount_type - name CouponPricing: type: object properties: currency: type: string description: 3-letter ISO 4217 currency code. discount: type: number format: float description: The fixed discount (in dollars) for the corresponding currency. CouponDiscount: type: object description: | Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`. properties: type: "$ref": "#/components/schemas/DiscountTypeEnum" percent: description: This is only present when `type=percent`. type: integer currencies: type: array description: This is only present when `type=fixed`. items: "$ref": "#/components/schemas/CouponDiscountPricing" trial: type: object x-class-name: CouponDiscountTrial description: This is only present when `type=free_trial`. properties: unit: title: Trial unit description: Temporal unit of the free trial "$ref": "#/components/schemas/FreeTrialUnitEnum" length: type: integer title: Trial length description: Trial length measured in the units specified by the sibling `unit` property CouponDiscountPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Discount Amount description: Value of the fixed discount that this coupon applies. CouponBulkCreate: type: object properties: number_of_unique_codes: type: integer title: Number of unique codes description: The quantity of unique coupon codes to generate minimum: 1 maximum: 200 CouponMini: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponRedemption: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string title: Object type description: Will always be `coupon`. readOnly: true account: type: object title: Account description: The Account on which the coupon was applied. readOnly: true "$ref": "#/components/schemas/AccountMini" subscription_id: type: string title: Subscription ID readOnly: true coupon: "$ref": "#/components/schemas/Coupon" state: title: Coupon Redemption state default: active "$ref": "#/components/schemas/ActiveStateEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 @@ -20598,1329 +20606,1344 @@ components: type: string title: Setup fee accounting code description: Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the plan, `false` applies tax on the plan." currencies: type: array title: Pricing items: "$ref": "#/components/schemas/PlanPricing" minItems: 1 hosted_pages: type: object title: Hosted pages settings "$ref": "#/components/schemas/PlanHostedPages" add_ons: type: array title: Add Ons items: "$ref": "#/components/schemas/AddOnCreate" allow_any_item_on_subscriptions: type: boolean title: Allow any item on subscriptions default: false description: | Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used. dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. required: - code - name - currencies PlanHostedPages: type: object properties: success_url: type: string title: Success redirect URL description: URL to redirect to after signup on the hosted payment pages. cancel_url: type: string title: Cancel redirect URL (deprecated) description: URL to redirect to on canceled signup on the hosted payment pages. bypass_confirmation: type: boolean title: Bypass confirmation page? description: If `true`, the customer will be sent directly to your `success_url` after a successful signup, bypassing Recurly's hosted confirmation page. display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the plan. PlanPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 setup_fee: type: number format: float title: Setup fee description: Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan. minimum: 0 maximum: 1000000 unit_amount: type: number format: float title: Unit price description: This field should not be sent when the pricing model is 'ramp'. minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true PlanRampInterval: type: object title: Plan Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. default: 1 currencies: type: array description: Represents the price for the ramp interval. items: "$ref": "#/components/schemas/PlanRampPricing" PlanUpdate: type: object properties: id: type: string title: Plan ID maxLength: 13 readOnly: true code: type: string title: Plan code description: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. maxLength: 255 description: type: string title: Description description: Optional description, not displayed. accounting_code: type: string title: Plan accounting code description: Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 trial_unit: title: Trial unit description: Units for the plan's trial period. default: months "$ref": "#/components/schemas/IntervalUnitEnum" trial_length: type: integer title: Trial length description: Length of plan's trial period in `trial_units`. `0` means `no trial`. default: 0 minimum: 0 trial_requires_billing_info: type: boolean title: Trial Requires BillingInfo description: Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee. default: true total_billing_cycles: type: integer title: Total billing cycles description: Automatically terminate plans after a defined number of billing cycles. minimum: 0 auto_renew: type: boolean title: Auto renew default: true description: Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself. ramp_intervals: type: array title: Ramp Intervals items: "$ref": "#/components/schemas/PlanRampInterval" custom_fields: "$ref": "#/components/schemas/CustomFields" revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" setup_fee_revenue_schedule_type: title: Setup fee revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" setup_fee_accounting_code: type: string title: Setup fee accounting code description: Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the plan, `false` applies tax on the plan." currencies: type: array title: Pricing description: Optional when the pricing model is 'ramp'. items: "$ref": "#/components/schemas/PlanPricing" minItems: 1 hosted_pages: type: object title: Hosted pages settings "$ref": "#/components/schemas/PlanHostedPages" allow_any_item_on_subscriptions: type: boolean title: Allow any item on subscriptions description: | Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used. dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. AddOnPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 unit_amount: type: number format: float title: Unit price minimum: 0 maximum: 1000000 description: Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided. unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: | Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true required: - currency TierPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 unit_amount: type: number format: float title: Unit price minimum: 0 maximum: 1000000 description: Allows up to 2 decimal places. Required unless `unit_amount_decimal` is provided. unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: | Allows up to 9 decimal places. Only supported when `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. required: - currency PlanRampPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 unit_amount: type: number format: float title: Unit price description: Represents the price for the Ramp Interval. minimum: 0 maximum: 1000000 required: - currency - unit_amount Pricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 unit_amount: type: number format: float title: Unit price minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true required: - currency - unit_amount Tier: type: object properties: ending_quantity: type: integer title: Ending quantity minimum: 1 maximum: 999999999 default: description: Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier. usage_percentage: type: string title: Usage Percentage description: "(deprecated) -- Use the percentage_tiers object instead." deprecated: true currencies: type: array title: Tier pricing items: "$ref": "#/components/schemas/TierPricing" minItems: 1 PercentageTiersByCurrency: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 tiers: type: array title: Tiers items: "$ref": "#/components/schemas/PercentageTier" minItems: 1 PercentageTier: type: object properties: ending_amount: type: number format: float title: Ending amount minimum: 0.01 maximum: 9999999999999.99 default: description: Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier. usage_percentage: type: string title: Usage Percentage minimum: 0 maximum: 100 description: | The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. Settings: type: object properties: billing_address_requirement: description: | - full: Full Address (Street, City, State, Postal Code and Country) - streetzip: Street and Postal Code only - zip: Postal Code only - none: No Address readOnly: true "$ref": "#/components/schemas/AddressRequirementEnum" accepted_currencies: type: array items: type: string description: 3-letter ISO 4217 currency code. readOnly: true default_currency: type: string description: The default 3-letter ISO 4217 currency code. readOnly: true ShippingAddress: type: object properties: id: type: string title: Shipping Address ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string title: Account ID maxLength: 13 readOnly: true nickname: type: string maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 255 email: type: string maxLength: 255 vat_number: type: string maxLength: 20 phone: type: string maxLength: 30 street1: type: string maxLength: 255 street2: type: string maxLength: 255 city: type: string maxLength: 255 region: type: string maxLength: 255 description: State or province. postal_code: type: string maxLength: 20 description: Zip or postal code. country: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Updated at format: date-time readOnly: true ShippingAddressCreate: type: object properties: nickname: type: string maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 255 email: type: string maxLength: 255 vat_number: type: string maxLength: 20 phone: type: string maxLength: 30 street1: type: string maxLength: 255 street2: type: string maxLength: 255 city: type: string maxLength: 255 region: type: string maxLength: 255 description: State or province. postal_code: type: string maxLength: 20 description: Zip or postal code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration country: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. required: - first_name - last_name - street1 - city - postal_code - country ShippingAddressList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ShippingAddress" ShippingMethod: type: object properties: id: type: string title: Shipping Method ID readOnly: true maxLength: 13 object: type: string title: Object type readOnly: true code: type: string title: Code description: The internal name used identify the shipping method. maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true ShippingMethodMini: type: object properties: id: type: string title: Shipping Method ID readOnly: true maxLength: 13 object: type: string title: Object type readOnly: true code: type: string title: Code description: The internal name used identify the shipping method. maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 ShippingMethodCreate: type: object properties: code: type: string title: Code description: The internal name used identify the shipping method. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 required: - code - name ShippingMethodUpdate: type: object properties: code: type: string title: Code description: The internal name used identify the shipping method. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 ShippingFeeCreate: type: object properties: method_id: type: string title: Method ID description: The id of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Method Code description: The code of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Amount description: This is priced in the purchase's currency. minimum: 0 ShippingAddressUpdate: type: object properties: id: type: string title: Shipping Address ID maxLength: 13 readOnly: true nickname: type: string maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 255 email: type: string maxLength: 255 vat_number: type: string maxLength: 20 phone: type: string maxLength: 30 street1: type: string maxLength: 255 street2: type: string maxLength: 255 city: type: string maxLength: 255 region: type: string maxLength: 255 description: State or province. postal_code: type: string maxLength: 20 description: Zip or postal code. country: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. + geo_code: + type: string + maxLength: 20 + description: Code that represents a geographic entity (location or object). + Only returned for Sling Vertex Integration Site: type: object properties: id: type: string title: Site ID readOnly: true maxLength: 13 object: type: string title: Object type readOnly: true subdomain: type: string readOnly: true maxLength: 100 public_api_key: type: string title: Public API Key readOnly: true maxLength: 50 description: This value is used to configure RecurlyJS to submit tokenized billing information. mode: title: Mode maxLength: 15 readOnly: true "$ref": "#/components/schemas/SiteModeEnum" address: "$ref": "#/components/schemas/Address" settings: "$ref": "#/components/schemas/Settings" features: type: array title: Features description: A list of features enabled for the site. items: readOnly: true "$ref": "#/components/schemas/FeaturesEnum" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true Subscription: type: object properties: id: type: string title: Subscription ID maxLength: 13 object: type: string title: Object type uuid: type: string title: UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 account: "$ref": "#/components/schemas/AccountMini" plan: "$ref": "#/components/schemas/PlanMini" state: title: State "$ref": "#/components/schemas/SubscriptionStateEnum" shipping: "$ref": "#/components/schemas/SubscriptionShipping" coupon_redemptions: type: array title: Coupon redemptions description: Returns subscription level coupon redemptions that are tied to this subscription. items: "$ref": "#/components/schemas/CouponRedemptionMini" pending_change: "$ref": "#/components/schemas/SubscriptionChange" current_period_started_at: type: string format: date-time title: Current billing period started at current_period_ends_at: type: string format: date-time title: Current billing period ends at current_term_started_at: type: string format: date-time title: Current term started at description: The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods. current_term_ends_at: type: string format: date-time title: Current term ends at description: When the term ends. This is calculated by a plan's interval and `total_billing_cycles` in a term. Subscription changes with a `timeframe=renewal` will be applied on this date. trial_started_at: type: string format: date-time title: Trial period started at trial_ends_at: type: string format: date-time title: Trial period ends at remaining_billing_cycles: type: integer title: Remaining billing cycles description: The remaining billing cycles in the current term. total_billing_cycles: type: integer title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. ramp_intervals: type: array title: Ramp Intervals description: The ramp intervals representing the pricing schedule for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampIntervalResponse" paused_at: type: string format: date-time title: Paused at description: Null unless subscription is paused or will pause at the end of the current billing period. remaining_pause_cycles: type: integer title: Remaining pause cycles description: Null unless subscription is paused or will pause at the end of the current billing period. currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" unit_amount: type: number format: float title: Subscription unit price tax_inclusive: type: boolean title: Tax Inclusive? description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag. quantity: type: integer title: Subscription quantity minimum: 0 add_ons: type: array title: Add-ons items: "$ref": "#/components/schemas/SubscriptionAddOn" add_ons_total: type: number format: float title: Total price of add-ons minimum: 0 subtotal: type: number format: float title: Estimated total, before tax. minimum: 0 tax: type: number format: float title: Estimated tax tax_info: "$ref": "#/components/schemas/TaxInfo" total: type: number format: float title: Estimated total collection_method: title: Collection method default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" terms_and_conditions: type: string title: Terms and conditions customer_notes: type: string title: Customer notes expiration_reason: type: string title: Expiration reason custom_fields: "$ref": "#/components/schemas/CustomFields" created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Last updated at activated_at: type: string format: date-time title: Activated at canceled_at: type: string format: date-time title: Canceled at expires_at: type: string format: date-time title: Expires at bank_account_authorized_at: type: string format: date-time title: Bank account authorized description: Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared. gateway_code: type: string title: Gateway Code description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 billing_info_id: type: string title: Billing Info ID description: Billing Info ID. active_invoice_id: type: string title: Active invoice ID description: The invoice ID of the latest invoice created for an active subscription. maxLength: 13 readOnly: true started_with_gift: type: boolean default: false description: Whether the subscription was started with a gift certificate. title: Started with Gift converted_at: type: string format: date-time description: When the subscription was converted from a gift card. title: Converted at action_result: type: object description: Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. title: Action result SubscriptionAddOn: type: object title: Subscription Add-on description: This links an Add-on to a specific Subscription. properties: id: type: string title: Subscription Add-on ID maxLength: 13 object: type: string title: Object type subscription_id: type: string title: Subscription ID maxLength: 13 add_on: "$ref": "#/components/schemas/AddOnMini" add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Add-on quantity minimum: 0 unit_amount: type: number format: float title: Add-on unit price description: Supports up to 2 decimal places. unit_amount_decimal: type: string format: decimal title: Add-on unit in decimal price description: Supports up to 9 decimal places. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" minItems: 1 description: "If tiers are provided in the request, all existing tiers on the Subscription Add-on will be\nremoved and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and\nadd_on.usage_type is percentage use percentage_tiers instead. \nThere must be one tier without an `ending_quantity` value which represents the final tier.\n" percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" minItems: 1 description: | If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage. created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Updated at expired_at: type: string format: date-time title: Expired at SubscriptionAddOnCreate: type: object properties: code: type: string title: Add-on code maxLength: 50 description: | If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used. add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Quantity minimum: 0 default: 1 unit_amount: type: number format: float title: Unit amount description: | Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 unit_amount_decimal: type: string format: decimal title: Unit Amount Decimal description: | Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" minItems: 1 description: | If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" minItems: 1 description: | If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. This feature is currently in development and requires approval and enablement, please contact support. usage_percentage: type: number format: float title: Usage Percentage minimum: 0 maximum: 100 description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" required: - code SubscriptionAddOnUpdate: type: object properties: id: type: string title: Subscription Add-on ID. description: | When an id is provided, the existing subscription add-on attributes will persist unless overridden in the request. maxLength: 13 code: type: string title: Add-on code maxLength: 50 description: | If a code is provided without an id, the subscription add-on attributes will be set to the current value for those attributes on the plan add-on unless provided in the request. If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used. add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Quantity minimum: 0 unit_amount: type: number format: float title: Unit amount description: | Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 unit_amount_decimal: type: string title: Unit amount decimal description: | Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. tiers: type: array @@ -24470,1054 +24493,1056 @@ components: to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-BE - fr-CA - fr-CH - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never NetTermsTypeEnum: type: string title: Net Terms Type description: | Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled. enum: - net - eom default: net InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - bacs - ach - amazon - apple_pay - check - credit_card - eft + - google_pay - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - external_recovery - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - bacs - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token + - google_pay - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero - boleto CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum: - ach_cancel - ach_chargeback - ach_credit_return - ach_exception - ach_return - ach_transactions_not_supported - ach_validation_exception - amazon_amount_exceeded - amazon_declined_review - amazon_invalid_authorization_status - amazon_invalid_close_attempt - amazon_invalid_create_order_reference - amazon_invalid_order_status - amazon_not_authorized - amazon_order_not_modifiable - amazon_transaction_count_exceeded - api_error - approved - approved_fraud_review - authorization_already_captured - authorization_amount_depleted - authorization_expired - batch_processing_error - billing_agreement_already_accepted - billing_agreement_not_accepted - billing_agreement_not_found - billing_agreement_replaced - call_issuer - call_issuer_update_cardholder_data - cancelled - cannot_refund_unsettled_transactions - card_not_activated - card_type_not_accepted - cardholder_requested_stop - contact_gateway - contract_not_found - currency_not_supported - customer_canceled_transaction - cvv_required - declined - declined_card_number - declined_exception - declined_expiration_date - declined_missing_data - declined_saveable - declined_security_code - deposit_referenced_chargeback - direct_debit_type_not_accepted - duplicate_transaction - exceeds_daily_limit - exceeds_max_amount - expired_card - finbot_disconnect - finbot_unavailable - fraud_address - fraud_address_recurly - fraud_advanced_verification - fraud_gateway - fraud_generic - fraud_ip_address - fraud_manual_decision - fraud_risk_check - fraud_security_code - fraud_stolen_card - fraud_too_many_attempts - fraud_velocity - gateway_account_setup_incomplete - gateway_error - gateway_rate_limited - gateway_timeout - gateway_token_not_found - gateway_unavailable - gateway_validation_exception - insufficient_funds - invalid_account_number - invalid_amount - invalid_billing_agreement_status - invalid_card_number - invalid_data - invalid_email - invalid_gateway_access_token - invalid_gateway_configuration - invalid_issuer - invalid_login - invalid_merchant_type - invalid_name - invalid_payment_method - invalid_payment_method_hard - invalid_transaction - issuer_unavailable - lifecycle_decline - merch_max_transaction_limit_exceeded - moneybot_disconnect - moneybot_unavailable - no_billing_information - no_gateway - no_gateway_found_for_transaction_amount - partial_approval - partial_credits_not_supported - payer_authentication_rejected - payment_cannot_void_authorization - payment_not_accepted - paypal_account_issue - paypal_cannot_pay_self - paypal_declined_use_alternate - paypal_expired_reference_id - paypal_hard_decline - paypal_invalid_billing_agreement - paypal_primary_declined - processor_not_available - processor_unavailable - recurly_credentials_not_found - recurly_error - recurly_failed_to_get_token - recurly_token_mismatch - recurly_token_not_found - reference_transactions_not_enabled - restricted_card - restricted_card_chargeback - rjs_token_expired - roku_invalid_card_number - roku_invalid_cib - roku_invalid_payment_method - roku_zip_code_mismatch - simultaneous - ssl_error - temporary_hold - three_d_secure_action_required - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error - three_d_secure_credential_error - three_d_secure_not_supported - too_busy - too_many_attempts - total_credit_exceeds_capture - transaction_already_refunded - transaction_already_voided - transaction_cannot_be_authorized - transaction_cannot_be_refunded - transaction_cannot_be_refunded_currently - transaction_cannot_be_voided - transaction_failed_to_settle - transaction_not_found - transaction_service_v2_disconnect - transaction_service_v2_unavailable - transaction_settled - transaction_stale_at_gateway - try_again - unknown - unmapped_partner_error - vaultly_service_unavailable - zero_dollar_auth_not_supported DeclineCodeEnum: type: string enum: - account_closed - call_issuer - card_not_activated - card_not_supported - cardholder_requested_stop - do_not_honor - do_not_try_again - exceeds_daily_limit - generic_decline - expired_card - fraudulent - insufficient_funds - incorrect_address - incorrect_security_code - invalid_amount - invalid_number - invalid_transaction - issuer_unavailable - lifecycle_decline - lost_card - pickup_card - policy_decline - restricted_card - restricted_card_chargeback - security_decline - stolen_card - try_again - update_cardholder_data - requires_3d_secure ExportDates: type: object properties: object: type: string title: Object type readOnly: true dates: type: array items: type: string title: An array of dates that have available exports. ExportFiles: type: object properties: object: type: string title: Object type readOnly: true files: type: array items: "$ref": "#/components/schemas/ExportFile" ExportFile: type: object properties: name: type: string title: Filename description: Name of the export file. md5sum: type: string title: MD5 hash of the export file description: MD5 hash of the export file. href: type: string title: A link to the export file description: A presigned link to download the export file. TaxIdentifierTypeEnum: type: string enum: - cpf - cnpj - cuit DunningCycleTypeEnum: type: string description: The type of invoice this cycle applies to. enum: - automatic - manual - trial AchTypeEnum: type: string description: The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values. enum: - bacs - becs AchAccountTypeEnum: type: string description: The bank account type. (ACH only) enum: - checking - savings ExternalHppTypeEnum: type: string description: Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - adyen OnlineBankingPaymentTypeEnum: type: string description: Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - ideal - sofort ExternalInvoiceStateEnum: type: string enum: - paid
recurly/recurly-client-php
5cf749821e353951de93fa40042822acdc33b641
4.41.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 21ebe9d..b0d75b1 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.40.0 +current_version = 4.41.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ad4317..2c9f3b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,489 +1,500 @@ # Changelog +## [4.41.0](https://github.com/recurly/recurly-client-php/tree/4.41.0) (2023-08-29) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.40.0...4.41.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (`VATNumber`, `LifecycleDecline`) [#782](https://github.com/recurly/recurly-client-php/pull/782) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.40.0](https://github.com/recurly/recurly-client-php/tree/4.40.0) (2023-08-10) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.39.0...4.40.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (action_result) [#781](https://github.com/recurly/recurly-client-php/pull/781) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.39.0](https://github.com/recurly/recurly-client-php/tree/4.39.0) (2023-07-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.37.0...4.39.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Ramp Dates, Net Terms, Invoice Business Entity) [#779](https://github.com/recurly/recurly-client-php/pull/779) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (App Management - External Subscriptions) [#777](https://github.com/recurly/recurly-client-php/pull/777) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.37.0](https://github.com/recurly/recurly-client-php/tree/4.37.0) (2023-06-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.36.0...4.37.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Multiple Business Entities) [#769](https://github.com/recurly/recurly-client-php/pull/769) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 562629e..3092061 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.40.0", + "version": "4.41.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 890f89c..a93aa62 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.40.0'; + public const CURRENT = '4.41.0'; }
recurly/recurly-client-php
1a77bfecadf01660d188115af5bedfa6e9ee13b9
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/transaction.php b/lib/recurly/resources/transaction.php index fc877c5..8722820 100644 --- a/lib/recurly/resources/transaction.php +++ b/lib/recurly/resources/transaction.php @@ -1,966 +1,990 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class Transaction extends RecurlyResource { private $_account; private $_action_result; private $_amount; private $_avs_check; private $_backup_payment_method_used; private $_billing_address; private $_collected_at; private $_collection_method; private $_created_at; private $_currency; private $_customer_message; private $_customer_message_locale; private $_cvv_check; private $_gateway_approval_code; private $_gateway_message; private $_gateway_reference; private $_gateway_response_code; private $_gateway_response_time; private $_gateway_response_values; private $_id; private $_invoice; private $_ip_address_country; private $_ip_address_v4; private $_object; private $_origin; private $_original_transaction_id; private $_payment_gateway; private $_payment_method; private $_refunded; private $_status; private $_status_code; private $_status_message; private $_subscription_ids; private $_success; private $_type; private $_updated_at; private $_uuid; + private $_vat_number; private $_voided_at; private $_voided_by_invoice; protected static $array_hints = [ 'setSubscriptionIds' => 'string', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the action_result attribute. * Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. * * @return ?object */ public function getActionResult(): ?object { return $this->_action_result; } /** * Setter method for the action_result attribute. * * @param object $action_result * * @return void */ public function setActionResult(object $action_result): void { $this->_action_result = $action_result; } /** * Getter method for the amount attribute. * Total transaction amount sent to the payment gateway. * * @return ?float */ public function getAmount(): ?float { return $this->_amount; } /** * Setter method for the amount attribute. * * @param float $amount * * @return void */ public function setAmount(float $amount): void { $this->_amount = $amount; } /** * Getter method for the avs_check attribute. * When processed, result from checking the overall AVS on the transaction. * * @return ?string */ public function getAvsCheck(): ?string { return $this->_avs_check; } /** * Setter method for the avs_check attribute. * * @param string $avs_check * * @return void */ public function setAvsCheck(string $avs_check): void { $this->_avs_check = $avs_check; } /** * Getter method for the backup_payment_method_used attribute. * Indicates if the transaction was completed using a backup payment * * @return ?bool */ public function getBackupPaymentMethodUsed(): ?bool { return $this->_backup_payment_method_used; } /** * Setter method for the backup_payment_method_used attribute. * * @param bool $backup_payment_method_used * * @return void */ public function setBackupPaymentMethodUsed(bool $backup_payment_method_used): void { $this->_backup_payment_method_used = $backup_payment_method_used; } /** * Getter method for the billing_address attribute. * * * @return ?\Recurly\Resources\AddressWithName */ public function getBillingAddress(): ?\Recurly\Resources\AddressWithName { return $this->_billing_address; } /** * Setter method for the billing_address attribute. * * @param \Recurly\Resources\AddressWithName $billing_address * * @return void */ public function setBillingAddress(\Recurly\Resources\AddressWithName $billing_address): void { $this->_billing_address = $billing_address; } /** * Getter method for the collected_at attribute. * Collected at, or if not collected yet, the time the transaction was created. * * @return ?string */ public function getCollectedAt(): ?string { return $this->_collected_at; } /** * Setter method for the collected_at attribute. * * @param string $collected_at * * @return void */ public function setCollectedAt(string $collected_at): void { $this->_collected_at = $collected_at; } /** * Getter method for the collection_method attribute. * The method by which the payment was collected. * * @return ?string */ public function getCollectionMethod(): ?string { return $this->_collection_method; } /** * Setter method for the collection_method attribute. * * @param string $collection_method * * @return void */ public function setCollectionMethod(string $collection_method): void { $this->_collection_method = $collection_method; } /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the customer_message attribute. * For declined (`success=false`) transactions, the message displayed to the customer. * * @return ?string */ public function getCustomerMessage(): ?string { return $this->_customer_message; } /** * Setter method for the customer_message attribute. * * @param string $customer_message * * @return void */ public function setCustomerMessage(string $customer_message): void { $this->_customer_message = $customer_message; } /** * Getter method for the customer_message_locale attribute. * Language code for the message * * @return ?string */ public function getCustomerMessageLocale(): ?string { return $this->_customer_message_locale; } /** * Setter method for the customer_message_locale attribute. * * @param string $customer_message_locale * * @return void */ public function setCustomerMessageLocale(string $customer_message_locale): void { $this->_customer_message_locale = $customer_message_locale; } /** * Getter method for the cvv_check attribute. * When processed, result from checking the CVV/CVC value on the transaction. * * @return ?string */ public function getCvvCheck(): ?string { return $this->_cvv_check; } /** * Setter method for the cvv_check attribute. * * @param string $cvv_check * * @return void */ public function setCvvCheck(string $cvv_check): void { $this->_cvv_check = $cvv_check; } /** * Getter method for the gateway_approval_code attribute. * Transaction approval code from the payment gateway. * * @return ?string */ public function getGatewayApprovalCode(): ?string { return $this->_gateway_approval_code; } /** * Setter method for the gateway_approval_code attribute. * * @param string $gateway_approval_code * * @return void */ public function setGatewayApprovalCode(string $gateway_approval_code): void { $this->_gateway_approval_code = $gateway_approval_code; } /** * Getter method for the gateway_message attribute. * Transaction message from the payment gateway. * * @return ?string */ public function getGatewayMessage(): ?string { return $this->_gateway_message; } /** * Setter method for the gateway_message attribute. * * @param string $gateway_message * * @return void */ public function setGatewayMessage(string $gateway_message): void { $this->_gateway_message = $gateway_message; } /** * Getter method for the gateway_reference attribute. * Transaction reference number from the payment gateway. * * @return ?string */ public function getGatewayReference(): ?string { return $this->_gateway_reference; } /** * Setter method for the gateway_reference attribute. * * @param string $gateway_reference * * @return void */ public function setGatewayReference(string $gateway_reference): void { $this->_gateway_reference = $gateway_reference; } /** * Getter method for the gateway_response_code attribute. * For declined transactions (`success=false`), this field lists the gateway error code. * * @return ?string */ public function getGatewayResponseCode(): ?string { return $this->_gateway_response_code; } /** * Setter method for the gateway_response_code attribute. * * @param string $gateway_response_code * * @return void */ public function setGatewayResponseCode(string $gateway_response_code): void { $this->_gateway_response_code = $gateway_response_code; } /** * Getter method for the gateway_response_time attribute. * Time, in seconds, for gateway to process the transaction. * * @return ?float */ public function getGatewayResponseTime(): ?float { return $this->_gateway_response_time; } /** * Setter method for the gateway_response_time attribute. * * @param float $gateway_response_time * * @return void */ public function setGatewayResponseTime(float $gateway_response_time): void { $this->_gateway_response_time = $gateway_response_time; } /** * Getter method for the gateway_response_values attribute. * The values in this field will vary from gateway to gateway. * * @return ?object */ public function getGatewayResponseValues(): ?object { return $this->_gateway_response_values; } /** * Setter method for the gateway_response_values attribute. * * @param object $gateway_response_values * * @return void */ public function setGatewayResponseValues(object $gateway_response_values): void { $this->_gateway_response_values = $gateway_response_values; } /** * Getter method for the id attribute. * Transaction ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the invoice attribute. * Invoice mini details * * @return ?\Recurly\Resources\InvoiceMini */ public function getInvoice(): ?\Recurly\Resources\InvoiceMini { return $this->_invoice; } /** * Setter method for the invoice attribute. * * @param \Recurly\Resources\InvoiceMini $invoice * * @return void */ public function setInvoice(\Recurly\Resources\InvoiceMini $invoice): void { $this->_invoice = $invoice; } /** * Getter method for the ip_address_country attribute. * Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. * * @return ?string */ public function getIpAddressCountry(): ?string { return $this->_ip_address_country; } /** * Setter method for the ip_address_country attribute. * * @param string $ip_address_country * * @return void */ public function setIpAddressCountry(string $ip_address_country): void { $this->_ip_address_country = $ip_address_country; } /** * Getter method for the ip_address_v4 attribute. * IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. * * @return ?string */ public function getIpAddressV4(): ?string { return $this->_ip_address_v4; } /** * Setter method for the ip_address_v4 attribute. * * @param string $ip_address_v4 * * @return void */ public function setIpAddressV4(string $ip_address_v4): void { $this->_ip_address_v4 = $ip_address_v4; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the origin attribute. * Describes how the transaction was triggered. * * @return ?string */ public function getOrigin(): ?string { return $this->_origin; } /** * Setter method for the origin attribute. * * @param string $origin * * @return void */ public function setOrigin(string $origin): void { $this->_origin = $origin; } /** * Getter method for the original_transaction_id attribute. * If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded. * * @return ?string */ public function getOriginalTransactionId(): ?string { return $this->_original_transaction_id; } /** * Setter method for the original_transaction_id attribute. * * @param string $original_transaction_id * * @return void */ public function setOriginalTransactionId(string $original_transaction_id): void { $this->_original_transaction_id = $original_transaction_id; } /** * Getter method for the payment_gateway attribute. * * * @return ?\Recurly\Resources\TransactionPaymentGateway */ public function getPaymentGateway(): ?\Recurly\Resources\TransactionPaymentGateway { return $this->_payment_gateway; } /** * Setter method for the payment_gateway attribute. * * @param \Recurly\Resources\TransactionPaymentGateway $payment_gateway * * @return void */ public function setPaymentGateway(\Recurly\Resources\TransactionPaymentGateway $payment_gateway): void { $this->_payment_gateway = $payment_gateway; } /** * Getter method for the payment_method attribute. * * * @return ?\Recurly\Resources\PaymentMethod */ public function getPaymentMethod(): ?\Recurly\Resources\PaymentMethod { return $this->_payment_method; } /** * Setter method for the payment_method attribute. * * @param \Recurly\Resources\PaymentMethod $payment_method * * @return void */ public function setPaymentMethod(\Recurly\Resources\PaymentMethod $payment_method): void { $this->_payment_method = $payment_method; } /** * Getter method for the refunded attribute. * Indicates if part or all of this transaction was refunded. * * @return ?bool */ public function getRefunded(): ?bool { return $this->_refunded; } /** * Setter method for the refunded attribute. * * @param bool $refunded * * @return void */ public function setRefunded(bool $refunded): void { $this->_refunded = $refunded; } /** * Getter method for the status attribute. * The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`. * * @return ?string */ public function getStatus(): ?string { return $this->_status; } /** * Setter method for the status attribute. * * @param string $status * * @return void */ public function setStatus(string $status): void { $this->_status = $status; } /** * Getter method for the status_code attribute. * Status code * * @return ?string */ public function getStatusCode(): ?string { return $this->_status_code; } /** * Setter method for the status_code attribute. * * @param string $status_code * * @return void */ public function setStatusCode(string $status_code): void { $this->_status_code = $status_code; } /** * Getter method for the status_message attribute. * For declined (`success=false`) transactions, the message displayed to the merchant. * * @return ?string */ public function getStatusMessage(): ?string { return $this->_status_message; } /** * Setter method for the status_message attribute. * * @param string $status_message * * @return void */ public function setStatusMessage(string $status_message): void { $this->_status_message = $status_message; } /** * Getter method for the subscription_ids attribute. * If the transaction is charging or refunding for one or more subscriptions, these are their IDs. * * @return array */ public function getSubscriptionIds(): array { return $this->_subscription_ids ?? [] ; } /** * Setter method for the subscription_ids attribute. * * @param array $subscription_ids * * @return void */ public function setSubscriptionIds(array $subscription_ids): void { $this->_subscription_ids = $subscription_ids; } /** * Getter method for the success attribute. * Did this transaction complete successfully? * * @return ?bool */ public function getSuccess(): ?bool { return $this->_success; } /** * Setter method for the success attribute. * * @param bool $success * * @return void */ public function setSuccess(bool $success): void { $this->_success = $success; } /** * Getter method for the type attribute. * - `authorization` – verifies billing information and places a hold on money in the customer's account. - `capture` – captures funds held by an authorization and completes a purchase. - `purchase` – combines the authorization and capture in one transaction. - `refund` – returns all or a portion of the money collected in a previous transaction to the customer. - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided. * * @return ?string */ public function getType(): ?string { return $this->_type; } /** * Setter method for the type attribute. * * @param string $type * * @return void */ public function setType(string $type): void { $this->_type = $type; } /** * Getter method for the updated_at attribute. * Updated at * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } /** * Getter method for the uuid attribute. * The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. * * @return ?string */ public function getUuid(): ?string { return $this->_uuid; } /** * Setter method for the uuid attribute. * * @param string $uuid * * @return void */ public function setUuid(string $uuid): void { $this->_uuid = $uuid; } + /** + * Getter method for the vat_number attribute. + * VAT number for the customer on this transaction. If the customer's Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info. + * + * @return ?string + */ + public function getVatNumber(): ?string + { + return $this->_vat_number; + } + + /** + * Setter method for the vat_number attribute. + * + * @param string $vat_number + * + * @return void + */ + public function setVatNumber(string $vat_number): void + { + $this->_vat_number = $vat_number; + } + /** * Getter method for the voided_at attribute. * Voided at * * @return ?string */ public function getVoidedAt(): ?string { return $this->_voided_at; } /** * Setter method for the voided_at attribute. * * @param string $voided_at * * @return void */ public function setVoidedAt(string $voided_at): void { $this->_voided_at = $voided_at; } /** * Getter method for the voided_by_invoice attribute. * Invoice mini details * * @return ?\Recurly\Resources\InvoiceMini */ public function getVoidedByInvoice(): ?\Recurly\Resources\InvoiceMini { return $this->_voided_by_invoice; } /** * Setter method for the voided_by_invoice attribute. * * @param \Recurly\Resources\InvoiceMini $voided_by_invoice * * @return void */ public function setVoidedByInvoice(\Recurly\Resources\InvoiceMini $voided_by_invoice): void { $this->_voided_by_invoice = $voided_by_invoice; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index f649648..0e0dbda 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -22531,1024 +22531,1031 @@ components: title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. minimum: 1 renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" ramp_intervals: type: array title: Ramp Intervals description: The new set of ramp intervals for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampInterval" required: - plan_code SubscriptionUpdate: type: object properties: collection_method: title: Change collection method "$ref": "#/components/schemas/CollectionMethodEnum" custom_fields: "$ref": "#/components/schemas/CustomFields" remaining_billing_cycles: type: integer title: Remaining billing cycles description: The remaining billing cycles in the current term. renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. next_bill_date: type: string format: date-time title: Next bill date description: If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. For a subscription in a trial period, this will change when the trial expires. This parameter is useful for postponement of a subscription to change its billing date without proration. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals. customer_notes: type: string title: Customer notes description: Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Terms that the subscription is due on description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" gateway_code: type: string title: Gateway Code description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true shipping: "$ref": "#/components/schemas/SubscriptionShippingUpdate" billing_info_id: type: string title: Billing Info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. SubscriptionPause: type: object properties: remaining_pause_cycles: type: integer title: Remaining pause cycles description: Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription. required: - remaining_pause_cycles SubscriptionShipping: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddress" method: "$ref": "#/components/schemas/ShippingMethodMini" amount: type: number format: float title: Subscription's shipping cost SubscriptionShippingCreate: type: object title: Subscription shipping details properties: address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If `address_id` and `address` are both present, `address` will be used. maxLength: 13 method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionShippingUpdate: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping Address ID description: Assign a shipping address from the account's existing shipping addresses. maxLength: 13 SubscriptionShippingPurchase: type: object title: Subscription shipping details properties: method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionRampInterval: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. default: 1 unit_amount: type: integer description: Represents the price for the ramp interval. SubscriptionRampIntervalResponse: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. remaining_billing_cycles: type: integer description: Represents how many billing cycles are left in a ramp interval. starting_on: type: string format: date-time title: Date the ramp interval starts ending_on: type: string format: date-time title: Date the ramp interval ends unit_amount: type: number format: float title: Unit price description: Represents the price for the ramp interval. TaxInfo: type: object title: Tax info properties: type: type: string title: Type description: Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled. region: type: string title: Region description: Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled. rate: type: number format: float title: Rate description: The combined tax rate. Not present when Avalara for Communications is enabled. tax_details: type: array description: Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled. items: "$ref": "#/components/schemas/TaxDetail" TaxDetail: type: object title: Tax detail properties: type: type: string title: Type description: Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. region: type: string title: Region description: Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled. rate: type: number format: float title: Rate description: Provides the tax rate for the region. tax: type: number format: float title: Tax description: The total tax applied for this tax type. name: type: string title: Name description: Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled. level: type: string title: Level description: Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled. billable: type: boolean title: Billable description: Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled. Transaction: type: object properties: id: type: string title: Transaction ID maxLength: 13 object: type: string title: Object type uuid: type: string title: Recurly UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 original_transaction_id: type: string title: Original Transaction ID description: If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded. maxLength: 13 account: "$ref": "#/components/schemas/AccountMini" invoice: "$ref": "#/components/schemas/InvoiceMini" voided_by_invoice: "$ref": "#/components/schemas/InvoiceMini" subscription_ids: type: array title: Subscription IDs description: If the transaction is charging or refunding for one or more subscriptions, these are their IDs. items: type: string title: Subscription ID maxLength: 13 type: title: Transaction type description: | - `authorization` – verifies billing information and places a hold on money in the customer's account. - `capture` – captures funds held by an authorization and completes a purchase. - `purchase` – combines the authorization and capture in one transaction. - `refund` – returns all or a portion of the money collected in a previous transaction to the customer. - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided. "$ref": "#/components/schemas/TransactionTypeEnum" origin: title: Origin of transaction description: Describes how the transaction was triggered. "$ref": "#/components/schemas/TransactionOriginEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: Total transaction amount sent to the payment gateway. status: title: Transaction status description: The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`. "$ref": "#/components/schemas/TransactionStatusEnum" success: type: boolean title: Success? description: Did this transaction complete successfully? backup_payment_method_used: type: boolean title: Backup Payment Method Used? description: Indicates if the transaction was completed using a backup payment refunded: type: boolean title: Refunded? description: Indicates if part or all of this transaction was refunded. billing_address: "$ref": "#/components/schemas/AddressWithName" collection_method: description: The method by which the payment was collected. "$ref": "#/components/schemas/CollectionMethodEnum" payment_method: "$ref": "#/components/schemas/PaymentMethod" ip_address_v4: type: string title: IP address description: | IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. ip_address_country: type: string title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. status_code: type: string title: Status code status_message: type: string title: Status message description: For declined (`success=false`) transactions, the message displayed to the merchant. customer_message: type: string title: Customer message description: For declined (`success=false`) transactions, the message displayed to the customer. customer_message_locale: type: string title: Language code for the message payment_gateway: type: object x-class-name: TransactionPaymentGateway properties: id: type: string object: type: string title: Object type type: type: string name: type: string gateway_message: type: string title: Gateway message description: Transaction message from the payment gateway. gateway_reference: type: string title: Gateway reference description: Transaction reference number from the payment gateway. gateway_approval_code: type: string title: Transaction approval code from the payment gateway. gateway_response_code: type: string title: For declined transactions (`success=false`), this field lists the gateway error code. gateway_response_time: type: number format: float title: Gateway response time description: Time, in seconds, for gateway to process the transaction. gateway_response_values: type: object title: Gateway response values description: The values in this field will vary from gateway to gateway. cvv_check: title: CVV check description: When processed, result from checking the CVV/CVC value on the transaction. "$ref": "#/components/schemas/CvvCheckEnum" avs_check: title: AVS check description: When processed, result from checking the overall AVS on the transaction. "$ref": "#/components/schemas/AvsCheckEnum" created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Updated at voided_at: type: string format: date-time title: Voided at collected_at: type: string format: date-time title: Collected at, or if not collected yet, the time the transaction was created. action_result: type: object description: Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. title: Action result + vat_number: + type: string + description: VAT number for the customer on this transaction. If the customer's + Billing Info country is BR or AR, then this will be their Tax Identifier. + For all other countries this will come from the VAT Number field in the + Billing Info. + title: VAT Number ExternalTransaction: type: object properties: payment_method: type: string title: Payment Method description: Payment method used for external transaction. "$ref": "#/components/schemas/ExternalPaymentMethodEnum" description: type: string title: Description description: Used as the transaction's description. maxLength: 50 amount: type: number format: float title: Amount description: The total amount of the transcaction. Cannot excceed the invoice total. collected_at: type: string format: date-time title: Collected At description: Datetime that the external payment was collected. Defaults to current datetime. UniqueCouponCode: type: object description: A unique coupon code for a bulk coupon. properties: id: type: string title: Unique Coupon Code ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. state: title: State description: Indicates if the unique coupon code is redeemable or why not. "$ref": "#/components/schemas/CouponCodeStateEnum" bulk_coupon_id: type: string title: Bulk Coupon ID description: The Coupon ID of the parent Bulk Coupon readOnly: true bulk_coupon_code: type: string title: Bulk Coupon code description: The Coupon code of the parent Bulk Coupon created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Updated at format: date-time readOnly: true redeemed_at: type: string title: Redeemed at description: The date and time the unique coupon code was redeemed. format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time UniqueCouponCodeList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/UniqueCouponCode" UniqueCouponCodeParams: type: object description: Parameters to be passed to the `list_unique_coupon_codes` endpoint to obtain the newly generated codes. properties: limit: type: integer title: The number of UniqueCouponCodes that will be generated order: type: string title: Sort order to list newly generated UniqueCouponCodes (should always be `asc`) sort: type: string title: Sort field to list newly generated UniqueCouponCodes (should always be `created_at`) begin_time: type: string title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time Usage: type: object properties: id: type: string object: type: string title: Object type merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). usage_type: "$ref": "#/components/schemas/UsageTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" description: The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 @@ -24827,689 +24834,690 @@ components: enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never NetTermsTypeEnum: type: string title: Net Terms Type description: | Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month. This field is only available when the EOM Net Terms feature is enabled. enum: - net - eom default: net InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - bacs - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - external_recovery - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - bacs - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero - boleto CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum: - ach_cancel - ach_chargeback - ach_credit_return - ach_exception - ach_return - ach_transactions_not_supported - ach_validation_exception - amazon_amount_exceeded - amazon_declined_review - amazon_invalid_authorization_status - amazon_invalid_close_attempt - amazon_invalid_create_order_reference - amazon_invalid_order_status - amazon_not_authorized - amazon_order_not_modifiable - amazon_transaction_count_exceeded - api_error - approved - approved_fraud_review - authorization_already_captured - authorization_amount_depleted - authorization_expired - batch_processing_error - billing_agreement_already_accepted - billing_agreement_not_accepted - billing_agreement_not_found - billing_agreement_replaced - call_issuer - call_issuer_update_cardholder_data - cancelled - cannot_refund_unsettled_transactions - card_not_activated - card_type_not_accepted - cardholder_requested_stop - contact_gateway - contract_not_found - currency_not_supported - customer_canceled_transaction - cvv_required - declined - declined_card_number - declined_exception - declined_expiration_date - declined_missing_data - declined_saveable - declined_security_code - deposit_referenced_chargeback - direct_debit_type_not_accepted - duplicate_transaction - exceeds_daily_limit - exceeds_max_amount - expired_card - finbot_disconnect - finbot_unavailable - fraud_address - fraud_address_recurly - fraud_advanced_verification - fraud_gateway - fraud_generic - fraud_ip_address - fraud_manual_decision - fraud_risk_check - fraud_security_code - fraud_stolen_card - fraud_too_many_attempts - fraud_velocity - gateway_account_setup_incomplete - gateway_error - gateway_rate_limited - gateway_timeout - gateway_token_not_found - gateway_unavailable - gateway_validation_exception - insufficient_funds - invalid_account_number - invalid_amount - invalid_billing_agreement_status - invalid_card_number - invalid_data - invalid_email - invalid_gateway_access_token - invalid_gateway_configuration - invalid_issuer - invalid_login - invalid_merchant_type - invalid_name - invalid_payment_method - invalid_payment_method_hard - invalid_transaction - issuer_unavailable + - lifecycle_decline - merch_max_transaction_limit_exceeded - moneybot_disconnect - moneybot_unavailable - no_billing_information - no_gateway - no_gateway_found_for_transaction_amount - partial_approval - partial_credits_not_supported - payer_authentication_rejected - payment_cannot_void_authorization - payment_not_accepted - paypal_account_issue - paypal_cannot_pay_self - paypal_declined_use_alternate - paypal_expired_reference_id - paypal_hard_decline - paypal_invalid_billing_agreement - paypal_primary_declined - processor_not_available - processor_unavailable - recurly_credentials_not_found - recurly_error - recurly_failed_to_get_token - recurly_token_mismatch - recurly_token_not_found - reference_transactions_not_enabled - restricted_card - restricted_card_chargeback - rjs_token_expired - roku_invalid_card_number - roku_invalid_cib - roku_invalid_payment_method - roku_zip_code_mismatch - simultaneous - ssl_error - temporary_hold - three_d_secure_action_required - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error - three_d_secure_credential_error - three_d_secure_not_supported - too_busy - too_many_attempts - total_credit_exceeds_capture - transaction_already_refunded - transaction_already_voided - transaction_cannot_be_authorized - transaction_cannot_be_refunded - transaction_cannot_be_refunded_currently - transaction_cannot_be_voided - transaction_failed_to_settle - transaction_not_found - transaction_service_v2_disconnect - transaction_service_v2_unavailable - transaction_settled - transaction_stale_at_gateway - try_again - unknown - unmapped_partner_error - vaultly_service_unavailable - zero_dollar_auth_not_supported DeclineCodeEnum: type: string enum: - account_closed - call_issuer - card_not_activated - card_not_supported - cardholder_requested_stop - do_not_honor - do_not_try_again - exceeds_daily_limit - generic_decline - expired_card - fraudulent - insufficient_funds - incorrect_address - incorrect_security_code - invalid_amount - invalid_number - invalid_transaction - issuer_unavailable - lifecycle_decline - lost_card - pickup_card - policy_decline - restricted_card - restricted_card_chargeback - security_decline - stolen_card - try_again - update_cardholder_data - requires_3d_secure ExportDates: type: object properties: object: type: string title: Object type readOnly: true dates: type: array items: type: string title: An array of dates that have available exports. ExportFiles: type: object properties: object: type: string title: Object type readOnly: true files: type: array items: "$ref": "#/components/schemas/ExportFile" ExportFile: type: object properties: name: type: string title: Filename description: Name of the export file. md5sum: type: string title: MD5 hash of the export file description: MD5 hash of the export file. href: type: string title: A link to the export file description: A presigned link to download the export file. TaxIdentifierTypeEnum: type: string enum: - cpf - cnpj - cuit DunningCycleTypeEnum: type: string description: The type of invoice this cycle applies to. enum: - automatic - manual - trial AchTypeEnum: type: string description: The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values. enum: - bacs - becs AchAccountTypeEnum: type: string description: The bank account type. (ACH only) enum: - checking - savings ExternalHppTypeEnum: type: string description: Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - adyen OnlineBankingPaymentTypeEnum: type: string description: Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - ideal - sofort ExternalInvoiceStateEnum: type: string enum: - paid
recurly/recurly-client-php
77b7aab80ae94b206acbd1c06a153d9894754f4b
4.40.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e322cc3..21ebe9d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.39.0 +current_version = 4.40.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index c826b07..0ad4317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,478 +1,489 @@ # Changelog +## [4.40.0](https://github.com/recurly/recurly-client-php/tree/4.40.0) (2023-08-10) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.39.0...4.40.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (action_result) [#781](https://github.com/recurly/recurly-client-php/pull/781) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.39.0](https://github.com/recurly/recurly-client-php/tree/4.39.0) (2023-07-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.37.0...4.39.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Ramp Dates, Net Terms, Invoice Business Entity) [#779](https://github.com/recurly/recurly-client-php/pull/779) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (App Management - External Subscriptions) [#777](https://github.com/recurly/recurly-client-php/pull/777) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.37.0](https://github.com/recurly/recurly-client-php/tree/4.37.0) (2023-06-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.36.0...4.37.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Multiple Business Entities) [#769](https://github.com/recurly/recurly-client-php/pull/769) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 7f3fcf2..562629e 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.39.0", + "version": "4.40.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index f240394..890f89c 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.39.0'; + public const CURRENT = '4.40.0'; }
recurly/recurly-client-php
091806eb6ac55544b3e6964eec3d62f2a1dff8b6
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/gateway_attributes.php b/lib/recurly/resources/gateway_attributes.php index ed61070..eeed8b6 100644 --- a/lib/recurly/resources/gateway_attributes.php +++ b/lib/recurly/resources/gateway_attributes.php @@ -1,43 +1,43 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class GatewayAttributes extends RecurlyResource { private $_account_reference; protected static $array_hints = [ ]; /** * Getter method for the account_reference attribute. - * Used by Adyen gateways. The Shopper Reference value used when the external token was created. + * Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response. * * @return ?string */ public function getAccountReference(): ?string { return $this->_account_reference; } /** * Setter method for the account_reference attribute. * * @param string $account_reference * * @return void */ public function setAccountReference(string $account_reference): void { $this->_account_reference = $account_reference; } } \ No newline at end of file diff --git a/lib/recurly/resources/subscription.php b/lib/recurly/resources/subscription.php index a3c4bf5..e203593 100644 --- a/lib/recurly/resources/subscription.php +++ b/lib/recurly/resources/subscription.php @@ -1,610 +1,634 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class Subscription extends RecurlyResource { private $_account; + private $_action_result; private $_activated_at; private $_active_invoice_id; private $_add_ons; private $_add_ons_total; private $_auto_renew; private $_bank_account_authorized_at; private $_billing_info_id; private $_canceled_at; private $_collection_method; private $_converted_at; private $_coupon_redemptions; private $_created_at; private $_currency; private $_current_period_ends_at; private $_current_period_started_at; private $_current_term_ends_at; private $_current_term_started_at; private $_custom_fields; private $_customer_notes; private $_expiration_reason; private $_expires_at; private $_gateway_code; private $_id; private $_net_terms; private $_net_terms_type; private $_object; private $_paused_at; private $_pending_change; private $_plan; private $_po_number; private $_quantity; private $_ramp_intervals; private $_remaining_billing_cycles; private $_remaining_pause_cycles; private $_renewal_billing_cycles; private $_revenue_schedule_type; private $_shipping; private $_started_with_gift; private $_state; private $_subtotal; private $_tax; private $_tax_inclusive; private $_tax_info; private $_terms_and_conditions; private $_total; private $_total_billing_cycles; private $_trial_ends_at; private $_trial_started_at; private $_unit_amount; private $_updated_at; private $_uuid; protected static $array_hints = [ 'setAddOns' => '\Recurly\Resources\SubscriptionAddOn', 'setCouponRedemptions' => '\Recurly\Resources\CouponRedemptionMini', 'setCustomFields' => '\Recurly\Resources\CustomField', 'setRampIntervals' => '\Recurly\Resources\SubscriptionRampIntervalResponse', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } + /** + * Getter method for the action_result attribute. + * Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. + * + * @return ?object + */ + public function getActionResult(): ?object + { + return $this->_action_result; + } + + /** + * Setter method for the action_result attribute. + * + * @param object $action_result + * + * @return void + */ + public function setActionResult(object $action_result): void + { + $this->_action_result = $action_result; + } + /** * Getter method for the activated_at attribute. * Activated at * * @return ?string */ public function getActivatedAt(): ?string { return $this->_activated_at; } /** * Setter method for the activated_at attribute. * * @param string $activated_at * * @return void */ public function setActivatedAt(string $activated_at): void { $this->_activated_at = $activated_at; } /** * Getter method for the active_invoice_id attribute. * The invoice ID of the latest invoice created for an active subscription. * * @return ?string */ public function getActiveInvoiceId(): ?string { return $this->_active_invoice_id; } /** * Setter method for the active_invoice_id attribute. * * @param string $active_invoice_id * * @return void */ public function setActiveInvoiceId(string $active_invoice_id): void { $this->_active_invoice_id = $active_invoice_id; } /** * Getter method for the add_ons attribute. * Add-ons * * @return array */ public function getAddOns(): array { return $this->_add_ons ?? [] ; } /** * Setter method for the add_ons attribute. * * @param array $add_ons * * @return void */ public function setAddOns(array $add_ons): void { $this->_add_ons = $add_ons; } /** * Getter method for the add_ons_total attribute. * Total price of add-ons * * @return ?float */ public function getAddOnsTotal(): ?float { return $this->_add_ons_total; } /** * Setter method for the add_ons_total attribute. * * @param float $add_ons_total * * @return void */ public function setAddOnsTotal(float $add_ons_total): void { $this->_add_ons_total = $add_ons_total; } /** * Getter method for the auto_renew attribute. * Whether the subscription renews at the end of its term. * * @return ?bool */ public function getAutoRenew(): ?bool { return $this->_auto_renew; } /** * Setter method for the auto_renew attribute. * * @param bool $auto_renew * * @return void */ public function setAutoRenew(bool $auto_renew): void { $this->_auto_renew = $auto_renew; } /** * Getter method for the bank_account_authorized_at attribute. * Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared. * * @return ?string */ public function getBankAccountAuthorizedAt(): ?string { return $this->_bank_account_authorized_at; } /** * Setter method for the bank_account_authorized_at attribute. * * @param string $bank_account_authorized_at * * @return void */ public function setBankAccountAuthorizedAt(string $bank_account_authorized_at): void { $this->_bank_account_authorized_at = $bank_account_authorized_at; } /** * Getter method for the billing_info_id attribute. * Billing Info ID. * * @return ?string */ public function getBillingInfoId(): ?string { return $this->_billing_info_id; } /** * Setter method for the billing_info_id attribute. * * @param string $billing_info_id * * @return void */ public function setBillingInfoId(string $billing_info_id): void { $this->_billing_info_id = $billing_info_id; } /** * Getter method for the canceled_at attribute. * Canceled at * * @return ?string */ public function getCanceledAt(): ?string { return $this->_canceled_at; } /** * Setter method for the canceled_at attribute. * * @param string $canceled_at * * @return void */ public function setCanceledAt(string $canceled_at): void { $this->_canceled_at = $canceled_at; } /** * Getter method for the collection_method attribute. * Collection method * * @return ?string */ public function getCollectionMethod(): ?string { return $this->_collection_method; } /** * Setter method for the collection_method attribute. * * @param string $collection_method * * @return void */ public function setCollectionMethod(string $collection_method): void { $this->_collection_method = $collection_method; } /** * Getter method for the converted_at attribute. * When the subscription was converted from a gift card. * * @return ?string */ public function getConvertedAt(): ?string { return $this->_converted_at; } /** * Setter method for the converted_at attribute. * * @param string $converted_at * * @return void */ public function setConvertedAt(string $converted_at): void { $this->_converted_at = $converted_at; } /** * Getter method for the coupon_redemptions attribute. * Returns subscription level coupon redemptions that are tied to this subscription. * * @return array */ public function getCouponRedemptions(): array { return $this->_coupon_redemptions ?? [] ; } /** * Setter method for the coupon_redemptions attribute. * * @param array $coupon_redemptions * * @return void */ public function setCouponRedemptions(array $coupon_redemptions): void { $this->_coupon_redemptions = $coupon_redemptions; } /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the current_period_ends_at attribute. * Current billing period ends at * * @return ?string */ public function getCurrentPeriodEndsAt(): ?string { return $this->_current_period_ends_at; } /** * Setter method for the current_period_ends_at attribute. * * @param string $current_period_ends_at * * @return void */ public function setCurrentPeriodEndsAt(string $current_period_ends_at): void { $this->_current_period_ends_at = $current_period_ends_at; } /** * Getter method for the current_period_started_at attribute. * Current billing period started at * * @return ?string */ public function getCurrentPeriodStartedAt(): ?string { return $this->_current_period_started_at; } /** * Setter method for the current_period_started_at attribute. * * @param string $current_period_started_at * * @return void */ public function setCurrentPeriodStartedAt(string $current_period_started_at): void { $this->_current_period_started_at = $current_period_started_at; } /** * Getter method for the current_term_ends_at attribute. * When the term ends. This is calculated by a plan's interval and `total_billing_cycles` in a term. Subscription changes with a `timeframe=renewal` will be applied on this date. * * @return ?string */ public function getCurrentTermEndsAt(): ?string { return $this->_current_term_ends_at; } /** * Setter method for the current_term_ends_at attribute. * * @param string $current_term_ends_at * * @return void */ public function setCurrentTermEndsAt(string $current_term_ends_at): void { $this->_current_term_ends_at = $current_term_ends_at; } /** * Getter method for the current_term_started_at attribute. * The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods. * * @return ?string */ public function getCurrentTermStartedAt(): ?string { return $this->_current_term_started_at; } /** * Setter method for the current_term_started_at attribute. * * @param string $current_term_started_at * * @return void */ public function setCurrentTermStartedAt(string $current_term_started_at): void { $this->_current_term_started_at = $current_term_started_at; } /** * 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 */ public function getCustomFields(): array { return $this->_custom_fields ?? [] ; } /** * Setter method for the custom_fields attribute. * * @param array $custom_fields * * @return void */ public function setCustomFields(array $custom_fields): void { $this->_custom_fields = $custom_fields; } /** * Getter method for the customer_notes attribute. * Customer notes * * @return ?string */ public function getCustomerNotes(): ?string { return $this->_customer_notes; } /** * Setter method for the customer_notes attribute. * * @param string $customer_notes * * @return void */ public function setCustomerNotes(string $customer_notes): void { $this->_customer_notes = $customer_notes; } /** * Getter method for the expiration_reason attribute. * Expiration reason * * @return ?string */ public function getExpirationReason(): ?string { return $this->_expiration_reason; } /** * Setter method for the expiration_reason attribute. * * @param string $expiration_reason * * @return void */ public function setExpirationReason(string $expiration_reason): void { $this->_expiration_reason = $expiration_reason; } /** * Getter method for the expires_at attribute. * Expires at * * @return ?string */ public function getExpiresAt(): ?string { return $this->_expires_at; } /** * Setter method for the expires_at attribute. * * @param string $expires_at * * @return void */ public function setExpiresAt(string $expires_at): void { $this->_expires_at = $expires_at; } /** * Getter method for the gateway_code attribute. * If present, this subscription's transactions will use the payment gateway with this code. * * @return ?string */ public function getGatewayCode(): ?string { return $this->_gateway_code; } /** * Setter method for the gateway_code attribute. * * @param string $gateway_code * * @return void */ public function setGatewayCode(string $gateway_code): void { $this->_gateway_code = $gateway_code; } /** * Getter method for the id attribute. * Subscription ID * * @return ?string */ diff --git a/lib/recurly/resources/transaction.php b/lib/recurly/resources/transaction.php index cf1c2e3..fc877c5 100644 --- a/lib/recurly/resources/transaction.php +++ b/lib/recurly/resources/transaction.php @@ -1,593 +1,617 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class Transaction extends RecurlyResource { private $_account; + private $_action_result; private $_amount; private $_avs_check; private $_backup_payment_method_used; private $_billing_address; private $_collected_at; private $_collection_method; private $_created_at; private $_currency; private $_customer_message; private $_customer_message_locale; private $_cvv_check; private $_gateway_approval_code; private $_gateway_message; private $_gateway_reference; private $_gateway_response_code; private $_gateway_response_time; private $_gateway_response_values; private $_id; private $_invoice; private $_ip_address_country; private $_ip_address_v4; private $_object; private $_origin; private $_original_transaction_id; private $_payment_gateway; private $_payment_method; private $_refunded; private $_status; private $_status_code; private $_status_message; private $_subscription_ids; private $_success; private $_type; private $_updated_at; private $_uuid; private $_voided_at; private $_voided_by_invoice; protected static $array_hints = [ 'setSubscriptionIds' => 'string', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } + /** + * Getter method for the action_result attribute. + * Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort. + * + * @return ?object + */ + public function getActionResult(): ?object + { + return $this->_action_result; + } + + /** + * Setter method for the action_result attribute. + * + * @param object $action_result + * + * @return void + */ + public function setActionResult(object $action_result): void + { + $this->_action_result = $action_result; + } + /** * Getter method for the amount attribute. * Total transaction amount sent to the payment gateway. * * @return ?float */ public function getAmount(): ?float { return $this->_amount; } /** * Setter method for the amount attribute. * * @param float $amount * * @return void */ public function setAmount(float $amount): void { $this->_amount = $amount; } /** * Getter method for the avs_check attribute. * When processed, result from checking the overall AVS on the transaction. * * @return ?string */ public function getAvsCheck(): ?string { return $this->_avs_check; } /** * Setter method for the avs_check attribute. * * @param string $avs_check * * @return void */ public function setAvsCheck(string $avs_check): void { $this->_avs_check = $avs_check; } /** * Getter method for the backup_payment_method_used attribute. * Indicates if the transaction was completed using a backup payment * * @return ?bool */ public function getBackupPaymentMethodUsed(): ?bool { return $this->_backup_payment_method_used; } /** * Setter method for the backup_payment_method_used attribute. * * @param bool $backup_payment_method_used * * @return void */ public function setBackupPaymentMethodUsed(bool $backup_payment_method_used): void { $this->_backup_payment_method_used = $backup_payment_method_used; } /** * Getter method for the billing_address attribute. * * * @return ?\Recurly\Resources\AddressWithName */ public function getBillingAddress(): ?\Recurly\Resources\AddressWithName { return $this->_billing_address; } /** * Setter method for the billing_address attribute. * * @param \Recurly\Resources\AddressWithName $billing_address * * @return void */ public function setBillingAddress(\Recurly\Resources\AddressWithName $billing_address): void { $this->_billing_address = $billing_address; } /** * Getter method for the collected_at attribute. * Collected at, or if not collected yet, the time the transaction was created. * * @return ?string */ public function getCollectedAt(): ?string { return $this->_collected_at; } /** * Setter method for the collected_at attribute. * * @param string $collected_at * * @return void */ public function setCollectedAt(string $collected_at): void { $this->_collected_at = $collected_at; } /** * Getter method for the collection_method attribute. * The method by which the payment was collected. * * @return ?string */ public function getCollectionMethod(): ?string { return $this->_collection_method; } /** * Setter method for the collection_method attribute. * * @param string $collection_method * * @return void */ public function setCollectionMethod(string $collection_method): void { $this->_collection_method = $collection_method; } /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the customer_message attribute. * For declined (`success=false`) transactions, the message displayed to the customer. * * @return ?string */ public function getCustomerMessage(): ?string { return $this->_customer_message; } /** * Setter method for the customer_message attribute. * * @param string $customer_message * * @return void */ public function setCustomerMessage(string $customer_message): void { $this->_customer_message = $customer_message; } /** * Getter method for the customer_message_locale attribute. * Language code for the message * * @return ?string */ public function getCustomerMessageLocale(): ?string { return $this->_customer_message_locale; } /** * Setter method for the customer_message_locale attribute. * * @param string $customer_message_locale * * @return void */ public function setCustomerMessageLocale(string $customer_message_locale): void { $this->_customer_message_locale = $customer_message_locale; } /** * Getter method for the cvv_check attribute. * When processed, result from checking the CVV/CVC value on the transaction. * * @return ?string */ public function getCvvCheck(): ?string { return $this->_cvv_check; } /** * Setter method for the cvv_check attribute. * * @param string $cvv_check * * @return void */ public function setCvvCheck(string $cvv_check): void { $this->_cvv_check = $cvv_check; } /** * Getter method for the gateway_approval_code attribute. * Transaction approval code from the payment gateway. * * @return ?string */ public function getGatewayApprovalCode(): ?string { return $this->_gateway_approval_code; } /** * Setter method for the gateway_approval_code attribute. * * @param string $gateway_approval_code * * @return void */ public function setGatewayApprovalCode(string $gateway_approval_code): void { $this->_gateway_approval_code = $gateway_approval_code; } /** * Getter method for the gateway_message attribute. * Transaction message from the payment gateway. * * @return ?string */ public function getGatewayMessage(): ?string { return $this->_gateway_message; } /** * Setter method for the gateway_message attribute. * * @param string $gateway_message * * @return void */ public function setGatewayMessage(string $gateway_message): void { $this->_gateway_message = $gateway_message; } /** * Getter method for the gateway_reference attribute. * Transaction reference number from the payment gateway. * * @return ?string */ public function getGatewayReference(): ?string { return $this->_gateway_reference; } /** * Setter method for the gateway_reference attribute. * * @param string $gateway_reference * * @return void */ public function setGatewayReference(string $gateway_reference): void { $this->_gateway_reference = $gateway_reference; } /** * Getter method for the gateway_response_code attribute. * For declined transactions (`success=false`), this field lists the gateway error code. * * @return ?string */ public function getGatewayResponseCode(): ?string { return $this->_gateway_response_code; } /** * Setter method for the gateway_response_code attribute. * * @param string $gateway_response_code * * @return void */ public function setGatewayResponseCode(string $gateway_response_code): void { $this->_gateway_response_code = $gateway_response_code; } /** * Getter method for the gateway_response_time attribute. * Time, in seconds, for gateway to process the transaction. * * @return ?float */ public function getGatewayResponseTime(): ?float { return $this->_gateway_response_time; } /** * Setter method for the gateway_response_time attribute. * * @param float $gateway_response_time * * @return void */ public function setGatewayResponseTime(float $gateway_response_time): void { $this->_gateway_response_time = $gateway_response_time; } /** * Getter method for the gateway_response_values attribute. * The values in this field will vary from gateway to gateway. * * @return ?object */ public function getGatewayResponseValues(): ?object { return $this->_gateway_response_values; } /** * Setter method for the gateway_response_values attribute. * * @param object $gateway_response_values * * @return void */ public function setGatewayResponseValues(object $gateway_response_values): void { $this->_gateway_response_values = $gateway_response_values; } /** * Getter method for the id attribute. * Transaction ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the invoice attribute. * Invoice mini details * * @return ?\Recurly\Resources\InvoiceMini */ public function getInvoice(): ?\Recurly\Resources\InvoiceMini { return $this->_invoice; } /** * Setter method for the invoice attribute. * * @param \Recurly\Resources\InvoiceMini $invoice * * @return void */ public function setInvoice(\Recurly\Resources\InvoiceMini $invoice): void { $this->_invoice = $invoice; } /** * Getter method for the ip_address_country attribute. * Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. * * @return ?string */ public function getIpAddressCountry(): ?string { return $this->_ip_address_country; } /** * Setter method for the ip_address_country attribute. * * @param string $ip_address_country * * @return void */ public function setIpAddressCountry(string $ip_address_country): void { $this->_ip_address_country = $ip_address_country; } /** * Getter method for the ip_address_v4 attribute. * IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. * * @return ?string */ public function getIpAddressV4(): ?string { return $this->_ip_address_v4; } /** * Setter method for the ip_address_v4 attribute. * * @param string $ip_address_v4 * * @return void */ public function setIpAddressV4(string $ip_address_v4): void { $this->_ip_address_v4 = $ip_address_v4; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** diff --git a/openapi/api.yaml b/openapi/api.yaml index 4c7ca56..f649648 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -17695,1027 +17695,1028 @@ components: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 item: "$ref": "#/components/schemas/ItemMini" readOnly: true tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" percentage_tiers: type: array title: Percentage Tiers description: This feature is currently in development and requires approval and enablement, please contact support. items: "$ref": "#/components/schemas/PercentageTiersByCurrency" external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 readOnly: true created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true required: - code - name AddOnCreate: type: object title: Add-on description: Full add-on details. properties: item_code: type: string title: Item Code description: Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used. maxLength: 13 code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeCreateEnum" usage_type: "$ref": "#/components/schemas/UsageTypeCreateEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. plan_id: type: string title: Plan ID maxLength: 13 readOnly: true accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent. maxLength: 50 currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeCreateEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. required: - code - name AddOnUpdate: type: object title: Add-on description: Full add-on details. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent. maxLength: 255 usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then currencies must be absent. Must also be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. BillingInfo: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string maxLength: 13 readOnly: true first_name: type: string maxLength: 50 last_name: type: string maxLength: 50 company: type: string maxLength: 100 address: "$ref": "#/components/schemas/Address" vat_number: type: string description: Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices. valid: type: boolean readOnly: true payment_method: "$ref": "#/components/schemas/PaymentMethod" fraud: type: object x-class-name: FraudInfo title: Fraud information description: Most recent fraud result. readOnly: true properties: score: type: integer title: Kount score minimum: 1 maximum: 99 decision: title: Kount decision maxLength: 10 "$ref": "#/components/schemas/KountDecisionEnum" risk_rules_triggered: type: object title: Kount rules primary_payment_method: type: boolean description: The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used backup_payment_method: type: boolean description: The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. created_at: type: string format: date-time description: When the billing information was created. readOnly: true updated_at: type: string format: date-time description: When the billing information was last changed. readOnly: true updated_by: type: object x-class-name: BillingInfoUpdatedBy readOnly: true properties: ip: type: string description: Customer's IP address when updating their billing information. maxLength: 20 country: type: string description: Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly. maxLength: 2 BillingInfoCreate: type: object properties: token_id: type: string title: Token ID description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token). maxLength: 22 first_name: type: string title: First name maxLength: 50 last_name: type: string title: Last name maxLength: 50 company: type: string title: Company name maxLength: 100 address: "$ref": "#/components/schemas/Address" number: type: string title: Credit card number description: Credit card number, spaces and dashes are accepted. month: type: string title: Expiration month maxLength: 2 year: type: string title: Expiration year maxLength: 4 cvv: type: string title: Security code or CVV description: "*STRONGLY RECOMMENDED*" maxLength: 4 currency: type: string description: 3-letter ISO 4217 currency code. vat_number: type: string title: VAT number ip_address: type: string title: IP address description: "*STRONGLY RECOMMENDED* Customer's IP address when updating their billing information." maxLength: 20 gateway_token: type: string title: A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`. maxLength: 50 gateway_code: type: string title: An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. maxLength: 12 gateway_attributes: type: object description: Additional attributes to send to the gateway. x-class-name: GatewayAttributes properties: account_reference: type: string - description: Used by Adyen gateways. The Shopper Reference value used - when the external token was created. Must be used in conjunction with - gateway_token and gateway_code. + description: Used by Adyen and Braintree gateways. For Adyen the Shopper + Reference value used when the external token was created. Must be + used in conjunction with gateway_token and gateway_code. For Braintree + the PayPal PayerID is populated in the response. maxLength: 264 amazon_billing_agreement_id: type: string title: Amazon billing agreement ID paypal_billing_agreement_id: type: string title: PayPal billing agreement ID fraud_session_id: type: string title: Fraud Session ID transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 iban: type: string maxLength: 34 description: The International Bank Account Number, up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, and potential routing information name_on_account: type: string maxLength: 255 description: The name associated with the bank account (ACH, SEPA, Bacs only) account_number: type: string maxLength: 255 description: The bank account number. (ACH, Bacs only) routing_number: type: string maxLength: 15 description: The bank's rounting number. (ACH only) sort_code: type: string maxLength: 15 description: Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only) type: "$ref": "#/components/schemas/AchTypeEnum" account_type: "$ref": "#/components/schemas/AchAccountTypeEnum" tax_identifier: type: string description: Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively. tax_identifier_type: description: This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina. "$ref": "#/components/schemas/TaxIdentifierTypeEnum" primary_payment_method: type: boolean title: Primary Payment Method description: The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided. backup_payment_method: type: boolean description: The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such. external_hpp_type: "$ref": "#/components/schemas/ExternalHppTypeEnum" online_banking_payment_type: "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum" deprecated: true card_type: "$ref": "#/components/schemas/CardTypeEnum" BillingInfoVerify: type: object properties: gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 BillingInfoVerifyCVV: type: object properties: verification_value: type: string description: Unique security code for a credit card. Coupon: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" max_redemptions: type: integer title: Max redemptions description: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. max_redemptions_per_account: type: integer title: Max redemptions per account description: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. unique_coupon_codes_count: type: integer title: Unique coupon codes count description: When this number reaches `max_redemptions` the coupon will no longer be redeemable. readOnly: true unique_code_template: type: string title: Unique code template description: On a bulk coupon, the template from which unique coupon codes are generated. unique_coupon_code: allOf: - "$ref": "#/components/schemas/UniqueCouponCode" type: object description: Will be populated when the Coupon being returned is a `UniqueCouponCode`. duration: title: Duration description: | - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. minimum: 1 maximum: 9999 applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | The coupon is valid for all items if true. If false then `items` will list the applicable items. default: false applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false plans: type: array title: Plans description: A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`. items: "$ref": "#/components/schemas/PlanMini" items: type: array title: Items description: | A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`. items: "$ref": "#/components/schemas/ItemMini" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" hosted_page_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. format: date-time created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponCreate: allOf: - "$ref": "#/components/schemas/CouponUpdate" - type: object properties: code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. discount_type: title: Discount type description: The type of discount provided by the coupon (how the amount discounted is calculated) "$ref": "#/components/schemas/DiscountTypeEnum" discount_percent: type: integer title: Discount percent description: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`. free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`. minimum: 1 maximum: 9999 currencies: title: Currencies description: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values type: array items: "$ref": "#/components/schemas/CouponPricing" applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`. default: false plan_codes: type: array title: Plan codes description: | List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true. items: type: string item_codes: type: array title: Item codes description: | List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`. items: type: string duration: title: Duration description: | This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever. default: forever "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" coupon_type: title: Coupon type description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" unique_code_template: type: string title: Unique code template description: | On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" required: - code - discount_type - name CouponPricing: type: object properties: currency: type: string description: 3-letter ISO 4217 currency code. discount: type: number format: float description: The fixed discount (in dollars) for the corresponding currency. CouponDiscount: type: object description: | Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`. properties: type: "$ref": "#/components/schemas/DiscountTypeEnum" percent: description: This is only present when `type=percent`. type: integer currencies: type: array description: This is only present when `type=fixed`. items: "$ref": "#/components/schemas/CouponDiscountPricing" trial: type: object x-class-name: CouponDiscountTrial description: This is only present when `type=free_trial`. properties: unit: title: Trial unit description: Temporal unit of the free trial "$ref": "#/components/schemas/FreeTrialUnitEnum" length: type: integer title: Trial length description: Trial length measured in the units specified by the sibling `unit` property CouponDiscountPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Discount Amount description: Value of the fixed discount that this coupon applies. CouponBulkCreate: type: object properties: number_of_unique_codes: type: integer title: Number of unique codes description: The quantity of unique coupon codes to generate minimum: 1 maximum: 200 CouponMini: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponRedemption: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string title: Object type description: Will always be `coupon`. readOnly: true account: type: object title: Account description: The Account on which the coupon was applied. readOnly: true "$ref": "#/components/schemas/AccountMini" subscription_id: type: string title: Subscription ID readOnly: true coupon: "$ref": "#/components/schemas/Coupon" state: title: Coupon Redemption state @@ -21203,1024 +21204,1030 @@ components: description: The internal name used identify the shipping method. maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true ShippingMethodMini: type: object properties: id: type: string title: Shipping Method ID readOnly: true maxLength: 13 object: type: string title: Object type readOnly: true code: type: string title: Code description: The internal name used identify the shipping method. maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 ShippingMethodCreate: type: object properties: code: type: string title: Code description: The internal name used identify the shipping method. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 required: - code - name ShippingMethodUpdate: type: object properties: code: type: string title: Code description: The internal name used identify the shipping method. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: The name of the shipping method displayed to customers. maxLength: 100 accounting_code: type: string title: Accounting Code description: Accounting code for shipping method. maxLength: 20 tax_code: type: string title: Tax code description: | Used by Avalara, Vertex, and Recurly’s built-in tax feature. The tax code values are specific to each tax system. If you are using Recurly’s built-in taxes the values are: - `FR` – Common Carrier FOB Destination - `FR022000` – Common Carrier FOB Origin - `FR020400` – Non Common Carrier FOB Destination - `FR020500` – Non Common Carrier FOB Origin - `FR010100` – Delivery by Company Vehicle Before Passage of Title - `FR010200` – Delivery by Company Vehicle After Passage of Title - `NT` – Non-Taxable maxLength: 50 ShippingFeeCreate: type: object properties: method_id: type: string title: Method ID description: The id of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Method Code description: The code of the shipping method used to deliver the purchase. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Amount description: This is priced in the purchase's currency. minimum: 0 ShippingAddressUpdate: type: object properties: id: type: string title: Shipping Address ID maxLength: 13 readOnly: true nickname: type: string maxLength: 255 first_name: type: string maxLength: 255 last_name: type: string maxLength: 255 company: type: string maxLength: 255 email: type: string maxLength: 255 vat_number: type: string maxLength: 20 phone: type: string maxLength: 30 street1: type: string maxLength: 255 street2: type: string maxLength: 255 city: type: string maxLength: 255 region: type: string maxLength: 255 description: State or province. postal_code: type: string maxLength: 20 description: Zip or postal code. country: type: string maxLength: 50 description: Country, 2-letter ISO 3166-1 alpha-2 code. Site: type: object properties: id: type: string title: Site ID readOnly: true maxLength: 13 object: type: string title: Object type readOnly: true subdomain: type: string readOnly: true maxLength: 100 public_api_key: type: string title: Public API Key readOnly: true maxLength: 50 description: This value is used to configure RecurlyJS to submit tokenized billing information. mode: title: Mode maxLength: 15 readOnly: true "$ref": "#/components/schemas/SiteModeEnum" address: "$ref": "#/components/schemas/Address" settings: "$ref": "#/components/schemas/Settings" features: type: array title: Features description: A list of features enabled for the site. items: readOnly: true "$ref": "#/components/schemas/FeaturesEnum" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true Subscription: type: object properties: id: type: string title: Subscription ID maxLength: 13 object: type: string title: Object type uuid: type: string title: UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 account: "$ref": "#/components/schemas/AccountMini" plan: "$ref": "#/components/schemas/PlanMini" state: title: State "$ref": "#/components/schemas/SubscriptionStateEnum" shipping: "$ref": "#/components/schemas/SubscriptionShipping" coupon_redemptions: type: array title: Coupon redemptions description: Returns subscription level coupon redemptions that are tied to this subscription. items: "$ref": "#/components/schemas/CouponRedemptionMini" pending_change: "$ref": "#/components/schemas/SubscriptionChange" current_period_started_at: type: string format: date-time title: Current billing period started at current_period_ends_at: type: string format: date-time title: Current billing period ends at current_term_started_at: type: string format: date-time title: Current term started at description: The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods. current_term_ends_at: type: string format: date-time title: Current term ends at description: When the term ends. This is calculated by a plan's interval and `total_billing_cycles` in a term. Subscription changes with a `timeframe=renewal` will be applied on this date. trial_started_at: type: string format: date-time title: Trial period started at trial_ends_at: type: string format: date-time title: Trial period ends at remaining_billing_cycles: type: integer title: Remaining billing cycles description: The remaining billing cycles in the current term. total_billing_cycles: type: integer title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. ramp_intervals: type: array title: Ramp Intervals description: The ramp intervals representing the pricing schedule for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampIntervalResponse" paused_at: type: string format: date-time title: Paused at description: Null unless subscription is paused or will pause at the end of the current billing period. remaining_pause_cycles: type: integer title: Remaining pause cycles description: Null unless subscription is paused or will pause at the end of the current billing period. currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" unit_amount: type: number format: float title: Subscription unit price tax_inclusive: type: boolean title: Tax Inclusive? description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag. quantity: type: integer title: Subscription quantity minimum: 0 add_ons: type: array title: Add-ons items: "$ref": "#/components/schemas/SubscriptionAddOn" add_ons_total: type: number format: float title: Total price of add-ons minimum: 0 subtotal: type: number format: float title: Estimated total, before tax. minimum: 0 tax: type: number format: float title: Estimated tax tax_info: "$ref": "#/components/schemas/TaxInfo" total: type: number format: float title: Estimated total collection_method: title: Collection method default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" terms_and_conditions: type: string title: Terms and conditions customer_notes: type: string title: Customer notes expiration_reason: type: string title: Expiration reason custom_fields: "$ref": "#/components/schemas/CustomFields" created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Last updated at activated_at: type: string format: date-time title: Activated at canceled_at: type: string format: date-time title: Canceled at expires_at: type: string format: date-time title: Expires at bank_account_authorized_at: type: string format: date-time title: Bank account authorized description: Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared. gateway_code: type: string title: Gateway Code description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 billing_info_id: type: string title: Billing Info ID description: Billing Info ID. active_invoice_id: type: string title: Active invoice ID description: The invoice ID of the latest invoice created for an active subscription. maxLength: 13 readOnly: true started_with_gift: type: boolean default: false description: Whether the subscription was started with a gift certificate. title: Started with Gift converted_at: type: string format: date-time description: When the subscription was converted from a gift card. title: Converted at + action_result: + type: object + description: Action result params to be used in Recurly-JS to complete a + payment when using asynchronous payment methods, e.g., Boleto, iDEAL and + Sofort. + title: Action result SubscriptionAddOn: type: object title: Subscription Add-on description: This links an Add-on to a specific Subscription. properties: id: type: string title: Subscription Add-on ID maxLength: 13 object: type: string title: Object type subscription_id: type: string title: Subscription ID maxLength: 13 add_on: "$ref": "#/components/schemas/AddOnMini" add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Add-on quantity minimum: 0 unit_amount: type: number format: float title: Add-on unit price description: Supports up to 2 decimal places. unit_amount_decimal: type: string format: decimal title: Add-on unit in decimal price description: Supports up to 9 decimal places. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" minItems: 1 description: "If tiers are provided in the request, all existing tiers on the Subscription Add-on will be\nremoved and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and\nadd_on.usage_type is percentage use percentage_tiers instead. \nThere must be one tier without an `ending_quantity` value which represents the final tier.\n" percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" minItems: 1 description: | If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage. created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Updated at expired_at: type: string format: date-time title: Expired at SubscriptionAddOnCreate: type: object properties: code: type: string title: Add-on code maxLength: 50 description: | If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used. add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Quantity minimum: 0 default: 1 unit_amount: type: number format: float title: Unit amount description: | Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 unit_amount_decimal: type: string format: decimal title: Unit Amount Decimal description: | Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" minItems: 1 description: | If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" minItems: 1 description: | If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. This feature is currently in development and requires approval and enablement, please contact support. usage_percentage: type: number format: float title: Usage Percentage minimum: 0 maximum: 100 description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise. `usage_percentage` does not support tiers. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" required: - code SubscriptionAddOnUpdate: type: object properties: id: type: string title: Subscription Add-on ID. description: | When an id is provided, the existing subscription add-on attributes will persist unless overridden in the request. maxLength: 13 code: type: string title: Add-on code maxLength: 50 description: | If a code is provided without an id, the subscription add-on attributes will be set to the current value for those attributes on the plan add-on unless provided in the request. If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used. add_on_source: "$ref": "#/components/schemas/AddOnSourceEnum" quantity: type: integer title: Quantity minimum: 0 unit_amount: type: number format: float title: Unit amount description: | Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided. minimum: 0 maximum: 1000000 unit_amount_decimal: type: string title: Unit amount decimal description: | Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" minItems: 1 description: | If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" minItems: 1 description: | If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage and usage_type is percentage. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" SubscriptionAddOnTier: type: object properties: ending_quantity: type: integer title: Ending quantity minimum: 1 maximum: 999999999 default: description: Ending quantity for the tier. This represents a unit amount for unit-priced add ons. Must be left empty if it is the final tier. unit_amount: type: number format: float title: Unit amount minimum: 0 maximum: 1000000 description: Allows up to 2 decimal places. Optionally, override the tiers' default unit amount. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided. unit_amount_decimal: type: string title: Unit amount decimal description: | Allows up to 9 decimal places. Optionally, override tiers' default unit amount. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided. If add-on's `add_on_type` is `usage` and `usage_type` is `percentage`, cannot be provided. usage_percentage: type: string title: Usage Percentage description: "(deprecated) -- Use the percentage_tiers object instead." deprecated: true SubscriptionAddOnPercentageTier: type: object properties: ending_amount: type: number format: float title: Ending amount minimum: 1 maximum: 9999999999999.99 default: description: Ending amount for the tier. Allows up to 2 decimal places. Must be left empty if it is the final tier. usage_percentage: type: string title: Usage Percentage minimum: 0 maximum: 100 description: | The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places represented as a string. SubscriptionCancel: type: object properties: timeframe: title: Timeframe description: The timeframe parameter controls when the expiration takes place. The `bill_date` timeframe causes the subscription to expire when the subscription is scheduled to bill next. The `term_end` timeframe causes the subscription to continue to bill until the end of the subscription term, then expire. default: term_end "$ref": "#/components/schemas/TimeframeEnum" SubscriptionChange: type: object title: Subscription Change properties: id: type: string title: Subscription Change ID description: The ID of the Subscription Change. object: type: string title: Object type subscription_id: type: string title: Subscription ID description: The ID of the subscription that is going to be changed. maxLength: 13 plan: "$ref": "#/components/schemas/PlanMini" add_ons: type: array title: Add-ons description: These add-ons will be used when the subscription renews. items: "$ref": "#/components/schemas/SubscriptionAddOn" unit_amount: type: number format: float title: Unit amount tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true quantity: type: integer title: Subscription quantity shipping: "$ref": "#/components/schemas/SubscriptionShipping" activate_at: type: string format: date-time title: Activated at readOnly: true activated: type: boolean title: Activated? description: Returns `true` if the subscription change is activated. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" invoice_collection: title: Invoice Collection "$ref": "#/components/schemas/InvoiceCollection" custom_fields: "$ref": "#/components/schemas/CustomFields" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true billing_info: "$ref": "#/components/schemas/SubscriptionChangeBillingInfo" ramp_intervals: type: array title: Ramp Intervals description: The ramp intervals representing the pricing schedule for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampIntervalResponse" SubscriptionChangeBillingInfo: type: object description: Accept nested attributes for three_d_secure_action_result_token_id properties: three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 SubscriptionChangeBillingInfoCreate: allOf: - "$ref": "#/components/schemas/SubscriptionChangeBillingInfo" SubscriptionChangeCreate: type: object properties: timeframe: title: Timeframe description: The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you're performing an upgrade, you will want the change to occur immediately (now). If you're performing a downgrade, you should set the timeframe to `term_end` or `bill_date` so the change takes effect at a scheduled billing date. The `renewal` timeframe option is accepted as an alias for `term_end`. default: now "$ref": "#/components/schemas/ChangeTimeframeEnum" plan_id: type: string title: Plan ID maxLength: 13 description: If you want to change to a new plan, you can provide the plan's code or id. If both are provided the `plan_id` will be used. plan_code: type: string title: New plan code maxLength: 50 description: If you want to change to a new plan, you can provide the plan's code or id. If both are provided the `plan_id` will be used. unit_amount: type: number format: float title: Custom subscription price description: Optionally, sets custom pricing for the subscription, overriding the plan's default unit amount. The subscription's current currency will be used. minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true quantity: type: integer title: Quantity description: Optionally override the default quantity of 1. default: 1 minimum: 0 shipping: "$ref": "#/components/schemas/SubscriptionChangeShippingCreate" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription during the change. Only allowed if timeframe is now and you change something about the subscription that creates an invoice. items: type: string add_ons: type: array title: Add-ons description: | If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on''s ID: `{"id": "abc123"}`. If this value is omitted your existing add-ons will be unaffected. To remove all existing add-ons, this value should be an empty array.' If a subscription add-on's `code` is supplied without the `id`, `{"code": "def456"}`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an `id` is passed, any attributes not passed in will pull from the existing subscription add-on - If a `code` is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios items: "$ref": "#/components/schemas/SubscriptionAddOnUpdate" collection_method: title: Collection method default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" custom_fields: "$ref": "#/components/schemas/CustomFields" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: |- Integer normally paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. During a subscription change, it's not necessary to provide both the `Net Terms Type` and `Net Terms` parameters. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" billing_info: "$ref": "#/components/schemas/SubscriptionChangeBillingInfoCreate" ramp_intervals: type: array title: Ramp Intervals description: The new set of ramp intervals for the subscription. items: @@ -22518,1024 +22525,1030 @@ components: invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires. total_billing_cycles: type: integer title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. minimum: 1 renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" ramp_intervals: type: array title: Ramp Intervals description: The new set of ramp intervals for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampInterval" required: - plan_code SubscriptionUpdate: type: object properties: collection_method: title: Change collection method "$ref": "#/components/schemas/CollectionMethodEnum" custom_fields: "$ref": "#/components/schemas/CustomFields" remaining_billing_cycles: type: integer title: Remaining billing cycles description: The remaining billing cycles in the current term. renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. next_bill_date: type: string format: date-time title: Next bill date description: If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. For a subscription in a trial period, this will change when the trial expires. This parameter is useful for postponement of a subscription to change its billing date without proration. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals. customer_notes: type: string title: Customer notes description: Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Terms that the subscription is due on description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" gateway_code: type: string title: Gateway Code description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true shipping: "$ref": "#/components/schemas/SubscriptionShippingUpdate" billing_info_id: type: string title: Billing Info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. SubscriptionPause: type: object properties: remaining_pause_cycles: type: integer title: Remaining pause cycles description: Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription. required: - remaining_pause_cycles SubscriptionShipping: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddress" method: "$ref": "#/components/schemas/ShippingMethodMini" amount: type: number format: float title: Subscription's shipping cost SubscriptionShippingCreate: type: object title: Subscription shipping details properties: address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If `address_id` and `address` are both present, `address` will be used. maxLength: 13 method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionShippingUpdate: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping Address ID description: Assign a shipping address from the account's existing shipping addresses. maxLength: 13 SubscriptionShippingPurchase: type: object title: Subscription shipping details properties: method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionRampInterval: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. default: 1 unit_amount: type: integer description: Represents the price for the ramp interval. SubscriptionRampIntervalResponse: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. remaining_billing_cycles: type: integer description: Represents how many billing cycles are left in a ramp interval. starting_on: type: string format: date-time title: Date the ramp interval starts ending_on: type: string format: date-time title: Date the ramp interval ends unit_amount: type: number format: float title: Unit price description: Represents the price for the ramp interval. TaxInfo: type: object title: Tax info properties: type: type: string title: Type description: Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled. region: type: string title: Region description: Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled. rate: type: number format: float title: Rate description: The combined tax rate. Not present when Avalara for Communications is enabled. tax_details: type: array description: Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled. items: "$ref": "#/components/schemas/TaxDetail" TaxDetail: type: object title: Tax detail properties: type: type: string title: Type description: Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. region: type: string title: Region description: Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled. rate: type: number format: float title: Rate description: Provides the tax rate for the region. tax: type: number format: float title: Tax description: The total tax applied for this tax type. name: type: string title: Name description: Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled. level: type: string title: Level description: Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled. billable: type: boolean title: Billable description: Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled. Transaction: type: object properties: id: type: string title: Transaction ID maxLength: 13 object: type: string title: Object type uuid: type: string title: Recurly UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 original_transaction_id: type: string title: Original Transaction ID description: If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded. maxLength: 13 account: "$ref": "#/components/schemas/AccountMini" invoice: "$ref": "#/components/schemas/InvoiceMini" voided_by_invoice: "$ref": "#/components/schemas/InvoiceMini" subscription_ids: type: array title: Subscription IDs description: If the transaction is charging or refunding for one or more subscriptions, these are their IDs. items: type: string title: Subscription ID maxLength: 13 type: title: Transaction type description: | - `authorization` – verifies billing information and places a hold on money in the customer's account. - `capture` – captures funds held by an authorization and completes a purchase. - `purchase` – combines the authorization and capture in one transaction. - `refund` – returns all or a portion of the money collected in a previous transaction to the customer. - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided. "$ref": "#/components/schemas/TransactionTypeEnum" origin: title: Origin of transaction description: Describes how the transaction was triggered. "$ref": "#/components/schemas/TransactionOriginEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: Total transaction amount sent to the payment gateway. status: title: Transaction status description: The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`. "$ref": "#/components/schemas/TransactionStatusEnum" success: type: boolean title: Success? description: Did this transaction complete successfully? backup_payment_method_used: type: boolean title: Backup Payment Method Used? description: Indicates if the transaction was completed using a backup payment refunded: type: boolean title: Refunded? description: Indicates if part or all of this transaction was refunded. billing_address: "$ref": "#/components/schemas/AddressWithName" collection_method: description: The method by which the payment was collected. "$ref": "#/components/schemas/CollectionMethodEnum" payment_method: "$ref": "#/components/schemas/PaymentMethod" ip_address_v4: type: string title: IP address description: | IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. ip_address_country: type: string title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. status_code: type: string title: Status code status_message: type: string title: Status message description: For declined (`success=false`) transactions, the message displayed to the merchant. customer_message: type: string title: Customer message description: For declined (`success=false`) transactions, the message displayed to the customer. customer_message_locale: type: string title: Language code for the message payment_gateway: type: object x-class-name: TransactionPaymentGateway properties: id: type: string object: type: string title: Object type type: type: string name: type: string gateway_message: type: string title: Gateway message description: Transaction message from the payment gateway. gateway_reference: type: string title: Gateway reference description: Transaction reference number from the payment gateway. gateway_approval_code: type: string title: Transaction approval code from the payment gateway. gateway_response_code: type: string title: For declined transactions (`success=false`), this field lists the gateway error code. gateway_response_time: type: number format: float title: Gateway response time description: Time, in seconds, for gateway to process the transaction. gateway_response_values: type: object title: Gateway response values description: The values in this field will vary from gateway to gateway. cvv_check: title: CVV check description: When processed, result from checking the CVV/CVC value on the transaction. "$ref": "#/components/schemas/CvvCheckEnum" avs_check: title: AVS check description: When processed, result from checking the overall AVS on the transaction. "$ref": "#/components/schemas/AvsCheckEnum" created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Updated at voided_at: type: string format: date-time title: Voided at collected_at: type: string format: date-time title: Collected at, or if not collected yet, the time the transaction was created. + action_result: + type: object + description: Action result params to be used in Recurly-JS to complete a + payment when using asynchronous payment methods, e.g., Boleto, iDEAL and + Sofort. + title: Action result ExternalTransaction: type: object properties: payment_method: type: string title: Payment Method description: Payment method used for external transaction. "$ref": "#/components/schemas/ExternalPaymentMethodEnum" description: type: string title: Description description: Used as the transaction's description. maxLength: 50 amount: type: number format: float title: Amount description: The total amount of the transcaction. Cannot excceed the invoice total. collected_at: type: string format: date-time title: Collected At description: Datetime that the external payment was collected. Defaults to current datetime. UniqueCouponCode: type: object description: A unique coupon code for a bulk coupon. properties: id: type: string title: Unique Coupon Code ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. state: title: State description: Indicates if the unique coupon code is redeemable or why not. "$ref": "#/components/schemas/CouponCodeStateEnum" bulk_coupon_id: type: string title: Bulk Coupon ID description: The Coupon ID of the parent Bulk Coupon readOnly: true bulk_coupon_code: type: string title: Bulk Coupon code description: The Coupon code of the parent Bulk Coupon created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Updated at format: date-time readOnly: true redeemed_at: type: string title: Redeemed at description: The date and time the unique coupon code was redeemed. format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time UniqueCouponCodeList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/UniqueCouponCode" UniqueCouponCodeParams: type: object description: Parameters to be passed to the `list_unique_coupon_codes` endpoint to obtain the newly generated codes. properties: limit: type: integer title: The number of UniqueCouponCodes that will be generated order: type: string title: Sort order to list newly generated UniqueCouponCodes (should always be `asc`) sort: type: string title: Sort field to list newly generated UniqueCouponCodes (should always be `created_at`) begin_time: type: string title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time Usage: type: object properties: id: type: string object: type: string title: Object type merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). usage_type: "$ref": "#/components/schemas/UsageTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" description: The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: |- Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For any value, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information please visit our docs page (https://docs.recurly.com/docs/manual-payments#section-collection-terms) minimum: 0 default: 0 net_terms_type: "$ref": "#/components/schemas/NetTermsTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 @@ -23640,1026 +23653,1027 @@ components: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalProductCreate: type: object properties: name: type: string description: External product name. plan_id: type: string description: Recurly plan UUID. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceBase" required: - name ExternalProductUpdate: type: object properties: plan_id: type: string description: Recurly plan UUID. required: - plan_id ExternalProductReferenceBase: type: object properties: reference_code: type: string description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. maxLength: 255 external_connection_type: "$ref": "#/components/schemas/ExternalProductReferenceConnectionTypeEnum" ExternalProductReferenceCollection: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductReferenceCreate: allOf: - "$ref": "#/components/schemas/ExternalProductReferenceBase" required: - reference_code - external_connection_type ExternalProductReferenceUpdate: allOf: - "$ref": "#/components/schemas/ExternalProductReferenceBase" ExternalProductReferenceConnectionTypeEnum: type: string enum: - apple_app_store - google_play_store ExternalAccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalAccount" ExternalAccountCreate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` required: - external_account_code - external_connection_type ExternalAccountUpdate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` ExternalAccount: type: object title: External Account properties: object: type: string default: external_account id: type: string description: UUID of the external_account . external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` created_at: type: string format: date-time description: Created at readOnly: true updated_at: type: string format: date-time description: Last updated at readOnly: true ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" external_id: type: string title: External Id description: The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false in_grace_period: type: boolean title: In grace period description: An indication of whether or not the external subscription is in a grace period. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 state: type: string description: External subscriptions can be active, canceled, expired, or past_due. default: active activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. canceled_at: type: string format: date-time title: Canceled at description: When the external subscription was canceled in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. trial_started_at: type: string format: date-time title: Trial started at description: When the external subscription trial period started in the external platform. trial_ends_at: type: string format: date-time title: Trial ends at description: When the external subscription trial period ends in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalInvoice: type: object description: Invoice from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_subscription: "$ref": "#/components/schemas/ExternalSubscription" external_id: type: string description: An identifier which associates the external invoice to a corresponding object in an external platform. state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: type: string format: decimal title: Total currency: type: string title: Currency description: 3-letter ISO 4217 currency code. line_items: type: array items: "$ref": "#/components/schemas/ExternalCharge" purchased_at: type: string format: date-time description: When the invoice was created in the external platform. created_at: type: string format: date-time description: When the external invoice was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external invoice was updated in Recurly. ExternalInvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalInvoice" ExternalCharge: type: object description: Charge from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. unit_amount: type: string format: decimal title: Unit Amount quantity: type: integer description: type: string external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" created_at: type: string format: date-time title: Created at description: When the external charge was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 gateway_attributes: type: object description: Gateway specific attributes associated with this PaymentMethod x-class-name: GatewayAttributes properties: account_reference: type: string - description: Used by Adyen gateways. The Shopper Reference value used - when the external token was created. + description: Used by Adyen and Braintree gateways. For Adyen the Shopper + Reference value used when the external token was created. For Braintree + the PayPal PayerID is populated in the response. maxLength: 264 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. BusinessEntityList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/BusinessEntity" BusinessEntity: type: object description: Business entity details properties: id: title: Business entity ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true code: title: Business entity code type: string maxLength: 50 description: The entity code of the business entity. name: type: string title: Name description: This name describes your business entity and will appear on the invoice. maxLength: 255 invoice_display_address: title: Invoice display address description: Address information for the business entity that will appear on the invoice. "$ref": "#/components/schemas/Address" tax_address: title: Tax address description: Address information for the business entity that will be used for calculating taxes. "$ref": "#/components/schemas/Address" default_vat_number: type: string title: Default VAT number description: VAT number for the customer used on the invoice. maxLength: 20 default_registration_number: type: string title: Default registration number description: Registration number for the customer used on the invoice. maxLength: 30 subscriber_location_countries: type: array title: Subscriber location countries description: List of countries for which the business entity will be used. items: type: string title: Country code created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. Required if `method` is `email`. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string
recurly/recurly-client-php
f8ccb666cea8defde7fa8dd4bd7964c17fd42f41
4.39.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3ad8fc6..e322cc3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.38.0 +current_version = 4.39.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index e80087d..c826b07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,477 +1,478 @@ # Changelog -## [4.38.0](https://github.com/recurly/recurly-client-php/tree/4.38.0) (2023-07-26) +## [4.39.0](https://github.com/recurly/recurly-client-php/tree/4.39.0) (2023-07-27) -[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.37.0...4.38.0) +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.37.0...4.39.0) **Merged Pull Requests** +- Generated Latest Changes for v2021-02-25 (Ramp Dates, Net Terms, Invoice Business Entity) [#779](https://github.com/recurly/recurly-client-php/pull/779) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (App Management - External Subscriptions) [#777](https://github.com/recurly/recurly-client-php/pull/777) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.37.0](https://github.com/recurly/recurly-client-php/tree/4.37.0) (2023-06-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.36.0...4.37.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Multiple Business Entities) [#769](https://github.com/recurly/recurly-client-php/pull/769) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 11e26a0..7f3fcf2 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.38.0", + "version": "4.39.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 2510588..f240394 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.38.0'; + public const CURRENT = '4.39.0'; }
recurly/recurly-client-php
b8ae17120834fe7175ae5a027a2872a0f489ab35
4.38.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 613c511..3ad8fc6 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.37.0 +current_version = 4.38.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4c1e6..e80087d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,466 +1,477 @@ # Changelog +## [4.38.0](https://github.com/recurly/recurly-client-php/tree/4.38.0) (2023-07-26) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.37.0...4.38.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (App Management - External Subscriptions) [#777](https://github.com/recurly/recurly-client-php/pull/777) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.37.0](https://github.com/recurly/recurly-client-php/tree/4.37.0) (2023-06-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.36.0...4.37.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Multiple Business Entities) [#769](https://github.com/recurly/recurly-client-php/pull/769) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index acf6330..11e26a0 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.37.0", + "version": "4.38.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 728aa19..2510588 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.37.0'; + public const CURRENT = '4.38.0'; }
recurly/recurly-client-php
7c2c99e0f72b9ef20aa2eefc1996b704d7667234
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/external_subscription.php b/lib/recurly/resources/external_subscription.php index f53aca4..8cff6da 100644 --- a/lib/recurly/resources/external_subscription.php +++ b/lib/recurly/resources/external_subscription.php @@ -1,355 +1,451 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ExternalSubscription extends RecurlyResource { private $_account; private $_activated_at; private $_app_identifier; private $_auto_renew; + private $_canceled_at; private $_created_at; private $_expires_at; private $_external_id; private $_external_product_reference; private $_id; + private $_in_grace_period; private $_last_purchased; private $_object; private $_quantity; private $_state; + private $_trial_ends_at; + private $_trial_started_at; private $_updated_at; protected static $array_hints = [ ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the activated_at attribute. * When the external subscription was activated in the external platform. * * @return ?string */ public function getActivatedAt(): ?string { return $this->_activated_at; } /** * Setter method for the activated_at attribute. * * @param string $activated_at * * @return void */ public function setActivatedAt(string $activated_at): void { $this->_activated_at = $activated_at; } /** * Getter method for the app_identifier attribute. * Identifier of the app that generated the external subscription. * * @return ?string */ public function getAppIdentifier(): ?string { return $this->_app_identifier; } /** * Setter method for the app_identifier attribute. * * @param string $app_identifier * * @return void */ public function setAppIdentifier(string $app_identifier): void { $this->_app_identifier = $app_identifier; } /** * Getter method for the auto_renew attribute. * An indication of whether or not the external subscription will auto-renew at the expiration date. * * @return ?bool */ public function getAutoRenew(): ?bool { return $this->_auto_renew; } /** * Setter method for the auto_renew attribute. * * @param bool $auto_renew * * @return void */ public function setAutoRenew(bool $auto_renew): void { $this->_auto_renew = $auto_renew; } + /** + * Getter method for the canceled_at attribute. + * When the external subscription was canceled in the external platform. + * + * @return ?string + */ + public function getCanceledAt(): ?string + { + return $this->_canceled_at; + } + + /** + * Setter method for the canceled_at attribute. + * + * @param string $canceled_at + * + * @return void + */ + public function setCanceledAt(string $canceled_at): void + { + $this->_canceled_at = $canceled_at; + } + /** * Getter method for the created_at attribute. * When the external subscription was created in Recurly. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the expires_at attribute. * When the external subscription expires in the external platform. * * @return ?string */ public function getExpiresAt(): ?string { return $this->_expires_at; } /** * Setter method for the expires_at attribute. * * @param string $expires_at * * @return void */ public function setExpiresAt(string $expires_at): void { $this->_expires_at = $expires_at; } /** * Getter method for the external_id attribute. * The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. * * @return ?string */ public function getExternalId(): ?string { return $this->_external_id; } /** * Setter method for the external_id attribute. * * @param string $external_id * * @return void */ public function setExternalId(string $external_id): void { $this->_external_id = $external_id; } /** * Getter method for the external_product_reference attribute. * External Product Reference details * * @return ?\Recurly\Resources\ExternalProductReferenceMini */ public function getExternalProductReference(): ?\Recurly\Resources\ExternalProductReferenceMini { return $this->_external_product_reference; } /** * Setter method for the external_product_reference attribute. * * @param \Recurly\Resources\ExternalProductReferenceMini $external_product_reference * * @return void */ public function setExternalProductReference(\Recurly\Resources\ExternalProductReferenceMini $external_product_reference): void { $this->_external_product_reference = $external_product_reference; } /** * Getter method for the id attribute. * System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } + /** + * Getter method for the in_grace_period attribute. + * An indication of whether or not the external subscription is in a grace period. + * + * @return ?bool + */ + public function getInGracePeriod(): ?bool + { + return $this->_in_grace_period; + } + + /** + * Setter method for the in_grace_period attribute. + * + * @param bool $in_grace_period + * + * @return void + */ + public function setInGracePeriod(bool $in_grace_period): void + { + $this->_in_grace_period = $in_grace_period; + } + /** * Getter method for the last_purchased attribute. * When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. * * @return ?string */ public function getLastPurchased(): ?string { return $this->_last_purchased; } /** * Setter method for the last_purchased attribute. * * @param string $last_purchased * * @return void */ public function setLastPurchased(string $last_purchased): void { $this->_last_purchased = $last_purchased; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the quantity attribute. * An indication of the quantity of a subscribed item's quantity. * * @return ?int */ public function getQuantity(): ?int { return $this->_quantity; } /** * Setter method for the quantity attribute. * * @param int $quantity * * @return void */ public function setQuantity(int $quantity): void { $this->_quantity = $quantity; } /** * Getter method for the state attribute. - * External subscriptions can be active, canceled, expired, or future. + * External subscriptions can be active, canceled, expired, or past_due. * * @return ?string */ public function getState(): ?string { return $this->_state; } /** * Setter method for the state attribute. * * @param string $state * * @return void */ public function setState(string $state): void { $this->_state = $state; } + /** + * Getter method for the trial_ends_at attribute. + * When the external subscription trial period ends in the external platform. + * + * @return ?string + */ + public function getTrialEndsAt(): ?string + { + return $this->_trial_ends_at; + } + + /** + * Setter method for the trial_ends_at attribute. + * + * @param string $trial_ends_at + * + * @return void + */ + public function setTrialEndsAt(string $trial_ends_at): void + { + $this->_trial_ends_at = $trial_ends_at; + } + + /** + * Getter method for the trial_started_at attribute. + * When the external subscription trial period started in the external platform. + * + * @return ?string + */ + public function getTrialStartedAt(): ?string + { + return $this->_trial_started_at; + } + + /** + * Setter method for the trial_started_at attribute. + * + * @param string $trial_started_at + * + * @return void + */ + public function setTrialStartedAt(string $trial_started_at): void + { + $this->_trial_started_at = $trial_started_at; + } + /** * Getter method for the updated_at attribute. * When the external subscription was updated in Recurly. * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 19f5ce0..674b302 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -23256,1049 +23256,1074 @@ components: description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalProductCreate: type: object properties: name: type: string description: External product name. plan_id: type: string description: Recurly plan UUID. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceBase" required: - name ExternalProductUpdate: type: object properties: plan_id: type: string description: Recurly plan UUID. required: - plan_id ExternalProductReferenceBase: type: object properties: reference_code: type: string description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. maxLength: 255 external_connection_type: "$ref": "#/components/schemas/ExternalProductReferenceConnectionTypeEnum" ExternalProductReferenceCollection: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductReferenceCreate: allOf: - "$ref": "#/components/schemas/ExternalProductReferenceBase" required: - reference_code - external_connection_type ExternalProductReferenceUpdate: allOf: - "$ref": "#/components/schemas/ExternalProductReferenceBase" ExternalProductReferenceConnectionTypeEnum: type: string enum: - apple_app_store - google_play_store ExternalAccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalAccount" ExternalAccountCreate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` required: - external_account_code - external_connection_type ExternalAccountUpdate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` ExternalAccount: type: object title: External Account properties: object: type: string default: external_account id: type: string description: UUID of the external_account . external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` created_at: type: string format: date-time description: Created at readOnly: true updated_at: type: string format: date-time description: Last updated at readOnly: true ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" external_id: type: string title: External Id description: The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false + in_grace_period: + type: boolean + title: In grace period + description: An indication of whether or not the external subscription is + in a grace period. + default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 state: type: string description: External subscriptions can be active, canceled, expired, or - future. + past_due. + default: active activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. + canceled_at: + type: string + format: date-time + title: Canceled at + description: When the external subscription was canceled in the external + platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. + trial_started_at: + type: string + format: date-time + title: Trial started at + description: When the external subscription trial period started in the + external platform. + trial_ends_at: + type: string + format: date-time + title: Trial ends at + description: When the external subscription trial period ends in the external + platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalInvoice: type: object description: Invoice from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_subscription: "$ref": "#/components/schemas/ExternalSubscription" external_id: type: string description: An identifier which associates the external invoice to a corresponding object in an external platform. state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: type: string format: decimal title: Total currency: type: string title: Currency description: 3-letter ISO 4217 currency code. line_items: type: array items: "$ref": "#/components/schemas/ExternalCharge" purchased_at: type: string format: date-time description: When the invoice was created in the external platform. created_at: type: string format: date-time description: When the external invoice was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external invoice was updated in Recurly. ExternalInvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalInvoice" ExternalCharge: type: object description: Charge from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. unit_amount: type: string format: decimal title: Unit Amount quantity: type: integer description: type: string external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" created_at: type: string format: date-time title: Created at description: When the external charge was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 gateway_attributes: type: object description: Gateway specific attributes associated with this PaymentMethod x-class-name: GatewayAttributes properties: account_reference: type: string description: Used by Adyen gateways. The Shopper Reference value used when the external token was created. maxLength: 264 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. BusinessEntityList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/BusinessEntity" BusinessEntity: type: object description: Business entity details properties: id: title: Business entity ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true code: title: Business entity code type: string maxLength: 50 description: The entity code of the business entity. name: type: string title: Name description: This name describes your business entity and will appear on the invoice. maxLength: 255 invoice_display_address: title: Invoice display address description: Address information for the business entity that will appear on the invoice. "$ref": "#/components/schemas/Address" tax_address: title: Tax address description: Address information for the business entity that will be used for calculating taxes. "$ref": "#/components/schemas/Address" default_vat_number: type: string title: Default VAT number description: VAT number for the customer used on the invoice. maxLength: 20 default_registration_number: type: string title: Default registration number description: Registration number for the customer used on the invoice. maxLength: 30 subscriber_location_countries: type: array title: Subscriber location countries description: List of countries for which the business entity will be used. items: type: string title: Country code created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: @@ -24530,849 +24555,850 @@ components: - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-BE - fr-CA - fr-CH - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - bacs - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - external_recovery - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - bacs - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero + - boleto CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum: - ach_cancel - ach_chargeback - ach_credit_return - ach_exception - ach_return - ach_transactions_not_supported - ach_validation_exception - amazon_amount_exceeded - amazon_declined_review - amazon_invalid_authorization_status - amazon_invalid_close_attempt - amazon_invalid_create_order_reference - amazon_invalid_order_status - amazon_not_authorized - amazon_order_not_modifiable - amazon_transaction_count_exceeded - api_error - approved - approved_fraud_review - authorization_already_captured - authorization_amount_depleted - authorization_expired - batch_processing_error - billing_agreement_already_accepted - billing_agreement_not_accepted - billing_agreement_not_found - billing_agreement_replaced - call_issuer - call_issuer_update_cardholder_data - cancelled - cannot_refund_unsettled_transactions - card_not_activated - card_type_not_accepted - cardholder_requested_stop - contact_gateway - contract_not_found - currency_not_supported - customer_canceled_transaction - cvv_required - declined - declined_card_number - declined_exception - declined_expiration_date - declined_missing_data - declined_saveable - declined_security_code - deposit_referenced_chargeback - direct_debit_type_not_accepted - duplicate_transaction - exceeds_daily_limit - exceeds_max_amount - expired_card - finbot_disconnect - finbot_unavailable - fraud_address - fraud_address_recurly - fraud_advanced_verification - fraud_gateway - fraud_generic - fraud_ip_address - fraud_manual_decision - fraud_risk_check - fraud_security_code - fraud_stolen_card - fraud_too_many_attempts - fraud_velocity - gateway_account_setup_incomplete - gateway_error - gateway_rate_limited - gateway_timeout - gateway_token_not_found - gateway_unavailable - gateway_validation_exception - insufficient_funds - invalid_account_number - invalid_amount - invalid_billing_agreement_status - invalid_card_number - invalid_data - invalid_email - invalid_gateway_access_token - invalid_gateway_configuration - invalid_issuer - invalid_login - invalid_merchant_type - invalid_name - invalid_payment_method - invalid_payment_method_hard - invalid_transaction - issuer_unavailable - merch_max_transaction_limit_exceeded - moneybot_disconnect - moneybot_unavailable - no_billing_information - no_gateway - no_gateway_found_for_transaction_amount - partial_approval - partial_credits_not_supported - payer_authentication_rejected - payment_cannot_void_authorization - payment_not_accepted - paypal_account_issue - paypal_cannot_pay_self - paypal_declined_use_alternate - paypal_expired_reference_id - paypal_hard_decline - paypal_invalid_billing_agreement - paypal_primary_declined - processor_not_available - processor_unavailable - recurly_credentials_not_found - recurly_error - recurly_failed_to_get_token - recurly_token_mismatch - recurly_token_not_found - reference_transactions_not_enabled - restricted_card - restricted_card_chargeback - rjs_token_expired - roku_invalid_card_number - roku_invalid_cib - roku_invalid_payment_method - roku_zip_code_mismatch - simultaneous - ssl_error - temporary_hold - three_d_secure_action_required - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error - three_d_secure_credential_error - three_d_secure_not_supported - too_busy - too_many_attempts - total_credit_exceeds_capture - transaction_already_refunded - transaction_already_voided - transaction_cannot_be_authorized - transaction_cannot_be_refunded - transaction_cannot_be_refunded_currently - transaction_cannot_be_voided - transaction_failed_to_settle - transaction_not_found - transaction_service_v2_disconnect - transaction_service_v2_unavailable - transaction_settled - transaction_stale_at_gateway - try_again - unknown - unmapped_partner_error - vaultly_service_unavailable - zero_dollar_auth_not_supported DeclineCodeEnum: type: string enum: - account_closed - call_issuer - card_not_activated - card_not_supported - cardholder_requested_stop - do_not_honor - do_not_try_again - exceeds_daily_limit - generic_decline - expired_card - fraudulent - insufficient_funds - incorrect_address - incorrect_security_code - invalid_amount - invalid_number - invalid_transaction - issuer_unavailable - lifecycle_decline - lost_card - pickup_card - policy_decline - restricted_card - restricted_card_chargeback - security_decline - stolen_card - try_again - update_cardholder_data - requires_3d_secure ExportDates: type: object properties: object: type: string title: Object type readOnly: true dates: type: array items: type: string title: An array of dates that have available exports. ExportFiles: type: object properties: object: type: string title: Object type readOnly: true files: type: array items: "$ref": "#/components/schemas/ExportFile" ExportFile: type: object properties: name: type: string title: Filename description: Name of the export file. md5sum: type: string title: MD5 hash of the export file description: MD5 hash of the export file. href: type: string title: A link to the export file description: A presigned link to download the export file. TaxIdentifierTypeEnum: type: string enum: - cpf - cnpj - cuit DunningCycleTypeEnum: type: string description: The type of invoice this cycle applies to. enum: - automatic - manual - trial AchTypeEnum: type: string description: The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values. enum: - bacs - becs AchAccountTypeEnum: type: string description: The bank account type. (ACH only) enum: - checking - savings ExternalHppTypeEnum: type: string description: Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - adyen OnlineBankingPaymentTypeEnum: type: string description: Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - ideal - sofort ExternalInvoiceStateEnum: type: string enum: - paid
recurly/recurly-client-php
7286fa2b0f1c5024a0f2a08e879d174f2fe4916c
Adding PR Review workflow with Label Checker job
diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml new file mode 100644 index 0000000..63dd94e --- /dev/null +++ b/.github/workflows/pr-review.yml @@ -0,0 +1,27 @@ +name: PR Review + +on: + pull_request: + types: + - opened + - repoened + - edited + - synchronize + - labeled + - unlabeled + +concurrency: + group: ${{ github.workflow }} - ${{ github.ref }} + cancel-in-progress: true + +jobs: + label-checker: + runs-on: ubuntu-latest + name: Label Checker + steps: + - name: Check Labels + uses: docker://agilepathway/pull-request-label-checker:latest + with: + one_of: V4 + repo_token: ${{ secrets.GITHUB_TOKEN }} +
recurly/recurly-client-php
09129476eb25e980c7e9a2bca2209e5b8b10aee7
4.37.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index fc16529..613c511 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.36.0 +current_version = 4.37.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index b82b7c4..9c4c1e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,455 +1,466 @@ # Changelog +## [4.37.0](https://github.com/recurly/recurly-client-php/tree/4.37.0) (2023-06-01) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.36.0...4.37.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (Multiple Business Entities) [#769](https://github.com/recurly/recurly-client-php/pull/769) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index b3e2a71..acf6330 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.36.0", + "version": "4.37.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 6c44d9d..728aa19 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.36.0'; + public const CURRENT = '4.37.0'; }
recurly/recurly-client-php
9f0b929bccf1407471939749d58edd76b320cce0
4.36.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c4f2847..fc16529 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.35.0 +current_version = 4.36.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index c9a76ee..b82b7c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,444 +1,455 @@ # Changelog +## [4.36.0](https://github.com/recurly/recurly-client-php/tree/4.36.0) (2023-05-24) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.35.0...4.36.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Products & References) [#766](https://github.com/recurly/recurly-client-php/pull/766) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 63298f7..b3e2a71 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.35.0", + "version": "4.36.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 5c02139..6c44d9d 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.35.0'; + public const CURRENT = '4.36.0'; }
recurly/recurly-client-php
c33a1bf2cdfee3362745fde0622da8860175e7e2
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/client.php b/lib/recurly/client.php index 6104128..b734056 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -1111,1039 +1111,1154 @@ class Client extends BaseClient * * @return \Recurly\Pager A list of the site's coupons. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_coupons */ public function listCoupons(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/coupons", []); return new \Recurly\Pager($this, $path, $options); } /** * Create a new coupon * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Coupon A new coupon. * @link https://developers.recurly.com/api/v2021-02-25#operation/create_coupon */ public function createCoupon(array $body, array $options = []): \Recurly\Resources\Coupon { $path = $this->interpolatePath("/coupons", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Fetch a coupon * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Coupon A coupon. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_coupon */ public function getCoupon(string $coupon_id, array $options = []): \Recurly\Resources\Coupon { $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update an active coupon * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Coupon The updated coupon. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_coupon */ public function updateCoupon(string $coupon_id, array $body, array $options = []): \Recurly\Resources\Coupon { $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Expire a coupon * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Coupon The expired Coupon * @link https://developers.recurly.com/api/v2021-02-25#operation/deactivate_coupon */ public function deactivateCoupon(string $coupon_id, array $options = []): \Recurly\Resources\Coupon { $path = $this->interpolatePath("/coupons/{coupon_id}", ['coupon_id' => $coupon_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * Generate unique coupon codes * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\UniqueCouponCodeParams A set of parameters that can be passed to the `list_unique_coupon_codes` endpoint to obtain only the newly generated `UniqueCouponCodes`. * @link https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes */ public function generateUniqueCouponCodes(string $coupon_id, array $body, array $options = []): \Recurly\Resources\UniqueCouponCodeParams { $path = $this->interpolatePath("/coupons/{coupon_id}/generate", ['coupon_id' => $coupon_id]); return $this->makeRequest('POST', $path, $body, $options); } /** * Restore an inactive coupon * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Coupon The restored coupon. * @link https://developers.recurly.com/api/v2021-02-25#operation/restore_coupon */ public function restoreCoupon(string $coupon_id, array $body, array $options = []): \Recurly\Resources\Coupon { $path = $this->interpolatePath("/coupons/{coupon_id}/restore", ['coupon_id' => $coupon_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * List unique coupon codes associated with a bulk coupon * * @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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * * @return \Recurly\Pager A list of unique coupon codes that were generated * @link https://developers.recurly.com/api/v2021-02-25#operation/list_unique_coupon_codes */ public function listUniqueCouponCodes(string $coupon_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/coupons/{coupon_id}/unique_coupon_codes", ['coupon_id' => $coupon_id]); return new \Recurly\Pager($this, $path, $options); } /** * List a site's credit payments * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * * @return \Recurly\Pager A list of the site's credit payments. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_credit_payments */ public function listCreditPayments(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/credit_payments", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch a credit payment * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\CreditPayment A credit payment. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_credit_payment */ public function getCreditPayment(string $credit_payment_id, array $options = []): \Recurly\Resources\CreditPayment { $path = $this->interpolatePath("/credit_payments/{credit_payment_id}", ['credit_payment_id' => $credit_payment_id]); return $this->makeRequest('GET', $path, [], $options); } /** * List a site's custom field definitions * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['related_type'] (string): Filter by related type. * * @return \Recurly\Pager A list of the site's custom field definitions. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_custom_field_definitions */ public function listCustomFieldDefinitions(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/custom_field_definitions", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch an custom field definition * * @param string $custom_field_definition_id Custom Field Definition ID * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\CustomFieldDefinition An custom field definition. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_custom_field_definition */ public function getCustomFieldDefinition(string $custom_field_definition_id, array $options = []): \Recurly\Resources\CustomFieldDefinition { $path = $this->interpolatePath("/custom_field_definitions/{custom_field_definition_id}", ['custom_field_definition_id' => $custom_field_definition_id]); return $this->makeRequest('GET', $path, [], $options); } /** * List an invoice template's associated accounts * * @param string $invoice_template_id Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['email'] (string): Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address. * - $options['params']['subscriber'] (bool): Filter for accounts with or without a subscription in the `active`, * `canceled`, or `future` state. * - $options['params']['past_due'] (string): Filter for accounts with an invoice in the `past_due` state. * * @return \Recurly\Pager A list of an invoice template's associated accounts. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts */ public function listInvoiceTemplateAccounts(string $invoice_template_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoice_templates/{invoice_template_id}/accounts", ['invoice_template_id' => $invoice_template_id]); return new \Recurly\Pager($this, $path, $options); } /** * List a site's items * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['state'] (string): Filter by state. * * @return \Recurly\Pager A list of the site's items. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_items */ public function listItems(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/items", []); return new \Recurly\Pager($this, $path, $options); } /** * Create a new item * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Item A new item. * @link https://developers.recurly.com/api/v2021-02-25#operation/create_item */ public function createItem(array $body, array $options = []): \Recurly\Resources\Item { $path = $this->interpolatePath("/items", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Fetch an item * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Item An item. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_item */ public function getItem(string $item_id, array $options = []): \Recurly\Resources\Item { $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update an active item * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Item The updated item. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_item */ public function updateItem(string $item_id, array $body, array $options = []): \Recurly\Resources\Item { $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Deactivate an item * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Item An item. * @link https://developers.recurly.com/api/v2021-02-25#operation/deactivate_item */ public function deactivateItem(string $item_id, array $options = []): \Recurly\Resources\Item { $path = $this->interpolatePath("/items/{item_id}", ['item_id' => $item_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * Reactivate an inactive item * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Item An item. * @link https://developers.recurly.com/api/v2021-02-25#operation/reactivate_item */ public function reactivateItem(string $item_id, array $options = []): \Recurly\Resources\Item { $path = $this->interpolatePath("/items/{item_id}/reactivate", ['item_id' => $item_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * List a site's measured units * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['state'] (string): Filter by state. * * @return \Recurly\Pager A list of the site's measured units. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_measured_unit */ public function listMeasuredUnit(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/measured_units", []); return new \Recurly\Pager($this, $path, $options); } /** * Create a new measured unit * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\MeasuredUnit A new measured unit. * @link https://developers.recurly.com/api/v2021-02-25#operation/create_measured_unit */ public function createMeasuredUnit(array $body, array $options = []): \Recurly\Resources\MeasuredUnit { $path = $this->interpolatePath("/measured_units", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Fetch a measured unit * * @param string $measured_unit_id Measured unit ID or name. For ID no prefix is used e.g. `e28zov4fw0v2`. For name use prefix `name-`, e.g. `name-Storage`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\MeasuredUnit An item. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_measured_unit */ public function getMeasuredUnit(string $measured_unit_id, array $options = []): \Recurly\Resources\MeasuredUnit { $path = $this->interpolatePath("/measured_units/{measured_unit_id}", ['measured_unit_id' => $measured_unit_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update a measured unit * * @param string $measured_unit_id Measured unit ID or name. For ID no prefix is used e.g. `e28zov4fw0v2`. For name use prefix `name-`, e.g. `name-Storage`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\MeasuredUnit The updated measured_unit. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_measured_unit */ public function updateMeasuredUnit(string $measured_unit_id, array $body, array $options = []): \Recurly\Resources\MeasuredUnit { $path = $this->interpolatePath("/measured_units/{measured_unit_id}", ['measured_unit_id' => $measured_unit_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Remove a measured unit * * @param string $measured_unit_id Measured unit ID or name. For ID no prefix is used e.g. `e28zov4fw0v2`. For name use prefix `name-`, e.g. `name-Storage`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\MeasuredUnit A measured unit. * @link https://developers.recurly.com/api/v2021-02-25#operation/remove_measured_unit */ public function removeMeasuredUnit(string $measured_unit_id, array $options = []): \Recurly\Resources\MeasuredUnit { $path = $this->interpolatePath("/measured_units/{measured_unit_id}", ['measured_unit_id' => $measured_unit_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * List a site's external products * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * * @return \Recurly\Pager A list of the the external_products on a site. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_products */ public function listExternalProducts(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/external_products", []); return new \Recurly\Pager($this, $path, $options); } + /** + * Create an external product + * + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProduct Returns the external product + * @link https://developers.recurly.com/api/v2021-02-25#operation/create_external_product + */ + public function createExternalProduct(array $body, array $options = []): \Recurly\Resources\ExternalProduct + { + $path = $this->interpolatePath("/external_products", []); + return $this->makeRequest('POST', $path, $body, $options); + } + /** * Fetch an external product * * @param string $external_product_id External product id * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\ExternalProduct Settings for an external product. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_external_product */ public function getExternalProduct(string $external_product_id, array $options = []): \Recurly\Resources\ExternalProduct { $path = $this->interpolatePath("/external_products/{external_product_id}", ['external_product_id' => $external_product_id]); return $this->makeRequest('GET', $path, [], $options); } + /** + * Update an external product + * + * @param string $external_product_id External product id + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProduct Settings for an external product. + * @link https://developers.recurly.com/api/v2021-02-25#operation/update_external_product + */ + public function updateExternalProduct(string $external_product_id, array $body, array $options = []): \Recurly\Resources\ExternalProduct + { + $path = $this->interpolatePath("/external_products/{external_product_id}", ['external_product_id' => $external_product_id]); + return $this->makeRequest('PUT', $path, $body, $options); + } + + /** + * Deactivate an external product + * + * @param string $external_product_id External product id + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProduct Deactivated external product. + * @link https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_products + */ + public function deactivateExternalProducts(string $external_product_id, array $options = []): \Recurly\Resources\ExternalProduct + { + $path = $this->interpolatePath("/external_products/{external_product_id}", ['external_product_id' => $external_product_id]); + return $this->makeRequest('DELETE', $path, [], $options); + } + + /** + * List the external product references for an external product + * + * @param string $external_product_id External product id + * @param array $options Associative array of optional parameters + * + * Supported optional query string parameters: + * + * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending + * order. In descending order updated records will move behind the cursor and could + * prevent some records from being returned. + * + * @return \Recurly\Pager A list of the the external product references for an external product. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_product_external_product_references + */ + public function listExternalProductExternalProductReferences(string $external_product_id, array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/external_products/{external_product_id}/external_product_references", ['external_product_id' => $external_product_id]); + return new \Recurly\Pager($this, $path, $options); + } + + /** + * Create an external product reference on an external product + * + * @param string $external_product_id External product id + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProductReferenceMini Details for the external product reference. + * @link https://developers.recurly.com/api/v2021-02-25#operation/create_external_product_external_product_reference + */ + public function createExternalProductExternalProductReference(string $external_product_id, array $body, array $options = []): \Recurly\Resources\ExternalProductReferenceMini + { + $path = $this->interpolatePath("/external_products/{external_product_id}/external_product_references", ['external_product_id' => $external_product_id]); + return $this->makeRequest('POST', $path, $body, $options); + } + + /** + * Fetch an external product reference + * + * @param string $external_product_id External product id + * @param string $external_product_reference_id External product reference ID, e.g. `d39iun2fw1v4`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProductReferenceMini Details for an external product reference. + * @link https://developers.recurly.com/api/v2021-02-25#operation/get_external_product_external_product_reference + */ + public function getExternalProductExternalProductReference(string $external_product_id, string $external_product_reference_id, array $options = []): \Recurly\Resources\ExternalProductReferenceMini + { + $path = $this->interpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", ['external_product_id' => $external_product_id, 'external_product_reference_id' => $external_product_reference_id]); + return $this->makeRequest('GET', $path, [], $options); + } + + /** + * Deactivate an external product reference + * + * @param string $external_product_id External product id + * @param string $external_product_reference_id External product reference ID, e.g. `d39iun2fw1v4`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\ExternalProductReferenceMini Details for an external product reference. + * @link https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_product_external_product_reference + */ + public function deactivateExternalProductExternalProductReference(string $external_product_id, string $external_product_reference_id, array $options = []): \Recurly\Resources\ExternalProductReferenceMini + { + $path = $this->interpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", ['external_product_id' => $external_product_id, 'external_product_reference_id' => $external_product_reference_id]); + return $this->makeRequest('DELETE', $path, [], $options); + } + /** * List a site's external subscriptions * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * * @return \Recurly\Pager A list of the the external_subscriptions on a site. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions */ public function listExternalSubscriptions(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/external_subscriptions", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch an external subscription * * @param string $external_subscription_id External subscription id * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\ExternalSubscription Settings for an external subscription. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription */ public function getExternalSubscription(string $external_subscription_id, array $options = []): \Recurly\Resources\ExternalSubscription { $path = $this->interpolatePath("/external_subscriptions/{external_subscription_id}", ['external_subscription_id' => $external_subscription_id]); return $this->makeRequest('GET', $path, [], $options); } /** * List the external invoices on an external subscription * * @param string $external_subscription_id External subscription id * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * * @return \Recurly\Pager A list of the the external_invoices on a site. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscription_external_invoices */ public function listExternalSubscriptionExternalInvoices(string $external_subscription_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/external_subscriptions/{external_subscription_id}/external_invoices", ['external_subscription_id' => $external_subscription_id]); return new \Recurly\Pager($this, $path, $options); } /** * List a site's invoices * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['type'] (string): Filter by type when: * - `type=charge`, only charge invoices will be returned. * - `type=credit`, only credit invoices will be returned. * - `type=non-legacy`, only charge and credit invoices will be returned. * - `type=legacy`, only legacy invoices will be returned. * * @return \Recurly\Pager A list of the site's invoices. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_invoices */ public function listInvoices(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoices", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch an 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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice An invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_invoice */ public function getInvoice(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update an 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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice An invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_invoice */ public function updateInvoice(string $invoice_id, array $body, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Fetch an invoice as a PDF * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\BinaryFile An invoice as a PDF. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_pdf */ public function getInvoicePdf(string $invoice_id, array $options = []): \Recurly\Resources\BinaryFile { $path = $this->interpolatePath("/invoices/{invoice_id}.pdf", ['invoice_id' => $invoice_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Apply available credit to a pending or past due charge 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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance */ public function applyCreditBalance(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/apply_credit_balance", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Collect a pending or past due, automatic 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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/collect_invoice */ public function collectInvoice(string $invoice_id, array $body = [], array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/collect", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Mark an open invoice as failed * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_failed */ public function markInvoiceFailed(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/mark_failed", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Mark an open invoice as successful * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/mark_invoice_successful */ public function markInvoiceSuccessful(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/mark_successful", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Reopen a closed, manual 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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/reopen_invoice */ public function reopenInvoice(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/reopen", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Void a credit 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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice The updated invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/void_invoice */ public function voidInvoice(string $invoice_id, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/void", ['invoice_id' => $invoice_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Record an external payment for a manual invoices. * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Transaction The recorded transaction. * @link https://developers.recurly.com/api/v2021-02-25#operation/record_external_transaction */ public function recordExternalTransaction(string $invoice_id, array $body, array $options = []): \Recurly\Resources\Transaction { $path = $this->interpolatePath("/invoices/{invoice_id}/transactions", ['invoice_id' => $invoice_id]); return $this->makeRequest('POST', $path, $body, $options); } /** * List an invoice's line items * * @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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['original'] (string): Filter by original field. * - $options['params']['state'] (string): Filter by state field. * - $options['params']['type'] (string): Filter by type field. * * @return \Recurly\Pager A list of the invoice's line items. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_line_items */ public function listInvoiceLineItems(string $invoice_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoices/{invoice_id}/line_items", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, $options); } /** * List the coupon redemptions applied to an 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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * * @return \Recurly\Pager A list of the the coupon redemptions associated with the invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_coupon_redemptions */ public function listInvoiceCouponRedemptions(string $invoice_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoices/{invoice_id}/coupon_redemptions", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, $options); } /** * List an invoice's related credit or charge invoices * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Pager A list of the credit or charge invoices associated with the invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_related_invoices */ public function listRelatedInvoices(string $invoice_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoices/{invoice_id}/related_invoices", ['invoice_id' => $invoice_id]); return new \Recurly\Pager($this, $path, $options); } /** * Refund an 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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Invoice Returns the new credit invoice. * @link https://developers.recurly.com/api/v2021-02-25#operation/refund_invoice */ public function refundInvoice(string $invoice_id, array $body, array $options = []): \Recurly\Resources\Invoice { $path = $this->interpolatePath("/invoices/{invoice_id}/refund", ['invoice_id' => $invoice_id]); return $this->makeRequest('POST', $path, $body, $options); } /** * List a site's line items * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['original'] (string): Filter by original field. * - $options['params']['state'] (string): Filter by state field. * - $options['params']['type'] (string): Filter by type field. * * @return \Recurly\Pager A list of the site's line items. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_line_items */ public function listLineItems(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/line_items", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch a line item * * @param string $line_item_id Line Item ID. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\LineItem A line item. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_line_item */ public function getLineItem(string $line_item_id, array $options = []): \Recurly\Resources\LineItem { $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Delete an uninvoiced line item * * @param string $line_item_id Line Item ID. * @param array $options Associative array of optional parameters * * @return \Recurly\EmptyResource Line item deleted. * @link https://developers.recurly.com/api/v2021-02-25#operation/remove_line_item */ public function removeLineItem(string $line_item_id, array $options = []): \Recurly\EmptyResource { $path = $this->interpolatePath("/line_items/{line_item_id}", ['line_item_id' => $line_item_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * List a site's plans * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['state'] (string): Filter by state. * * @return \Recurly\Pager A list of plans. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_plans */ public function listPlans(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/plans", []); return new \Recurly\Pager($this, $path, $options); } /** * Create a plan * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Plan A plan. * @link https://developers.recurly.com/api/v2021-02-25#operation/create_plan */ public function createPlan(array $body, array $options = []): \Recurly\Resources\Plan { $path = $this->interpolatePath("/plans", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Fetch a plan * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Plan A plan. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_plan */ public function getPlan(string $plan_id, array $options = []): \Recurly\Resources\Plan { $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update a plan * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Plan A plan. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_plan */ public function updatePlan(string $plan_id, array $body, array $options = []): \Recurly\Resources\Plan { $path = $this->interpolatePath("/plans/{plan_id}", ['plan_id' => $plan_id]); diff --git a/lib/recurly/resources/external_product_reference_collection.php b/lib/recurly/resources/external_product_reference_collection.php new file mode 100644 index 0000000..536ed56 --- /dev/null +++ b/lib/recurly/resources/external_product_reference_collection.php @@ -0,0 +1,116 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class ExternalProductReferenceCollection extends RecurlyResource +{ + private $_data; + private $_has_more; + private $_next; + private $_object; + + protected static $array_hints = [ + 'setData' => '\Recurly\Resources\ExternalProductReferenceMini', + ]; + + + /** + * Getter method for the data attribute. + * + * + * @return array + */ + public function getData(): array + { + return $this->_data ?? [] ; + } + + /** + * Setter method for the data attribute. + * + * @param array $data + * + * @return void + */ + public function setData(array $data): void + { + $this->_data = $data; + } + + /** + * Getter method for the has_more attribute. + * Indicates there are more results on subsequent pages. + * + * @return ?bool + */ + public function getHasMore(): ?bool + { + return $this->_has_more; + } + + /** + * Setter method for the has_more attribute. + * + * @param bool $has_more + * + * @return void + */ + public function setHasMore(bool $has_more): void + { + $this->_has_more = $has_more; + } + + /** + * Getter method for the next attribute. + * Path to subsequent page of results. + * + * @return ?string + */ + public function getNext(): ?string + { + return $this->_next; + } + + /** + * Setter method for the next attribute. + * + * @param string $next + * + * @return void + */ + public function setNext(string $next): void + { + $this->_next = $next; + } + + /** + * Getter method for the object attribute. + * Will always be List. + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } +} \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 2e41606..d66ed15 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -1,874 +1,879 @@ --- openapi: 3.0.0 info: title: Recurly V3 API description: | # Getting Started ## Versioning The V3 API is versioned to allow stability for integrators and flexibility for Recurly to continue making improvements. The versions follow a format that incorporates the approximate date the changes were released in a YYYY-MM-DD format, e.g. `v2021-02-25`. > *WARNING*: Specifying a version is required to get a successful response. Each request should specify a version using the `Accept` header: * `Accept: application/vnd.recurly.v2021-02-25` * `Accept: application/vnd.recurly.v2021-02-25+json` All responses will include a `Recurly-Version` header with the API version used to process the request: ``` Recurly-Version: recurly.v2021-02-25 ``` Recurly's client libraries correspond with API versions as listed below. <table> <tr> <th>API Version</th> <th>Client Library Version</th> </tr> <tr> <td>v2021-02-25</td> <td>4.x</td> </tr> <tr> <td>v2019-10-10</td> <td>3.x</td> </tr> </table> Client library releases: * [Node.js](https://github.com/recurly/recurly-client-node/releases) * [Python](https://github.com/recurly/recurly-client-python/releases) * [.NET](https://github.com/recurly/recurly-client-dotnet/releases) * [Ruby](https://github.com/recurly/recurly-client-ruby/releases) * [Java](https://github.com/recurly/recurly-client-java/releases) * [PHP](https://github.com/recurly/recurly-client-php/releases) * [Go](https://github.com/recurly/recurly-client-go/releases) Client libraries follow semantic versioning. For example, [Ruby client library version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1) represents major version `3`, minor version `18` with patch `1`. We encourage you to update to the latest version of the API and corresponding client library, as most recent versions are more performant than their predecessors. See the [changelog](https://recurly.com/developers/api/changelog.html) for a comprehensive list of changes introduced in the latest API version. ### Default Versions Specifying a version is required to get a successful response. If you wish to receive the latest version and are willing to accept the risk of breaking changes, you may specify a version of `latest`. The following media types will default the newest version of the API: * `application/vnd.recurly.latest` * `application/vnd.recurly.latest+json` ### Deprecation Responses for a deprecated version request will return two headers: ``` Recurly-Deprecated: TRUE Recurly-Sunset-Date: 2017-06-01T00:00:00+00:00 ``` The sunset date is an ISO-8601 formatted date time after which the version will no longer be accessible. ### Unsupported Versions A request for an unsupported version will return a status code of 406 and the body will include a list of supported versions: ``` { "error": { "type": "invalid_api_version", "message": "That accept header isn't in the format we use to specify an API version. Try one of these instead:", "acceptable_accept_headers": [ "application/vnd.recurly.v2016-03-01", "application/vnd.recurly.v2016-04-27", "application/vnd.recurly.v2016-07-27", "application/vnd.recurly.v2016-12-15", "application/vnd.recurly.v2017-01-12", "application/vnd.recurly.v2017-09-30", "application/vnd.recurly.v2018-01-24", "application/vnd.recurly.v2018-05-10", "application/vnd.recurly.v2018-06-06", "application/vnd.recurly.v2018-08-09", "application/vnd.recurly.v2019-10-10", "application/vnd.recurly.v2021-02-25" ] } } ``` ## Error Messages Error messages sent via the Recurly API are generally directed at developers and those who are familiar with API technology. When using the API and passing error messages to target systems, be mindful that these messages may not make sense in the context of the target system. Please consider changing these messages in the target system to be better suited to the audience of the system. Please see [transaction error codes](https://recurly.com/developers/pages/api-transaction-errors.html) for more details. ## Pagination ### Response Schema Every GET listing endpoint returns a response with the same schema: ``` { "object": "list", // Always "list" "has_more": true, // false if this is the last page of data "next": "https://...", // A URL pointing to the next page of data "data": [] // The data for this page as an array } ``` To page through every record, your code should continually call the URL at `next` until `has_more` is `false`. ### Query Parameters Most GET listing endpoints take query parameters that allow filtering and sorting the results. Some endpoints have additional parameters, which are documented on the respective endpoints, but most support the following parameters: * `ids`: A comma separated list of ids to match. * `limit`: The number of records to return per page. * `order`: The sort order of records. * `sort`: The date field to use in sorting. * `begin_time`: The start datetime to filter (ISO 8601). * `end_time`: The end datetime to filter (ISO 8601). ### Counting with HEAD Every GET listing endpoint also supports the HEAD HTTP method. Making a head request to the endpoint results in an empty body and an additional `Recurly-Total-Records` header. This is a count of the total number of records that the endpoint will return, taking into account the current filtering query parameters. ## Limits In order to provide a fast response time to all our customers, we may rate limit excessive requests. By default, new Recurly sites have the following API rate limits: * Sandbox sites: 400 requests/min. All requests count towards the rate limit. * Production sites: 1,000 requests/min. Only GET requests count towards the rate limit. Once your site moves into production mode, Recurly will only rate limit GET requests. New subscriptions, account modifications, and other requests using POST, PUT, or DELETE methods will not count against your rate limit. The rate limit is calculated over a sliding 5 minute window. This means a production site could make 4,000 requests within one minute and not hit the rate limit so long as the site made less than 1,000 requests during the prior 4 minutes. If an API request exceeds the rate limit, the API will return a `429 Too Many Requests` HTTP status. If your business needs a higher limit, please contact support. The rate limit applied to your client can be determined with the `X-RateLimit-Limit` header, and the number of remaining requests is sent in the `X-RateLimit-Remaining` header. Finally, the `X-RateLimit-Reset` header contains an integer value representing the time, measured in seconds since the UNIX Epoch, at which the request count will be reset. ## Change Log A list of changes for this version can be found [in the changelog](https://recurly.com/developers/api/changelog.html#v2021-02-25---current-ga-version). version: v2021-02-25 security: - api_key: [] x-tagGroups: - name: Customers tags: - account - note - account_acquisition - billing_info - billing_infos - subscription - subscription_change - shipping_address - purchase - usage - automated_exports - gift_cards - name: App Management tags: - external_subscriptions - external_invoices - external_products - external_accounts + - external_product_references - name: Products and Promotions tags: - item - plan - add-on - measured_unit - coupon - coupon_redemption - unique_coupon_code - name: Invoices and Payments tags: - invoice - line_item - credit_payment - transaction - name: Configuration tags: - site - custom_field_definition - shipping_method - dunning_campaigns tags: - name: site x-displayName: Site - name: custom_field_definition x-displayName: Custom Field Definition description: Describes the fields that can be used as custom fields on accounts, items, line-items (one time charges), plans, or subscriptions. - name: item x-displayName: Item description: |- For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items". Recurly's item catalog requires the Credit Invoices features to be enabled. - name: plan x-displayName: Plan description: A plan tells Recurly how often and how much to charge your customers. Plans can be created with free trials, optional products (called add-ons), setup fees, and more. - name: add-on x-displayName: Add-on description: An add-on is a charge billed each billing period in addition to a subscription’s base charge. Each plan may have one or more add-ons associated with it. - name: measured_unit x-displayName: Measured Unit description: A measured unit describes a usage-based add-on's usage. If different usage-based add-ons share the same measured unit, you can report on customer usage for those add-ons at the aggregated measured unit level. - name: account x-displayName: Account description: Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more. - name: note x-displayName: Account Note description: Account notes allow your team to leave notes on an account to add context, e.g. the reason for a refund, customer requests, and/or complaints. These notes are internal and not exposed to your customers. - name: account_acquisition x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored payment method at a time. Examples include credit cards, PayPal, or bank accounts. Billing info is filled out by the customer upon purchase or when they update their information. - name: billing_infos x-displayName: Billing Infos description: If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints. - name: subscription x-displayName: Subscription description: Subscriptions are created when your customers subscribe to one of your plans. The customer's subscription tells Recurly when and how much to bill the customer. - name: subscription_change x-displayName: Subscription Change description: Subscription changes alter subscription in a way that might affect the invoiced amount, such as changing the plan, add-ons, quantities, or shipping address. Changes can be made immediately in the current billing cycle or scheduled to take place at the next renewal. - name: shipping_address x-displayName: Shipping Address description: Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription. - name: invoice x-displayName: Invoice description: An invoice relates charges, credits, and payments together. When a subscription is created or renewed or a charge is created on the account, Recurly will sum the charges, discount or tax as appropriate, and send the invoice out for collection. - name: line_item x-displayName: Line Item description: Line items are the charges and credits on your customer's invoices. - name: credit_payment x-displayName: Credit Payment - name: purchase x-displayName: Purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. The purchases endpoint can also be used to immediately create a credit invoice on an account, when Credit Invoices is enabled on your site. - name: usage x-displayName: Usage description: Send Recurly your customer usage and we will automatically bill them in arrears at the end of the billing cycle. For more info on usage-based billing, [click here](https://docs.recurly.com/docs/usage-based-billing). - name: transaction x-displayName: Transaction description: Purchasing information is sent to your payment gateway in an action called a transaction. This includes the customer's billing information and the amount of money to be charged, voided, or refunded. - name: coupon x-displayName: Coupon description: Coupons can either be single codes that easily allow mass distribution by many customers or bulk coupons that can generate many unique coupons that can allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption description: Coupon redemptions are created when a coupon is applied to an account or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. - name: shipping_method x-displayName: Shipping Method description: Shipping methods offered to send products to customers. - name: automated_exports x-displayName: Automated Exports description: Automated exports of customer data. - name: dunning_campaigns x-displayName: Dunning Campaigns description: Settings used when attempting to dun customers whose payments are declined. - name: external_subscriptions x-displayName: External Subscription description: A subscription from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_invoices x-displayName: External Invoice description: An invoice from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_products x-displayName: External Product description: A product from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. +- name: external_product_references + x-displayName: External Product Reference + description: Associates an external product to a corresponding resource on an external + platform like the Apple App Store or Google Play Store. - name: gift_cards x-displayName: Gift Cards description: Add gift card purchases to your checkout and allow gift card recipients to redeem the gift card for credit towards any of your products. - name: external_accounts x-displayName: External Account description: An account from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. paths: "/sites": get: operationId: list_sites summary: List sites description: | This route is most useful for finding a site's ID for subsequent requests. See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. tags: - site parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of sites. content: application/json: schema: "$ref": "#/components/schemas/SiteList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const sites = client.listSites({ params: { limit: 200 } }) for await (const site of sites.each()) { console.log(site.subdomain) } - lang: Python source: | params = {"limit": 200} sites = client.list_sites(params=params).items() for site in sites: print(site.subdomain) - lang: ".NET" source: | var optionalParams = new ListSitesParams() { Limit = 200 }; var sites = client.ListSites(optionalParams); foreach(Site site in sites) { Console.WriteLine(site.Subdomain); } - lang: Ruby source: | params = { limit: 200 } sites = @client.list_sites(params: params) sites.each do |site| puts "Site: #{site.subdomain}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Site> sites = client.listSites(params); for (Site site : sites) { System.out.println(site.getSubdomain()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $sites = $client->listSites($options); foreach($sites as $site) { echo 'Site: ' . $site->getSubdomain() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListSitesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"asc\"),\n\tLimit: recurly.Int(200),\n}\n\nsites, err := client.ListSites(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor sites.HasMore() {\n\terr := sites.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, site := range sites.Data() {\n\t\tfmt.Printf(\"Site %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tsite.Id,\n\t\t\tsite.Subdomain,\n\t\t)\n\t}\n}" "/sites/{site_id}": get: operationId: get_site summary: Fetch a site tags: - site parameters: - "$ref": "#/components/parameters/site_id" responses: '200': description: A site. content: application/json: schema: "$ref": "#/components/schemas/Site" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const site = await client.getSite(siteId) console.log('Fetched site: ', site) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: site = client.get_site(site_id) print("Got Site %s" % site) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Site site = client.GetSite(siteId); Console.WriteLine($"Fetched site {site.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin site = @client.get_site(site_id: site_id) puts "Got Site #{site}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Site site = client.getSite(siteId); System.out.println("Fetched site: " + site.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $site = $client->getSite($site_id); echo 'Got Site:' . PHP_EOL; var_dump($site); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "site, err := client.GetSite(siteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Site: %s\", site.Id)" "/accounts": get: tags: - account operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_account_email" - "$ref": "#/components/parameters/filter_account_subscriber" - "$ref": "#/components/parameters/filter_account_past_due" responses: '200': description: A list of the site's accounts. content: application/json: schema: "$ref": "#/components/schemas/AccountList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const accounts = client.listAccounts({ params: { limit: 200 } }) for await (const account of accounts.each()) { console.log(account.code) } - lang: Python source: | params = {"limit": 200} accounts = client.list_accounts(params=params).items() for account in accounts: print(account.code) - lang: ".NET" source: | var optionalParams = new ListAccountsParams() { Limit = 200 }; var accounts = client.ListAccounts(optionalParams); foreach(Account account in accounts) { Console.WriteLine(account.Code); } - lang: Ruby source: | params = { limit: 200 } accounts = @client.list_accounts(params: params) accounts.each do |account| puts "Account: #{account.code}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time Pager<Account> accounts = client.listAccounts(params); for (Account acct : accounts) { System.out.println(acct.getCode()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $accounts = $client->listAccounts($options); foreach($accounts as $account) { echo 'Account code: ' . $account->getCode() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccounts, err := client.ListAccounts(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accounts.HasMore() {\n\terr := accounts.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, account := range accounts.Data() {\n\t\tfmt.Printf(\"Account %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\taccount.Id,\n\t\t\taccount.Code,\n\t\t)\n\t}\n}" post: tags: - account operationId: create_account summary: Create an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" required: true responses: '201': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountCreate = { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', preferredTimeZone: 'America/Chicago', address: { street1: '900 Camp St', city: 'New Orleans', region: 'LA', postalCode: '70115', country: 'US' } } const account = await client.createAccount(accountCreate) console.log('Created Account: ', account.code) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account_create = { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", "preferred_time_zone": "America/Chicago", "acquisition": { "campaign": "podcast-marketing", "channel": "social_media", "subchannel": "twitter", "cost": {"currency": "USD", "amount": 0.50}, }, "shipping_addresses": [ { "nickname": "Home", "street1": "1 Tchoupitoulas St", "city": "New Orleans", "region": "LA", "country": "US", "postal_code": "70115", "first_name": "Aaron", "last_name": "Du Monde", } ], } account = client.create_account(account_create) print("Created Account %s" % account) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var accountReq = new AccountCreate() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", PreferredTimeZone = "America/Chicago", Address = new Address() { City = "New Orleans", Region = "LA", Country = "US", PostalCode = "70115", Street1 = "900 Camp St." } }; Account account = client.CreateAccount(accountReq); Console.WriteLine($"Created account {account.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account_create = { code: account_code, first_name: "Benjamin", last_name: "Du Monde", preferred_time_zone: "America/Chicago", acquisition: { campaign: "podcast-marketing", channel: "social_media", subchannel: "twitter", cost: { currency: "USD", amount: 0.50 } }, shipping_addresses: [ { nickname: "Home", street1: "1 Tchoupitoulas St", city: "New Orleans", region: "LA", country: "US", postal_code: "70115", first_name: "Benjamin", last_name: "Du Monde" } ] } account = @client.create_account(body: account_create) puts "Created Account #{account}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountCreate accountReq = new AccountCreate(); Address address = new Address(); @@ -7236,1052 +7241,1264 @@ paths: source: | begin item_update = { name: "New Item Name", description: "New Item Description" } item = @client.update_item( item_id: item_id, body: item_update ) puts "Updated Item #{item}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { final ItemUpdate itemUpdate = new ItemUpdate(); itemUpdate.setName("New Item Name"); itemUpdate.setDescription("New Item Description"); final Item item = client.updateItem(itemId, itemUpdate); System.out.println("Updated item: " + item.getCode()); System.out.println(item.getName()); System.out.println(item.getDescription()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $item_update = [ "name" => "Dark Roast Coffee Beans", "description" => "A special dark roast version.", ]; $item = $client->updateItem($item_id, $item_update); echo 'Updated Item:' . PHP_EOL; var_dump($item); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "updateReq := &recurly.ItemUpdate{\n\tName: recurly.String(\"Pothos Plant\"),\n\tDescription: recurly.String(\"A sturdy houseplant\"),\n}\nitem, err := client.UpdateItem(itemID, updateReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Updated Item: %v\", item.Id)" delete: tags: - item operationId: deactivate_item summary: Deactivate an item parameters: - "$ref": "#/components/parameters/item_id" description: Deactivating an item makes it unavailable for new purchases. It will not affect existing line items. responses: '200': description: An item. content: application/json: schema: "$ref": "#/components/schemas/Item" '422': description: Item may already be inactive. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const item = await client.deactivateItem(itemId) console.log('Deleted item: ', item.code) } catch (err) { if (err && err.type === 'not-found') { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it throw err } - lang: Python source: | try: item = client.deactivate_item(item_id) print("Deactivated Item %s" % item) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Item item = client.DeactivateItem(itemId); Console.WriteLine($"Deactivated item {item.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin item = @client.deactivate_item(item_id: item_id) puts "Deactivated Item #{item}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { Item item = client.deactivateItem(itemId); System.out.println("deactivated item " + item.getCode()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $item = $client->deactivateItem($item_id); echo 'Deactivated Item:' . PHP_EOL; var_dump($item); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "deactivatedItem, err := client.DeactivateItem(itemID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Item deactivated: %s\", deactivatedItem.Code)" "/items/{item_id}/reactivate": parameters: - "$ref": "#/components/parameters/item_id" put: tags: - item operationId: reactivate_item summary: Reactivate an inactive item description: Reactivating an item makes it available for new purchases. It will not affect existing line items. responses: '200': description: An item. content: application/json: schema: "$ref": "#/components/schemas/Item" '404': description: Incorrect site or item ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Item is already active. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const item = await client.reactivateItem(itemId) console.log('Reactivated item: ', item.code) } catch (err) { if (err && err.type === 'not_found') { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it throw err } - lang: Python source: | try: item = client.reactivate_item(item_id) print("Reactivated Item %s" % item) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Item item = client.ReactivateItem(itemId); Console.WriteLine($"Reactivated item {item.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin item = @client.reactivate_item(item_id: item_id) puts "Reactivated Item #{item}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Item item = client.reactivateItem(itemId); System.out.println("Reactivated item: " + item.getCode()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $item = $client->reactivateItem($item_id); echo 'Reactivate Item:' . PHP_EOL; var_dump($item); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "item, err := client.ReactivateItem(itemID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Reactivated Item: %s\", item.Id)" "/measured_units": get: tags: - measured_unit operationId: list_measured_unit summary: List a site's measured units description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of the site's measured units. content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnitList" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] post: tags: - measured_unit operationId: create_measured_unit summary: Create a new measured unit requestBody: content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnitCreate" required: true responses: '201': description: A new measured unit. content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnit" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid request parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/measured_units/{measured_unit_id}": get: tags: - measured_unit operationId: get_measured_unit summary: Fetch a measured unit parameters: - "$ref": "#/components/parameters/measured_unit_id" responses: '200': description: An item. content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnit" '404': description: Incorrect site or measured unit ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] put: tags: - measured_unit operationId: update_measured_unit summary: Update a measured unit parameters: - "$ref": "#/components/parameters/measured_unit_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnitUpdate" required: true responses: '200': description: The updated measured_unit. content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnit" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or measured unit ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid request parameters content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] delete: tags: - measured_unit operationId: remove_measured_unit summary: Remove a measured unit description: A mesured unit cannot be deleted if it is used by an active plan. parameters: - "$ref": "#/components/parameters/measured_unit_id" responses: '200': description: A measured unit. content: application/json: schema: "$ref": "#/components/schemas/MeasuredUnit" '422': description: Measured unit may already be inactive. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_products": get: tags: - external_products operationId: list_external_products summary: List a site's external products description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the external_products on a site. content: application/json: schema: "$ref": "#/components/schemas/ExternalProductList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + post: + tags: + - external_products + operationId: create_external_product + summary: Create an external product + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductCreate" + required: true + responses: + '201': + description: Returns the external product + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProduct" + '400': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: External product cannot be created for the specified reason. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/external_products/{external_product_id}": parameters: - "$ref": "#/components/parameters/external_product_id" get: tags: - external_products operationId: get_external_product summary: Fetch an external product responses: '200': description: Settings for an external product. content: application/json: schema: "$ref": "#/components/schemas/ExternalProduct" '404': description: Incorrect site or external product ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + put: + tags: + - external_products + operationId: update_external_product + summary: Update an external product + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductUpdate" + required: true + responses: + '200': + description: Settings for an external product. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProduct" + '404': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + delete: + tags: + - external_products + operationId: deactivate_external_products + summary: Deactivate an external product + description: Deactivate an external product. + responses: + '200': + description: Deactivated external product. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProduct" + '404': + description: Bad request; perhaps missing or invalid parameters. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + "/external_products/{external_product_id}/external_product_references": + parameters: + - "$ref": "#/components/parameters/external_product_id" + get: + tags: + - external_product_references + operationId: list_external_product_external_product_references + summary: List the external product references for an external product + description: See the [Pagination Guide](/developers/guides/pagination.html) + to learn how to use pagination in the API and Client Libraries. + parameters: + - "$ref": "#/components/parameters/sort_dates" + responses: + '200': + description: A list of the the external product references for an external + product. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductReferenceCollection" + '404': + description: Incorrect site or external product ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + post: + tags: + - external_product_references + operationId: create_external_product_external_product_reference + summary: Create an external product reference on an external product + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductReferenceCreate" + required: true + responses: + '201': + description: Details for the external product reference. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductReferenceMini" + '404': + description: Incorrect site. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + "/external_products/{external_product_id}/external_product_references/{external_product_reference_id}": + parameters: + - "$ref": "#/components/parameters/external_product_id" + - "$ref": "#/components/parameters/external_product_reference_id" + get: + tags: + - external_product_references + operationId: get_external_product_external_product_reference + summary: Fetch an external product reference + responses: + '200': + description: Details for an external product reference. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductReferenceMini" + '404': + description: Incorrect site or external product ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + delete: + tags: + - external_product_references + operationId: deactivate_external_product_external_product_reference + summary: Deactivate an external product reference + responses: + '200': + description: Details for an external product reference. + content: + application/json: + schema: + "$ref": "#/components/schemas/ExternalProductReferenceMini" + '404': + description: Incorrect site or external product reference ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/external_subscriptions": get: tags: - external_subscriptions operationId: list_external_subscriptions summary: List a site's external subscriptions description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the external_subscriptions on a site. content: application/json: schema: "$ref": "#/components/schemas/ExternalSubscriptionList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_subscriptions/{external_subscription_id}": parameters: - "$ref": "#/components/parameters/external_subscription_id" get: tags: - external_subscriptions operationId: get_external_subscription summary: Fetch an external subscription responses: '200': description: Settings for an external subscription. content: application/json: schema: "$ref": "#/components/schemas/ExternalSubscription" '404': description: Incorrect site or external subscription ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Validation error with external resource connection or feature flag. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_subscriptions/{external_subscription_id}/external_invoices": parameters: - "$ref": "#/components/parameters/external_subscription_id" get: tags: - external_subscriptions operationId: list_external_subscription_external_invoices summary: List the external invoices on an external subscription description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" responses: '200': description: A list of the the external_invoices on a site. content: application/json: schema: "$ref": "#/components/schemas/ExternalInvoiceList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/invoices": get: tags: - invoice operationId: list_invoices summary: List a site's invoices description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_invoice_type" responses: '200': description: A list of the site's invoices. content: application/json: schema: "$ref": "#/components/schemas/InvoiceList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const invoices = client.listInvoices({ params: { limit: 200 } }) for await (const invoice of invoices.each()) { console.log(invoice.number) } - lang: Python source: | params = {"limit": 200} invoices = client.list_invoices(params=params).items() for invoice in invoices: print(invoice.number) - lang: ".NET" source: | var optionalParams = new ListInvoicesParams() { Limit = 200 }; var invoices = client.ListInvoices(optionalParams); foreach(Invoice invoice in invoices) { Console.WriteLine(invoice.Number); } - lang: Ruby source: | params = { limit: 200 } invoices = @client.list_invoices(params: params) invoices.each do |invoice| puts "Invoice: #{invoice.number}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Invoice> invoices = client.listInvoices(params); for (Invoice invoice : invoices) { System.out.println(invoice.getNumber()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $invoices = $client->listInvoices($options); foreach($invoices as $invoice) { echo 'Invoice: ' . $invoice->getNumber() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListInvoicesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\ninvoices, err := client.ListInvoices(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor invoices.HasMore() {\n\terr := invoices.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, invoice := range invoices.Data() {\n\t\tfmt.Printf(\"Invoice %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tinvoice.Id,\n\t\t\tinvoice.Number,\n\t\t)\n\t}\n}" "/invoices/{invoice_id}": get: tags: - invoice operationId: get_invoice summary: Fetch an invoice parameters: - "$ref": "#/components/parameters/invoice_id" responses: '200': description: An invoice. content: application/json: schema: "$ref": "#/components/schemas/Invoice" '404': description: Incorrect site or invoice ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const invoice = await client.getInvoice(invoiceId) console.log('Fetched Invoice: ', invoice.number) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: invoice = client.get_invoice(invoice_id) print("Got Invoice %s" % invoice) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Invoice invoice = client.GetInvoice(invoiceId); Console.WriteLine($"Fetched invoice #{invoice.Number}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin invoice = @client.get_invoice(invoice_id: invoice_id) puts "Got invoice #{invoice}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Invoice invoice = client.getInvoice(invoiceId); System.out.println("Fetched invoice " + invoice.getNumber()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $invoice = $client->getInvoice($invoice_id); echo 'Got Invoice:' . PHP_EOL; var_dump($invoice); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "invoice, err := client.GetInvoice(invoiceID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Fetched Invoice: %v\", invoice)" put: tags: - invoice operationId: update_invoice summary: Update an invoice parameters: - "$ref": "#/components/parameters/invoice_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/InvoiceUpdate" required: true responses: '200': description: An invoice. content: application/json: schema: "$ref": "#/components/schemas/Invoice" '404': description: Incorrect site or invoice ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: A validation error content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const invoiceUpdate = { customerNotes: "New notes", termsAndConditions: "New terms and conditions" } const invoice = await client.updateInvoice(invoiceId, invoiceUpdate) console.log('Edited invoice: ', invoice.number) } catch(err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: invoice_update = { "customer_notes": "New Notes", "terms_and_conditions": "New Terms and Conditions", } invoice = client.update_invoice(invoice_id, invoice_update) print("Updated Invoice %s" % invoice.id) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { var invoiceReq = new InvoiceUpdate() { CustomerNotes = "New Notes", TermsAndConditions = "New Terms and Conditions" }; Invoice invoice = client.UpdateInvoice(invoiceId, invoiceReq); Console.WriteLine($"Edited invoice #{invoice.Number}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin invoice_update = { customer_notes: "New Notes", terms_and_conditions: "New Terms and Conditions" } invoice = @client.update_invoice(invoice_id: invoice_id, body: invoice_update) puts "Updated invoice #{invoice}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final InvoiceUpdate invoiceUpdate = new InvoiceUpdate(); invoiceUpdate.setCustomerNotes("New notes"); invoiceUpdate.setTermsAndConditions("New terms and conditions"); final Invoice invoice = client.updateInvoice(invoiceId, invoiceUpdate); System.out.println("Edited invoice " + invoice.getNumber()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $invoice_update = [ "customer_notes" => "New Notes", "terms_and_conditions" => "New terms and conditions", ]; $invoice = $client->updateInvoice($invoice_id, $invoice_update); echo 'Updated Invoice:' . PHP_EOL; var_dump($invoice); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "updateReq := &recurly.InvoiceUpdate{\n\tCustomerNotes: recurly.String(\"New Notes\"),\n\tTermsAndConditions: recurly.String(\"New Terms and Conditions\"),\n}\ninvoice, err := client.UpdateInvoice(invoiceID, updateReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Updated Invoice: %s\", invoice.Id)" "/invoices/{invoice_id}.pdf": get: tags: - invoice operationId: get_invoice_pdf summary: Fetch an invoice as a PDF parameters: - "$ref": "#/components/parameters/invoice_id" responses: '200': description: An invoice as a PDF. content: application/pdf: schema: "$ref": "#/components/schemas/BinaryFile" '404': description: Incorrect site or invoice ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const invoice = await client.getInvoicePdf(invoiceId) console.log('Fetched Invoice: ', invoice) const filename = `${downloadDirectory}/nodeinvoice-${invoiceId}.pdf` await fs.writeFile(filename, invoice.data, 'binary', (err) => { // throws an error, you could also catch it here if (err) throw err; // success case, the file was saved console.log('Saved Invoice PDF to', filename) }) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { @@ -15505,1024 +15722,1031 @@ paths: '200': description: Settings for a dunning campaign. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaign" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or campaign ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/dunning_campaigns/{dunning_campaign_id}/bulk_update": parameters: - "$ref": "#/components/parameters/dunning_campaign_id" put: tags: - dunning_campaigns operationId: put_dunning_campaign_bulk_update summary: Assign a dunning campaign to multiple plans requestBody: content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignsBulkUpdate" responses: '200': description: A list of updated plans. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignsBulkUpdateResponse" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or campaign ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/invoice_templates": get: tags: - invoice_templates operationId: list_invoice_templates summary: Show the invoice templates for a site description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the invoice templates on a site. content: application/json: schema: "$ref": "#/components/schemas/InvoiceTemplateList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/invoice_templates/{invoice_template_id}": parameters: - "$ref": "#/components/parameters/invoice_template_id" get: tags: - invoice_templates operationId: get_invoice_template summary: Fetch an invoice template responses: '200': description: Settings for an invoice template. content: application/json: schema: "$ref": "#/components/schemas/InvoiceTemplate" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or invoice template ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_invoices": get: tags: - external_invoices operationId: list_external_invoices summary: List the external invoices on a site description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" responses: '200': description: A list of the the external_invoices on a site. content: application/json: schema: "$ref": "#/components/schemas/ExternalInvoiceList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/external_invoices/{external_invoice_id}": parameters: - "$ref": "#/components/parameters/external_invoice_id" get: tags: - external_invoices operationId: show_external_invoice summary: Fetch an external invoice responses: '201': description: Returns the external invoice content: application/json: schema: "$ref": "#/components/schemas/ExternalInvoice" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: External invoice cannot be found for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/accounts/{account_id}/entitlements": parameters: - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/filter_limited_subscription_state" get: tags: - account operationId: list_entitlements summary: List entitlements granted to an account responses: '200': description: A list of the entitlements granted to an account. content: application/json: schema: "$ref": "#/components/schemas/Entitlements" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/accounts/{account_id}/external_subscriptions": parameters: - "$ref": "#/components/parameters/account_id" get: tags: - account operationId: list_account_external_subscriptions summary: List an account's external subscriptions description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the external_subscriptions on an account. content: application/json: schema: "$ref": "#/components/schemas/ExternalSubscriptionList" '404': description: Incorrect account. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/gift_cards": get: tags: - gift_cards operationId: list_gift_cards summary: List gift cards responses: '200': description: List of all created gift cards on your site. content: application/json: schema: "$ref": "#/components/schemas/GiftCardList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] post: tags: - gift_cards operationId: create_gift_card summary: Create gift card requestBody: content: application/json: schema: "$ref": "#/components/schemas/GiftCardCreate" required: true responses: '201': description: Returns the gift card content: application/json: schema: "$ref": "#/components/schemas/GiftCard" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Gift card cannot be completed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/gift_cards/{gift_card_id}": parameters: - "$ref": "#/components/parameters/gift_card_id" get: tags: - gift_cards operationId: get_gift_card summary: Fetch a gift card responses: '200': description: Gift card details content: application/json: schema: "$ref": "#/components/schemas/GiftCard" '404': description: Incorrect site or gift card ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/gift_cards/preview": post: tags: - gift_cards operationId: preview_gift_card summary: Preview gift card requestBody: content: application/json: schema: "$ref": "#/components/schemas/GiftCardCreate" required: true responses: '201': description: Returns the gift card content: application/json: schema: "$ref": "#/components/schemas/GiftCard" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Gift card cannot be completed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/gift_cards/{redemption_code}/redeem": parameters: - "$ref": "#/components/parameters/redemption_code" post: tags: - gift_cards operationId: redeem_gift_card summary: Redeem gift card requestBody: content: application/json: schema: "$ref": "#/components/schemas/GiftCardRedeem" required: true responses: '201': description: Redeems and returns the gift card content: application/json: schema: "$ref": "#/components/schemas/GiftCard" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Gift card cannot be redeemed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] servers: - url: https://v3.recurly.com - url: https://v3.eu.recurly.com components: parameters: site_id: name: site_id in: path description: Site ID or subdomain. For ID no prefix is used e.g. `e28zov4fw0v2`. For subdomain use prefix `subdomain-`, e.g. `subdomain-recurly`. required: true schema: type: string account_id: name: account_id in: path description: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. required: true schema: type: string add_on_id: name: add_on_id in: path description: Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. required: true schema: type: string billing_info_id: name: billing_info_id in: path description: Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. required: true schema: type: string usage_id: name: usage_id in: path description: Usage Record ID. required: true schema: type: string coupon_id: name: coupon_id in: path description: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. required: true schema: type: string credit_payment_id: name: credit_payment_id in: path description: Credit Payment ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string custom_field_definition_id: name: custom_field_definition_id in: path description: Custom Field Definition ID required: true schema: type: string external_account_id: name: external_account_id in: path description: External account ID, e.g. `s28zov4fw0cb`. required: true schema: type: string external_invoice_id: name: external_invoice_id in: path description: External invoice ID, e.g. `e28zov4fw0v2`. required: true schema: type: string external_product_id: name: external_product_id in: path description: External product id required: true schema: type: string + external_product_reference_id: + name: external_product_reference_id + in: path + description: External product reference ID, e.g. `d39iun2fw1v4`. + required: true + schema: + type: string external_subscription_id: name: external_subscription_id in: path description: External subscription id required: true schema: type: string invoice_template_id: name: invoice_template_id in: path description: Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. required: true schema: type: string item_id: name: item_id in: path description: Item ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-red`. required: true schema: type: string invoice_id: name: invoice_id in: path description: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. required: true schema: type: string measured_unit_id: name: measured_unit_id in: path description: Measured unit ID or name. For ID no prefix is used e.g. `e28zov4fw0v2`. For name use prefix `name-`, e.g. `name-Storage`. required: true schema: type: string line_item_id: name: line_item_id in: path description: Line Item ID. required: true schema: type: string plan_id: name: plan_id in: path description: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. required: true schema: type: string shipping_address_id: name: shipping_address_id in: path description: Shipping Address ID. required: true schema: type: string shipping_method_id: name: shipping_method_id in: path description: 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`. required: true schema: type: string subscription_id: name: subscription_id in: path description: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string transaction_id: name: transaction_id in: path description: Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string unique_coupon_code_id: name: unique_coupon_code_id in: path description: 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`. required: true schema: type: string dunning_campaign_id: name: dunning_campaign_id in: path description: Dunning Campaign ID, e.g. `e28zov4fw0v2`. required: true schema: type: string gift_card_id: name: gift_card_id in: path description: Gift Card ID, e.g. `e28zov4fw0v2`. required: true schema: type: string redemption_code: name: redemption_code in: path description: Gift Card redemption code, e.g., `N1A2T8IRXSCMO40V`. required: true schema: type: string ids: name: ids in: query description: | Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. **Important notes:** * The `ids` parameter cannot be used with any other ordering or filtering parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request. * Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself. style: form explode: false schema: type: array items: type: string limit: name: limit in: query description: Limit number of records 1-200. schema: type: integer minimum: 1 maximum: 200 default: 20 order: name: order in: query description: Sort order. schema: default: desc "$ref": "#/components/schemas/AlphanumericSortEnum" sort_dates: name: sort in: query description: | Sort field. You *really* only want to sort by `updated_at` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned. schema: default: created_at "$ref": "#/components/schemas/TimestampSortEnum" usage_sort_dates: name: sort in: query description: | Sort field. You *really* only want to sort by `usage_timestamp` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned. schema: type: string "$ref": "#/components/schemas/UsageSortEnum" billing_status: name: billing_status in: query description: Filter by usage record's billing status schema: type: string "$ref": "#/components/schemas/BillingStatusEnum" filter_state: name: state in: query description: Filter by state. schema: "$ref": "#/components/schemas/ActiveStateEnum" filter_subscription_state: name: state in: query description: | Filter by state. - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned. - When `state=in_trial`, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned. - When `state=live`, only subscriptions that are in an active, canceled, or future state or are in trial will be returned. schema: "$ref": "#/components/schemas/FilterSubscriptionStateEnum" filter_limited_subscription_state: name: state in: query description: | Filter the entitlements based on the state of the applicable subscription. - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned. - When no state is provided, subscriptions with active or canceled states will be returned. schema: "$ref": "#/components/schemas/FilterLimitedSubscriptionStateEnum" filter_begin_time: name: begin_time in: query description: | Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_end_time: name: end_time in: query description: | Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_usage_begin_time: name: begin_time in: query description: | Inclusively filter by begin_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_usage_end_time: name: end_time in: query description: | Inclusively filter by end_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_account_email: name: email in: query description: Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address. schema: type: string filter_account_subscriber: name: subscriber in: query description: | Filter for accounts with or without a subscription in the `active`, `canceled`, or `future` state. schema: type: boolean filter_account_past_due: name: past_due in: query description: Filter for accounts with an invoice in the `past_due` state. schema: "$ref": "#/components/schemas/TrueEnum" filter_line_item_original: name: original in: query description: Filter by original field. schema: "$ref": "#/components/schemas/TrueEnum" filter_line_item_state: name: state in: query description: Filter by state field. schema: "$ref": "#/components/schemas/LineItemStateEnum" filter_line_item_type: name: type in: query description: Filter by type field. schema: "$ref": "#/components/schemas/LineItemTypeEnum" filter_transaction_type: name: type in: query description: Filter by type field. The value `payment` will return both `purchase` and `capture` transactions. schema: "$ref": "#/components/schemas/FilterTransactionTypeEnum" filter_transaction_success: name: success in: query description: Filter by success field. schema: "$ref": "#/components/schemas/TrueEnum" filter_invoice_type: name: type in: query description: | Filter by type when: - `type=charge`, only charge invoices will be returned. - `type=credit`, only credit invoices will be returned. - `type=non-legacy`, only charge and credit invoices will be returned. - `type=legacy`, only legacy invoices will be returned. schema: "$ref": "#/components/schemas/FilterInvoiceTypeEnum" export_date: name: export_date in: path description: Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format. required: true schema: type: string securitySchemes: api_key: type: http description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page. scheme: basic schemas: Empty: type: object properties: {} BinaryFile: type: string format: binary readOnly: true AccountAcquisitionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AccountAcquisition" AccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Account" AccountNoteList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AccountNote" AddOnList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AddOn" BillingInfoList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/BillingInfo" CreditPaymentList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CreditPayment" CouponList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Coupon" CouponRedemptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CouponRedemption" CustomFieldDefinitionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CustomFieldDefinition" ItemList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Item" InvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: @@ -22711,1024 +22935,1091 @@ components: title: Sort order to list newly generated UniqueCouponCodes (should always be `asc`) sort: type: string title: Sort field to list newly generated UniqueCouponCodes (should always be `created_at`) begin_time: type: string title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time Usage: type: object properties: id: type: string object: type: string title: Object type merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). usage_type: "$ref": "#/components/schemas/UsageTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" description: The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" + ExternalProductCreate: + type: object + properties: + name: + type: string + description: External product name. + plan_id: + type: string + description: Recurly plan UUID. + external_product_references: + type: array + title: External Product References + description: List of external product references of the external product. + items: + "$ref": "#/components/schemas/ExternalProductReferenceBase" + required: + - name + ExternalProductUpdate: + type: object + properties: + plan_id: + type: string + description: Recurly plan UUID. + required: + - plan_id + ExternalProductReferenceBase: + type: object + properties: + reference_code: + type: string + description: A code which associates the external product to a corresponding + object or resource in an external platform like the Apple App Store or + Google Play Store. + maxLength: 255 + external_connection_type: + "$ref": "#/components/schemas/ExternalProductReferenceConnectionTypeEnum" + ExternalProductReferenceCollection: + type: object + properties: + object: + type: string + title: Object type + description: Will always be List. + has_more: + type: boolean + description: Indicates there are more results on subsequent pages. + next: + type: string + description: Path to subsequent page of results. + data: + type: array + items: + "$ref": "#/components/schemas/ExternalProductReferenceMini" + ExternalProductReferenceCreate: + allOf: + - "$ref": "#/components/schemas/ExternalProductReferenceBase" + required: + - reference_code + - external_connection_type + ExternalProductReferenceUpdate: + allOf: + - "$ref": "#/components/schemas/ExternalProductReferenceBase" + ExternalProductReferenceConnectionTypeEnum: + type: string + enum: + - apple_app_store + - google_play_store ExternalAccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalAccount" ExternalAccountCreate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` required: - external_account_code - external_connection_type ExternalAccountUpdate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` ExternalAccount: type: object title: External Account properties: object: type: string default: external_account id: type: string description: UUID of the external_account . external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` created_at: type: string format: date-time description: Created at readOnly: true updated_at: type: string format: date-time description: Last updated at readOnly: true ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" external_id: type: string title: External Id description: The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 state: type: string description: External subscriptions can be active, canceled, expired, or future. activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalInvoice: type: object description: Invoice from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_subscription: "$ref": "#/components/schemas/ExternalSubscription" external_id: type: string description: An identifier which associates the external invoice to a corresponding object in an external platform. state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: type: string format: decimal title: Total currency: type: string title: Currency description: 3-letter ISO 4217 currency code. line_items: type: array items: "$ref": "#/components/schemas/ExternalCharge" purchased_at: type: string format: date-time description: When the invoice was created in the external platform. created_at: type: string format: date-time description: When the external invoice was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external invoice was updated in Recurly. ExternalInvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalInvoice" ExternalCharge: type: object description: Charge from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. unit_amount: type: string format: decimal title: Unit Amount quantity: type: integer description: type: string external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" created_at: type: string format: date-time title: Created at description: When the external charge was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 gateway_attributes: type: object description: Gateway specific attributes associated with this PaymentMethod x-class-name: GatewayAttributes properties: account_reference: type: string description: Used by Adyen gateways. The Shopper Reference value used when the external token was created. maxLength: 264 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery:
recurly/recurly-client-php
c47b0b7b8e3208126d17a540f025856bb8c93dc1
4.35.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c40cd89..c4f2847 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.34.0 +current_version = 4.35.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 7233b21..c9a76ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,433 +1,444 @@ # Changelog +## [4.35.0](https://github.com/recurly/recurly-client-php/tree/4.35.0) (2023-05-23) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.34.0...4.35.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (gateway_attributes on PaymentMethod) [#764](https://github.com/recurly/recurly-client-php/pull/764) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 1c1b68d..63298f7 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.34.0", + "version": "4.35.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 4432ad7..5c02139 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.34.0'; + public const CURRENT = '4.35.0'; }
recurly/recurly-client-php
251d752045e500a693dbd60b7cdabac3fc9ff756
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/gateway_attributes.php b/lib/recurly/resources/gateway_attributes.php new file mode 100644 index 0000000..ed61070 --- /dev/null +++ b/lib/recurly/resources/gateway_attributes.php @@ -0,0 +1,43 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class GatewayAttributes extends RecurlyResource +{ + private $_account_reference; + + protected static $array_hints = [ + ]; + + + /** + * Getter method for the account_reference attribute. + * Used by Adyen gateways. The Shopper Reference value used when the external token was created. + * + * @return ?string + */ + public function getAccountReference(): ?string + { + return $this->_account_reference; + } + + /** + * Setter method for the account_reference attribute. + * + * @param string $account_reference + * + * @return void + */ + public function setAccountReference(string $account_reference): void + { + $this->_account_reference = $account_reference; + } +} \ No newline at end of file diff --git a/lib/recurly/resources/payment_method.php b/lib/recurly/resources/payment_method.php index bb66f2e..3821057 100644 --- a/lib/recurly/resources/payment_method.php +++ b/lib/recurly/resources/payment_method.php @@ -1,403 +1,427 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class PaymentMethod extends RecurlyResource { private $_account_type; private $_billing_agreement_id; private $_card_type; private $_cc_bin_country; private $_exp_month; private $_exp_year; private $_first_six; + private $_gateway_attributes; private $_gateway_code; private $_gateway_token; private $_last_four; private $_last_two; private $_name_on_account; private $_object; private $_routing_number; private $_routing_number_bank; private $_username; protected static $array_hints = [ ]; /** * Getter method for the account_type attribute. * The bank account type. Only present for ACH payment methods. * * @return ?string */ public function getAccountType(): ?string { return $this->_account_type; } /** * Setter method for the account_type attribute. * * @param string $account_type * * @return void */ public function setAccountType(string $account_type): void { $this->_account_type = $account_type; } /** * Getter method for the billing_agreement_id attribute. * Billing Agreement identifier. Only present for Amazon or Paypal payment methods. * * @return ?string */ public function getBillingAgreementId(): ?string { return $this->_billing_agreement_id; } /** * Setter method for the billing_agreement_id attribute. * * @param string $billing_agreement_id * * @return void */ public function setBillingAgreementId(string $billing_agreement_id): void { $this->_billing_agreement_id = $billing_agreement_id; } /** * Getter method for the card_type attribute. * Visa, MasterCard, American Express, Discover, JCB, etc. * * @return ?string */ public function getCardType(): ?string { return $this->_card_type; } /** * Setter method for the card_type attribute. * * @param string $card_type * * @return void */ public function setCardType(string $card_type): void { $this->_card_type = $card_type; } /** * Getter method for the cc_bin_country attribute. * The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. * * @return ?string */ public function getCcBinCountry(): ?string { return $this->_cc_bin_country; } /** * Setter method for the cc_bin_country attribute. * * @param string $cc_bin_country * * @return void */ public function setCcBinCountry(string $cc_bin_country): void { $this->_cc_bin_country = $cc_bin_country; } /** * Getter method for the exp_month attribute. * Expiration month. * * @return ?int */ public function getExpMonth(): ?int { return $this->_exp_month; } /** * Setter method for the exp_month attribute. * * @param int $exp_month * * @return void */ public function setExpMonth(int $exp_month): void { $this->_exp_month = $exp_month; } /** * Getter method for the exp_year attribute. * Expiration year. * * @return ?int */ public function getExpYear(): ?int { return $this->_exp_year; } /** * Setter method for the exp_year attribute. * * @param int $exp_year * * @return void */ public function setExpYear(int $exp_year): void { $this->_exp_year = $exp_year; } /** * Getter method for the first_six attribute. * Credit card number's first six digits. * * @return ?string */ public function getFirstSix(): ?string { return $this->_first_six; } /** * Setter method for the first_six attribute. * * @param string $first_six * * @return void */ public function setFirstSix(string $first_six): void { $this->_first_six = $first_six; } + /** + * Getter method for the gateway_attributes attribute. + * Gateway specific attributes associated with this PaymentMethod + * + * @return ?\Recurly\Resources\GatewayAttributes + */ + public function getGatewayAttributes(): ?\Recurly\Resources\GatewayAttributes + { + return $this->_gateway_attributes; + } + + /** + * Setter method for the gateway_attributes attribute. + * + * @param \Recurly\Resources\GatewayAttributes $gateway_attributes + * + * @return void + */ + public function setGatewayAttributes(\Recurly\Resources\GatewayAttributes $gateway_attributes): void + { + $this->_gateway_attributes = $gateway_attributes; + } + /** * Getter method for the gateway_code attribute. * An identifier for a specific payment gateway. * * @return ?string */ public function getGatewayCode(): ?string { return $this->_gateway_code; } /** * Setter method for the gateway_code attribute. * * @param string $gateway_code * * @return void */ public function setGatewayCode(string $gateway_code): void { $this->_gateway_code = $gateway_code; } /** * Getter method for the gateway_token attribute. * A token used in place of a credit card in order to perform transactions. * * @return ?string */ public function getGatewayToken(): ?string { return $this->_gateway_token; } /** * Setter method for the gateway_token attribute. * * @param string $gateway_token * * @return void */ public function setGatewayToken(string $gateway_token): void { $this->_gateway_token = $gateway_token; } /** * Getter method for the last_four attribute. * Credit card number's last four digits. Will refer to bank account if payment method is ACH. * * @return ?string */ public function getLastFour(): ?string { return $this->_last_four; } /** * Setter method for the last_four attribute. * * @param string $last_four * * @return void */ public function setLastFour(string $last_four): void { $this->_last_four = $last_four; } /** * Getter method for the last_two attribute. * The IBAN bank account's last two digits. * * @return ?string */ public function getLastTwo(): ?string { return $this->_last_two; } /** * Setter method for the last_two attribute. * * @param string $last_two * * @return void */ public function setLastTwo(string $last_two): void { $this->_last_two = $last_two; } /** * Getter method for the name_on_account attribute. * The name associated with the bank account. * * @return ?string */ public function getNameOnAccount(): ?string { return $this->_name_on_account; } /** * Setter method for the name_on_account attribute. * * @param string $name_on_account * * @return void */ public function setNameOnAccount(string $name_on_account): void { $this->_name_on_account = $name_on_account; } /** * Getter method for the object attribute. * * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the routing_number attribute. * The bank account's routing number. Only present for ACH payment methods. * * @return ?string */ public function getRoutingNumber(): ?string { return $this->_routing_number; } /** * Setter method for the routing_number attribute. * * @param string $routing_number * * @return void */ public function setRoutingNumber(string $routing_number): void { $this->_routing_number = $routing_number; } /** * Getter method for the routing_number_bank attribute. * The bank name of this routing number. * * @return ?string */ public function getRoutingNumberBank(): ?string { return $this->_routing_number_bank; } /** * Setter method for the routing_number_bank attribute. * * @param string $routing_number_bank * * @return void */ public function setRoutingNumberBank(string $routing_number_bank): void { $this->_routing_number_bank = $routing_number_bank; } /** * Getter method for the username attribute. * Username of the associated payment method. Currently only associated with Venmo. * * @return ?string */ public function getUsername(): ?string { return $this->_username; } /** * Setter method for the username attribute. * * @param string $username * * @return void */ public function setUsername(string $username): void { $this->_username = $username; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 199e4b6..2e41606 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -17344,1024 +17344,1035 @@ components: be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 item: "$ref": "#/components/schemas/ItemMini" readOnly: true tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" percentage_tiers: type: array title: Percentage Tiers description: This feature is currently in development and requires approval and enablement, please contact support. items: "$ref": "#/components/schemas/PercentageTiersByCurrency" external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 readOnly: true created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true required: - code - name AddOnCreate: type: object title: Add-on description: Full add-on details. properties: item_code: type: string title: Item Code description: Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used. maxLength: 13 code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeCreateEnum" usage_type: "$ref": "#/components/schemas/UsageTypeCreateEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. plan_id: type: string title: Plan ID maxLength: 13 readOnly: true accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent. maxLength: 50 currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeCreateEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. required: - code - name AddOnUpdate: type: object title: Add-on description: Full add-on details. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent. maxLength: 255 usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then currencies must be absent. Must also be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. BillingInfo: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string maxLength: 13 readOnly: true first_name: type: string maxLength: 50 last_name: type: string maxLength: 50 company: type: string maxLength: 100 address: "$ref": "#/components/schemas/Address" vat_number: type: string description: Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices. valid: type: boolean readOnly: true payment_method: "$ref": "#/components/schemas/PaymentMethod" fraud: type: object x-class-name: FraudInfo title: Fraud information description: Most recent fraud result. readOnly: true properties: score: type: integer title: Kount score minimum: 1 maximum: 99 decision: title: Kount decision maxLength: 10 "$ref": "#/components/schemas/KountDecisionEnum" risk_rules_triggered: type: object title: Kount rules primary_payment_method: type: boolean description: The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used backup_payment_method: type: boolean description: The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. created_at: type: string format: date-time description: When the billing information was created. readOnly: true updated_at: type: string format: date-time description: When the billing information was last changed. readOnly: true updated_by: type: object x-class-name: BillingInfoUpdatedBy readOnly: true properties: ip: type: string description: Customer's IP address when updating their billing information. maxLength: 20 country: type: string description: Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly. maxLength: 2 BillingInfoCreate: type: object properties: token_id: type: string title: Token ID description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token). maxLength: 22 first_name: type: string title: First name maxLength: 50 last_name: type: string title: Last name maxLength: 50 company: type: string title: Company name maxLength: 100 address: "$ref": "#/components/schemas/Address" number: type: string title: Credit card number description: Credit card number, spaces and dashes are accepted. month: type: string title: Expiration month maxLength: 2 year: type: string title: Expiration year maxLength: 4 cvv: type: string title: Security code or CVV description: "*STRONGLY RECOMMENDED*" maxLength: 4 currency: type: string description: 3-letter ISO 4217 currency code. vat_number: type: string title: VAT number ip_address: type: string title: IP address description: "*STRONGLY RECOMMENDED* Customer's IP address when updating their billing information." maxLength: 20 gateway_token: type: string title: A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`. maxLength: 50 gateway_code: type: string title: An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. maxLength: 12 + gateway_attributes: + type: object + description: Additional attributes to send to the gateway. + x-class-name: GatewayAttributes + properties: + account_reference: + type: string + description: Used by Adyen gateways. The Shopper Reference value used + when the external token was created. Must be used in conjunction with + gateway_token and gateway_code. + maxLength: 264 amazon_billing_agreement_id: type: string title: Amazon billing agreement ID paypal_billing_agreement_id: type: string title: PayPal billing agreement ID fraud_session_id: type: string title: Fraud Session ID transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 iban: type: string maxLength: 34 description: The International Bank Account Number, up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, and potential routing information name_on_account: type: string maxLength: 255 description: The name associated with the bank account (ACH, SEPA, Bacs only) account_number: type: string maxLength: 255 description: The bank account number. (ACH, Bacs only) routing_number: type: string maxLength: 15 description: The bank's rounting number. (ACH only) sort_code: type: string maxLength: 15 description: Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only) type: "$ref": "#/components/schemas/AchTypeEnum" account_type: "$ref": "#/components/schemas/AchAccountTypeEnum" tax_identifier: type: string description: Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively. tax_identifier_type: description: This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina. "$ref": "#/components/schemas/TaxIdentifierTypeEnum" primary_payment_method: type: boolean title: Primary Payment Method description: The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided. backup_payment_method: type: boolean description: The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such. external_hpp_type: "$ref": "#/components/schemas/ExternalHppTypeEnum" online_banking_payment_type: "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum" card_type: "$ref": "#/components/schemas/CardTypeEnum" BillingInfoVerify: type: object properties: gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 BillingInfoVerifyCVV: type: object properties: verification_value: type: string description: Unique security code for a credit card. Coupon: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" max_redemptions: type: integer title: Max redemptions description: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. max_redemptions_per_account: type: integer title: Max redemptions per account description: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. unique_coupon_codes_count: type: integer title: Unique coupon codes count description: When this number reaches `max_redemptions` the coupon will no longer be redeemable. readOnly: true unique_code_template: type: string title: Unique code template description: On a bulk coupon, the template from which unique coupon codes are generated. unique_coupon_code: allOf: - "$ref": "#/components/schemas/UniqueCouponCode" type: object description: Will be populated when the Coupon being returned is a `UniqueCouponCode`. duration: title: Duration description: | - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. minimum: 1 maximum: 9999 applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | The coupon is valid for all items if true. If false then `items` will list the applicable items. default: false applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false plans: type: array title: Plans description: A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`. items: "$ref": "#/components/schemas/PlanMini" items: type: array title: Items description: | A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`. items: "$ref": "#/components/schemas/ItemMini" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" hosted_page_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. format: date-time created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponCreate: allOf: - "$ref": "#/components/schemas/CouponUpdate" - type: object properties: code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. discount_type: title: Discount type description: The type of discount provided by the coupon (how the amount discounted is calculated) "$ref": "#/components/schemas/DiscountTypeEnum" discount_percent: type: integer title: Discount percent description: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`. free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`. minimum: 1 maximum: 9999 currencies: title: Currencies description: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values type: array items: "$ref": "#/components/schemas/CouponPricing" applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`. default: false plan_codes: type: array title: Plan codes description: | List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true. items: type: string item_codes: type: array title: Item codes description: | List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`. items: type: string duration: title: Duration description: | This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever. default: forever "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" coupon_type: title: Coupon type description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" unique_code_template: type: string title: Unique code template description: | On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" required: - code - discount_type - name CouponPricing: type: object properties: currency: type: string description: 3-letter ISO 4217 currency code. discount: type: number format: float description: The fixed discount (in dollars) for the corresponding currency. CouponDiscount: type: object description: | Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`. properties: type: "$ref": "#/components/schemas/DiscountTypeEnum" percent: description: This is only present when `type=percent`. type: integer currencies: type: array description: This is only present when `type=fixed`. items: "$ref": "#/components/schemas/CouponDiscountPricing" trial: type: object x-class-name: CouponDiscountTrial description: This is only present when `type=free_trial`. properties: unit: title: Trial unit description: Temporal unit of the free trial "$ref": "#/components/schemas/FreeTrialUnitEnum" length: type: integer title: Trial length description: Trial length measured in the units specified by the sibling `unit` property CouponDiscountPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Discount Amount description: Value of the fixed discount that this coupon applies. CouponBulkCreate: type: object properties: number_of_unique_codes: type: integer title: Number of unique codes description: The quantity of unique coupon codes to generate minimum: 1 maximum: 200 CouponMini: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponRedemption: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string title: Object type description: Will always be `coupon`. readOnly: true account: type: object title: Account description: The Account on which the coupon was applied. readOnly: true "$ref": "#/components/schemas/AccountMini" subscription_id: type: string title: Subscription ID readOnly: true coupon: "$ref": "#/components/schemas/Coupon" state: title: Coupon Redemption state default: active "$ref": "#/components/schemas/ActiveStateEnum" @@ -23097,1024 +23108,1034 @@ components: maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalAccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalAccount" ExternalAccountCreate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` required: - external_account_code - external_connection_type ExternalAccountUpdate: type: object properties: external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` ExternalAccount: type: object title: External Account properties: object: type: string default: external_account id: type: string description: UUID of the external_account . external_account_code: type: string description: Represents the account code for the external account. external_connection_type: type: string description: Represents the connection type. `AppleAppStore` or `GooglePlayStore` created_at: type: string format: date-time description: Created at readOnly: true updated_at: type: string format: date-time description: Last updated at readOnly: true ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" external_id: type: string title: External Id description: The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 state: type: string description: External subscriptions can be active, canceled, expired, or future. activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalInvoice: type: object description: Invoice from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_subscription: "$ref": "#/components/schemas/ExternalSubscription" external_id: type: string description: An identifier which associates the external invoice to a corresponding object in an external platform. state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: type: string format: decimal title: Total currency: type: string title: Currency description: 3-letter ISO 4217 currency code. line_items: type: array items: "$ref": "#/components/schemas/ExternalCharge" purchased_at: type: string format: date-time description: When the invoice was created in the external platform. created_at: type: string format: date-time description: When the external invoice was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external invoice was updated in Recurly. ExternalInvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalInvoice" ExternalCharge: type: object description: Charge from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. unit_amount: type: string format: decimal title: Unit Amount quantity: type: integer description: type: string external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" created_at: type: string format: date-time title: Created at description: When the external charge was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 + gateway_attributes: + type: object + description: Gateway specific attributes associated with this PaymentMethod + x-class-name: GatewayAttributes + properties: + account_reference: + type: string + description: Used by Adyen gateways. The Shopper Reference value used + when the external token was created. + maxLength: 264 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. Required if `method` is `email`. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-BE - fr-CA - fr-CH - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string
recurly/recurly-client-php
3d9c832dd75b9226aaf2d06624ea8d3b3871cef6
Generated Latest Changes for v2021-02-25
diff --git a/openapi/api.yaml b/openapi/api.yaml index 7a5a9af..199e4b6 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -1,878 +1,880 @@ --- openapi: 3.0.0 info: title: Recurly V3 API description: | # Getting Started ## Versioning The V3 API is versioned to allow stability for integrators and flexibility for Recurly to continue making improvements. The versions follow a format that incorporates the approximate date the changes were released in a YYYY-MM-DD format, e.g. `v2021-02-25`. > *WARNING*: Specifying a version is required to get a successful response. Each request should specify a version using the `Accept` header: * `Accept: application/vnd.recurly.v2021-02-25` * `Accept: application/vnd.recurly.v2021-02-25+json` All responses will include a `Recurly-Version` header with the API version used to process the request: ``` Recurly-Version: recurly.v2021-02-25 ``` Recurly's client libraries correspond with API versions as listed below. <table> <tr> <th>API Version</th> <th>Client Library Version</th> </tr> <tr> <td>v2021-02-25</td> <td>4.x</td> </tr> <tr> <td>v2019-10-10</td> <td>3.x</td> </tr> </table> Client library releases: * [Node.js](https://github.com/recurly/recurly-client-node/releases) * [Python](https://github.com/recurly/recurly-client-python/releases) * [.NET](https://github.com/recurly/recurly-client-dotnet/releases) * [Ruby](https://github.com/recurly/recurly-client-ruby/releases) * [Java](https://github.com/recurly/recurly-client-java/releases) * [PHP](https://github.com/recurly/recurly-client-php/releases) * [Go](https://github.com/recurly/recurly-client-go/releases) Client libraries follow semantic versioning. For example, [Ruby client library version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1) represents major version `3`, minor version `18` with patch `1`. We encourage you to update to the latest version of the API and corresponding client library, as most recent versions are more performant than their predecessors. See the [changelog](https://recurly.com/developers/api/changelog.html) for a comprehensive list of changes introduced in the latest API version. ### Default Versions Specifying a version is required to get a successful response. If you wish to receive the latest version and are willing to accept the risk of breaking changes, you may specify a version of `latest`. The following media types will default the newest version of the API: * `application/vnd.recurly.latest` * `application/vnd.recurly.latest+json` ### Deprecation Responses for a deprecated version request will return two headers: ``` Recurly-Deprecated: TRUE Recurly-Sunset-Date: 2017-06-01T00:00:00+00:00 ``` The sunset date is an ISO-8601 formatted date time after which the version will no longer be accessible. ### Unsupported Versions A request for an unsupported version will return a status code of 406 and the body will include a list of supported versions: ``` { "error": { "type": "invalid_api_version", "message": "That accept header isn't in the format we use to specify an API version. Try one of these instead:", "acceptable_accept_headers": [ "application/vnd.recurly.v2016-03-01", "application/vnd.recurly.v2016-04-27", "application/vnd.recurly.v2016-07-27", "application/vnd.recurly.v2016-12-15", "application/vnd.recurly.v2017-01-12", "application/vnd.recurly.v2017-09-30", "application/vnd.recurly.v2018-01-24", "application/vnd.recurly.v2018-05-10", "application/vnd.recurly.v2018-06-06", "application/vnd.recurly.v2018-08-09", "application/vnd.recurly.v2019-10-10", "application/vnd.recurly.v2021-02-25" ] } } ``` ## Error Messages Error messages sent via the Recurly API are generally directed at developers and those who are familiar with API technology. When using the API and passing error messages to target systems, be mindful that these messages may not make sense in the context of the target system. Please consider changing these messages in the target system to be better suited to the audience of the system. Please see [transaction error codes](https://recurly.com/developers/pages/api-transaction-errors.html) for more details. ## Pagination ### Response Schema Every GET listing endpoint returns a response with the same schema: ``` { "object": "list", // Always "list" "has_more": true, // false if this is the last page of data "next": "https://...", // A URL pointing to the next page of data "data": [] // The data for this page as an array } ``` To page through every record, your code should continually call the URL at `next` until `has_more` is `false`. ### Query Parameters Most GET listing endpoints take query parameters that allow filtering and sorting the results. Some endpoints have additional parameters, which are documented on the respective endpoints, but most support the following parameters: * `ids`: A comma separated list of ids to match. * `limit`: The number of records to return per page. * `order`: The sort order of records. * `sort`: The date field to use in sorting. * `begin_time`: The start datetime to filter (ISO 8601). * `end_time`: The end datetime to filter (ISO 8601). ### Counting with HEAD Every GET listing endpoint also supports the HEAD HTTP method. Making a head request to the endpoint results in an empty body and an additional `Recurly-Total-Records` header. This is a count of the total number of records that the endpoint will return, taking into account the current filtering query parameters. ## Limits In order to provide a fast response time to all our customers, we may rate limit excessive requests. By default, new Recurly sites have the following API rate limits: * Sandbox sites: 400 requests/min. All requests count towards the rate limit. * Production sites: 1,000 requests/min. Only GET requests count towards the rate limit. Once your site moves into production mode, Recurly will only rate limit GET requests. New subscriptions, account modifications, and other requests using POST, PUT, or DELETE methods will not count against your rate limit. The rate limit is calculated over a sliding 5 minute window. This means a production site could make 4,000 requests within one minute and not hit the rate limit so long as the site made less than 1,000 requests during the prior 4 minutes. If an API request exceeds the rate limit, the API will return a `429 Too Many Requests` HTTP status. If your business needs a higher limit, please contact support. The rate limit applied to your client can be determined with the `X-RateLimit-Limit` header, and the number of remaining requests is sent in the `X-RateLimit-Remaining` header. Finally, the `X-RateLimit-Reset` header contains an integer value representing the time, measured in seconds since the UNIX Epoch, at which the request count will be reset. ## Change Log A list of changes for this version can be found [in the changelog](https://recurly.com/developers/api/changelog.html#v2021-02-25---current-ga-version). version: v2021-02-25 security: - api_key: [] x-tagGroups: - name: Customers tags: - account - note - account_acquisition - billing_info - billing_infos - subscription - subscription_change - shipping_address - purchase - usage - automated_exports + - gift_cards +- name: App Management + tags: - external_subscriptions - external_invoices - external_products - external_accounts - - gift_cards - name: Products and Promotions tags: - item - plan - add-on - measured_unit - coupon - coupon_redemption - unique_coupon_code - name: Invoices and Payments tags: - invoice - line_item - credit_payment - transaction - name: Configuration tags: - site - custom_field_definition - shipping_method - dunning_campaigns tags: - name: site x-displayName: Site - name: custom_field_definition x-displayName: Custom Field Definition description: Describes the fields that can be used as custom fields on accounts, items, line-items (one time charges), plans, or subscriptions. - name: item x-displayName: Item description: |- For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items". Recurly's item catalog requires the Credit Invoices features to be enabled. - name: plan x-displayName: Plan description: A plan tells Recurly how often and how much to charge your customers. Plans can be created with free trials, optional products (called add-ons), setup fees, and more. - name: add-on x-displayName: Add-on description: An add-on is a charge billed each billing period in addition to a subscription’s base charge. Each plan may have one or more add-ons associated with it. - name: measured_unit x-displayName: Measured Unit description: A measured unit describes a usage-based add-on's usage. If different usage-based add-ons share the same measured unit, you can report on customer usage for those add-ons at the aggregated measured unit level. - name: account x-displayName: Account description: Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more. - name: note x-displayName: Account Note description: Account notes allow your team to leave notes on an account to add context, e.g. the reason for a refund, customer requests, and/or complaints. These notes are internal and not exposed to your customers. - name: account_acquisition x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored payment method at a time. Examples include credit cards, PayPal, or bank accounts. Billing info is filled out by the customer upon purchase or when they update their information. - name: billing_infos x-displayName: Billing Infos description: If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints. - name: subscription x-displayName: Subscription description: Subscriptions are created when your customers subscribe to one of your plans. The customer's subscription tells Recurly when and how much to bill the customer. - name: subscription_change x-displayName: Subscription Change description: Subscription changes alter subscription in a way that might affect the invoiced amount, such as changing the plan, add-ons, quantities, or shipping address. Changes can be made immediately in the current billing cycle or scheduled to take place at the next renewal. - name: shipping_address x-displayName: Shipping Address description: Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription. - name: invoice x-displayName: Invoice description: An invoice relates charges, credits, and payments together. When a subscription is created or renewed or a charge is created on the account, Recurly will sum the charges, discount or tax as appropriate, and send the invoice out for collection. - name: line_item x-displayName: Line Item description: Line items are the charges and credits on your customer's invoices. - name: credit_payment x-displayName: Credit Payment - name: purchase x-displayName: Purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. The purchases endpoint can also be used to immediately create a credit invoice on an account, when Credit Invoices is enabled on your site. - name: usage x-displayName: Usage description: Send Recurly your customer usage and we will automatically bill them in arrears at the end of the billing cycle. For more info on usage-based billing, [click here](https://docs.recurly.com/docs/usage-based-billing). - name: transaction x-displayName: Transaction description: Purchasing information is sent to your payment gateway in an action called a transaction. This includes the customer's billing information and the amount of money to be charged, voided, or refunded. - name: coupon x-displayName: Coupon description: Coupons can either be single codes that easily allow mass distribution by many customers or bulk coupons that can generate many unique coupons that can allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption description: Coupon redemptions are created when a coupon is applied to an account or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. - name: shipping_method x-displayName: Shipping Method description: Shipping methods offered to send products to customers. - name: automated_exports x-displayName: Automated Exports description: Automated exports of customer data. - name: dunning_campaigns x-displayName: Dunning Campaigns description: Settings used when attempting to dun customers whose payments are declined. - name: external_subscriptions x-displayName: External Subscription description: A subscription from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_invoices - x-displayName: External Invoices + x-displayName: External Invoice description: An invoice from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_products x-displayName: External Product description: A product from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: gift_cards x-displayName: Gift Cards description: Add gift card purchases to your checkout and allow gift card recipients to redeem the gift card for credit towards any of your products. - name: external_accounts - x-displayName: External Accounts + x-displayName: External Account description: An account from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. paths: "/sites": get: operationId: list_sites summary: List sites description: | This route is most useful for finding a site's ID for subsequent requests. See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. tags: - site parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of sites. content: application/json: schema: "$ref": "#/components/schemas/SiteList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const sites = client.listSites({ params: { limit: 200 } }) for await (const site of sites.each()) { console.log(site.subdomain) } - lang: Python source: | params = {"limit": 200} sites = client.list_sites(params=params).items() for site in sites: print(site.subdomain) - lang: ".NET" source: | var optionalParams = new ListSitesParams() { Limit = 200 }; var sites = client.ListSites(optionalParams); foreach(Site site in sites) { Console.WriteLine(site.Subdomain); } - lang: Ruby source: | params = { limit: 200 } sites = @client.list_sites(params: params) sites.each do |site| puts "Site: #{site.subdomain}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Site> sites = client.listSites(params); for (Site site : sites) { System.out.println(site.getSubdomain()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $sites = $client->listSites($options); foreach($sites as $site) { echo 'Site: ' . $site->getSubdomain() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListSitesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"asc\"),\n\tLimit: recurly.Int(200),\n}\n\nsites, err := client.ListSites(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor sites.HasMore() {\n\terr := sites.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, site := range sites.Data() {\n\t\tfmt.Printf(\"Site %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tsite.Id,\n\t\t\tsite.Subdomain,\n\t\t)\n\t}\n}" "/sites/{site_id}": get: operationId: get_site summary: Fetch a site tags: - site parameters: - "$ref": "#/components/parameters/site_id" responses: '200': description: A site. content: application/json: schema: "$ref": "#/components/schemas/Site" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const site = await client.getSite(siteId) console.log('Fetched site: ', site) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: site = client.get_site(site_id) print("Got Site %s" % site) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Site site = client.GetSite(siteId); Console.WriteLine($"Fetched site {site.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin site = @client.get_site(site_id: site_id) puts "Got Site #{site}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Site site = client.getSite(siteId); System.out.println("Fetched site: " + site.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $site = $client->getSite($site_id); echo 'Got Site:' . PHP_EOL; var_dump($site); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "site, err := client.GetSite(siteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Site: %s\", site.Id)" "/accounts": get: tags: - account operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_account_email" - "$ref": "#/components/parameters/filter_account_subscriber" - "$ref": "#/components/parameters/filter_account_past_due" responses: '200': description: A list of the site's accounts. content: application/json: schema: "$ref": "#/components/schemas/AccountList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const accounts = client.listAccounts({ params: { limit: 200 } }) for await (const account of accounts.each()) { console.log(account.code) } - lang: Python source: | params = {"limit": 200} accounts = client.list_accounts(params=params).items() for account in accounts: print(account.code) - lang: ".NET" source: | var optionalParams = new ListAccountsParams() { Limit = 200 }; var accounts = client.ListAccounts(optionalParams); foreach(Account account in accounts) { Console.WriteLine(account.Code); } - lang: Ruby source: | params = { limit: 200 } accounts = @client.list_accounts(params: params) accounts.each do |account| puts "Account: #{account.code}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time Pager<Account> accounts = client.listAccounts(params); for (Account acct : accounts) { System.out.println(acct.getCode()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $accounts = $client->listAccounts($options); foreach($accounts as $account) { echo 'Account code: ' . $account->getCode() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccounts, err := client.ListAccounts(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accounts.HasMore() {\n\terr := accounts.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, account := range accounts.Data() {\n\t\tfmt.Printf(\"Account %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\taccount.Id,\n\t\t\taccount.Code,\n\t\t)\n\t}\n}" post: tags: - account operationId: create_account summary: Create an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" required: true responses: '201': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountCreate = { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', preferredTimeZone: 'America/Chicago', address: { street1: '900 Camp St', city: 'New Orleans', region: 'LA', postalCode: '70115', country: 'US' } } const account = await client.createAccount(accountCreate) console.log('Created Account: ', account.code) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account_create = { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", "preferred_time_zone": "America/Chicago", "acquisition": { "campaign": "podcast-marketing", "channel": "social_media", "subchannel": "twitter", "cost": {"currency": "USD", "amount": 0.50}, }, "shipping_addresses": [ { "nickname": "Home", "street1": "1 Tchoupitoulas St", "city": "New Orleans", "region": "LA", "country": "US", "postal_code": "70115", "first_name": "Aaron", "last_name": "Du Monde", } ], } account = client.create_account(account_create) print("Created Account %s" % account) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var accountReq = new AccountCreate() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", PreferredTimeZone = "America/Chicago", Address = new Address() { City = "New Orleans", Region = "LA", Country = "US", PostalCode = "70115", Street1 = "900 Camp St." } }; Account account = client.CreateAccount(accountReq); Console.WriteLine($"Created account {account.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account_create = { code: account_code, first_name: "Benjamin", last_name: "Du Monde", preferred_time_zone: "America/Chicago", acquisition: { campaign: "podcast-marketing", channel: "social_media", subchannel: "twitter", cost: { currency: "USD", amount: 0.50 } }, shipping_addresses: [ { nickname: "Home", street1: "1 Tchoupitoulas St", city: "New Orleans", region: "LA", country: "US", postal_code: "70115", first_name: "Benjamin", last_name: "Du Monde" } ] } account = @client.create_account(body: account_create) puts "Created Account #{account}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountCreate accountReq = new AccountCreate(); Address address = new Address(); accountReq.setCode(accountCode); accountReq.setFirstName("Aaron"); accountReq.setLastName("Du Monde"); accountReq.setPreferredTimeZone("America/Chicago"); @@ -23803,1056 +23805,1059 @@ components: null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-BE - fr-CA - fr-CH - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: + - bacs - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback + - external_recovery - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: + - bacs - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum: - ach_cancel - ach_chargeback - ach_credit_return - ach_exception - ach_return - ach_transactions_not_supported - ach_validation_exception - amazon_amount_exceeded - amazon_declined_review - amazon_invalid_authorization_status - amazon_invalid_close_attempt - amazon_invalid_create_order_reference - amazon_invalid_order_status - amazon_not_authorized - amazon_order_not_modifiable - amazon_transaction_count_exceeded - api_error - approved - approved_fraud_review - authorization_already_captured - authorization_amount_depleted - authorization_expired - batch_processing_error - billing_agreement_already_accepted - billing_agreement_not_accepted - billing_agreement_not_found - billing_agreement_replaced - call_issuer - call_issuer_update_cardholder_data - cancelled - cannot_refund_unsettled_transactions - card_not_activated - card_type_not_accepted - cardholder_requested_stop - contact_gateway - contract_not_found - currency_not_supported - customer_canceled_transaction - cvv_required - declined - declined_card_number - declined_exception - declined_expiration_date - declined_missing_data - declined_saveable - declined_security_code - deposit_referenced_chargeback - direct_debit_type_not_accepted - duplicate_transaction - exceeds_daily_limit - exceeds_max_amount - expired_card - finbot_disconnect - finbot_unavailable - fraud_address - fraud_address_recurly - fraud_advanced_verification - fraud_gateway - fraud_generic - fraud_ip_address - fraud_manual_decision - fraud_risk_check - fraud_security_code - fraud_stolen_card - fraud_too_many_attempts - fraud_velocity - gateway_account_setup_incomplete - gateway_error - gateway_rate_limited - gateway_timeout - gateway_token_not_found - gateway_unavailable - gateway_validation_exception - insufficient_funds - invalid_account_number - invalid_amount - invalid_billing_agreement_status - invalid_card_number - invalid_data - invalid_email - invalid_gateway_access_token - invalid_gateway_configuration - invalid_issuer - invalid_login - invalid_merchant_type - invalid_name - invalid_payment_method - invalid_payment_method_hard - invalid_transaction - issuer_unavailable - merch_max_transaction_limit_exceeded - moneybot_disconnect - moneybot_unavailable - no_billing_information - no_gateway - no_gateway_found_for_transaction_amount - partial_approval - partial_credits_not_supported - payer_authentication_rejected - payment_cannot_void_authorization - payment_not_accepted - paypal_account_issue - paypal_cannot_pay_self - paypal_declined_use_alternate - paypal_expired_reference_id - paypal_hard_decline - paypal_invalid_billing_agreement - paypal_primary_declined - processor_not_available - processor_unavailable - recurly_credentials_not_found - recurly_error - recurly_failed_to_get_token - recurly_token_mismatch - recurly_token_not_found - reference_transactions_not_enabled - restricted_card - restricted_card_chargeback - rjs_token_expired - roku_invalid_card_number - roku_invalid_cib - roku_invalid_payment_method - roku_zip_code_mismatch - simultaneous - ssl_error - temporary_hold - three_d_secure_action_required - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error - three_d_secure_credential_error - three_d_secure_not_supported - too_busy - too_many_attempts - total_credit_exceeds_capture - transaction_already_refunded - transaction_already_voided - transaction_cannot_be_authorized - transaction_cannot_be_refunded - transaction_cannot_be_refunded_currently - transaction_cannot_be_voided - transaction_failed_to_settle - transaction_not_found - transaction_service_v2_disconnect - transaction_service_v2_unavailable - transaction_settled - transaction_stale_at_gateway - try_again - unknown - unmapped_partner_error - vaultly_service_unavailable - zero_dollar_auth_not_supported DeclineCodeEnum: type: string enum: - account_closed - call_issuer - card_not_activated - card_not_supported - cardholder_requested_stop - do_not_honor - do_not_try_again - exceeds_daily_limit - generic_decline - expired_card - fraudulent - insufficient_funds - incorrect_address - incorrect_security_code - invalid_amount - invalid_number - invalid_transaction - issuer_unavailable - lifecycle_decline - lost_card - pickup_card - policy_decline - restricted_card - restricted_card_chargeback - security_decline - stolen_card - try_again - update_cardholder_data - requires_3d_secure ExportDates: type: object properties: object: type: string title: Object type readOnly: true dates: type: array items: type: string title: An array of dates that have available exports. ExportFiles: type: object properties: object: type: string title: Object type readOnly: true files: type: array items: "$ref": "#/components/schemas/ExportFile" ExportFile: type: object properties: name: type: string title: Filename description: Name of the export file. md5sum: type: string title: MD5 hash of the export file description: MD5 hash of the export file. href: type: string title: A link to the export file description: A presigned link to download the export file. TaxIdentifierTypeEnum: type: string enum: - cpf - cnpj - cuit DunningCycleTypeEnum: type: string description: The type of invoice this cycle applies to. enum: - automatic - manual - trial AchTypeEnum: type: string description: The payment method type for a non-credit card based billing info. `bacs` and `becs` are the only accepted values. enum: - bacs - becs AchAccountTypeEnum: type: string description: The bank account type. (ACH only) enum: - checking - savings ExternalHppTypeEnum: type: string description: Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - adyen OnlineBankingPaymentTypeEnum: type: string description: Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object. enum: - ideal - sofort ExternalInvoiceStateEnum: type: string enum: - paid
recurly/recurly-client-php
bfc6e06dc38c04fd2493aa6b703633003dd5aa70
4.34.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 839c941..c40cd89 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.33.0 +current_version = 4.34.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c974f..7233b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,422 +1,433 @@ # Changelog +## [4.34.0](https://github.com/recurly/recurly-client-php/tree/4.34.0) (2023-05-03) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.33.0...4.34.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 [#761](https://github.com/recurly/recurly-client-php/pull/761) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index a41bc53..1c1b68d 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.33.0", + "version": "4.34.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index a655d6d..4432ad7 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.33.0'; + public const CURRENT = '4.34.0'; }
recurly/recurly-client-php
4f0032a8b255672cbaabc551eaa2b80343f9f396
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/tax_detail.php b/lib/recurly/resources/tax_detail.php index d31c43b..8372801 100644 --- a/lib/recurly/resources/tax_detail.php +++ b/lib/recurly/resources/tax_detail.php @@ -1,115 +1,187 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class TaxDetail extends RecurlyResource { + private $_billable; + private $_level; + private $_name; private $_rate; private $_region; private $_tax; private $_type; protected static $array_hints = [ ]; + /** + * Getter method for the billable attribute. + * Whether or not the line item is taxable. Only populated for a single LineItem fetch when Avalara for Communications is enabled. + * + * @return ?bool + */ + public function getBillable(): ?bool + { + return $this->_billable; + } + + /** + * Setter method for the billable attribute. + * + * @param bool $billable + * + * @return void + */ + public function setBillable(bool $billable): void + { + $this->_billable = $billable; + } + + /** + * Getter method for the level attribute. + * Provides the jurisdiction level for the Communications tax applied. Example values include city, state and federal. Present only when Avalara for Communications is enabled. + * + * @return ?string + */ + public function getLevel(): ?string + { + return $this->_level; + } + + /** + * Setter method for the level attribute. + * + * @param string $level + * + * @return void + */ + public function setLevel(string $level): void + { + $this->_level = $level; + } + + /** + * Getter method for the name attribute. + * Provides the name of the Communications tax applied. Present only when Avalara for Communications is enabled. + * + * @return ?string + */ + public function getName(): ?string + { + return $this->_name; + } + + /** + * Setter method for the name attribute. + * + * @param string $name + * + * @return void + */ + public function setName(string $name): void + { + $this->_name = $name; + } + /** * Getter method for the rate attribute. * Provides the tax rate for the region. * * @return ?float */ public function getRate(): ?float { return $this->_rate; } /** * Setter method for the rate attribute. * * @param float $rate * * @return void */ public function setRate(float $rate): void { $this->_rate = $rate; } /** * Getter method for the region attribute. - * Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. + * Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. Not present when Avalara for Communications is enabled. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the tax attribute. * The total tax applied for this tax type. * * @return ?float */ public function getTax(): ?float { return $this->_tax; } /** * Setter method for the tax attribute. * * @param float $tax * * @return void */ public function setTax(float $tax): void { $this->_tax = $tax; } /** * Getter method for the type attribute. - * Provides the tax type for the region. For Canadian Sales Tax, this will be GST, HST, QST or PST. + * Provides the tax type for the region or type of Comminications tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. * * @return ?string */ public function getType(): ?string { return $this->_type; } /** * Setter method for the type attribute. * * @param string $type * * @return void */ public function setType(string $type): void { $this->_type = $type; } } \ No newline at end of file diff --git a/lib/recurly/resources/tax_info.php b/lib/recurly/resources/tax_info.php index 6ed8e00..cba8b7a 100644 --- a/lib/recurly/resources/tax_info.php +++ b/lib/recurly/resources/tax_info.php @@ -1,116 +1,116 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class TaxInfo extends RecurlyResource { private $_rate; private $_region; private $_tax_details; private $_type; protected static $array_hints = [ 'setTaxDetails' => '\Recurly\Resources\TaxDetail', ]; /** * Getter method for the rate attribute. - * Rate + * The combined tax rate. Not present when Avalara for Communications is enabled. * * @return ?float */ public function getRate(): ?float { return $this->_rate; } /** * Setter method for the rate attribute. * * @param float $rate * * @return void */ public function setRate(float $rate): void { $this->_rate = $rate; } /** * Getter method for the region attribute. - * Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. + * Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display the regional tax, like VAT, GST, or PST. Not present when Avalara for Communications is enabled. * * @return ?string */ public function getRegion(): ?string { return $this->_region; } /** * Setter method for the region attribute. * * @param string $region * * @return void */ public function setRegion(string $region): void { $this->_region = $region; } /** * Getter method for the tax_details attribute. - * Provides additional tax details for Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItem. + * Provides additional tax details for Communications taxes when Avalara for Communications is enabled or Canadian Sales Tax when there is tax applied at both the country and province levels. This will only be populated for the Invoice response when fetching a single invoice and not for the InvoiceList or LineItemList. Only populated for a single LineItem fetch when Avalara for Communications is enabled. * * @return array */ public function getTaxDetails(): array { return $this->_tax_details ?? [] ; } /** * Setter method for the tax_details attribute. * * @param array $tax_details * * @return void */ public function setTaxDetails(array $tax_details): void { $this->_tax_details = $tax_details; } /** * Getter method for the type attribute. - * Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. + * Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. Not present when Avalara for Communications is enabled. * * @return ?string */ public function getType(): ?string { return $this->_type; } /** * Setter method for the type attribute. * * @param string $type * * @return void */ public function setType(string $type): void { $this->_type = $type; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index a7a7a54..7a5a9af 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -21838,1067 +21838,1091 @@ components: method_code: type: string title: Method Code description: The code of the shipping method used to deliver the subscription. To remove shipping set this to `null` and the `amount=0`. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and address are both present, address will take precedence. address: "$ref": "#/components/schemas/ShippingAddressCreate" SubscriptionCreate: type: object properties: plan_code: type: string title: Plan code maxLength: 50 description: You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used. plan_id: type: string title: Plan ID maxLength: 13 description: You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used. account: "$ref": "#/components/schemas/AccountCreate" billing_info_id: type: string title: Billing Info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. shipping: title: Shipping address description: Create a shipping address on the account and assign it to the subscription. "$ref": "#/components/schemas/SubscriptionShippingCreate" collection_method: title: Collection method default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 unit_amount: type: number format: float title: Custom subscription pricing description: Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag. quantity: type: integer title: Quantity description: Optionally override the default quantity of 1. default: 1 minimum: 0 add_ons: type: array title: Add-ons items: "$ref": "#/components/schemas/SubscriptionAddOnCreate" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string custom_fields: "$ref": "#/components/schemas/CustomFields" trial_ends_at: type: string format: date-time title: Trial ends at description: If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time. starts_at: type: string format: date-time title: Start date description: If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial. next_bill_date: type: string format: date-time title: Next bill date description: If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires. total_billing_cycles: type: integer title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. minimum: 1 renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. ramp_intervals: type: array title: Ramp Intervals description: The new set of ramp intervals for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampInterval" revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals. customer_notes: type: string title: Customer notes description: This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. credit_customer_notes: type: string title: Credit customer notes description: If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice. po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" gift_card_redemption_code: type: string title: Gift card Redemption Code description: A gift card redemption code to be redeemed on the purchase invoice. required: - plan_code - currency - account SubscriptionPurchase: type: object properties: plan_code: type: string title: Plan code plan_id: type: string title: Plan ID maxLength: 13 unit_amount: type: number format: float title: Custom subscription pricing description: Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency. minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag. quantity: type: integer title: Quantity description: Optionally override the default quantity of 1. default: 1 minimum: 0 add_ons: type: array title: Add-ons items: "$ref": "#/components/schemas/SubscriptionAddOnCreate" custom_fields: "$ref": "#/components/schemas/CustomFields" shipping: title: Shipping address description: Create a shipping address on the account and assign it to the subscription. "$ref": "#/components/schemas/SubscriptionShippingPurchase" trial_ends_at: type: string format: date-time title: Trial ends at description: If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time. starts_at: type: string format: date-time title: Start date description: If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial. next_bill_date: type: string format: date-time title: Next bill date description: If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription's activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires. total_billing_cycles: type: integer title: Total billing cycles description: The number of cycles/billing periods in a term. When `remaining_billing_cycles=0`, if `auto_renew=true` the subscription will renew and a new term will begin, otherwise the subscription will expire. minimum: 1 renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" ramp_intervals: type: array title: Ramp Intervals description: The new set of ramp intervals for the subscription. items: "$ref": "#/components/schemas/SubscriptionRampInterval" required: - plan_code SubscriptionUpdate: type: object properties: collection_method: title: Change collection method "$ref": "#/components/schemas/CollectionMethodEnum" custom_fields: "$ref": "#/components/schemas/CustomFields" remaining_billing_cycles: type: integer title: Remaining billing cycles description: The remaining billing cycles in the current term. renewal_billing_cycles: type: integer title: Renewal billing cycles description: If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms. Defaults to the plan's `total_billing_cycles`. auto_renew: type: boolean default: true title: Auto renew description: Whether the subscription renews at the end of its term. next_bill_date: type: string format: date-time title: Next bill date description: If present, this sets the date the subscription's next billing period will start (`current_period_ends_at`). This can be used to align the subscription’s billing to a specific day of the month. For a subscription in a trial period, this will change when the trial expires. This parameter is useful for postponement of a subscription to change its billing date without proration. revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" terms_and_conditions: type: string title: Terms and conditions description: Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals. customer_notes: type: string title: Customer notes description: Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals. po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Terms that the subscription is due on description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 gateway_code: type: string title: Gateway Code description: If present, this subscription's transactions will use the payment gateway with this code. maxLength: 13 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true shipping: "$ref": "#/components/schemas/SubscriptionShippingUpdate" billing_info_id: type: string title: Billing Info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. SubscriptionPause: type: object properties: remaining_pause_cycles: type: integer title: Remaining pause cycles description: Number of billing cycles to pause the subscriptions. A value of 0 will cancel any pending pauses on the subscription. required: - remaining_pause_cycles SubscriptionShipping: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddress" method: "$ref": "#/components/schemas/ShippingMethodMini" amount: type: number format: float title: Subscription's shipping cost SubscriptionShippingCreate: type: object title: Subscription shipping details properties: address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If `address_id` and `address` are both present, `address` will be used. maxLength: 13 method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionShippingUpdate: type: object title: Subscription shipping details properties: object: type: string title: Object type address: "$ref": "#/components/schemas/ShippingAddressCreate" address_id: type: string title: Shipping Address ID description: Assign a shipping address from the account's existing shipping addresses. maxLength: 13 SubscriptionShippingPurchase: type: object title: Subscription shipping details properties: method_id: type: string title: Service ID description: The id of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 13 method_code: type: string title: Service Code description: The code of the shipping method used to deliver the subscription. If `method_id` and `method_code` are both present, `method_id` will be used. maxLength: 50 amount: type: number format: float title: Assigns the subscription's shipping cost. If this is greater than zero then a `method_id` or `method_code` is required. SubscriptionRampInterval: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. default: 1 unit_amount: type: integer description: Represents the price for the ramp interval. SubscriptionRampIntervalResponse: type: object title: Subscription Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. remaining_billing_cycles: type: integer description: Represents how many billing cycles are left in a ramp interval. unit_amount: type: number format: float title: Unit price description: Represents the price for the ramp interval. TaxInfo: type: object title: Tax info properties: type: type: string title: Type description: Provides the tax type as "vat" for EU VAT, "usst" for U.S. Sales Tax, or the 2 letter country code for country level tax types like Canada, Australia, New Zealand, Israel, and all non-EU European countries. + Not present when Avalara for Communications is enabled. region: type: string title: Region description: Provides the tax region applied on an invoice. For U.S. Sales Tax, this will be the 2 letter state code. For EU VAT this will be the 2 letter country code. For all country level tax types, this will display - the regional tax, like VAT, GST, or PST. + the regional tax, like VAT, GST, or PST. Not present when Avalara for + Communications is enabled. rate: type: number format: float title: Rate + description: The combined tax rate. Not present when Avalara for Communications + is enabled. tax_details: type: array - description: Provides additional tax details for Canadian Sales Tax when - there is tax applied at both the country and province levels. This will - only be populated for the Invoice response when fetching a single invoice - and not for the InvoiceList or LineItem. + description: Provides additional tax details for Communications taxes when + Avalara for Communications is enabled or Canadian Sales Tax when there + is tax applied at both the country and province levels. This will only + be populated for the Invoice response when fetching a single invoice and + not for the InvoiceList or LineItemList. Only populated for a single LineItem + fetch when Avalara for Communications is enabled. items: "$ref": "#/components/schemas/TaxDetail" TaxDetail: type: object title: Tax detail properties: type: type: string title: Type - description: Provides the tax type for the region. For Canadian Sales Tax, + description: Provides the tax type for the region or type of Comminications + tax when Avalara for Communications is enabled. For Canadian Sales Tax, this will be GST, HST, QST or PST. region: type: string title: Region description: Provides the tax region applied on an invoice. For Canadian Sales Tax, this will be either the 2 letter province code or country code. + Not present when Avalara for Communications is enabled. rate: type: number format: float title: Rate description: Provides the tax rate for the region. tax: type: number format: float title: Tax description: The total tax applied for this tax type. + name: + type: string + title: Name + description: Provides the name of the Communications tax applied. Present + only when Avalara for Communications is enabled. + level: + type: string + title: Level + description: Provides the jurisdiction level for the Communications tax + applied. Example values include city, state and federal. Present only + when Avalara for Communications is enabled. + billable: + type: boolean + title: Billable + description: Whether or not the line item is taxable. Only populated for + a single LineItem fetch when Avalara for Communications is enabled. Transaction: type: object properties: id: type: string title: Transaction ID maxLength: 13 object: type: string title: Object type uuid: type: string title: Recurly UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 original_transaction_id: type: string title: Original Transaction ID description: If this transaction is a refund (`type=refund`), this will be the ID of the original transaction on the invoice being refunded. maxLength: 13 account: "$ref": "#/components/schemas/AccountMini" invoice: "$ref": "#/components/schemas/InvoiceMini" voided_by_invoice: "$ref": "#/components/schemas/InvoiceMini" subscription_ids: type: array title: Subscription IDs description: If the transaction is charging or refunding for one or more subscriptions, these are their IDs. items: type: string title: Subscription ID maxLength: 13 type: title: Transaction type description: | - `authorization` – verifies billing information and places a hold on money in the customer's account. - `capture` – captures funds held by an authorization and completes a purchase. - `purchase` – combines the authorization and capture in one transaction. - `refund` – returns all or a portion of the money collected in a previous transaction to the customer. - `verify` – a $0 or $1 transaction used to verify billing information which is immediately voided. "$ref": "#/components/schemas/TransactionTypeEnum" origin: title: Origin of transaction description: Describes how the transaction was triggered. "$ref": "#/components/schemas/TransactionOriginEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: Total transaction amount sent to the payment gateway. status: title: Transaction status description: The current transaction status. Note that the status may change, e.g. a `pending` transaction may become `declined` or `success` may later become `void`. "$ref": "#/components/schemas/TransactionStatusEnum" success: type: boolean title: Success? description: Did this transaction complete successfully? backup_payment_method_used: type: boolean title: Backup Payment Method Used? description: Indicates if the transaction was completed using a backup payment refunded: type: boolean title: Refunded? description: Indicates if part or all of this transaction was refunded. billing_address: "$ref": "#/components/schemas/AddressWithName" collection_method: description: The method by which the payment was collected. "$ref": "#/components/schemas/CollectionMethodEnum" payment_method: "$ref": "#/components/schemas/PaymentMethod" ip_address_v4: type: string title: IP address description: | IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded. ip_address_country: type: string title: Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly. status_code: type: string title: Status code status_message: type: string title: Status message description: For declined (`success=false`) transactions, the message displayed to the merchant. customer_message: type: string title: Customer message description: For declined (`success=false`) transactions, the message displayed to the customer. customer_message_locale: type: string title: Language code for the message payment_gateway: type: object x-class-name: TransactionPaymentGateway properties: id: type: string object: type: string title: Object type type: type: string name: type: string gateway_message: type: string title: Gateway message description: Transaction message from the payment gateway. gateway_reference: type: string title: Gateway reference description: Transaction reference number from the payment gateway. gateway_approval_code: type: string title: Transaction approval code from the payment gateway. gateway_response_code: type: string title: For declined transactions (`success=false`), this field lists the gateway error code. gateway_response_time: type: number format: float title: Gateway response time description: Time, in seconds, for gateway to process the transaction. gateway_response_values: type: object title: Gateway response values description: The values in this field will vary from gateway to gateway. cvv_check: title: CVV check description: When processed, result from checking the CVV/CVC value on the transaction. "$ref": "#/components/schemas/CvvCheckEnum" avs_check: title: AVS check description: When processed, result from checking the overall AVS on the transaction. "$ref": "#/components/schemas/AvsCheckEnum" created_at: type: string format: date-time title: Created at updated_at: type: string format: date-time title: Updated at voided_at: type: string format: date-time title: Voided at collected_at: type: string format: date-time title: Collected at, or if not collected yet, the time the transaction was created. ExternalTransaction: type: object properties: payment_method: type: string title: Payment Method description: Payment method used for external transaction. "$ref": "#/components/schemas/ExternalPaymentMethodEnum" description: type: string title: Description description: Used as the transaction's description. maxLength: 50 amount: type: number format: float title: Amount description: The total amount of the transcaction. Cannot excceed the invoice total. collected_at: type: string format: date-time title: Collected At description: Datetime that the external payment was collected. Defaults to current datetime. UniqueCouponCode: type: object description: A unique coupon code for a bulk coupon. properties: id: type: string title: Unique Coupon Code ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. state: title: State description: Indicates if the unique coupon code is redeemable or why not. "$ref": "#/components/schemas/CouponCodeStateEnum" bulk_coupon_id: type: string title: Bulk Coupon ID description: The Coupon ID of the parent Bulk Coupon readOnly: true bulk_coupon_code: type: string title: Bulk Coupon code description: The Coupon code of the parent Bulk Coupon created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Updated at format: date-time readOnly: true redeemed_at: type: string title: Redeemed at description: The date and time the unique coupon code was redeemed. format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time UniqueCouponCodeList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/UniqueCouponCode" UniqueCouponCodeParams: type: object description: Parameters to be passed to the `list_unique_coupon_codes` endpoint to obtain the newly generated codes. properties: limit: type: integer title: The number of UniqueCouponCodes that will be generated order: type: string title: Sort order to list newly generated UniqueCouponCodes (should always be `asc`) sort: type: string title: Sort field to list newly generated UniqueCouponCodes (should always be `created_at`) begin_time: type: string title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time Usage: type: object properties: id: type: string object: type: string title: Object type merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). usage_type: "$ref": "#/components/schemas/UsageTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" description: The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id:
recurly/recurly-client-php
4cf7a4b5c2285da08aca65bdcb2fee3023556b7c
4.33.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5484c9c..839c941 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.32.0 +current_version = 4.33.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index ff33955..d1c974f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,411 +1,422 @@ # Changelog +## [4.33.0](https://github.com/recurly/recurly-client-php/tree/4.33.0) (2023-04-26) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.32.0...4.33.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (used_tax_service on Invoice) [#759](https://github.com/recurly/recurly-client-php/pull/759) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index e6534c4..a41bc53 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.32.0", + "version": "4.33.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 14cc453..a655d6d 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.32.0'; + public const CURRENT = '4.33.0'; }
recurly/recurly-client-php
0c84c0bbe7f47ac9c7668ace194b615e79518731
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/invoice.php b/lib/recurly/resources/invoice.php index cdad2aa..ff624e8 100644 --- a/lib/recurly/resources/invoice.php +++ b/lib/recurly/resources/invoice.php @@ -1,983 +1,1007 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class Invoice extends RecurlyResource { private $_account; private $_address; private $_balance; private $_billing_info_id; private $_closed_at; private $_collection_method; private $_created_at; private $_credit_payments; private $_currency; private $_customer_notes; private $_discount; private $_due_at; private $_dunning_campaign_id; private $_dunning_events_sent; private $_final_dunning_event; private $_has_more_line_items; private $_id; private $_line_items; private $_net_terms; private $_number; private $_object; private $_origin; private $_paid; private $_po_number; private $_previous_invoice_id; private $_refundable_amount; private $_shipping_address; private $_state; private $_subscription_ids; private $_subtotal; private $_tax; private $_tax_info; private $_terms_and_conditions; private $_total; private $_transactions; private $_type; private $_updated_at; + private $_used_tax_service; private $_uuid; private $_vat_number; private $_vat_reverse_charge_notes; protected static $array_hints = [ 'setCreditPayments' => '\Recurly\Resources\CreditPayment', 'setLineItems' => '\Recurly\Resources\LineItem', 'setSubscriptionIds' => 'string', 'setTransactions' => '\Recurly\Resources\Transaction', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the address attribute. * * * @return ?\Recurly\Resources\InvoiceAddress */ public function getAddress(): ?\Recurly\Resources\InvoiceAddress { return $this->_address; } /** * Setter method for the address attribute. * * @param \Recurly\Resources\InvoiceAddress $address * * @return void */ public function setAddress(\Recurly\Resources\InvoiceAddress $address): void { $this->_address = $address; } /** * Getter method for the balance attribute. * The outstanding balance remaining on this invoice. * * @return ?float */ public function getBalance(): ?float { return $this->_balance; } /** * Setter method for the balance attribute. * * @param float $balance * * @return void */ public function setBalance(float $balance): void { $this->_balance = $balance; } /** * Getter method for the billing_info_id attribute. * The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. * * @return ?string */ public function getBillingInfoId(): ?string { return $this->_billing_info_id; } /** * Setter method for the billing_info_id attribute. * * @param string $billing_info_id * * @return void */ public function setBillingInfoId(string $billing_info_id): void { $this->_billing_info_id = $billing_info_id; } /** * Getter method for the closed_at attribute. * Date invoice was marked paid or failed. * * @return ?string */ public function getClosedAt(): ?string { return $this->_closed_at; } /** * Setter method for the closed_at attribute. * * @param string $closed_at * * @return void */ public function setClosedAt(string $closed_at): void { $this->_closed_at = $closed_at; } /** * Getter method for the collection_method attribute. * An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. * * @return ?string */ public function getCollectionMethod(): ?string { return $this->_collection_method; } /** * Setter method for the collection_method attribute. * * @param string $collection_method * * @return void */ public function setCollectionMethod(string $collection_method): void { $this->_collection_method = $collection_method; } /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the credit_payments attribute. * Credit payments * * @return array */ public function getCreditPayments(): array { return $this->_credit_payments ?? [] ; } /** * Setter method for the credit_payments attribute. * * @param array $credit_payments * * @return void */ public function setCreditPayments(array $credit_payments): void { $this->_credit_payments = $credit_payments; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the customer_notes attribute. * This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. * * @return ?string */ public function getCustomerNotes(): ?string { return $this->_customer_notes; } /** * Setter method for the customer_notes attribute. * * @param string $customer_notes * * @return void */ public function setCustomerNotes(string $customer_notes): void { $this->_customer_notes = $customer_notes; } /** * Getter method for the discount attribute. * Total discounts applied to this invoice. * * @return ?float */ public function getDiscount(): ?float { return $this->_discount; } /** * Setter method for the discount attribute. * * @param float $discount * * @return void */ public function setDiscount(float $discount): void { $this->_discount = $discount; } /** * Getter method for the due_at attribute. * Date invoice is due. This is the date the net terms are reached. * * @return ?string */ public function getDueAt(): ?string { return $this->_due_at; } /** * Setter method for the due_at attribute. * * @param string $due_at * * @return void */ public function setDueAt(string $due_at): void { $this->_due_at = $due_at; } /** * Getter method for the dunning_campaign_id attribute. * Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign. * * @return ?string */ public function getDunningCampaignId(): ?string { return $this->_dunning_campaign_id; } /** * Setter method for the dunning_campaign_id attribute. * * @param string $dunning_campaign_id * * @return void */ public function setDunningCampaignId(string $dunning_campaign_id): void { $this->_dunning_campaign_id = $dunning_campaign_id; } /** * Getter method for the dunning_events_sent attribute. * Number of times the event was sent. * * @return ?int */ public function getDunningEventsSent(): ?int { return $this->_dunning_events_sent; } /** * Setter method for the dunning_events_sent attribute. * * @param int $dunning_events_sent * * @return void */ public function setDunningEventsSent(int $dunning_events_sent): void { $this->_dunning_events_sent = $dunning_events_sent; } /** * Getter method for the final_dunning_event attribute. * Last communication attempt. * * @return ?bool */ public function getFinalDunningEvent(): ?bool { return $this->_final_dunning_event; } /** * Setter method for the final_dunning_event attribute. * * @param bool $final_dunning_event * * @return void */ public function setFinalDunningEvent(bool $final_dunning_event): void { $this->_final_dunning_event = $final_dunning_event; } /** * Getter method for the has_more_line_items attribute. * Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint. * * @return ?bool */ public function getHasMoreLineItems(): ?bool { return $this->_has_more_line_items; } /** * Setter method for the has_more_line_items attribute. * * @param bool $has_more_line_items * * @return void */ public function setHasMoreLineItems(bool $has_more_line_items): void { $this->_has_more_line_items = $has_more_line_items; } /** * Getter method for the id attribute. * Invoice ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the line_items attribute. * Line Items * * @return array */ public function getLineItems(): array { return $this->_line_items ?? [] ; } /** * Setter method for the line_items attribute. * * @param array $line_items * * @return void */ public function setLineItems(array $line_items): void { $this->_line_items = $line_items; } /** * Getter method for the net_terms attribute. * Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. * * @return ?int */ public function getNetTerms(): ?int { return $this->_net_terms; } /** * Setter method for the net_terms attribute. * * @param int $net_terms * * @return void */ public function setNetTerms(int $net_terms): void { $this->_net_terms = $net_terms; } /** * Getter method for the number attribute. * If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. * * @return ?string */ public function getNumber(): ?string { return $this->_number; } /** * Setter method for the number attribute. * * @param string $number * * @return void */ public function setNumber(string $number): void { $this->_number = $number; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the origin attribute. * The event that created the invoice. * * @return ?string */ public function getOrigin(): ?string { return $this->_origin; } /** * Setter method for the origin attribute. * * @param string $origin * * @return void */ public function setOrigin(string $origin): void { $this->_origin = $origin; } /** * Getter method for the paid attribute. * The total amount of successful payments transaction on this invoice. * * @return ?float */ public function getPaid(): ?float { return $this->_paid; } /** * Setter method for the paid attribute. * * @param float $paid * * @return void */ public function setPaid(float $paid): void { $this->_paid = $paid; } /** * Getter method for the po_number attribute. * For manual invoicing, this identifies the PO number associated with the subscription. * * @return ?string */ public function getPoNumber(): ?string { return $this->_po_number; } /** * Setter method for the po_number attribute. * * @param string $po_number * * @return void */ public function setPoNumber(string $po_number): void { $this->_po_number = $po_number; } /** * Getter method for the previous_invoice_id attribute. * On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice. * * @return ?string */ public function getPreviousInvoiceId(): ?string { return $this->_previous_invoice_id; } /** * Setter method for the previous_invoice_id attribute. * * @param string $previous_invoice_id * * @return void */ public function setPreviousInvoiceId(string $previous_invoice_id): void { $this->_previous_invoice_id = $previous_invoice_id; } /** * Getter method for the refundable_amount attribute. * The refundable amount on a charge invoice. It will be null for all other invoices. * * @return ?float */ public function getRefundableAmount(): ?float { return $this->_refundable_amount; } /** * Setter method for the refundable_amount attribute. * * @param float $refundable_amount * * @return void */ public function setRefundableAmount(float $refundable_amount): void { $this->_refundable_amount = $refundable_amount; } /** * Getter method for the shipping_address attribute. * * * @return ?\Recurly\Resources\ShippingAddress */ public function getShippingAddress(): ?\Recurly\Resources\ShippingAddress { return $this->_shipping_address; } /** * Setter method for the shipping_address attribute. * * @param \Recurly\Resources\ShippingAddress $shipping_address * * @return void */ public function setShippingAddress(\Recurly\Resources\ShippingAddress $shipping_address): void { $this->_shipping_address = $shipping_address; } /** * Getter method for the state attribute. * Invoice state * * @return ?string */ public function getState(): ?string { return $this->_state; } /** * Setter method for the state attribute. * * @param string $state * * @return void */ public function setState(string $state): void { $this->_state = $state; } /** * Getter method for the subscription_ids attribute. * If the invoice is charging or refunding for one or more subscriptions, these are their IDs. * * @return array */ public function getSubscriptionIds(): array { return $this->_subscription_ids ?? [] ; } /** * Setter method for the subscription_ids attribute. * * @param array $subscription_ids * * @return void */ public function setSubscriptionIds(array $subscription_ids): void { $this->_subscription_ids = $subscription_ids; } /** * Getter method for the subtotal attribute. * The summation of charges and credits, before discounts and taxes. * * @return ?float */ public function getSubtotal(): ?float { return $this->_subtotal; } /** * Setter method for the subtotal attribute. * * @param float $subtotal * * @return void */ public function setSubtotal(float $subtotal): void { $this->_subtotal = $subtotal; } /** * Getter method for the tax attribute. * The total tax on this invoice. * * @return ?float */ public function getTax(): ?float { return $this->_tax; } /** * Setter method for the tax attribute. * * @param float $tax * * @return void */ public function setTax(float $tax): void { $this->_tax = $tax; } /** * Getter method for the tax_info attribute. * Tax info * * @return ?\Recurly\Resources\TaxInfo */ public function getTaxInfo(): ?\Recurly\Resources\TaxInfo { return $this->_tax_info; } /** * Setter method for the tax_info attribute. * * @param \Recurly\Resources\TaxInfo $tax_info * * @return void */ public function setTaxInfo(\Recurly\Resources\TaxInfo $tax_info): void { $this->_tax_info = $tax_info; } /** * Getter method for the terms_and_conditions attribute. * This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. * * @return ?string */ public function getTermsAndConditions(): ?string { return $this->_terms_and_conditions; } /** * Setter method for the terms_and_conditions attribute. * * @param string $terms_and_conditions * * @return void */ public function setTermsAndConditions(string $terms_and_conditions): void { $this->_terms_and_conditions = $terms_and_conditions; } /** * Getter method for the total attribute. * The final total on this invoice. The summation of invoice charges, discounts, credits, and tax. * * @return ?float */ public function getTotal(): ?float { return $this->_total; } /** * Setter method for the total attribute. * * @param float $total * * @return void */ public function setTotal(float $total): void { $this->_total = $total; } /** * Getter method for the transactions attribute. * Transactions * * @return array */ public function getTransactions(): array { return $this->_transactions ?? [] ; } /** * Setter method for the transactions attribute. * * @param array $transactions * * @return void */ public function setTransactions(array $transactions): void { $this->_transactions = $transactions; } /** * Getter method for the type attribute. * Invoices are either charge, credit, or legacy invoices. * * @return ?string */ public function getType(): ?string { return $this->_type; } /** * Setter method for the type attribute. * * @param string $type * * @return void */ public function setType(string $type): void { $this->_type = $type; } /** * Getter method for the updated_at attribute. * Last updated at * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } + /** + * Getter method for the used_tax_service attribute. + * Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service. + * + * @return ?bool + */ + public function getUsedTaxService(): ?bool + { + return $this->_used_tax_service; + } + + /** + * Setter method for the used_tax_service attribute. + * + * @param bool $used_tax_service + * + * @return void + */ + public function setUsedTaxService(bool $used_tax_service): void + { + $this->_used_tax_service = $used_tax_service; + } + /** * Getter method for the uuid attribute. * Invoice UUID * * @return ?string */ public function getUuid(): ?string { return $this->_uuid; } /** * Setter method for the uuid attribute. * * @param string $uuid * * @return void */ public function setUuid(string $uuid): void { $this->_uuid = $uuid; } /** * Getter method for the vat_number attribute. * VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method. * * @return ?string */ public function getVatNumber(): ?string { return $this->_vat_number; } /** * Setter method for the vat_number attribute. * * @param string $vat_number * * @return void */ public function setVatNumber(string $vat_number): void { $this->_vat_number = $vat_number; } /** * Getter method for the vat_reverse_charge_notes attribute. * VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. * * @return ?string */ public function getVatReverseChargeNotes(): ?string { return $this->_vat_reverse_charge_notes; } /** * Setter method for the vat_reverse_charge_notes attribute. * * @param string $vat_reverse_charge_notes * * @return void */ public function setVatReverseChargeNotes(string $vat_reverse_charge_notes): void { $this->_vat_reverse_charge_notes = $vat_reverse_charge_notes; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 493071b..a7a7a54 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -18523,1024 +18523,1031 @@ components: title: Last updated at format: date-time readOnly: true voided_at: type: string title: Voided at format: date-time readOnly: true CustomField: type: object title: Custom field properties: name: type: string title: Field name description: Fields must be created in the UI before values can be assigned to them. pattern: "/^[a-z0-9_-]+$/i" maxLength: 50 value: type: string title: Field value description: Any values that resemble a credit card number or security code (CVV/CVC) will be rejected. maxLength: 255 required: - name - value CustomFields: type: array title: Custom fields description: 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. items: "$ref": "#/components/schemas/CustomField" CustomFieldDefinition: type: object title: Custom field definition properties: id: type: string title: Custom field definition ID readOnly: true object: type: string title: Object type readOnly: true related_type: title: Related Recurly object type "$ref": "#/components/schemas/RelatedTypeEnum" name: type: string title: Name description: Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type. pattern: "/^[a-z0-9_-]+$/i" maxLength: 50 user_access: title: User access description: | The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. - `set_only` - Users with the Customers role will be able to set this field's data via the admin console. "$ref": "#/components/schemas/UserAccessEnum" display_name: type: string title: Display name description: Used to label the field when viewing and editing the field in Recurly's admin UI. maxLength: 50 tooltip: type: string title: Tooltip description description: Displayed as a tooltip when editing the field in the Recurly admin UI. pattern: "/^[a-z0-9_-]+$/i" maxLength: 255 created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at description: Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible. readOnly: true ItemMini: type: object title: Item mini details description: Just the important parts. properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 state: title: State description: The current state of the item. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. Item: type: object description: Full item details. properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 state: title: State description: The current state of the item. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true ItemCreate: type: object properties: code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" required: - code - name ItemUpdate: type: object properties: code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" Invoice: type: object properties: id: type: string title: Invoice ID readOnly: true uuid: type: string title: Invoice UUID readOnly: true object: type: string title: Object type readOnly: true type: title: Invoice type description: Invoices are either charge, credit, or legacy invoices. "$ref": "#/components/schemas/InvoiceTypeEnum" origin: title: Origin description: The event that created the invoice. "$ref": "#/components/schemas/OriginEnum" state: title: Invoice state "$ref": "#/components/schemas/InvoiceStateEnum" account: "$ref": "#/components/schemas/AccountMini" billing_info_id: type: string title: Billing info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. subscription_ids: type: array title: Subscription IDs description: If the invoice is charging or refunding for one or more subscriptions, these are their IDs. items: type: string title: Subscription ID maxLength: 13 previous_invoice_id: type: string title: Previous invoice ID description: On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice. maxLength: 13 number: type: string title: Invoice number description: 'If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.' collection_method: title: Collection method description: An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 address: "$ref": "#/components/schemas/InvoiceAddress" shipping_address: "$ref": "#/components/schemas/ShippingAddress" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 discount: type: number format: float title: Discount description: Total discounts applied to this invoice. subtotal: type: number format: float title: Subtotal description: The summation of charges and credits, before discounts and taxes. tax: type: number format: float title: Tax description: The total tax on this invoice. total: type: number format: float title: Total description: The final total on this invoice. The summation of invoice charges, discounts, credits, and tax. refundable_amount: type: number format: float title: Refundable amount description: The refundable amount on a charge invoice. It will be null for all other invoices. paid: type: number format: float title: Paid description: The total amount of successful payments transaction on this invoice. balance: type: number format: float title: Balance description: The outstanding balance remaining on this invoice. tax_info: "$ref": "#/components/schemas/TaxInfo" + used_tax_service: + type: boolean + title: Used Tax Service? + description: Will be `true` when the invoice had a successful response from + the tax service and `false` when the invoice was not sent to tax service + due to a lack of address or enabled jurisdiction or was processed without + tax due to a non-blocking error returned from the tax service. vat_number: type: string title: VAT number description: VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method. maxLength: 20 vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. terms_and_conditions: type: string title: Terms and conditions description: This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. customer_notes: type: string title: Customer notes description: This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. line_items: type: array title: Line Items items: "$ref": "#/components/schemas/LineItem" has_more_line_items: type: boolean title: Has more Line Items description: Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint. transactions: type: array title: Transactions items: "$ref": "#/components/schemas/Transaction" credit_payments: type: array title: Credit payments items: "$ref": "#/components/schemas/CreditPayment" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true due_at: type: string format: date-time title: Due at description: Date invoice is due. This is the date the net terms are reached. closed_at: type: string format: date-time title: Closed at description: Date invoice was marked paid or failed. dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign. dunning_events_sent: type: integer title: Dunning Event Sent description: Number of times the event was sent. final_dunning_event: type: boolean title: Final Dunning Event description: Last communication attempt. InvoiceCreate: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 collection_method: title: Collection method description: An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" charge_customer_notes: type: string title: Charge customer notes description: This will default to the Customer Notes text specified on the Invoice Settings for charge invoices. Specify custom notes to add or override Customer Notes on charge invoices. credit_customer_notes: type: string title: Credit customer notes description: This will default to the Customer Notes text specified on the Invoice Settings for credit invoices. Specify customer notes to add or override Customer Notes on credit invoices. net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. default: 0 minimum: 0 po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 terms_and_conditions: type: string title: Terms and conditions description: This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. required: - currency InvoiceCollect: type: object properties: three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" billing_info_id: type: string title: Billing Info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. InvoiceCollection: type: object title: Invoice collection properties: object: type: string title: Object type charge_invoice: "$ref": "#/components/schemas/Invoice" credit_invoices: type: array title: Credit invoices items: "$ref": "#/components/schemas/Invoice" InvoiceUpdate: type: object properties: po_number: type: string title: Purchase order number description: This identifies the PO number associated with the invoice. Not editable for credit invoices. maxLength: 50 vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT Reverse Charge Notes are editable only if there was a VAT reverse charge applied to the invoice. terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions are an optional note field. Not editable for credit invoices. customer_notes: type: string title: Customer notes description: Customer notes are an optional note field. net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. Changing Net terms changes due_on, and the invoice could move between past due and pending. minimum: 0 maximum: 999 address: "$ref": "#/components/schemas/InvoiceAddress" InvoiceMini: type: object title: Invoice mini details properties: id: type: string title: Invoice ID maxLength: 13 object: type: string title: Object type number: type: string title: Invoice number type: title: Invoice type "$ref": "#/components/schemas/InvoiceTypeEnum" state: title: Invoice state "$ref": "#/components/schemas/InvoiceStateEnum" InvoiceRefund: type: object title: Invoice refund properties: type: title: Type description: The type of refund. Amount and line items cannot both be specified in the request. "$ref": "#/components/schemas/InvoiceRefundTypeEnum" amount: type: number format: float title: Amount description: | The amount to be refunded. The amount will be split between the line items. If no amount is specified, it will default to refunding the total refundable amount on the invoice. line_items: type: array title: Line items description: The line items to be refunded. This is required when `type=line_items`. items: "$ref": "#/components/schemas/LineItemRefund" refund_method: title: Refund method description: | Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice: - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled. - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled. - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled. - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled. default: credit_first "$ref": "#/components/schemas/RefuneMethodEnum" credit_customer_notes: type: string title: Credit customer notes description: | Used as the Customer Notes on the credit invoice. This field can only be include when the Credit Invoices feature is enabled. external_refund: type: object x-class-name: ExternalRefund description: | Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled. properties: payment_method: title: Payment Method description: Payment method used for external refund transaction. "$ref": "#/components/schemas/ExternalPaymentMethodEnum" description: type: string title: Description description: Used as the refund transactions' description. maxLength: 50 refunded_at: type: string format: date-time title: Refunded At description: Date the external refund payment was made. Defaults to the current date-time. required: - payment_method required: - type MeasuredUnit: type: object title: Measured unit properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true name: type: string title: Name description: Unique internal name of the measured unit on your site. display_name: type: string title: Display name description: Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric. maxLength: 50 state: title: State description: The current state of the measured unit. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" description: type: string title: Description description: Optional internal description. created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true MeasuredUnitCreate: type: object properties: name: type: string title: Name description: Unique internal name of the measured unit on your site. maxLength: 255 display_name: type: string title: Display name description: Display name for the measured unit. pattern: "/^[\\w ]+$/" maxLength: 50 description: type: string title: Description description: Optional internal description. required: - name - display_name MeasuredUnitUpdate: type: object properties: name: type: string title: Name description: Unique internal name of the measured unit on your site. maxLength: 255 display_name: type: string title: Display name description: Display name for the measured unit. pattern: "/^[\\w ]+$/" maxLength: 50 description: type: string title: Description description: Optional internal description. LineItem: type: object title: Line item properties: id: type: string title: Line item ID maxLength: 13 object: type: string title: Object type uuid: type: string title: UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 type: title: Line item type description: Charges are positive line items that debit the account. Credits are negative line items that credit the account. "$ref": "#/components/schemas/LineItemTypeEnum" item_code: type: string title: Item Code description: Unique code to identify an item. Available when the Credit Invoices feature is enabled. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled. maxLength: 13 external_sku: type: string title: External SKU description: Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled. maxLength: 50 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/LineItemRevenueScheduleTypeEnum" state: title: Current state of the line item description: Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value. "$ref": "#/components/schemas/LineItemStateEnum" legacy_category: title: Legacy category description: | Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account. "$ref": "#/components/schemas/LegacyCategoryEnum" account: "$ref": "#/components/schemas/AccountMini" bill_for_account_id: type: string title: Bill For Account ID maxLength: 13 description: The UUID of the account responsible for originating the line item. subscription_id: type: string title: Subscription ID description: If the line item is a charge or credit for a subscription, this is its ID. maxLength: 13 plan_id: type: string title: Plan ID description: If the line item is a charge or credit for a plan or add-on, this is the plan's ID. maxLength: 13 plan_code: type: string title: Plan code description: If the line item is a charge or credit for a plan or add-on, this is the plan's code. maxLength: 50 add_on_id: type: string title: Add-on ID description: If the line item is a charge or credit for an add-on this is its ID. maxLength: 13 add_on_code: type: string title: Add-on code description: If the line item is a charge or credit for an add-on, this is its code. maxLength: 50 invoice_id: type: string title: Invoice ID description: Once the line item has been invoiced this will be the invoice's ID. maxLength: 13 invoice_number: type: string title: Invoice number description: 'Once the line item has been invoiced this will be the invoice''s number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.' previous_line_item_id: type: string title: Previous line item ID description: Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. maxLength: 13 original_line_item_invoice_id: type: string title: Original line item's invoice ID description: The invoice where the credit originated. Will only have a value @@ -23534,1025 +23541,1027 @@ components: PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. Required if `method` is `email`. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI + - fr-BE - fr-CA + - fr-CH - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum:
recurly/recurly-client-php
004040d2836faec669564e35e379d9e03e0c55ba
4.32.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index af9808d..5484c9c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.31.0 +current_version = 4.32.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index d1dbfd9..ff33955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,400 +1,411 @@ # Changelog +## [4.32.0](https://github.com/recurly/recurly-client-php/tree/4.32.0) (2023-04-13) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.31.0...4.32.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Accounts) [#756](https://github.com/recurly/recurly-client-php/pull/756) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index a340f8c..e6534c4 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.31.0", + "version": "4.32.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 627bc68..14cc453 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.31.0'; + public const CURRENT = '4.32.0'; }
recurly/recurly-client-php
1a19fe81c9dce9b004d9bd7b908cffc0c3604aa9
4.31.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 016b765..af9808d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.30.0 +current_version = 4.31.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index e5e7dc5..d1dbfd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,389 +1,400 @@ # Changelog +## [4.31.0](https://github.com/recurly/recurly-client-php/tree/4.31.0) (2023-04-05) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.30.0...4.31.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 [#753](https://github.com/recurly/recurly-client-php/pull/753) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 66b893c..a340f8c 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.30.0", + "version": "4.31.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 7053bb1..627bc68 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.30.0'; + public const CURRENT = '4.31.0'; }
recurly/recurly-client-php
6d45b387eb47220c798f43f692ec8883637d1e48
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/external_charge.php b/lib/recurly/resources/external_charge.php index 165b1da..a5916af 100644 --- a/lib/recurly/resources/external_charge.php +++ b/lib/recurly/resources/external_charge.php @@ -1,259 +1,259 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ExternalCharge extends RecurlyResource { private $_account; private $_created_at; private $_currency; private $_description; private $_external_product_reference; private $_id; private $_object; private $_quantity; private $_unit_amount; private $_updated_at; protected static $array_hints = [ ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the created_at attribute. * When the external charge was created in Recurly. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the description attribute. * * * @return ?string */ public function getDescription(): ?string { return $this->_description; } /** * Setter method for the description attribute. * * @param string $description * * @return void */ public function setDescription(string $description): void { $this->_description = $description; } /** * Getter method for the external_product_reference attribute. * External Product Reference details * * @return ?\Recurly\Resources\ExternalProductReferenceMini */ public function getExternalProductReference(): ?\Recurly\Resources\ExternalProductReferenceMini { return $this->_external_product_reference; } /** * Setter method for the external_product_reference attribute. * * @param \Recurly\Resources\ExternalProductReferenceMini $external_product_reference * * @return void */ public function setExternalProductReference(\Recurly\Resources\ExternalProductReferenceMini $external_product_reference): void { $this->_external_product_reference = $external_product_reference; } /** * Getter method for the id attribute. * System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the quantity attribute. * * * @return ?int */ public function getQuantity(): ?int { return $this->_quantity; } /** * Setter method for the quantity attribute. * * @param int $quantity * * @return void */ public function setQuantity(int $quantity): void { $this->_quantity = $quantity; } /** * Getter method for the unit_amount attribute. * Unit Amount * - * @return ?float + * @return ?string */ - public function getUnitAmount(): ?float + public function getUnitAmount(): ?string { return $this->_unit_amount; } /** * Setter method for the unit_amount attribute. * - * @param float $unit_amount + * @param string $unit_amount * * @return void */ - public function setUnitAmount(float $unit_amount): void + public function setUnitAmount(string $unit_amount): void { $this->_unit_amount = $unit_amount; } /** * Getter method for the updated_at attribute. * When the external charge was updated in Recurly. * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } } \ No newline at end of file diff --git a/lib/recurly/resources/external_invoice.php b/lib/recurly/resources/external_invoice.php index f6e3c96..68adda9 100644 --- a/lib/recurly/resources/external_invoice.php +++ b/lib/recurly/resources/external_invoice.php @@ -1,308 +1,308 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ExternalInvoice extends RecurlyResource { private $_account; private $_created_at; private $_currency; private $_external_id; private $_external_subscription; private $_id; private $_line_items; private $_object; private $_purchased_at; private $_state; private $_total; private $_updated_at; protected static $array_hints = [ 'setLineItems' => '\Recurly\Resources\ExternalCharge', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the created_at attribute. * When the external invoice was created in Recurly. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } /** * Getter method for the external_id attribute. * An identifier which associates the external invoice to a corresponding object in an external platform. * * @return ?string */ public function getExternalId(): ?string { return $this->_external_id; } /** * Setter method for the external_id attribute. * * @param string $external_id * * @return void */ public function setExternalId(string $external_id): void { $this->_external_id = $external_id; } /** * Getter method for the external_subscription attribute. * Subscription from an external resource such as Apple App Store or Google Play Store. * * @return ?\Recurly\Resources\ExternalSubscription */ public function getExternalSubscription(): ?\Recurly\Resources\ExternalSubscription { return $this->_external_subscription; } /** * Setter method for the external_subscription attribute. * * @param \Recurly\Resources\ExternalSubscription $external_subscription * * @return void */ public function setExternalSubscription(\Recurly\Resources\ExternalSubscription $external_subscription): void { $this->_external_subscription = $external_subscription; } /** * Getter method for the id attribute. * System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the line_items attribute. * * * @return array */ public function getLineItems(): array { return $this->_line_items ?? [] ; } /** * Setter method for the line_items attribute. * * @param array $line_items * * @return void */ public function setLineItems(array $line_items): void { $this->_line_items = $line_items; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the purchased_at attribute. * When the invoice was created in the external platform. * * @return ?string */ public function getPurchasedAt(): ?string { return $this->_purchased_at; } /** * Setter method for the purchased_at attribute. * * @param string $purchased_at * * @return void */ public function setPurchasedAt(string $purchased_at): void { $this->_purchased_at = $purchased_at; } /** * Getter method for the state attribute. * * * @return ?string */ public function getState(): ?string { return $this->_state; } /** * Setter method for the state attribute. * * @param string $state * * @return void */ public function setState(string $state): void { $this->_state = $state; } /** * Getter method for the total attribute. * Total * - * @return ?float + * @return ?string */ - public function getTotal(): ?float + public function getTotal(): ?string { return $this->_total; } /** * Setter method for the total attribute. * - * @param float $total + * @param string $total * * @return void */ - public function setTotal(float $total): void + public function setTotal(string $total): void { $this->_total = $total; } /** * Getter method for the updated_at attribute. * When the external invoice was updated in Recurly. * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index f8ab3ed..b41eb36 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -17095,1024 +17095,1027 @@ components: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 item: "$ref": "#/components/schemas/ItemMini" readOnly: true tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" percentage_tiers: type: array title: Percentage Tiers description: This feature is currently in development and requires approval and enablement, please contact support. items: "$ref": "#/components/schemas/PercentageTiersByCurrency" external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 readOnly: true created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true required: - code - name AddOnCreate: type: object title: Add-on description: Full add-on details. properties: item_code: type: string title: Item Code description: Unique code to identify an item. Available when the `Credit Invoices` feature are enabled. If `item_id` and `item_code` are both present, `item_id` will be used. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used. maxLength: 13 code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required. maxLength: 255 add_on_type: "$ref": "#/components/schemas/AddOnTypeCreateEnum" usage_type: "$ref": "#/components/schemas/UsageTypeCreateEnum" usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. plan_id: type: string title: Plan ID maxLength: 13 readOnly: true accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent. maxLength: 50 currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | * If `item_code`/`item_id` is part of the request and the item has a default currency then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tier_type: "$ref": "#/components/schemas/TierTypeEnum" usage_timeframe: "$ref": "#/components/schemas/UsageTimeframeCreateEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. required: - code - name AddOnUpdate: type: object title: Add-on description: Full add-on details. properties: id: type: string title: Add-on ID maxLength: 13 readOnly: true code: type: string title: Add-on code description: The unique identifier for the add-on within its plan. If an `Item` is associated to the `AddOn` then `code` must be absent. maxLength: 50 name: type: string title: Name description: Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent. maxLength: 255 usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. usage_calculation_type: "$ref": "#/components/schemas/UsageCalculationTypeEnum" measured_unit_id: type: string title: Measured Unit ID description: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. maxLength: 13 measured_unit_name: type: string title: Measured Unit Name description: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used. accounting_code: type: string title: Accounting code description: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If an `Item` is associated to the `AddOn` then `accounting code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type description: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item. "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent. maxLength: 50 display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the add-on. default: false default_quantity: type: integer title: Default quantity description: Default quantity for the hosted pages. default: 1 optional: type: boolean title: Optional description: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. currencies: type: array title: Add-on pricing items: "$ref": "#/components/schemas/AddOnPricing" minItems: 1 description: | If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then currencies must be absent. Must also be absent if `add_on_type` is `usage` and `usage_type` is `percentage`. tiers: type: array title: Tiers items: "$ref": "#/components/schemas/Tier" description: | If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. percentage_tiers: type: array title: Percentage Tiers By Currency items: "$ref": "#/components/schemas/PercentageTiersByCurrency" description: | `percentage_tiers` is an array of objects, which must have the set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support. BillingInfo: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account_id: type: string maxLength: 13 readOnly: true first_name: type: string maxLength: 50 last_name: type: string maxLength: 50 company: type: string maxLength: 100 address: "$ref": "#/components/schemas/Address" vat_number: type: string description: Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices. valid: type: boolean readOnly: true payment_method: "$ref": "#/components/schemas/PaymentMethod" fraud: type: object x-class-name: FraudInfo title: Fraud information description: Most recent fraud result. readOnly: true properties: score: type: integer title: Kount score minimum: 1 maximum: 99 decision: title: Kount decision maxLength: 10 "$ref": "#/components/schemas/KountDecisionEnum" risk_rules_triggered: type: object title: Kount rules primary_payment_method: type: boolean description: The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used backup_payment_method: type: boolean description: The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. created_at: type: string format: date-time description: When the billing information was created. readOnly: true updated_at: type: string format: date-time description: When the billing information was last changed. readOnly: true updated_by: type: object x-class-name: BillingInfoUpdatedBy readOnly: true properties: ip: type: string description: Customer's IP address when updating their billing information. maxLength: 20 country: type: string description: Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly. maxLength: 2 BillingInfoCreate: type: object properties: token_id: type: string title: Token ID description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token). maxLength: 22 first_name: type: string title: First name maxLength: 50 last_name: type: string title: Last name maxLength: 50 company: type: string title: Company name maxLength: 100 address: "$ref": "#/components/schemas/Address" number: type: string title: Credit card number description: Credit card number, spaces and dashes are accepted. month: type: string title: Expiration month maxLength: 2 year: type: string title: Expiration year maxLength: 4 cvv: type: string title: Security code or CVV description: "*STRONGLY RECOMMENDED*" maxLength: 4 + currency: + type: string + description: 3-letter ISO 4217 currency code. vat_number: type: string title: VAT number ip_address: type: string title: IP address description: "*STRONGLY RECOMMENDED* Customer's IP address when updating their billing information." maxLength: 20 gateway_token: type: string title: A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`. maxLength: 50 gateway_code: type: string title: An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`. maxLength: 12 amazon_billing_agreement_id: type: string title: Amazon billing agreement ID paypal_billing_agreement_id: type: string title: PayPal billing agreement ID fraud_session_id: type: string title: Fraud Session ID transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" three_d_secure_action_result_token_id: type: string title: 3-D Secure action result token ID description: A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge. maxLength: 22 iban: type: string maxLength: 34 description: The International Bank Account Number, up to 34 alphanumeric characters comprising a country code; two check digits; and a number that includes the domestic bank account number, branch identifier, and potential routing information name_on_account: type: string maxLength: 255 description: The name associated with the bank account (ACH, SEPA, Bacs only) account_number: type: string maxLength: 255 description: The bank account number. (ACH, Bacs only) routing_number: type: string maxLength: 15 description: The bank's rounting number. (ACH only) sort_code: type: string maxLength: 15 description: Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only) type: "$ref": "#/components/schemas/AchTypeEnum" account_type: "$ref": "#/components/schemas/AchAccountTypeEnum" tax_identifier: type: string description: Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively. tax_identifier_type: description: This field and a value of `cpf`, `cnpj` or `cuit` are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina. "$ref": "#/components/schemas/TaxIdentifierTypeEnum" primary_payment_method: type: boolean title: Primary Payment Method description: The `primary_payment_method` field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the `primary_payment_method` with a value of `true`. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided. backup_payment_method: type: boolean description: The `backup_payment_method` field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked `primary_payment_method` can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such. external_hpp_type: "$ref": "#/components/schemas/ExternalHppTypeEnum" online_banking_payment_type: "$ref": "#/components/schemas/OnlineBankingPaymentTypeEnum" card_type: "$ref": "#/components/schemas/CardTypeEnum" BillingInfoVerify: type: object properties: gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 BillingInfoVerifyCVV: type: object properties: verification_value: type: string description: Unique security code for a credit card. Coupon: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" max_redemptions: type: integer title: Max redemptions description: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. max_redemptions_per_account: type: integer title: Max redemptions per account description: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. unique_coupon_codes_count: type: integer title: Unique coupon codes count description: When this number reaches `max_redemptions` the coupon will no longer be redeemable. readOnly: true unique_code_template: type: string title: Unique code template description: On a bulk coupon, the template from which unique coupon codes are generated. unique_coupon_code: allOf: - "$ref": "#/components/schemas/UniqueCouponCode" type: object description: Will be populated when the Coupon being returned is a `UniqueCouponCode`. duration: title: Duration description: | - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. minimum: 1 maximum: 9999 applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | The coupon is valid for all items if true. If false then `items` will list the applicable items. default: false applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false plans: type: array title: Plans description: A list of plans for which this coupon applies. This will be `null` if `applies_to_all_plans=true`. items: "$ref": "#/components/schemas/PlanMini" items: type: array title: Items description: | A list of items for which this coupon applies. This will be `null` if `applies_to_all_items=true`. items: "$ref": "#/components/schemas/ItemMini" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" hosted_page_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. format: date-time created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponCreate: allOf: - "$ref": "#/components/schemas/CouponUpdate" - type: object properties: code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. discount_type: title: Discount type description: The type of discount provided by the coupon (how the amount discounted is calculated) "$ref": "#/components/schemas/DiscountTypeEnum" discount_percent: type: integer title: Discount percent description: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`. free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`. minimum: 1 maximum: 9999 currencies: title: Currencies description: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values type: array items: "$ref": "#/components/schemas/CouponPricing" applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`. default: false plan_codes: type: array title: Plan codes description: | List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true. items: type: string item_codes: type: array title: Item codes description: | List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`. items: type: string duration: title: Duration description: | This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever. default: forever "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" coupon_type: title: Coupon type description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" unique_code_template: type: string title: Unique code template description: | On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" required: - code - discount_type - name CouponPricing: type: object properties: currency: type: string description: 3-letter ISO 4217 currency code. discount: type: number format: float description: The fixed discount (in dollars) for the corresponding currency. CouponDiscount: type: object description: | Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`. properties: type: "$ref": "#/components/schemas/DiscountTypeEnum" percent: description: This is only present when `type=percent`. type: integer currencies: type: array description: This is only present when `type=fixed`. items: "$ref": "#/components/schemas/CouponDiscountPricing" trial: type: object x-class-name: CouponDiscountTrial description: This is only present when `type=free_trial`. properties: unit: title: Trial unit description: Temporal unit of the free trial "$ref": "#/components/schemas/FreeTrialUnitEnum" length: type: integer title: Trial length description: Trial length measured in the units specified by the sibling `unit` property CouponDiscountPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Discount Amount description: Value of the fixed discount that this coupon applies. CouponBulkCreate: type: object properties: number_of_unique_codes: type: integer title: Number of unique codes description: The quantity of unique coupon codes to generate minimum: 1 maximum: 200 CouponMini: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponRedemption: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string @@ -22580,1087 +22583,1087 @@ components: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" external_id: type: string title: External Id description: The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 state: type: string description: External subscriptions can be active, canceled, expired, or future. activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalInvoice: type: object description: Invoice from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external invoice ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_subscription: "$ref": "#/components/schemas/ExternalSubscription" external_id: type: string description: An identifier which associates the external invoice to a corresponding object in an external platform. state: "$ref": "#/components/schemas/ExternalInvoiceStateEnum" total: - type: number - format: float + type: string + format: decimal title: Total currency: type: string title: Currency description: 3-letter ISO 4217 currency code. line_items: type: array items: "$ref": "#/components/schemas/ExternalCharge" purchased_at: type: string format: date-time description: When the invoice was created in the external platform. created_at: type: string format: date-time description: When the external invoice was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external invoice was updated in Recurly. ExternalInvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalInvoice" ExternalCharge: type: object description: Charge from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External invoice ID description: System-generated unique identifier for an external charge ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. unit_amount: - type: number - format: float + type: string + format: decimal title: Unit Amount quantity: type: integer description: type: string external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" created_at: type: string format: date-time title: Created at description: When the external charge was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external charge was updated in Recurly. CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. Required if `method` is `email`. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum:
recurly/recurly-client-php
bc8e4a87074f3cc164ab9951d8632d8826ebd824
4.30.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e1c23f5..016b765 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.29.0 +current_version = 4.30.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index fc0bd17..e5e7dc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,378 +1,389 @@ # Changelog +## [4.30.0](https://github.com/recurly/recurly-client-php/tree/4.30.0) (2023-03-29) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.29.0...4.30.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Invoices) [#751](https://github.com/recurly/recurly-client-php/pull/751) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 8f07352..66b893c 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.29.0", + "version": "4.30.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index f67e8ca..7053bb1 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.29.0'; + public const CURRENT = '4.30.0'; }
recurly/recurly-client-php
700f6c4607034d4af600c98b7ff515c91298b6ce
Fix return type of RecurlyError::getApiError
diff --git a/lib/recurly/recurly_error.php b/lib/recurly/recurly_error.php index e924e48..227c330 100644 --- a/lib/recurly/recurly_error.php +++ b/lib/recurly/recurly_error.php @@ -1,89 +1,89 @@ <?php namespace Recurly; class RecurlyError extends \Error { use RecurlyTraits; use ErrorTraits; private $_api_error; /** * Constructor * * @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) { parent::__construct($message); $this->_api_error = $api_error; } /** * Getter for the Recurly API Error * * @return \Recurly\Resources\ErrorMayHaveTransaction */ - public function getApiError(): \Recurly\Resources\ErrorMayHaveTransaction + public function getApiError(): ?\Recurly\Resources\ErrorMayHaveTransaction { return $this->_api_error; } /** * Class method to build a \Recurly\RecurlyError from a Recurly response. * * @param \Recurly\Response $response The \Recurly\Response object * * @return \Recurly\RecurlyError */ public static function fromResponse(\Recurly\Response $response): \Recurly\RecurlyError { if ($response->getContentType() == 'application/json') { $json = $response->getJsonResponse(); if (isset($json->error)) { $error = $json->error; $klass = static::titleize($error->type, '\\Recurly\\Errors\\'); if (!class_exists($klass)) { $klass = static::_defaultErrorType($response); } $error->object = 'error_may_have_transaction'; $api_error = \Recurly\Resources\ErrorMayHaveTransaction::fromResponse($response, $error); return new $klass($error->message, $api_error); } } else { $error_type = static::errorFromStatus($response->getStatusCode()); $klass = static::titleize($error_type, '\\Recurly\\Errors\\'); if (class_exists($klass)) { return new $klass('An unexpected error has occurred'); } } $klass = static::_defaultErrorType($response); return new $klass('An unexpected error has occurred'); } /** * Inspects the $response's HTTP status code and determines the default error * type to be used if a more suitable class is not found. * * @param \Recurly\Response $response The \Recurly\Response object * * @return string Default error class name */ private static function _defaultErrorType(\Recurly\Response $response): string { if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { return \Recurly\Errors\ClientError::class; } elseif ($response->getStatusCode() >= 500) { return \Recurly\Errors\ServerError::class; } else { // The errors must flow return \Recurly\RecurlyError::class; } } -} \ No newline at end of file +}
recurly/recurly-client-php
00db3a169a5764210e338074ad01076e1ba17b17
4.29.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 6d862a4..e1c23f5 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.28.0 +current_version = 4.29.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e43677..fc0bd17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,367 +1,378 @@ # Changelog +## [4.29.0](https://github.com/recurly/recurly-client-php/tree/4.29.0) (2023-02-22) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.28.0...4.29.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 [#747](https://github.com/recurly/recurly-client-php/pull/747) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index baba45a..8f07352 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.28.0", + "version": "4.29.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index ff0f51d..f67e8ca 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.28.0'; + public const CURRENT = '4.29.0'; }
recurly/recurly-client-php
41b56b8edeaaca5ea870c32f372edffeb54b2b43
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/custom_field_definition.php b/lib/recurly/resources/custom_field_definition.php index 23b8e02..0f844b6 100644 --- a/lib/recurly/resources/custom_field_definition.php +++ b/lib/recurly/resources/custom_field_definition.php @@ -1,264 +1,265 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class CustomFieldDefinition extends RecurlyResource { private $_created_at; private $_deleted_at; private $_display_name; private $_id; private $_name; private $_object; private $_related_type; private $_tooltip; private $_updated_at; private $_user_access; protected static $array_hints = [ ]; /** * Getter method for the created_at attribute. * Created at * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the deleted_at attribute. * Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible. * * @return ?string */ public function getDeletedAt(): ?string { return $this->_deleted_at; } /** * Setter method for the deleted_at attribute. * * @param string $deleted_at * * @return void */ public function setDeletedAt(string $deleted_at): void { $this->_deleted_at = $deleted_at; } /** * Getter method for the display_name attribute. * Used to label the field when viewing and editing the field in Recurly's admin UI. * * @return ?string */ public function getDisplayName(): ?string { return $this->_display_name; } /** * Setter method for the display_name attribute. * * @param string $display_name * * @return void */ public function setDisplayName(string $display_name): void { $this->_display_name = $display_name; } /** * Getter method for the id attribute. * Custom field definition ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the name attribute. * Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type. * * @return ?string */ public function getName(): ?string { return $this->_name; } /** * Setter method for the name attribute. * * @param string $name * * @return void */ public function setName(string $name): void { $this->_name = $name; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the related_type attribute. * Related Recurly object type * * @return ?string */ public function getRelatedType(): ?string { return $this->_related_type; } /** * Setter method for the related_type attribute. * * @param string $related_type * * @return void */ public function setRelatedType(string $related_type): void { $this->_related_type = $related_type; } /** * Getter method for the tooltip attribute. * Displayed as a tooltip when editing the field in the Recurly admin UI. * * @return ?string */ public function getTooltip(): ?string { return $this->_tooltip; } /** * Setter method for the tooltip attribute. * * @param string $tooltip * * @return void */ public function setTooltip(string $tooltip): void { $this->_tooltip = $tooltip; } /** * Getter method for the updated_at attribute. * Last updated at * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } /** * Getter method for the user_access attribute. * The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. +- `set_only` - Users with the Customers role will be able to set this field's data via the admin console. * * @return ?string */ public function getUserAccess(): ?string { return $this->_user_access; } /** * Setter method for the user_access attribute. * * @param string $user_access * * @return void */ public function setUserAccess(string $user_access): void { $this->_user_access = $user_access; } } \ No newline at end of file diff --git a/lib/recurly/resources/external_resource_mini.php b/lib/recurly/resources/external_resource_mini.php deleted file mode 100644 index 315dcca..0000000 --- a/lib/recurly/resources/external_resource_mini.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * This file is automatically created by Recurly's OpenAPI generation process - * and thus any edits you make by hand will be lost. If you wish to make a - * change to this file, please create a Github issue explaining the changes you - * need and we will usher them to the appropriate places. - */ -namespace Recurly\Resources; - -use Recurly\RecurlyResource; - -// phpcs:disable -class ExternalResourceMini extends RecurlyResource -{ - private $_external_object_reference; - private $_id; - private $_object; - - protected static $array_hints = [ - ]; - - - /** - * Getter method for the external_object_reference attribute. - * Identifier or URL reference where the resource is canonically available in the external platform. - * - * @return ?string - */ - public function getExternalObjectReference(): ?string - { - return $this->_external_object_reference; - } - - /** - * Setter method for the external_object_reference attribute. - * - * @param string $external_object_reference - * - * @return void - */ - public function setExternalObjectReference(string $external_object_reference): void - { - $this->_external_object_reference = $external_object_reference; - } - - /** - * Getter method for the id attribute. - * System-generated unique identifier for an external resource ID, e.g. `e28zov4fw0v2`. - * - * @return ?string - */ - public function getId(): ?string - { - return $this->_id; - } - - /** - * Setter method for the id attribute. - * - * @param string $id - * - * @return void - */ - public function setId(string $id): void - { - $this->_id = $id; - } - - /** - * Getter method for the object attribute. - * Object type - * - * @return ?string - */ - public function getObject(): ?string - { - return $this->_object; - } - - /** - * Setter method for the object attribute. - * - * @param string $object - * - * @return void - */ - public function setObject(string $object): void - { - $this->_object = $object; - } -} \ No newline at end of file diff --git a/lib/recurly/resources/external_subscription.php b/lib/recurly/resources/external_subscription.php index b70552f..f53aca4 100644 --- a/lib/recurly/resources/external_subscription.php +++ b/lib/recurly/resources/external_subscription.php @@ -1,331 +1,355 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class ExternalSubscription extends RecurlyResource { private $_account; private $_activated_at; private $_app_identifier; private $_auto_renew; private $_created_at; private $_expires_at; + private $_external_id; private $_external_product_reference; - private $_external_resource; private $_id; private $_last_purchased; private $_object; private $_quantity; + private $_state; private $_updated_at; protected static $array_hints = [ ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the activated_at attribute. * When the external subscription was activated in the external platform. * * @return ?string */ public function getActivatedAt(): ?string { return $this->_activated_at; } /** * Setter method for the activated_at attribute. * * @param string $activated_at * * @return void */ public function setActivatedAt(string $activated_at): void { $this->_activated_at = $activated_at; } /** * Getter method for the app_identifier attribute. * Identifier of the app that generated the external subscription. * * @return ?string */ public function getAppIdentifier(): ?string { return $this->_app_identifier; } /** * Setter method for the app_identifier attribute. * * @param string $app_identifier * * @return void */ public function setAppIdentifier(string $app_identifier): void { $this->_app_identifier = $app_identifier; } /** * Getter method for the auto_renew attribute. * An indication of whether or not the external subscription will auto-renew at the expiration date. * * @return ?bool */ public function getAutoRenew(): ?bool { return $this->_auto_renew; } /** * Setter method for the auto_renew attribute. * * @param bool $auto_renew * * @return void */ public function setAutoRenew(bool $auto_renew): void { $this->_auto_renew = $auto_renew; } /** * Getter method for the created_at attribute. * When the external subscription was created in Recurly. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the expires_at attribute. * When the external subscription expires in the external platform. * * @return ?string */ public function getExpiresAt(): ?string { return $this->_expires_at; } /** * Setter method for the expires_at attribute. * * @param string $expires_at * * @return void */ public function setExpiresAt(string $expires_at): void { $this->_expires_at = $expires_at; } /** - * Getter method for the external_product_reference attribute. - * External Product Reference details + * Getter method for the external_id attribute. + * The id of the subscription in the external systems., I.e. Apple App Store or Google Play Store. * - * @return ?\Recurly\Resources\ExternalProductReferenceMini + * @return ?string */ - public function getExternalProductReference(): ?\Recurly\Resources\ExternalProductReferenceMini + public function getExternalId(): ?string { - return $this->_external_product_reference; + return $this->_external_id; } /** - * Setter method for the external_product_reference attribute. + * Setter method for the external_id attribute. * - * @param \Recurly\Resources\ExternalProductReferenceMini $external_product_reference + * @param string $external_id * * @return void */ - public function setExternalProductReference(\Recurly\Resources\ExternalProductReferenceMini $external_product_reference): void + public function setExternalId(string $external_id): void { - $this->_external_product_reference = $external_product_reference; + $this->_external_id = $external_id; } /** - * Getter method for the external_resource attribute. - * External Resource mini details + * Getter method for the external_product_reference attribute. + * External Product Reference details * - * @return ?\Recurly\Resources\ExternalResourceMini + * @return ?\Recurly\Resources\ExternalProductReferenceMini */ - public function getExternalResource(): ?\Recurly\Resources\ExternalResourceMini + public function getExternalProductReference(): ?\Recurly\Resources\ExternalProductReferenceMini { - return $this->_external_resource; + return $this->_external_product_reference; } /** - * Setter method for the external_resource attribute. + * Setter method for the external_product_reference attribute. * - * @param \Recurly\Resources\ExternalResourceMini $external_resource + * @param \Recurly\Resources\ExternalProductReferenceMini $external_product_reference * * @return void */ - public function setExternalResource(\Recurly\Resources\ExternalResourceMini $external_resource): void + public function setExternalProductReference(\Recurly\Resources\ExternalProductReferenceMini $external_product_reference): void { - $this->_external_resource = $external_resource; + $this->_external_product_reference = $external_product_reference; } /** * Getter method for the id attribute. * System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the last_purchased attribute. * When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. * * @return ?string */ public function getLastPurchased(): ?string { return $this->_last_purchased; } /** * Setter method for the last_purchased attribute. * * @param string $last_purchased * * @return void */ public function setLastPurchased(string $last_purchased): void { $this->_last_purchased = $last_purchased; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the quantity attribute. * An indication of the quantity of a subscribed item's quantity. * * @return ?int */ public function getQuantity(): ?int { return $this->_quantity; } /** * Setter method for the quantity attribute. * * @param int $quantity * * @return void */ public function setQuantity(int $quantity): void { $this->_quantity = $quantity; } + /** + * Getter method for the state attribute. + * External subscriptions can be active, canceled, expired, or future. + * + * @return ?string + */ + public function getState(): ?string + { + return $this->_state; + } + + /** + * Setter method for the state attribute. + * + * @param string $state + * + * @return void + */ + public function setState(string $state): void + { + $this->_state = $state; + } + /** * Getter method for the updated_at attribute. * When the external subscription was updated in Recurly. * * @return ?string */ public function getUpdatedAt(): ?string { return $this->_updated_at; } /** * Setter method for the updated_at attribute. * * @param string $updated_at * * @return void */ public function setUpdatedAt(string $updated_at): void { $this->_updated_at = $updated_at; } } \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index e288d72..8db95d3 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -1,744 +1,744 @@ --- openapi: 3.0.0 info: title: Recurly V3 API description: | # Getting Started ## Versioning The V3 API is versioned to allow stability for integrators and flexibility for Recurly to continue making improvements. The versions follow a format that incorporates the approximate date the changes were released in a YYYY-MM-DD format, e.g. `v2021-02-25`. > *WARNING*: Specifying a version is required to get a successful response. Each request should specify a version using the `Accept` header: * `Accept: application/vnd.recurly.v2021-02-25` * `Accept: application/vnd.recurly.v2021-02-25+json` All responses will include a `Recurly-Version` header with the API version used to process the request: ``` Recurly-Version: recurly.v2021-02-25 ``` Recurly's client libraries correspond with API versions as listed below. <table> <tr> <th>API Version</th> <th>Client Library Version</th> </tr> <tr> <td>v2021-02-25</td> <td>4.x</td> </tr> <tr> <td>v2019-10-10</td> <td>3.x</td> </tr> </table> Client library releases: * [Node.js](https://github.com/recurly/recurly-client-node/releases) * [Python](https://github.com/recurly/recurly-client-python/releases) * [.NET](https://github.com/recurly/recurly-client-dotnet/releases) * [Ruby](https://github.com/recurly/recurly-client-ruby/releases) * [Java](https://github.com/recurly/recurly-client-java/releases) * [PHP](https://github.com/recurly/recurly-client-php/releases) * [Go](https://github.com/recurly/recurly-client-go/releases) Client libraries follow semantic versioning. For example, [Ruby client library version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1) represents major version `3`, minor version `18` with patch `1`. We encourage you to update to the latest version of the API and corresponding client library, as most recent versions are more performant than their predecessors. See the [changelog](https://recurly.com/developers/api/changelog.html) for a comprehensive list of changes introduced in the latest API version. ### Default Versions Specifying a version is required to get a successful response. If you wish to receive the latest version and are willing to accept the risk of breaking changes, you may specify a version of `latest`. The following media types will default the newest version of the API: * `application/vnd.recurly.latest` * `application/vnd.recurly.latest+json` ### Deprecation Responses for a deprecated version request will return two headers: ``` Recurly-Deprecated: TRUE Recurly-Sunset-Date: 2017-06-01T00:00:00+00:00 ``` The sunset date is an ISO-8601 formatted date time after which the version will no longer be accessible. ### Unsupported Versions A request for an unsupported version will return a status code of 406 and the body will include a list of supported versions: ``` { "error": { "type": "invalid_api_version", "message": "That accept header isn't in the format we use to specify an API version. Try one of these instead:", "acceptable_accept_headers": [ "application/vnd.recurly.v2016-03-01", "application/vnd.recurly.v2016-04-27", "application/vnd.recurly.v2016-07-27", "application/vnd.recurly.v2016-12-15", "application/vnd.recurly.v2017-01-12", "application/vnd.recurly.v2017-09-30", "application/vnd.recurly.v2018-01-24", "application/vnd.recurly.v2018-05-10", "application/vnd.recurly.v2018-06-06", "application/vnd.recurly.v2018-08-09", "application/vnd.recurly.v2019-10-10", "application/vnd.recurly.v2021-02-25" ] } } ``` ## Error Messages Error messages sent via the Recurly API are generally directed at developers and those who are familiar with API technology. When using the API and passing error messages to target systems, be mindful that these messages may not make sense in the context of the target system. Please consider changing these messages in the target system to be better suited to the audience of the system. Please see [transaction error codes](https://recurly.com/developers/pages/api-transaction-errors.html) for more details. ## Pagination ### Response Schema Every GET listing endpoint returns a response with the same schema: ``` { "object": "list", // Always "list" "has_more": true, // false if this is the last page of data "next": "https://...", // A URL pointing to the next page of data "data": [] // The data for this page as an array } ``` To page through every record, your code should continually call the URL at `next` until `has_more` is `false`. ### Query Parameters Most GET listing endpoints take query parameters that allow filtering and sorting the results. Some endpoints have additional parameters, which are documented on the respective endpoints, but most support the following parameters: * `ids`: A comma separated list of ids to match. * `limit`: The number of records to return per page. * `order`: The sort order of records. * `sort`: The date field to use in sorting. * `begin_time`: The start datetime to filter (ISO 8601). * `end_time`: The end datetime to filter (ISO 8601). ### Counting with HEAD Every GET listing endpoint also supports the HEAD HTTP method. Making a head request to the endpoint results in an empty body and an additional `Recurly-Total-Records` header. This is a count of the total number of records that the endpoint will return, taking into account the current filtering query parameters. ## Limits In order to provide a fast response time to all our customers, we may rate limit excessive requests. By default, new Recurly sites have the following API rate limits: * Sandbox sites: 400 requests/min. All requests count towards the rate limit. * Production sites: 1,000 requests/min. Only GET requests count towards the rate limit. Once your site moves into production mode, Recurly will only rate limit GET requests. New subscriptions, account modifications, and other requests using POST, PUT, or DELETE methods will not count against your rate limit. The rate limit is calculated over a sliding 5 minute window. This means a production site could make 4,000 requests within one minute and not hit the rate limit so long as the site made less than 1,000 requests during the prior 4 minutes. If an API request exceeds the rate limit, the API will return a `429 Too Many Requests` HTTP status. If your business needs a higher limit, please contact support. The rate limit applied to your client can be determined with the `X-RateLimit-Limit` header, and the number of remaining requests is sent in the `X-RateLimit-Remaining` header. Finally, the `X-RateLimit-Reset` header contains an integer value representing the time, measured in seconds since the UNIX Epoch, at which the request count will be reset. ## Change Log A list of changes for this version can be found [in the changelog](https://recurly.com/developers/api/changelog.html#v2021-02-25---current-ga-version). version: v2021-02-25 security: - api_key: [] x-tagGroups: - name: Customers tags: - account - note - account_acquisition - billing_info - billing_infos - subscription - subscription_change - shipping_address - purchase - usage - automated_exports - external_subscriptions - external_products - gift_cards - name: Products and Promotions tags: - item - plan - add-on - measured_unit - coupon - coupon_redemption - unique_coupon_code - name: Invoices and Payments tags: - invoice - line_item - credit_payment - transaction - name: Configuration tags: - site - custom_field_definition - shipping_method - dunning_campaigns tags: - name: site x-displayName: Site - name: custom_field_definition x-displayName: Custom Field Definition - description: Describes the fields that can use used as custom fields on accounts - or subscriptions. + description: Describes the fields that can be used as custom fields on accounts, + items, line-items (one time charges), plans, or subscriptions. - name: item x-displayName: Item description: |- For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items". Recurly's item catalog requires the Credit Invoices features to be enabled. - name: plan x-displayName: Plan description: A plan tells Recurly how often and how much to charge your customers. Plans can be created with free trials, optional products (called add-ons), setup fees, and more. - name: add-on x-displayName: Add-on description: An add-on is a charge billed each billing period in addition to a subscription’s base charge. Each plan may have one or more add-ons associated with it. - name: measured_unit x-displayName: Measured Unit description: A measured unit describes a usage-based add-on's usage. If different usage-based add-ons share the same measured unit, you can report on customer usage for those add-ons at the aggregated measured unit level. - name: account x-displayName: Account description: Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more. - name: note x-displayName: Account Note description: Account notes allow your team to leave notes on an account to add context, e.g. the reason for a refund, customer requests, and/or complaints. These notes are internal and not exposed to your customers. - name: account_acquisition x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored payment method at a time. Examples include credit cards, PayPal, or bank accounts. Billing info is filled out by the customer upon purchase or when they update their information. - name: billing_infos x-displayName: Billing Infos description: If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints. - name: subscription x-displayName: Subscription description: Subscriptions are created when your customers subscribe to one of your plans. The customer's subscription tells Recurly when and how much to bill the customer. - name: subscription_change x-displayName: Subscription Change description: Subscription changes alter subscription in a way that might affect the invoiced amount, such as changing the plan, add-ons, quantities, or shipping address. Changes can be made immediately in the current billing cycle or scheduled to take place at the next renewal. - name: shipping_address x-displayName: Shipping Address description: Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription. - name: invoice x-displayName: Invoice description: An invoice relates charges, credits, and payments together. When a subscription is created or renewed or a charge is created on the account, Recurly will sum the charges, discount or tax as appropriate, and send the invoice out for collection. - name: line_item x-displayName: Line Item description: Line items are the charges and credits on your customer's invoices. - name: credit_payment x-displayName: Credit Payment - name: purchase x-displayName: Purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. The purchases endpoint can also be used to immediately create a credit invoice on an account, when Credit Invoices is enabled on your site. - name: usage x-displayName: Usage description: Send Recurly your customer usage and we will automatically bill them in arrears at the end of the billing cycle. For more info on usage-based billing, [click here](https://docs.recurly.com/docs/usage-based-billing). - name: transaction x-displayName: Transaction description: Purchasing information is sent to your payment gateway in an action called a transaction. This includes the customer's billing information and the amount of money to be charged, voided, or refunded. - name: coupon x-displayName: Coupon description: Coupons can either be single codes that easily allow mass distribution by many customers or bulk coupons that can generate many unique coupons that can allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption description: Coupon redemptions are created when a coupon is applied to an account or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. - name: shipping_method x-displayName: Shipping Method description: Shipping methods offered to send products to customers. - name: automated_exports x-displayName: Automated Exports description: Automated exports of customer data. - name: dunning_campaigns x-displayName: Dunning Campaigns description: Settings used when attempting to dun customers whose payments are declined. - name: external_subscriptions x-displayName: External Subscription description: A subscription from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_products x-displayName: External Product description: A product from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: gift_cards x-displayName: Gift Cards description: Add gift card purchases to your checkout and allow gift card recipients to redeem the gift card for credit towards any of your products. paths: "/sites": get: operationId: list_sites summary: List sites description: | This route is most useful for finding a site's ID for subsequent requests. See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. tags: - site parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of sites. content: application/json: schema: "$ref": "#/components/schemas/SiteList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const sites = client.listSites({ params: { limit: 200 } }) for await (const site of sites.each()) { console.log(site.subdomain) } - lang: Python source: | params = {"limit": 200} sites = client.list_sites(params=params).items() for site in sites: print(site.subdomain) - lang: ".NET" source: | var optionalParams = new ListSitesParams() { Limit = 200 }; var sites = client.ListSites(optionalParams); foreach(Site site in sites) { Console.WriteLine(site.Subdomain); } - lang: Ruby source: | params = { limit: 200 } sites = @client.list_sites(params: params) sites.each do |site| puts "Site: #{site.subdomain}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Site> sites = client.listSites(params); for (Site site : sites) { System.out.println(site.getSubdomain()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $sites = $client->listSites($options); foreach($sites as $site) { echo 'Site: ' . $site->getSubdomain() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListSitesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"asc\"),\n\tLimit: recurly.Int(200),\n}\n\nsites, err := client.ListSites(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor sites.HasMore() {\n\terr := sites.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, site := range sites.Data() {\n\t\tfmt.Printf(\"Site %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tsite.Id,\n\t\t\tsite.Subdomain,\n\t\t)\n\t}\n}" "/sites/{site_id}": get: operationId: get_site summary: Fetch a site tags: - site parameters: - "$ref": "#/components/parameters/site_id" responses: '200': description: A site. content: application/json: schema: "$ref": "#/components/schemas/Site" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const site = await client.getSite(siteId) console.log('Fetched site: ', site) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: site = client.get_site(site_id) print("Got Site %s" % site) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Site site = client.GetSite(siteId); Console.WriteLine($"Fetched site {site.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin site = @client.get_site(site_id: site_id) puts "Got Site #{site}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Site site = client.getSite(siteId); System.out.println("Fetched site: " + site.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $site = $client->getSite($site_id); echo 'Got Site:' . PHP_EOL; var_dump($site); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "site, err := client.GetSite(siteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Site: %s\", site.Id)" "/accounts": get: tags: - account operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_account_email" - "$ref": "#/components/parameters/filter_account_subscriber" - "$ref": "#/components/parameters/filter_account_past_due" responses: '200': description: A list of the site's accounts. content: application/json: schema: "$ref": "#/components/schemas/AccountList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const accounts = client.listAccounts({ params: { limit: 200 } }) for await (const account of accounts.each()) { console.log(account.code) } - lang: Python source: | params = {"limit": 200} accounts = client.list_accounts(params=params).items() for account in accounts: print(account.code) - lang: ".NET" source: | var optionalParams = new ListAccountsParams() { Limit = 200 }; var accounts = client.ListAccounts(optionalParams); foreach(Account account in accounts) { Console.WriteLine(account.Code); } - lang: Ruby source: | params = { limit: 200 } accounts = @client.list_accounts(params: params) accounts.each do |account| puts "Account: #{account.code}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time Pager<Account> accounts = client.listAccounts(params); for (Account acct : accounts) { System.out.println(acct.getCode()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $accounts = $client->listAccounts($options); foreach($accounts as $account) { echo 'Account code: ' . $account->getCode() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccounts, err := client.ListAccounts(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accounts.HasMore() {\n\terr := accounts.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, account := range accounts.Data() {\n\t\tfmt.Printf(\"Account %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\taccount.Id,\n\t\t\taccount.Code,\n\t\t)\n\t}\n}" post: tags: - account operationId: create_account summary: Create an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" required: true responses: '201': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountCreate = { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', preferredTimeZone: 'America/Chicago', address: { street1: '900 Camp St', city: 'New Orleans', region: 'LA', postalCode: '70115', country: 'US' } } const account = await client.createAccount(accountCreate) console.log('Created Account: ', account.code) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params @@ -17702,1024 +17702,1025 @@ components: the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" hosted_page_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. format: date-time created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponCreate: allOf: - "$ref": "#/components/schemas/CouponUpdate" - type: object properties: code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. discount_type: title: Discount type description: The type of discount provided by the coupon (how the amount discounted is calculated) "$ref": "#/components/schemas/DiscountTypeEnum" discount_percent: type: integer title: Discount percent description: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`. free_trial_unit: title: Free trial unit description: Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`. "$ref": "#/components/schemas/FreeTrialUnitEnum" free_trial_amount: type: integer title: Free trial amount description: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`. minimum: 1 maximum: 9999 currencies: title: Currencies description: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values type: array items: "$ref": "#/components/schemas/CouponPricing" applies_to_non_plan_charges: type: boolean title: Applied to all non-plan charges? description: The coupon is valid for one-time, non-plan charges if true. default: false applies_to_all_plans: type: boolean title: Applies to all plans? description: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans. default: true applies_to_all_items: type: boolean title: Applies to all items? description: | To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`. default: false plan_codes: type: array title: Plan codes description: | List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true. items: type: string item_codes: type: array title: Item codes description: | List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`. items: type: string duration: title: Duration description: | This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever. default: forever "$ref": "#/components/schemas/CouponDurationEnum" temporal_amount: type: integer title: Temporal amount description: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for. temporal_unit: title: Temporal unit description: If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for. "$ref": "#/components/schemas/TemporalUnitEnum" coupon_type: title: Coupon type description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" unique_code_template: type: string title: Unique code template description: | On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'" redemption_resource: title: Redemption resource description: Whether the discount is for all eligible charges on the account, or only a specific subscription. default: account "$ref": "#/components/schemas/RedemptionResourceEnum" required: - code - discount_type - name CouponPricing: type: object properties: currency: type: string description: 3-letter ISO 4217 currency code. discount: type: number format: float description: The fixed discount (in dollars) for the corresponding currency. CouponDiscount: type: object description: | Details of the discount a coupon applies. Will contain a `type` property and one of the following properties: `percent`, `fixed`, `trial`. properties: type: "$ref": "#/components/schemas/DiscountTypeEnum" percent: description: This is only present when `type=percent`. type: integer currencies: type: array description: This is only present when `type=fixed`. items: "$ref": "#/components/schemas/CouponDiscountPricing" trial: type: object x-class-name: CouponDiscountTrial description: This is only present when `type=free_trial`. properties: unit: title: Trial unit description: Temporal unit of the free trial "$ref": "#/components/schemas/FreeTrialUnitEnum" length: type: integer title: Trial length description: Trial length measured in the units specified by the sibling `unit` property CouponDiscountPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Discount Amount description: Value of the fixed discount that this coupon applies. CouponBulkCreate: type: object properties: number_of_unique_codes: type: integer title: Number of unique codes description: The quantity of unique coupon codes to generate minimum: 1 maximum: 200 CouponMini: type: object properties: id: type: string title: Coupon ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. name: type: string title: Name description: The internal name for the coupon. state: title: State description: Indicates if the coupon is redeemable, and if it is not, why. "$ref": "#/components/schemas/CouponStateEnum" discount: "$ref": "#/components/schemas/CouponDiscount" coupon_type: title: 'Coupon type (TODO: implement coupon generation)' description: Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint. "$ref": "#/components/schemas/CouponTypeEnum" expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time CouponRedemption: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string title: Object type description: Will always be `coupon`. readOnly: true account: type: object title: Account description: The Account on which the coupon was applied. readOnly: true "$ref": "#/components/schemas/AccountMini" subscription_id: type: string title: Subscription ID readOnly: true coupon: "$ref": "#/components/schemas/Coupon" state: title: Coupon Redemption state default: active "$ref": "#/components/schemas/ActiveStateEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 discounted: type: number format: float title: Amount Discounted description: The amount that was discounted upon the application of the coupon, formatted with the currency. created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true removed_at: type: string title: Removed at description: The date and time the redemption was removed from the account (un-redeemed). format: date-time CouponRedemptionCreate: type: object properties: coupon_id: type: string title: Coupon ID currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 subscription_id: type: string title: Subscription ID required: - coupon_id CouponRedemptionMini: type: object properties: id: type: string title: Coupon Redemption ID readOnly: true object: type: string title: Object type description: Will always be `coupon`. readOnly: true coupon: "$ref": "#/components/schemas/CouponMini" state: title: Invoice state "$ref": "#/components/schemas/ActiveStateEnum" discounted: type: number format: float title: Amount Discounted description: The amount that was discounted upon the application of the coupon, formatted with the currency. created_at: type: string title: Created at format: date-time readOnly: true CouponUpdate: type: object properties: name: type: string title: Name description: The internal name for the coupon. max_redemptions: type: integer title: Max redemptions description: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions. max_redemptions_per_account: type: integer title: Max redemptions per account description: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign. hosted_description: type: string title: Hosted Payment Pages description description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page. invoice_description: type: string title: Invoice description description: Description of the coupon on the invoice. maxLength: 255 redeem_by_date: type: string title: Redeem by description: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time. CreditPayment: type: object properties: id: type: string title: Credit Payment ID maxLength: 13 object: type: string title: Object type uuid: type: string title: Recurly UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 action: title: Action description: The action for which the credit was created. "$ref": "#/components/schemas/CreditPaymentActionEnum" account: "$ref": "#/components/schemas/AccountMini" applied_to_invoice: "$ref": "#/components/schemas/InvoiceMini" original_invoice: "$ref": "#/components/schemas/InvoiceMini" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: Total credit payment amount applied to the charge invoice. original_credit_payment_id: type: string title: Original Credit Payment ID description: For credit payments with action `refund`, this is the credit payment that was refunded. maxLength: 13 refund_transaction: "$ref": "#/components/schemas/Transaction" created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Last updated at format: date-time readOnly: true voided_at: type: string title: Voided at format: date-time readOnly: true CustomField: type: object title: Custom field properties: name: type: string title: Field name description: Fields must be created in the UI before values can be assigned to them. pattern: "/^[a-z0-9_-]+$/i" maxLength: 50 value: type: string title: Field value description: Any values that resemble a credit card number or security code (CVV/CVC) will be rejected. maxLength: 255 required: - name - value CustomFields: type: array title: Custom fields description: 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. items: "$ref": "#/components/schemas/CustomField" CustomFieldDefinition: type: object title: Custom field definition properties: id: type: string title: Custom field definition ID readOnly: true object: type: string title: Object type readOnly: true related_type: title: Related Recurly object type "$ref": "#/components/schemas/RelatedTypeEnum" name: type: string title: Name description: Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type. pattern: "/^[a-z0-9_-]+$/i" maxLength: 50 user_access: title: User access description: | The access control applied inside Recurly's admin UI: - `api_only` - No one will be able to view or edit this field's data via the admin UI. - `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but editing will only be available via the API. - `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI. + - `set_only` - Users with the Customers role will be able to set this field's data via the admin console. "$ref": "#/components/schemas/UserAccessEnum" display_name: type: string title: Display name description: Used to label the field when viewing and editing the field in Recurly's admin UI. maxLength: 50 tooltip: type: string title: Tooltip description description: Displayed as a tooltip when editing the field in the Recurly admin UI. pattern: "/^[a-z0-9_-]+$/i" maxLength: 255 created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at description: Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible. readOnly: true ItemMini: type: object title: Item mini details description: Just the important parts. properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 state: title: State description: The current state of the item. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. Item: type: object description: Full item details. properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 state: title: State description: The current state of the item. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true ItemCreate: type: object properties: code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" required: - code - name ItemUpdate: type: object properties: code: type: string title: Item code description: Unique code to identify the item. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 name: type: string title: Name description: This name describes your item and will appear on the invoice when it's purchased on a one time basis. maxLength: 255 description: type: string title: Description description: Optional, description. external_sku: type: string title: External SKU description: Optional, stock keeping unit to link the item to other inventory systems. maxLength: 50 accounting_code: type: string title: Item accounting code description: Accounting code for invoice line items. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the item, `false` applies tax on the item." custom_fields: "$ref": "#/components/schemas/CustomFields" currencies: type: array title: Item Pricing items: "$ref": "#/components/schemas/Pricing" Invoice: type: object properties: id: type: string title: Invoice ID readOnly: true uuid: type: string title: Invoice UUID readOnly: true object: type: string title: Object type readOnly: true type: title: Invoice type description: Invoices are either charge, credit, or legacy invoices. "$ref": "#/components/schemas/InvoiceTypeEnum" origin: title: Origin description: The event that created the invoice. "$ref": "#/components/schemas/OriginEnum" state: title: Invoice state "$ref": "#/components/schemas/InvoiceStateEnum" account: "$ref": "#/components/schemas/AccountMini" billing_info_id: type: string title: Billing info ID description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. subscription_ids: type: array title: Subscription IDs description: If the invoice is charging or refunding for one or more subscriptions, these are their IDs. items: type: string title: Subscription ID maxLength: 13 previous_invoice_id: type: string title: Previous invoice ID description: On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](https://docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](https://recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice. maxLength: 13 number: type: string title: Invoice number description: 'If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.' collection_method: title: Collection method description: An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 address: "$ref": "#/components/schemas/InvoiceAddress" shipping_address: "$ref": "#/components/schemas/ShippingAddress" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 discount: type: number format: float title: Discount description: Total discounts applied to this invoice. subtotal: type: number format: float title: Subtotal description: The summation of charges and credits, before discounts and taxes. tax: type: number format: float title: Tax description: The total tax on this invoice. total: type: number format: float title: Total description: The final total on this invoice. The summation of invoice charges, discounts, credits, and tax. refundable_amount: type: number format: float title: Refundable amount description: The refundable amount on a charge invoice. It will be null for all other invoices. paid: type: number format: float title: Paid description: The total amount of successful payments transaction on this invoice. balance: type: number format: float title: Balance description: The outstanding balance remaining on this invoice. tax_info: "$ref": "#/components/schemas/TaxInfo" vat_number: type: string title: VAT number description: VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method. maxLength: 20 vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. terms_and_conditions: type: string title: Terms and conditions description: This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. customer_notes: type: string title: Customer notes description: This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. line_items: type: array title: Line Items items: "$ref": "#/components/schemas/LineItem" has_more_line_items: type: boolean title: Has more Line Items description: Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint. transactions: type: array title: Transactions items: "$ref": "#/components/schemas/Transaction" credit_payments: type: array title: Credit payments items: "$ref": "#/components/schemas/CreditPayment" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true due_at: type: string format: date-time title: Due at description: Date invoice is due. This is the date the net terms are reached. closed_at: type: string format: date-time title: Closed at @@ -22337,1851 +22338,1840 @@ components: items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []. This feature is currently in development and requires approval and enablement, please contact support. measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" - external_resource: - "$ref": "#/components/schemas/ExternalResourceMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" + external_id: + type: string + title: External Id + description: The id of the subscription in the external systems., I.e. Apple + App Store or Google Play Store. last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 + state: + type: string + description: External subscriptions can be active, canceled, expired, or + future. activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" - ExternalResourceMini: - type: object - title: External Resource mini details - properties: - id: - type: string - title: External resource ID - description: System-generated unique identifier for an external resource - ID, e.g. `e28zov4fw0v2`. - object: - type: string - title: Object type - external_object_reference: - type: string - title: External Object Reference - description: Identifier or URL reference where the resource is canonically - available in the external platform. - maxLength: 255 - readOnly: true CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. GiftCardList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/GiftCard" GiftCard: type: object description: Gift card details properties: id: title: Gift card ID type: string maxLength: 13 readOnly: true object: title: Object type type: string readOnly: true gifter_account_id: title: Gifter account ID type: string maxLength: 13 description: The ID of the account that purchased the gift card. recipient_account_id: title: Recipient account ID type: string maxLength: 13 description: The ID of the account that redeemed the gift card redemption code. Does not have a value until gift card is redeemed. purchase_invoice_id: title: Purchase invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card purchase made by the gifter. redemption_invoice_id: title: Redemption invoice ID type: string maxLength: 13 description: The ID of the invoice for the gift card redemption made by the recipient. Does not have a value until gift card is redeemed. redemption_code: title: Redemption code type: string description: The unique redemption code for the gift card, generated by Recurly. Will be 16 characters, alphanumeric, displayed uppercase, but accepted in any case at redemption. Used by the recipient account to create a credit in the amount of the `unit_amount` on their account. balance: title: Remaining balance type: number format: float description: The remaining credit on the recipient account associated with this gift card. Only has a value once the gift card has been redeemed. Can be used to create gift card balance displays for your customers. product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDelivery" created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true delivered_at: type: string format: date-time title: Delivered at readOnly: true description: When the gift card was sent to the recipient by Recurly via email, if method was email and the "Gift Card Delivery" email template was enabled. This will be empty for post delivery or email delivery where the email template was disabled. redeemed_at: type: string format: date-time title: Redeemed at readOnly: true description: When the gift card was redeemed by the recipient. canceled_at: type: string format: date-time title: Canceled at readOnly: true description: When the gift card was canceled. GiftCardCreate: type: object description: Gift card details properties: product_code: title: Product code type: string description: The product code or SKU of the gift card product. unit_amount: title: Purchase unit amount type: number format: float description: The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. currency: title: Currency type: string description: 3-letter ISO 4217 currency code. maxLength: 3 delivery: title: Delivery details description: The delivery details for the gift card. readOnly: true "$ref": "#/components/schemas/GiftCardDeliveryCreate" gifter_account: title: Gifter account details description: Block of account details for the gifter. This references an existing account_code. readOnly: true "$ref": "#/components/schemas/AccountPurchase" required: - product_code - unit_amount - currency - delivery - gifter_account GiftCardDeliveryCreate: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. Required if `method` is `email`. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. Required if `method` is `post`. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. required: - method GiftCardDelivery: type: object description: Gift card delivery details properties: method: title: Delivery method description: Whether the delivery method is email or postal service. "$ref": "#/components/schemas/DeliveryMethodEnum" email_address: title: Recipient email address type: string description: The email address of the recipient. deliver_at: type: string format: date-time title: Deliver at readOnly: true description: When the gift card should be delivered to the recipient. If null, the gift card will be delivered immediately. If a datetime is provided, the delivery will be in an hourly window, rounding down. For example, 6:23 pm will be in the 6:00 pm hourly batch. first_name: title: Recipient first name type: string description: The first name of the recipient. last_name: title: Recipient last name type: string description: The last name of the recipient. recipient_address: title: Recipient address description: Address information for the recipient. "$ref": "#/components/schemas/Address" gifter_name: title: Gifter name type: string description: The name of the gifter for the purpose of a message displayed to the recipient. personal_message: title: Personal message type: string maxLength: 255 description: The personal message from the gifter to the recipient. GiftCardRedeem: type: object description: The information necessary to redeem a gift card. properties: recipient_account: title: Recipient account description: The account for the recipient of the gift card. "$ref": "#/components/schemas/AccountReference" required: - recipient_account Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" decline_code: title: Decline code "$ref": "#/components/schemas/DeclineCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-CA - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self DeliveryMethodEnum: type: string enum: - email - post GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write + - set_only PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - ELO - Forbrugsforeningen - Hipercard - JCB - Laser - Maestro - MasterCard - Test Card - Union Pay - Unknown - Visa - Tarjeta Naranja AccountTypeEnum: type: string enum: - checking - savings ErrorTypeEnum: type: string enum: - bad_request - immutable_subscription - internal_server_error - invalid_api_key - invalid_api_version - invalid_content_type - invalid_permissions - invalid_token - missing_feature - not_found - rate_limited - service_not_available - simultaneous_request - tax_service_error - transaction - unauthorized - unavailable_in_api_version - unknown_api_version - validation ErrorCategoryEnum: type: string enum: - three_d_secure_required - three_d_secure_action_required - amazon - api_error - approved - communication - configuration - duplicate - fraud - hard - invalid - not_enabled - not_supported - recurly - referral - skles - soft - unknown ErrorCodeEnum: type: string enum: - ach_cancel - ach_chargeback - ach_credit_return - ach_exception - ach_return - ach_transactions_not_supported - ach_validation_exception - amazon_amount_exceeded - amazon_declined_review - amazon_invalid_authorization_status - amazon_invalid_close_attempt - amazon_invalid_create_order_reference - amazon_invalid_order_status - amazon_not_authorized - amazon_order_not_modifiable - amazon_transaction_count_exceeded - api_error - approved - approved_fraud_review - authorization_already_captured - authorization_amount_depleted - authorization_expired - batch_processing_error - billing_agreement_already_accepted - billing_agreement_not_accepted - billing_agreement_not_found - billing_agreement_replaced - call_issuer - call_issuer_update_cardholder_data - cancelled - cannot_refund_unsettled_transactions - card_not_activated - card_type_not_accepted - cardholder_requested_stop - contact_gateway - contract_not_found - currency_not_supported - customer_canceled_transaction - cvv_required - declined - declined_card_number - declined_exception - declined_expiration_date - declined_missing_data - declined_saveable - declined_security_code - deposit_referenced_chargeback - direct_debit_type_not_accepted - duplicate_transaction - exceeds_daily_limit - exceeds_max_amount - expired_card - finbot_disconnect - finbot_unavailable - fraud_address - fraud_address_recurly - fraud_advanced_verification - fraud_gateway - fraud_generic - fraud_ip_address - fraud_manual_decision - fraud_risk_check - fraud_security_code - fraud_stolen_card - fraud_too_many_attempts - fraud_velocity - gateway_account_setup_incomplete - gateway_error - gateway_rate_limited - gateway_timeout - gateway_token_not_found - gateway_unavailable - gateway_validation_exception - insufficient_funds - invalid_account_number - invalid_amount - invalid_billing_agreement_status - invalid_card_number - invalid_data - invalid_email - invalid_gateway_access_token - invalid_gateway_configuration - invalid_issuer - invalid_login - invalid_merchant_type - invalid_name - invalid_payment_method - invalid_payment_method_hard - invalid_transaction - issuer_unavailable - merch_max_transaction_limit_exceeded - moneybot_disconnect - moneybot_unavailable - no_billing_information - no_gateway - no_gateway_found_for_transaction_amount - partial_approval - partial_credits_not_supported - payer_authentication_rejected - payment_cannot_void_authorization - payment_not_accepted - paypal_account_issue - paypal_cannot_pay_self - paypal_declined_use_alternate - paypal_expired_reference_id - paypal_hard_decline - paypal_invalid_billing_agreement - paypal_primary_declined - processor_not_available - processor_unavailable - recurly_credentials_not_found - recurly_error - recurly_failed_to_get_token - recurly_token_mismatch - recurly_token_not_found - reference_transactions_not_enabled - restricted_card - restricted_card_chargeback - rjs_token_expired - roku_invalid_card_number - roku_invalid_cib - roku_invalid_payment_method - roku_zip_code_mismatch - simultaneous - ssl_error - temporary_hold - three_d_secure_action_required - three_d_secure_action_result_token_mismatch - three_d_secure_authentication - three_d_secure_connection_error - three_d_secure_credential_error - three_d_secure_not_supported - too_busy - too_many_attempts - total_credit_exceeds_capture - transaction_already_refunded - transaction_already_voided - transaction_cannot_be_authorized - transaction_cannot_be_refunded - transaction_cannot_be_refunded_currently - transaction_cannot_be_voided - transaction_failed_to_settle - transaction_not_found - transaction_service_v2_disconnect - transaction_service_v2_unavailable - transaction_settled - transaction_stale_at_gateway - try_again - unknown - unmapped_partner_error - vaultly_service_unavailable - zero_dollar_auth_not_supported DeclineCodeEnum: type: string enum: - account_closed - call_issuer - card_not_activated - card_not_supported - cardholder_requested_stop - do_not_honor - do_not_try_again
recurly/recurly-client-php
5e1ec3745b9283bf4cee0e258e431a7e7fe13320
4.28.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 90f1c78..6d862a4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.27.0 +current_version = 4.28.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 317df19..8e43677 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,356 +1,367 @@ # Changelog +## [4.28.0](https://github.com/recurly/recurly-client-php/tree/4.28.0) (2023-02-07) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.27.0...4.28.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (GiftCard endpoints and new transaction error support) [#745](https://github.com/recurly/recurly-client-php/pull/745) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 626cd4c..baba45a 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.27.0", + "version": "4.28.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index c6f776a..ff0f51d 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.27.0'; + public const CURRENT = '4.28.0'; }
recurly/recurly-client-php
3c8b9de4f3c650c1352a521aa1662196bd4d5218
4.27.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 9822e3d..90f1c78 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.26.0 +current_version = 4.27.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a91b9e..317df19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,345 +1,356 @@ # Changelog +## [4.27.0](https://github.com/recurly/recurly-client-php/tree/4.27.0) (2023-01-19) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.26.0...4.27.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (Custom Fields on Line Items) [#738](https://github.com/recurly/recurly-client-php/pull/738) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 81efd65..626cd4c 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.26.0", + "version": "4.27.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index fa2c312..c6f776a 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.26.0'; + public const CURRENT = '4.27.0'; }
recurly/recurly-client-php
3dfdef9dbb396d18a7d59daa1a3d48d846f1e946
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/resources/line_item.php b/lib/recurly/resources/line_item.php index db63eb3..c0887e9 100644 --- a/lib/recurly/resources/line_item.php +++ b/lib/recurly/resources/line_item.php @@ -1,859 +1,884 @@ <?php /** * This file is automatically created by Recurly's OpenAPI generation process * and thus any edits you make by hand will be lost. If you wish to make a * change to this file, please create a Github issue explaining the changes you * need and we will usher them to the appropriate places. */ namespace Recurly\Resources; use Recurly\RecurlyResource; // phpcs:disable class LineItem extends RecurlyResource { private $_account; private $_accounting_code; private $_add_on_code; private $_add_on_id; private $_amount; private $_avalara_service_type; private $_avalara_transaction_type; private $_bill_for_account_id; private $_created_at; private $_credit_applied; private $_credit_reason_code; private $_currency; + private $_custom_fields; private $_description; private $_discount; private $_end_date; private $_external_sku; private $_id; private $_invoice_id; private $_invoice_number; private $_item_code; private $_item_id; private $_legacy_category; private $_object; private $_origin; private $_original_line_item_invoice_id; private $_plan_code; private $_plan_id; private $_previous_line_item_id; private $_product_code; private $_proration_rate; private $_quantity; private $_quantity_decimal; private $_refund; private $_refunded_quantity; private $_refunded_quantity_decimal; private $_revenue_schedule_type; private $_shipping_address; private $_start_date; private $_state; private $_subscription_id; private $_subtotal; private $_tax; private $_tax_code; private $_tax_exempt; private $_tax_inclusive; private $_tax_info; private $_taxable; private $_type; private $_unit_amount; private $_unit_amount_decimal; private $_updated_at; private $_uuid; protected static $array_hints = [ + 'setCustomFields' => '\Recurly\Resources\CustomField', ]; /** * Getter method for the account attribute. * Account mini details * * @return ?\Recurly\Resources\AccountMini */ public function getAccount(): ?\Recurly\Resources\AccountMini { return $this->_account; } /** * Setter method for the account attribute. * * @param \Recurly\Resources\AccountMini $account * * @return void */ public function setAccount(\Recurly\Resources\AccountMini $account): void { $this->_account = $account; } /** * Getter method for the accounting_code attribute. * Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item. * * @return ?string */ public function getAccountingCode(): ?string { return $this->_accounting_code; } /** * Setter method for the accounting_code attribute. * * @param string $accounting_code * * @return void */ public function setAccountingCode(string $accounting_code): void { $this->_accounting_code = $accounting_code; } /** * Getter method for the add_on_code attribute. * If the line item is a charge or credit for an add-on, this is its code. * * @return ?string */ public function getAddOnCode(): ?string { return $this->_add_on_code; } /** * Setter method for the add_on_code attribute. * * @param string $add_on_code * * @return void */ public function setAddOnCode(string $add_on_code): void { $this->_add_on_code = $add_on_code; } /** * Getter method for the add_on_id attribute. * If the line item is a charge or credit for an add-on this is its ID. * * @return ?string */ public function getAddOnId(): ?string { return $this->_add_on_id; } /** * Setter method for the add_on_id attribute. * * @param string $add_on_id * * @return void */ public function setAddOnId(string $add_on_id): void { $this->_add_on_id = $add_on_id; } /** * Getter method for the amount attribute. * `(quantity * unit_amount) - (discount + tax)` * * @return ?float */ public function getAmount(): ?float { return $this->_amount; } /** * Setter method for the amount attribute. * * @param float $amount * * @return void */ public function setAmount(float $amount): void { $this->_amount = $amount; } /** * Getter method for the avalara_service_type attribute. * Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. * * @return ?int */ public function getAvalaraServiceType(): ?int { return $this->_avalara_service_type; } /** * Setter method for the avalara_service_type attribute. * * @param int $avalara_service_type * * @return void */ public function setAvalaraServiceType(int $avalara_service_type): void { $this->_avalara_service_type = $avalara_service_type; } /** * Getter method for the avalara_transaction_type attribute. * Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. * * @return ?int */ public function getAvalaraTransactionType(): ?int { return $this->_avalara_transaction_type; } /** * Setter method for the avalara_transaction_type attribute. * * @param int $avalara_transaction_type * * @return void */ public function setAvalaraTransactionType(int $avalara_transaction_type): void { $this->_avalara_transaction_type = $avalara_transaction_type; } /** * Getter method for the bill_for_account_id attribute. * The UUID of the account responsible for originating the line item. * * @return ?string */ public function getBillForAccountId(): ?string { return $this->_bill_for_account_id; } /** * Setter method for the bill_for_account_id attribute. * * @param string $bill_for_account_id * * @return void */ public function setBillForAccountId(string $bill_for_account_id): void { $this->_bill_for_account_id = $bill_for_account_id; } /** * Getter method for the created_at attribute. * When the line item was created. * * @return ?string */ public function getCreatedAt(): ?string { return $this->_created_at; } /** * Setter method for the created_at attribute. * * @param string $created_at * * @return void */ public function setCreatedAt(string $created_at): void { $this->_created_at = $created_at; } /** * Getter method for the credit_applied attribute. * The amount of credit from this line item that was applied to the invoice. * * @return ?float */ public function getCreditApplied(): ?float { return $this->_credit_applied; } /** * Setter method for the credit_applied attribute. * * @param float $credit_applied * * @return void */ public function setCreditApplied(float $credit_applied): void { $this->_credit_applied = $credit_applied; } /** * Getter method for the credit_reason_code attribute. * The reason the credit was given when line item is `type=credit`. * * @return ?string */ public function getCreditReasonCode(): ?string { return $this->_credit_reason_code; } /** * Setter method for the credit_reason_code attribute. * * @param string $credit_reason_code * * @return void */ public function setCreditReasonCode(string $credit_reason_code): void { $this->_credit_reason_code = $credit_reason_code; } /** * Getter method for the currency attribute. * 3-letter ISO 4217 currency code. * * @return ?string */ public function getCurrency(): ?string { return $this->_currency; } /** * Setter method for the currency attribute. * * @param string $currency * * @return void */ public function setCurrency(string $currency): void { $this->_currency = $currency; } + /** + * 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 + */ + public function getCustomFields(): array + { + return $this->_custom_fields ?? [] ; + } + + /** + * Setter method for the custom_fields attribute. + * + * @param array $custom_fields + * + * @return void + */ + public function setCustomFields(array $custom_fields): void + { + $this->_custom_fields = $custom_fields; + } + /** * Getter method for the description attribute. * Description that appears on the invoice. For subscription related items this will be filled in automatically. * * @return ?string */ public function getDescription(): ?string { return $this->_description; } /** * Setter method for the description attribute. * * @param string $description * * @return void */ public function setDescription(string $description): void { $this->_description = $description; } /** * Getter method for the discount attribute. * The discount applied to the line item. * * @return ?float */ public function getDiscount(): ?float { return $this->_discount; } /** * Setter method for the discount attribute. * * @param float $discount * * @return void */ public function setDiscount(float $discount): void { $this->_discount = $discount; } /** * Getter method for the end_date attribute. * If this date is provided, it indicates the end of a time range. * * @return ?string */ public function getEndDate(): ?string { return $this->_end_date; } /** * Setter method for the end_date attribute. * * @param string $end_date * * @return void */ public function setEndDate(string $end_date): void { $this->_end_date = $end_date; } /** * Getter method for the external_sku attribute. * Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled. * * @return ?string */ public function getExternalSku(): ?string { return $this->_external_sku; } /** * Setter method for the external_sku attribute. * * @param string $external_sku * * @return void */ public function setExternalSku(string $external_sku): void { $this->_external_sku = $external_sku; } /** * Getter method for the id attribute. * Line item ID * * @return ?string */ public function getId(): ?string { return $this->_id; } /** * Setter method for the id attribute. * * @param string $id * * @return void */ public function setId(string $id): void { $this->_id = $id; } /** * Getter method for the invoice_id attribute. * Once the line item has been invoiced this will be the invoice's ID. * * @return ?string */ public function getInvoiceId(): ?string { return $this->_invoice_id; } /** * Setter method for the invoice_id attribute. * * @param string $invoice_id * * @return void */ public function setInvoiceId(string $invoice_id): void { $this->_invoice_id = $invoice_id; } /** * Getter method for the invoice_number attribute. * Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. * * @return ?string */ public function getInvoiceNumber(): ?string { return $this->_invoice_number; } /** * Setter method for the invoice_number attribute. * * @param string $invoice_number * * @return void */ public function setInvoiceNumber(string $invoice_number): void { $this->_invoice_number = $invoice_number; } /** * Getter method for the item_code attribute. * Unique code to identify an item. Available when the Credit Invoices feature is enabled. * * @return ?string */ public function getItemCode(): ?string { return $this->_item_code; } /** * Setter method for the item_code attribute. * * @param string $item_code * * @return void */ public function setItemCode(string $item_code): void { $this->_item_code = $item_code; } /** * Getter method for the item_id attribute. * System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled. * * @return ?string */ public function getItemId(): ?string { return $this->_item_id; } /** * Setter method for the item_id attribute. * * @param string $item_id * * @return void */ public function setItemId(string $item_id): void { $this->_item_id = $item_id; } /** * Getter method for the legacy_category attribute. * Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account. * * @return ?string */ public function getLegacyCategory(): ?string { return $this->_legacy_category; } /** * Setter method for the legacy_category attribute. * * @param string $legacy_category * * @return void */ public function setLegacyCategory(string $legacy_category): void { $this->_legacy_category = $legacy_category; } /** * Getter method for the object attribute. * Object type * * @return ?string */ public function getObject(): ?string { return $this->_object; } /** * Setter method for the object attribute. * * @param string $object * * @return void */ public function setObject(string $object): void { $this->_object = $object; } /** * Getter method for the origin attribute. * A credit created from an original charge will have the value of the charge's origin. * * @return ?string */ public function getOrigin(): ?string { return $this->_origin; } /** * Setter method for the origin attribute. * * @param string $origin * * @return void */ public function setOrigin(string $origin): void { $this->_origin = $origin; } /** * Getter method for the original_line_item_invoice_id attribute. * The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. * * @return ?string */ public function getOriginalLineItemInvoiceId(): ?string { return $this->_original_line_item_invoice_id; } /** * Setter method for the original_line_item_invoice_id attribute. * * @param string $original_line_item_invoice_id * * @return void */ public function setOriginalLineItemInvoiceId(string $original_line_item_invoice_id): void { $this->_original_line_item_invoice_id = $original_line_item_invoice_id; } /** * Getter method for the plan_code attribute. * If the line item is a charge or credit for a plan or add-on, this is the plan's code. * * @return ?string */ public function getPlanCode(): ?string { return $this->_plan_code; } /** * Setter method for the plan_code attribute. * * @param string $plan_code * * @return void */ public function setPlanCode(string $plan_code): void { $this->_plan_code = $plan_code; } /** * Getter method for the plan_id attribute. * If the line item is a charge or credit for a plan or add-on, this is the plan's ID. * * @return ?string */ public function getPlanId(): ?string { return $this->_plan_id; } /** * Setter method for the plan_id attribute. * * @param string $plan_id * * @return void */ public function setPlanId(string $plan_id): void { $this->_plan_id = $plan_id; } /** * Getter method for the previous_line_item_id attribute. * Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. * * @return ?string */ public function getPreviousLineItemId(): ?string { return $this->_previous_line_item_id; } /** * Setter method for the previous_line_item_id attribute. * * @param string $previous_line_item_id * * @return void */ public function setPreviousLineItemId(string $previous_line_item_id): void { $this->_previous_line_item_id = $previous_line_item_id; } /** * Getter method for the product_code attribute. * For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's `external_sku`. * * @return ?string */ public function getProductCode(): ?string { return $this->_product_code; } /** * Setter method for the product_code attribute. * * @param string $product_code * * @return void */ public function setProductCode(string $product_code): void { $this->_product_code = $product_code; } /** * Getter method for the proration_rate attribute. * When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be `null`, even if the line item was prorated. * * @return ?float */ public function getProrationRate(): ?float { return $this->_proration_rate; } /** * Setter method for the proration_rate attribute. * * @param float $proration_rate * * @return void */ public function setProrationRate(float $proration_rate): void { $this->_proration_rate = $proration_rate; } /** * Getter method for the quantity attribute. * This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes. * * @return ?int */ public function getQuantity(): ?int { return $this->_quantity; } /** * Setter method for the quantity attribute. * * @param int $quantity * * @return void */ public function setQuantity(int $quantity): void { $this->_quantity = $quantity; } /** * Getter method for the quantity_decimal attribute. * A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field. * * @return ?string */ public function getQuantityDecimal(): ?string { return $this->_quantity_decimal; } /** * Setter method for the quantity_decimal attribute. * * @param string $quantity_decimal * * @return void */ public function setQuantityDecimal(string $quantity_decimal): void { $this->_quantity_decimal = $quantity_decimal; } /** * Getter method for the refund attribute. * Refund? * * @return ?bool */ public function getRefund(): ?bool { return $this->_refund; } /** * Setter method for the refund attribute. * * @param bool $refund * * @return void */ public function setRefund(bool $refund): void { $this->_refund = $refund; } /** * Getter method for the refunded_quantity attribute. * For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). * * @return ?int */ public function getRefundedQuantity(): ?int { return $this->_refunded_quantity; } /** * Setter method for the refunded_quantity attribute. * * @param int $refunded_quantity * * @return void */ public function setRefundedQuantity(int $refunded_quantity): void { $this->_refunded_quantity = $refunded_quantity; } /** diff --git a/openapi/api.yaml b/openapi/api.yaml index f0bb176..ea341f0 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -213,1221 +213,1227 @@ x-tagGroups: - name: Invoices and Payments tags: - invoice - line_item - credit_payment - transaction - name: Configuration tags: - site - custom_field_definition - shipping_method - dunning_campaigns tags: - name: site x-displayName: Site - name: custom_field_definition x-displayName: Custom Field Definition description: Describes the fields that can use used as custom fields on accounts or subscriptions. - name: item x-displayName: Item description: |- For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items". Recurly's item catalog requires the Credit Invoices features to be enabled. - name: plan x-displayName: Plan description: A plan tells Recurly how often and how much to charge your customers. Plans can be created with free trials, optional products (called add-ons), setup fees, and more. - name: add-on x-displayName: Add-on description: An add-on is a charge billed each billing period in addition to a subscription’s base charge. Each plan may have one or more add-ons associated with it. - name: measured_unit x-displayName: Measured Unit description: A measured unit describes a usage-based add-on's usage. If different usage-based add-ons share the same measured unit, you can report on customer usage for those add-ons at the aggregated measured unit level. - name: account x-displayName: Account description: Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more. - name: note x-displayName: Account Note description: Account notes allow your team to leave notes on an account to add context, e.g. the reason for a refund, customer requests, and/or complaints. These notes are internal and not exposed to your customers. - name: account_acquisition x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored payment method at a time. Examples include credit cards, PayPal, or bank accounts. Billing info is filled out by the customer upon purchase or when they update their information. - name: billing_infos x-displayName: Billing Infos description: If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints. - name: subscription x-displayName: Subscription description: Subscriptions are created when your customers subscribe to one of your plans. The customer's subscription tells Recurly when and how much to bill the customer. - name: subscription_change x-displayName: Subscription Change description: Subscription changes alter subscription in a way that might affect the invoiced amount, such as changing the plan, add-ons, quantities, or shipping address. Changes can be made immediately in the current billing cycle or scheduled to take place at the next renewal. - name: shipping_address x-displayName: Shipping Address description: Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription. - name: invoice x-displayName: Invoice description: An invoice relates charges, credits, and payments together. When a subscription is created or renewed or a charge is created on the account, Recurly will sum the charges, discount or tax as appropriate, and send the invoice out for collection. - name: line_item x-displayName: Line Item description: Line items are the charges and credits on your customer's invoices. - name: credit_payment x-displayName: Credit Payment - name: purchase x-displayName: Purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. The purchases endpoint can also be used to immediately create a credit invoice on an account, when Credit Invoices is enabled on your site. - name: usage x-displayName: Usage description: Send Recurly your customer usage and we will automatically bill them in arrears at the end of the billing cycle. For more info on usage-based billing, [click here](https://docs.recurly.com/docs/usage-based-billing). - name: transaction x-displayName: Transaction description: Purchasing information is sent to your payment gateway in an action called a transaction. This includes the customer's billing information and the amount of money to be charged, voided, or refunded. - name: coupon x-displayName: Coupon description: Coupons can either be single codes that easily allow mass distribution by many customers or bulk coupons that can generate many unique coupons that can allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption description: Coupon redemptions are created when a coupon is applied to an account or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. - name: shipping_method x-displayName: Shipping Method description: Shipping methods offered to send products to customers. - name: automated_exports x-displayName: Automated Exports description: Automated exports of customer data. - name: dunning_campaigns x-displayName: Dunning Campaigns description: Settings used when attempting to dun customers whose payments are declined. - name: external_subscriptions x-displayName: External Subscription description: A subscription from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. - name: external_products x-displayName: External Product description: A product from an external resource that is not managed by the Recurly platform and instead is managed by third-party platforms like Apple App Store and Google Play Store. paths: "/sites": get: operationId: list_sites summary: List sites description: | This route is most useful for finding a site's ID for subsequent requests. See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. tags: - site parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of sites. content: application/json: schema: "$ref": "#/components/schemas/SiteList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const sites = client.listSites({ params: { limit: 200 } }) for await (const site of sites.each()) { console.log(site.subdomain) } - lang: Python source: | params = {"limit": 200} sites = client.list_sites(params=params).items() for site in sites: print(site.subdomain) - lang: ".NET" source: | var optionalParams = new ListSitesParams() { Limit = 200 }; var sites = client.ListSites(optionalParams); foreach(Site site in sites) { Console.WriteLine(site.Subdomain); } - lang: Ruby source: | params = { limit: 200 } sites = @client.list_sites(params: params) sites.each do |site| puts "Site: #{site.subdomain}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Site> sites = client.listSites(params); for (Site site : sites) { System.out.println(site.getSubdomain()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $sites = $client->listSites($options); foreach($sites as $site) { echo 'Site: ' . $site->getSubdomain() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListSitesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"asc\"),\n\tLimit: recurly.Int(200),\n}\n\nsites, err := client.ListSites(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor sites.HasMore() {\n\terr := sites.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, site := range sites.Data() {\n\t\tfmt.Printf(\"Site %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tsite.Id,\n\t\t\tsite.Subdomain,\n\t\t)\n\t}\n}" "/sites/{site_id}": get: operationId: get_site summary: Fetch a site tags: - site parameters: - "$ref": "#/components/parameters/site_id" responses: '200': description: A site. content: application/json: schema: "$ref": "#/components/schemas/Site" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const site = await client.getSite(siteId) console.log('Fetched site: ', site) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: site = client.get_site(site_id) print("Got Site %s" % site) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Site site = client.GetSite(siteId); Console.WriteLine($"Fetched site {site.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin site = @client.get_site(site_id: site_id) puts "Got Site #{site}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Site site = client.getSite(siteId); System.out.println("Fetched site: " + site.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $site = $client->getSite($site_id); echo 'Got Site:' . PHP_EOL; var_dump($site); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "site, err := client.GetSite(siteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Site: %s\", site.Id)" "/accounts": get: tags: - account operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_account_email" - "$ref": "#/components/parameters/filter_account_subscriber" - "$ref": "#/components/parameters/filter_account_past_due" responses: '200': description: A list of the site's accounts. content: application/json: schema: "$ref": "#/components/schemas/AccountList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const accounts = client.listAccounts({ params: { limit: 200 } }) for await (const account of accounts.each()) { console.log(account.code) } - lang: Python source: | params = {"limit": 200} accounts = client.list_accounts(params=params).items() for account in accounts: print(account.code) - lang: ".NET" source: | var optionalParams = new ListAccountsParams() { Limit = 200 }; var accounts = client.ListAccounts(optionalParams); foreach(Account account in accounts) { Console.WriteLine(account.Code); } - lang: Ruby source: | params = { limit: 200 } accounts = @client.list_accounts(params: params) accounts.each do |account| puts "Account: #{account.code}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time Pager<Account> accounts = client.listAccounts(params); for (Account acct : accounts) { System.out.println(acct.getCode()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $accounts = $client->listAccounts($options); foreach($accounts as $account) { echo 'Account code: ' . $account->getCode() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccounts, err := client.ListAccounts(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accounts.HasMore() {\n\terr := accounts.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, account := range accounts.Data() {\n\t\tfmt.Printf(\"Account %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\taccount.Id,\n\t\t\taccount.Code,\n\t\t)\n\t}\n}" post: tags: - account operationId: create_account summary: Create an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" required: true responses: '201': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountCreate = { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', + preferredTimeZone: 'America/Chicago', address: { street1: '900 Camp St', city: 'New Orleans', region: 'LA', postalCode: '70115', country: 'US' } } const account = await client.createAccount(accountCreate) console.log('Created Account: ', account.code) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account_create = { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", + "preferred_time_zone": "America/Chicago", "acquisition": { "campaign": "podcast-marketing", "channel": "social_media", "subchannel": "twitter", "cost": {"currency": "USD", "amount": 0.50}, }, "shipping_addresses": [ { "nickname": "Home", "street1": "1 Tchoupitoulas St", "city": "New Orleans", "region": "LA", "country": "US", "postal_code": "70115", "first_name": "Aaron", "last_name": "Du Monde", } ], } account = client.create_account(account_create) print("Created Account %s" % account) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var accountReq = new AccountCreate() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", + PreferredTimeZone = "America/Chicago", Address = new Address() { City = "New Orleans", Region = "LA", Country = "US", PostalCode = "70115", Street1 = "900 Camp St." } }; Account account = client.CreateAccount(accountReq); Console.WriteLine($"Created account {account.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account_create = { code: account_code, first_name: "Benjamin", last_name: "Du Monde", + preferred_time_zone: "America/Chicago", acquisition: { campaign: "podcast-marketing", channel: "social_media", subchannel: "twitter", cost: { currency: "USD", amount: 0.50 } }, shipping_addresses: [ { nickname: "Home", street1: "1 Tchoupitoulas St", city: "New Orleans", region: "LA", country: "US", postal_code: "70115", first_name: "Benjamin", last_name: "Du Monde" } ] } account = @client.create_account(body: account_create) puts "Created Account #{account}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountCreate accountReq = new AccountCreate(); Address address = new Address(); accountReq.setCode(accountCode); accountReq.setFirstName("Aaron"); accountReq.setLastName("Du Monde"); + accountReq.setPreferredTimeZone("America/Chicago"); address.setStreet1("900 Camp St."); address.setCity("New Orleans"); address.setRegion("LA"); address.setCountry("US"); address.setPostalCode("70115"); accountReq.setAddress(address); Account account = client.createAccount(accountReq); System.out.println("Created account " + account.getCode()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $account_create = [ "code" => $account_code, "first_name" => "Douglas", "last_name" => "DuMonde", + "preferred_time_zone" => "America/Chicago", "shipping_addresses" => [ [ "first_name" => "Douglas", "last_name" => "DuMonde", "nickname" => "nola", "street1" => "1 Tchoupitoulas", "city" => "New Orleans", "postal_code" => "70130", "country" => "US" ] ] ]; $account = $client->createAccount($account_create); echo 'Created Account:' . PHP_EOL; var_dump($account); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "accountReq := &recurly.AccountCreate{\n\tCode: &accountCode,\n\tFirstName: recurly.String(\"Isaac\"),\n\tLastName: recurly.String(\"Du Monde\"),\n\tEmail: - \ recurly.String(\"isaac@example.com\"),\n\tBillingInfo: &recurly.BillingInfoCreate{\n\t\tFirstName: - recurly.String(\"Isaac\"),\n\t\tLastName: recurly.String(\"Du Monde\"),\n\t\tAddress: - &recurly.AddressCreate{\n\t\t\tPhone: recurly.String(\"415-555-5555\"),\n\t\t\tStreet1: - \ recurly.String(\"400 Alabama St.\"),\n\t\t\tCity: recurly.String(\"San - Francisco\"),\n\t\t\tPostalCode: recurly.String(\"94110\"),\n\t\t\tCountry: - \ recurly.String(\"US\"),\n\t\t\tRegion: recurly.String(\"CA\"),\n\t\t},\n\t\tNumber: - recurly.String(\"4111111111111111\"),\n\t\tMonth: recurly.String(\"12\"),\n\t\tYear: - \ recurly.String(\"22\"),\n\t\tCvv: recurly.String(\"123\"),\n\t},\n}\n\naccount, - err := client.CreateAccount(accountReq)\nif e, ok := err.(*recurly.Error); - ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed - validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected + \ recurly.String(\"isaac@example.com\"),\n\tPreferredTimeZone: recurly.String(\"America/Los_Angeles\"),\n\tBillingInfo: + &recurly.BillingInfoCreate{\n\t\tFirstName: recurly.String(\"Isaac\"),\n\t\tLastName: + \ recurly.String(\"Du Monde\"),\n\t\tAddress: &recurly.AddressCreate{\n\t\t\tPhone: + \ recurly.String(\"415-555-5555\"),\n\t\t\tStreet1: recurly.String(\"400 + Alabama St.\"),\n\t\t\tCity: recurly.String(\"San Francisco\"),\n\t\t\tPostalCode: + recurly.String(\"94110\"),\n\t\t\tCountry: recurly.String(\"US\"),\n\t\t\tRegion: + \ recurly.String(\"CA\"),\n\t\t},\n\t\tNumber: recurly.String(\"4111111111111111\"),\n\t\tMonth: + \ recurly.String(\"12\"),\n\t\tYear: recurly.String(\"22\"),\n\t\tCvv: + \ recurly.String(\"123\"),\n\t},\n}\n\naccount, err := client.CreateAccount(accountReq)\nif + e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation + {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Account: %s\", account.Id)" "/accounts/{account_id}": parameters: - "$ref": "#/components/parameters/account_id" get: tags: - account operationId: get_account summary: Fetch an account responses: '200': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const account = await client.getAccount(accountId) console.log('Fetched account: ', account.code) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account = client.get_account(account_id) print("Got Account %s" % account) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Account account = client.GetAccount(accountId); Console.WriteLine($"Fetched account {account.Code}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account = @client.get_account(account_id: account_id) puts "Got Account #{account}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Account account = client.getAccount(accountId); System.out.println("Fetched account: " + account.getCode()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $account = $client->getAccount($account_id); echo 'Got Account:' . PHP_EOL; var_dump($account); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "account, err := client.GetAccount(accountID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Println(\"Fetched Account \", account.Id)" put: tags: - account operationId: update_account summary: Update an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountUpdate" required: true responses: '200': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/ErrorMayHaveTransaction" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountUpdate = { firstName: 'Aaron', lastName: 'Du Monde' } const account = await client.updateAccount(accountId, accountUpdate) console.log('Updated account: ', account) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account_update = {"first_name": "Aaron", "last_name": "Du Monde"} account = client.update_account(account_id, account_update) print("Updated Account %s" % account) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var accountReq = new AccountUpdate() { FirstName = "Aaron", LastName = "Du Monde" }; Account account = client.UpdateAccount(accountId, accountReq); Console.WriteLine(account.FirstName); Console.WriteLine(account.LastName); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account_update = { first_name: "Aaron", last_name: "Du Monde", } account = @client.update_account( account_id: account_id, body: account_update ) puts "Updated Account #{account}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { final AccountUpdate accountUpdate = new AccountUpdate(); accountUpdate.setFirstName("Aaron"); accountUpdate.setLastName("Du Monde"); final Account account = client.updateAccount(accountId, accountUpdate); System.out.println("Updated account: " + account.getCode()); System.out.println(account.getFirstName()); System.out.println(account.getLastName()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $account_update = [ "first_name" => "Douglas", "last_name" => "Du Monde", ]; $account = $client->updateAccount($account_id, $account_update); echo 'Updated Account:' . PHP_EOL; var_dump($account); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "updateReq := &recurly.AccountUpdate{\n\tFirstName: recurly.String(\"Joanna\"),\n\tLastName: \ recurly.String(\"DuMonde\"),\n}\naccount, err := client.UpdateAccount(accountID, updateReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Updated Account: %s\", account.Id)" delete: tags: - account operationId: deactivate_account summary: Deactivate an account description: Deactivating an account permanently deletes its billing information and cancels any active subscriptions (canceled subscriptions will remain active until the end of the current billing cycle before expiring). We recommend closing accounts only when all business is concluded with a customer. responses: '200': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '422': description: Account may already be inactive. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const account = await client.deactivateAccount(accountId) console.log('Deleted account: ', account.code) } catch (err) { if (err && err.type === 'not-found') { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it throw err } - lang: Python source: | try: account = client.deactivate_account(account_id) print("Deactivated Account %s" % account) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Account account = client.DeactivateAccount(accountId); Console.WriteLine($"Deactivated account {account.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account = @client.deactivate_account(account_id: account_id) puts "Deactivated Account #{account}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { Account account = client.deactivateAccount(accountId); System.out.println("deactivated account " + account.getCode()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $account = $client->deactivateAccount($account_id); echo 'Deactivated Account:' . PHP_EOL; var_dump($account); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "account, err := client.DeactivateAccount(accountID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Deactivated Account: %s\", account.Id)" "/accounts/{account_id}/acquisition": parameters: - "$ref": "#/components/parameters/account_id" get: tags: - account_acquisition operationId: get_account_acquisition summary: Fetch an account's acquisition data responses: '200': description: An account's acquisition data. content: application/json: schema: "$ref": "#/components/schemas/AccountAcquisition" '404': description: Account has no acquisition data, or incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const acquisition = await client.getAccountAcquisition(accountId) console.log('Fetched account acquisition: ', acquisition.id) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: acquisition = client.get_account_acquisition(account_id) print("Got AccountAcquisition %s" % acquisition) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { AccountAcquisition acquisition = client.GetAccountAcquisition(accountId); Console.WriteLine($"Fetched account acquisition {acquisition.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin @client.get_account_acquisition(account_id: account_id) puts "Got AccountAcquisition" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final AccountAcquisition acquisition = client.getAccountAcquisition(accountId); System.out.println("Fetched account acquisition " + acquisition.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $acquisition = $client->getAccountAcquisition($account_id); echo 'Got Account Acquisition:' . PHP_EOL; var_dump($acquisition); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "accountAcq, err := client.GetAccountAcquisition(accountID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Account Acquisition: %v\", accountAcq.Id)" put: tags: - account_acquisition operationId: update_account_acquisition summary: Update an account's acquisition data requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountAcquisitionUpdate" required: true @@ -14179,1024 +14185,1026 @@ paths: '200': description: A unique coupon code. content: application/json: schema: "$ref": "#/components/schemas/UniqueCouponCode" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Unique coupon code cannot be restored for the provided reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/purchases": post: tags: - purchase operationId: create_purchase summary: Create a new purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. requestBody: content: application/json: schema: "$ref": "#/components/schemas/PurchaseCreate" required: true responses: '201': description: Returns the new invoices content: application/json: schema: "$ref": "#/components/schemas/InvoiceCollection" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Purchase cannot be completed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { let purchaseReq = { currency: 'USD', account: { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', billingInfo: { tokenId: rjsTokenId } }, subscriptions: [ { planCode: planCode }, ] } let invoiceCollection = await client.createPurchase(purchaseReq) console.log('Created Charge Invoice: ', invoiceCollection.chargeInvoice) console.log('Created Credit Invoices: ', invoiceCollection.creditInvoices) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: purchase = { "currency": "USD", "account": { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", "billing_info": {"token_id": rjs_token_id}, }, "subscriptions": [{"plan_code": plan_code}], } invoice_collection = client.create_purchase(purchase) print("Created Charge Invoice %s" % invoice_collection.charge_invoice) print("Created Credit Invoices %s" % invoice_collection.credit_invoices) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var purchaseReq = new PurchaseCreate() { Currency = "USD", Account = new AccountPurchase() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", BillingInfo = new BillingInfoCreate() { TokenId = rjsTokenId } }, Subscriptions = new List<SubscriptionPurchase>() { new SubscriptionPurchase() { PlanCode = planCode } } }; InvoiceCollection collection = client.CreatePurchase(purchaseReq); Console.WriteLine($"Created ChargeInvoice with Number: {collection.ChargeInvoice.Number}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin purchase = { currency: "USD", account: { code: account_code, first_name: "Benjamin", last_name: "Du Monde", billing_info: { token_id: rjs_token_id }, }, subscriptions: [ { plan_code: plan_code } ] } invoice_collection = @client.create_purchase( body: purchase ) puts "Created Charge Invoice #{invoice_collection.charge_invoice}" puts "Created Credit Invoices #{invoice_collection.credit_invoices}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountPurchase account = new AccountPurchase(); account.setCode(accountCode); account.setFirstName("Benjamin"); account.setLastName("DuMonde"); BillingInfoCreate billing = new BillingInfoCreate(); billing.setTokenId(rjsTokenId); account.setBillingInfo(billing); List<SubscriptionPurchase> subscriptions = new ArrayList<SubscriptionPurchase>(); SubscriptionPurchase sub = new SubscriptionPurchase(); sub.setPlanCode(planCode); subscriptions.add(sub); PurchaseCreate purchase = new PurchaseCreate(); purchase.setCurrency("USD"); purchase.setAccount(account); purchase.setSubscriptions(subscriptions); InvoiceCollection collection = client.createPurchase(purchase); System.out.println("Created ChargeInvoice with Id: " + collection.getChargeInvoice().getId()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); System.out.println("Params: " + e.getError().getParams()); } catch (TransactionException e) { TransactionError tError = e.getError().getTransactionError(); if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) { String actionTokenId = tError.getThreeDSecureActionTokenId(); System.out.println("Got 3DSecure TransactionError token: " + actionTokenId); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $purchase_create = [ "currency" => "USD", "account" => [ "code" => $account_code, "first_name" => "Douglas", "last_name" => "Du Monde", "billing_info" => [ "token_id" => $rjs_token_id ], ], "subscriptions" => [ [ "plan_code" => $plan_code ] ] ]; $invoice_collection = $client->createPurchase($purchase_create); echo 'Created Invoices:' . PHP_EOL; var_dump($invoice_collection); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tAccount: &recurly.AccountPurchase{\n\t\tCode: recurly.String(accountCode),\n\t},\n\tSubscriptions: []recurly.SubscriptionPurchase{\n\t\t{\n\t\t\tPlanCode: recurly.String(planCode),\n\t\t\tNextBillDate: recurly.Time(time.Date(2078, time.November, 10, 23, 0, 0, 0, time.UTC)),\n\t\t},\n\t},\n\tShipping: &recurly.ShippingPurchase{\n\t\tAddressId: recurly.String(shippingAddressID),\n\t},\n}\n\ncollection, err := client.CreatePurchase(purchaseReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Purchase: %s\", collection.ChargeInvoice.Number)" "/purchases/preview": post: tags: - purchase operationId: preview_purchase summary: Preview a new purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. requestBody: content: application/json: schema: "$ref": "#/components/schemas/PurchaseCreate" required: true responses: '200': description: Returns preview of the new invoices content: application/json: schema: "$ref": "#/components/schemas/InvoiceCollection" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Purchase cannot be previewed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { let purchaseReq = { currency: 'USD', account: { firstName: 'Benjamin', lastName: 'Du Monde', code: accountCode, billingInfo: { tokenId: rjsTokenId } }, subscriptions: [ { planCode: planCode }, ] } let invoiceCollection = await client.previewPurchase(purchaseReq) console.log('Preview Charge Invoice: ', invoiceCollection.chargeInvoice) console.log('Preview Credit Invoices: ', invoiceCollection.creditInvoices) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: purchase = { "currency": "USD", "account": { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", "billing_info": {"token_id": rjs_token_id}, }, "subscriptions": [{"plan_code": plan_code}], } invoice_collection = client.preview_purchase(purchase) print("Preview Charge Invoice %s" % invoice_collection.charge_invoice) print("Preview Credit Invoices %s" % invoice_collection.credit_invoices) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var purchaseReq = new PurchaseCreate() { Currency = "USD", Account = new AccountPurchase() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", BillingInfo = new BillingInfoCreate() { TokenId = rjsTokenId } }, Subscriptions = new List<SubscriptionPurchase>() { new SubscriptionPurchase() { PlanCode = planCode } } }; InvoiceCollection collection = client.PreviewPurchase(purchaseReq); Console.WriteLine($"Preview ChargeInvoice with Total: {collection.ChargeInvoice.Total}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin purchase = { currency: "USD", account: { code: account_code, first_name: "Benjamin", last_name: "Du Monde", billing_info: { token_id: rjs_token_id }, }, subscriptions: [ { plan_code: plan_code } ] } invoice_collection = @client.preview_purchase( body: purchase ) puts "Preview Charge Invoice #{invoice_collection.charge_invoice}" puts "Preview Credit Invoices #{invoice_collection.credit_invoices}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountPurchase account = new AccountPurchase(); account.setCode(accountCode); account.setFirstName("Joanna"); account.setLastName("DuMonde"); BillingInfoCreate billing = new BillingInfoCreate(); billing.setTokenId(rjsTokenId); account.setBillingInfo(billing); List<SubscriptionPurchase> subscriptions = new ArrayList<SubscriptionPurchase>(); SubscriptionPurchase sub = new SubscriptionPurchase(); sub.setPlanCode(planCode); subscriptions.add(sub); PurchaseCreate purchase = new PurchaseCreate(); purchase.setCurrency("USD"); purchase.setAccount(account); purchase.setSubscriptions(subscriptions); InvoiceCollection collection = client.previewPurchase(purchase); System.out.println("Preview Charge Invoice:" + collection.getChargeInvoice()); System.out.println("Preview Credit Invoices: " + collection.getCreditInvoices()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); System.out.println("Params: " + e.getError().getParams()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $purchase_preview = [ "currency" => "USD", "account" => [ "code" => $account_code, "first_name" => "Douglas", "last_name" => "Du Monde", "billing_info" => [ "token_id" => $rjs_token_id ], ], "subscriptions" => [ [ "plan_code" => $plan_code ] ] ]; $invoice_collection = $client->previewPurchase($purchase_preview); echo 'Preview Invoices:' . PHP_EOL; var_dump($invoice_collection); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tAccount: &recurly.AccountPurchase{\n\t\tCode: recurly.String(account.Code),\n\t},\n\tSubscriptions: []recurly.SubscriptionPurchase{\n\t\t{\n\t\t\tPlanCode: recurly.String(plan.Code),\n\t\t\tNextBillDate: recurly.Time(time.Date(2078, time.November, 10, 23, 0, 0, 0, time.UTC)),\n\t\t},\n\t},\n\tShipping: &recurly.ShippingPurchase{\n\t\tAddressId: recurly.String(shippingAddressID),\n\t},\n}\ncollection, err := client.PreviewPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Charge Invoice %v\", collection.ChargeInvoice)" "/purchases/pending": post: tags: - purchase operationId: create_pending_purchase summary: Create a pending purchase description: |- A purchase is a hybrid checkout containing at least one or more subscriptions or one-time charges (adjustments) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. A purchase is only a request data type and is not persistent in Recurly and an invoice collection will be the returned type. Use for **Adyen HPP** and **Online Banking** transaction requests. This runs the validations but not the transactions. The API request allows the inclusion of one of the following fields: **external_hpp_type** with `'adyen'` and **online_banking_payment_type** with `'ideal'` or `'sofort'` in the **billing_info** object. For additional information regarding shipping fees, please see https://docs.recurly.com/docs/shipping + + Note: an email address is required on the account for a Pending Purchase. requestBody: content: application/json: schema: "$ref": "#/components/schemas/PurchaseCreate" required: true responses: '200': description: Returns the pending invoice content: application/json: schema: "$ref": "#/components/schemas/InvoiceCollection" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Pending purchase cannot be completed for the specified reason. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const purchaseReq = { currency: 'EUR', account: { code: accountCode, email: 'example@recurly.com', billingInfo: { firstName: 'Benjamin', lastName: 'Du Monde', onlineBankingPaymentType: 'ideal' }, }, lineItems: [ { currency: 'EUR', unitAmount: 1000, type: 'charge' } ] }; const invoiceCollection = await client.createPendingPurchase(purchaseReq) console.log('Created ChargeInvoice with UUID: ', invoiceCollection.chargeInvoice.uuid) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: purchase = { "currency": "EUR", "account": { "code": account_code, "email": "benjamin@example.com", "billing_info": { "first_name": "Benjamin", "last_name": "Du Monde", "online_banking_payment_type": "ideal" } }, "line_items": [ { "currency": "EUR", "unit_amount": 1000, "type": "charge" } ], } invoice_collection = client.create_pending_purchase(purchase) print("Created ChargeInvoice with UUID %s" % invoice_collection.charge_invoice.uuid) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var purchaseReq = new PurchaseCreate() { Currency = "EUR", Account = new AccountPurchase() { Code = accountCode, Email = "benjamin@example.com", BillingInfo = new BillingInfoCreate() { FirstName = "Benjamin", LastName = "Du Monde", OnlineBankingPaymentType = OnlineBankingPaymentType.Ideal } }, LineItems = new List<LineItemCreate>() { new LineItemCreate() { Currency = "EUR", UnitAmount = 1000, Type = LineItemType.Charge } } }; InvoiceCollection collection = client.CreatePendingPurchase(purchaseReq); Console.WriteLine($"Created ChargeInvoice with UUID: {collection.ChargeInvoice.Uuid}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin purchase = { currency: 'EUR', account: { code: account_code, email: 'benjamin@example.com', billing_info: { first_name: 'Benjamin', last_name: 'Du Monde', online_banking_payment_type: 'ideal' }, }, line_items: [ { currency: 'EUR', unit_amount: 1000, type: 'charge' } ] } invoice_collection = @client.create_pending_purchase(body: purchase) puts "Created ChargeInvoice with UUID: #{invoice_collection.charge_invoice.uuid}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountPurchase account = new AccountPurchase(); account.setCode(accountCode); account.setEmail("benjamin@example.com"); BillingInfoCreate billingInfo = new BillingInfoCreate(); billingInfo.setFirstName("Benjamin"); billingInfo.setLastName("Du Monde"); billingInfo.setOnlineBankingPaymentType(Constants.OnlineBankingPaymentType.IDEAL); account.setBillingInfo(billingInfo); List<LineItemCreate> lineItems = new ArrayList<LineItemCreate>(); LineItemCreate lineItem = new LineItemCreate(); lineItem.setCurrency("EUR"); lineItem.setUnitAmount(new BigDecimal("1000.0")); lineItem.setType(Constants.LineItemType.CHARGE); lineItems.add(lineItem); PurchaseCreate purchase = new PurchaseCreate(); purchase.setCurrency("EUR"); purchase.setAccount(account); purchase.setLineItems(lineItems); InvoiceCollection collection = client.createPendingPurchase(purchase); System.out.println("Created ChargeInvoice with UUID: " + collection.getChargeInvoice().getUuid()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); System.out.println("Params: " + e.getError().getParams()); } catch (TransactionException e) { TransactionError tError = e.getError().getTransactionError(); if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) { String actionTokenId = tError.getThreeDSecureActionTokenId(); System.out.println("Got 3DSecure TransactionError token: " + actionTokenId); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $purchase_create = [ "currency" => "EUR", "account" => [ "code" => $account_code, "email" => "benjamin@example.com", "billing_info" => [ "first_name" => "Benjamin", "last_name" => "Du Monde", "online_banking_payment_type" => "ideal" ], ], "line_items" => [ [ "currency" => "EUR", "unit_amount" => 1000, "type" => "charge", ] ] ]; $invoice_collection = $client->createPendingPurchase($purchase_create); echo 'Created ChargeInvoice with UUID' . $invoice_collection->getChargeInvoice()->getUuid() . PHP_EOL; } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"EUR\"),\n\tAccount: &recurly.AccountPurchase{\n\t\tCode: recurly.String(accountCode),\n\t\tEmail: recurly.String(\"benjamin@example.com\"),\n\t\tBillingInfo: &recurly.BillingInfoCreate{\n\t\t\tFirstName: \ recurly.String(\"Benjamin\"),\n\t\t\tLastName: recurly.String(\"Du Monde\"),\n\t\t\tOnlineBankingPaymentType: recurly.String(\"ideal\"),\n\t\t},\n\t},\n\tLineItems: []recurly.LineItemCreate{\n\t\t{\n\t\t\tCurrency: recurly.String(\"EUR\"),\n\t\t\tUnitAmount: recurly.Float(1000),\n\t\t\tType: recurly.String(\"charge\"),\n\t\t},\n\t},\n}\ncollection, err := client.CreatePendingPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Created ChargeInvoice with UUID: %s.\\n\", collection.ChargeInvoice.Uuid)\n" "/export_dates": get: tags: - automated_exports operationId: get_export_dates summary: List the dates that have an available export to download. description: Returns a list of dates for which export files are available for download. responses: '200': description: Returns a list of dates. content: application/json: schema: "$ref": "#/components/schemas/ExportDates" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const export_dates = await client.getExportDates() export_dates.dates.forEach(date => { console.log(`Exports are available for: ${date}`) }) } catch (err) { if (err instanceof recurly.ApiError) { console.log('Unexpected error', err) } } - lang: Python source: | try: export_dates = client.get_export_dates() for date in export_dates.dates: print( "Exports are available for: %s" % date) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { ExportDates exportDates = client.GetExportDates(); foreach (var date in exportDates.Dates) { System.Console.WriteLine($"Exports are available for: {date}"); } } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin export_dates = @client.get_export_dates() export_dates.dates.each do |date| puts "Exports are available for: #{date}" end rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { ExportDates exportDates = client.getExportDates(); for (String date : exportDates.getDates()) { System.out.println("Exports are available for: " + date); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $export_dates = $client->getExportDates(); foreach($export_dates->getDates() as $date) { echo "Exports are available for: {$date}" . PHP_EOL; } } catch (\Recurly\RecurlyError $e) { echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "exportDates, err := client.GetExportDates()\nif e, ok := err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfor _, date := range exportDates.Dates {\n\tfmt.Println(\"Exports are available for: \", date)\n}" "/export_dates/{export_date}/export_files": parameters: - "$ref": "#/components/parameters/export_date" get: tags: - automated_exports operationId: get_export_files summary: List of the export files that are available to download. description: Returns a list of presigned URLs to download export files for the given date, with their MD5 sums. responses: '200': description: Returns a list of export files to download. content: application/json: schema: "$ref": "#/components/schemas/ExportFiles" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID or date. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const export_files = await client.getExportFiles(export_date) export_files.files.forEach(file => { console.log(`Export file download URL: ${file.href}`) }) } catch (err) { if (err instanceof recurly.ApiError) { console.log('Unexpected error', err) } } - lang: Python source: | try: export_files = client.get_export_files(export_date) for file in export_files.files: print( "Export file download URL: %s" % file.href) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { ExportFiles exportFiles = client.GetExportFiles(exportDate: exportDate); foreach (var file in exportFiles.Files) { System.Console.WriteLine($"Export file download URL: {file.Href}"); } } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin export_files = @client.get_export_files(export_date: export_date) export_files.files.each do |file| puts "Export file download URL: #{file.href}" end rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { ExportFiles exportFiles = client.getExportFiles(exportDate); for (ExportFile file : exportFiles.getFiles()) { System.out.println("Export file download URL: " + file.getHref()); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError()); } - lang: PHP source: | try { $export_files = $client->getExportFiles($export_date); foreach($export_files->getFiles() as $file) { echo "Export file download URL: {$file->getHref()}" . PHP_EOL; } } catch (\Recurly\RecurlyError $e) { echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "exportFiles, err := client.GetExportFiles(exportDate)\nif e, ok := err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfor _, file := range exportFiles.Files {\n\tfmt.Println(\"Export file download URL: \", file.Href)\n}" "/dunning_campaigns": get: tags: - dunning_campaigns operationId: list_dunning_campaigns summary: List the dunning campaigns for a site description: See the [Pagination Guide](/developers/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the dunning_campaigns on an account. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/dunning_campaigns/{dunning_campaign_id}": parameters: - "$ref": "#/components/parameters/dunning_campaign_id" get: @@ -18624,1190 +18632,1194 @@ components: properties: object: type: string title: Object type charge_invoice: "$ref": "#/components/schemas/Invoice" credit_invoices: type: array title: Credit invoices items: "$ref": "#/components/schemas/Invoice" InvoiceUpdate: type: object properties: po_number: type: string title: Purchase order number description: This identifies the PO number associated with the invoice. Not editable for credit invoices. maxLength: 50 vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT Reverse Charge Notes are editable only if there was a VAT reverse charge applied to the invoice. terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions are an optional note field. Not editable for credit invoices. customer_notes: type: string title: Customer notes description: Customer notes are an optional note field. net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. Changing Net terms changes due_on, and the invoice could move between past due and pending. minimum: 0 maximum: 999 address: "$ref": "#/components/schemas/InvoiceAddress" InvoiceMini: type: object title: Invoice mini details properties: id: type: string title: Invoice ID maxLength: 13 object: type: string title: Object type number: type: string title: Invoice number type: title: Invoice type "$ref": "#/components/schemas/InvoiceTypeEnum" state: title: Invoice state "$ref": "#/components/schemas/InvoiceStateEnum" InvoiceRefund: type: object title: Invoice refund properties: type: title: Type description: The type of refund. Amount and line items cannot both be specified in the request. "$ref": "#/components/schemas/InvoiceRefundTypeEnum" amount: type: number format: float title: Amount description: | The amount to be refunded. The amount will be split between the line items. If no amount is specified, it will default to refunding the total refundable amount on the invoice. line_items: type: array title: Line items description: The line items to be refunded. This is required when `type=line_items`. items: "$ref": "#/components/schemas/LineItemRefund" refund_method: title: Refund method description: | Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice: - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled. - `credit_first` – Issues credit back to the account first, then refunds any remaining amount back to the transaction. Default value when Credit Invoices feature is not enabled. - `all_credit` – Issues credit to the account for the entire amount of the refund. Only available when the Credit Invoices feature is enabled. - `all_transaction` – Refunds the entire amount back to transactions, using transactions from previous invoices if necessary. Only available when the Credit Invoices feature is enabled. default: credit_first "$ref": "#/components/schemas/RefuneMethodEnum" credit_customer_notes: type: string title: Credit customer notes description: | Used as the Customer Notes on the credit invoice. This field can only be include when the Credit Invoices feature is enabled. external_refund: type: object x-class-name: ExternalRefund description: | Indicates that the refund was settled outside of Recurly, and a manual transaction should be created to track it in Recurly. Required when: - refunding a manually collected charge invoice, and `refund_method` is not `all_credit` - refunding a credit invoice that refunded manually collecting invoices - refunding a credit invoice for a partial amount This field can only be included when the Credit Invoices feature is enabled. properties: payment_method: title: Payment Method description: Payment method used for external refund transaction. "$ref": "#/components/schemas/ExternalPaymentMethodEnum" description: type: string title: Description description: Used as the refund transactions' description. maxLength: 50 refunded_at: type: string format: date-time title: Refunded At description: Date the external refund payment was made. Defaults to the current date-time. required: - payment_method required: - type MeasuredUnit: type: object title: Measured unit properties: id: type: string title: Item ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true name: type: string title: Name description: Unique internal name of the measured unit on your site. display_name: type: string title: Display name description: Display name for the measured unit. Can only contain spaces, underscores and must be alphanumeric. maxLength: 50 state: title: State description: The current state of the measured unit. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" description: type: string title: Description description: Optional internal description. created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true MeasuredUnitCreate: type: object properties: name: type: string title: Name description: Unique internal name of the measured unit on your site. maxLength: 255 display_name: type: string title: Display name description: Display name for the measured unit. pattern: "/^[\\w ]+$/" maxLength: 50 description: type: string title: Description description: Optional internal description. required: - name - display_name MeasuredUnitUpdate: type: object properties: name: type: string title: Name description: Unique internal name of the measured unit on your site. maxLength: 255 display_name: type: string title: Display name description: Display name for the measured unit. pattern: "/^[\\w ]+$/" maxLength: 50 description: type: string title: Description description: Optional internal description. LineItem: type: object title: Line item properties: id: type: string title: Line item ID maxLength: 13 object: type: string title: Object type uuid: type: string title: UUID description: The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. maxLength: 32 type: title: Line item type description: Charges are positive line items that debit the account. Credits are negative line items that credit the account. "$ref": "#/components/schemas/LineItemTypeEnum" item_code: type: string title: Item Code description: Unique code to identify an item. Available when the Credit Invoices feature is enabled. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled. maxLength: 13 external_sku: type: string title: External SKU description: Optional Stock Keeping Unit assigned to an item. Available when the Credit Invoices feature is enabled. maxLength: 50 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/LineItemRevenueScheduleTypeEnum" state: title: Current state of the line item description: Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value. "$ref": "#/components/schemas/LineItemStateEnum" legacy_category: title: Legacy category description: | Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account. "$ref": "#/components/schemas/LegacyCategoryEnum" account: "$ref": "#/components/schemas/AccountMini" bill_for_account_id: type: string title: Bill For Account ID maxLength: 13 description: The UUID of the account responsible for originating the line item. subscription_id: type: string title: Subscription ID description: If the line item is a charge or credit for a subscription, this is its ID. maxLength: 13 plan_id: type: string title: Plan ID description: If the line item is a charge or credit for a plan or add-on, this is the plan's ID. maxLength: 13 plan_code: type: string title: Plan code description: If the line item is a charge or credit for a plan or add-on, this is the plan's code. maxLength: 50 add_on_id: type: string title: Add-on ID description: If the line item is a charge or credit for an add-on this is its ID. maxLength: 13 add_on_code: type: string title: Add-on code description: If the line item is a charge or credit for an add-on, this is its code. maxLength: 50 invoice_id: type: string title: Invoice ID description: Once the line item has been invoiced this will be the invoice's ID. maxLength: 13 invoice_number: type: string title: Invoice number description: 'Once the line item has been invoiced this will be the invoice''s number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence.' previous_line_item_id: type: string title: Previous line item ID description: Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. maxLength: 13 original_line_item_invoice_id: type: string title: Original line item's invoice ID description: The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. maxLength: 13 origin: title: Origin of line item description: A credit created from an original charge will have the value of the charge's origin. "$ref": "#/components/schemas/LineItemOriginEnum" accounting_code: type: string title: Accounting code description: Internal accounting code to help you reconcile your revenue to the correct ledger. Line items created as part of a subscription invoice will use the plan or add-on's accounting code, otherwise the value will only be present if you define an accounting code when creating the line item. maxLength: 20 product_code: type: string title: Product code description: For plan-related line items this will be the plan's code, for add-on related line items it will be the add-on's code. For item-related line items it will be the item's `external_sku`. maxLength: 50 credit_reason_code: title: Credit reason code description: The reason the credit was given when line item is `type=credit`. default: general "$ref": "#/components/schemas/FullCreditReasonCodeEnum" currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Total after discounts and taxes description: "`(quantity * unit_amount) - (discount + tax)`" description: type: string title: Description description: Description that appears on the invoice. For subscription related items this will be filled in automatically. maxLength: 255 quantity: type: integer title: Quantity description: This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes. default: 1 quantity_decimal: type: string title: Quantity Decimal description: A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field. unit_amount: type: number format: float title: Unit amount description: Positive amount for a charge, negative amount for a credit. unit_amount_decimal: type: string title: Unit amount decimal description: Positive amount for a charge, negative amount for a credit. tax_inclusive: type: boolean title: Tax Inclusive? description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag. subtotal: type: number format: float title: Total before discounts and taxes description: "`quantity * unit_amount`" discount: type: number format: float title: Discount description: The discount applied to the line item. tax: type: number format: float title: Tax description: The tax amount for the line item. taxable: type: boolean title: Taxable? description: "`true` if the line item is taxable, `false` if it is not." tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature." avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_info: "$ref": "#/components/schemas/TaxInfo" proration_rate: type: number format: float title: Proration rate description: When a line item has been prorated, this is the rate of the proration. Proration rates were made available for line items created after March 30, 2017. For line items created prior to that date, the proration rate will be `null`, even if the line item was prorated. minimum: 0 maximum: 1 refund: type: boolean title: Refund? refunded_quantity: type: integer title: Refunded Quantity description: For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). refunded_quantity_decimal: type: string title: Refunded Quantity Decimal description: A floating-point alternative to Refunded Quantity. For refund charges, the quantity being refunded. For non-refund charges, the total quantity refunded (possibly over multiple refunds). The Decimal Quantity feature must be enabled to utilize this field. credit_applied: type: number format: float title: Credit Applied description: The amount of credit from this line item that was applied to the invoice. shipping_address: "$ref": "#/components/schemas/ShippingAddress" start_date: type: string format: date-time title: Start date description: If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. end_date: type: string format: date-time title: End date description: If this date is provided, it indicates the end of a time range. + custom_fields: + "$ref": "#/components/schemas/CustomFields" created_at: type: string format: date-time title: Created at description: When the line item was created. updated_at: type: string format: date-time title: Last updated at description: When the line item was last changed. LineItemRefund: type: object properties: id: type: string title: Line item ID maxLength: 13 quantity: type: integer title: Quantity description: Line item quantity to be refunded. quantity_decimal: type: string title: Quantity Decimal description: A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field. prorate: type: boolean title: Prorate description: | Set to `true` if the line item should be prorated; set to `false` if not. This can only be used on line items that have a start and end date. default: false LineItemCreate: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. If `item_code`/`item_id` is part of the request then `currency` is optional, if the site has a single default currency. `currency` is required if `item_code`/`item_id` is present, and there are multiple currencies defined on the site. If `item_code`/`item_id` is not present `currency` is required. maxLength: 3 unit_amount: type: number format: float title: Unit amount description: | A positive or negative amount with `type=charge` will result in a positive `unit_amount`. A positive or negative amount with `type=credit` will result in a negative `unit_amount`. If `item_code`/`item_id` is present, `unit_amount` can be passed in, to override the `Item`'s `unit_amount`. If `item_code`/`item_id` is not present then `unit_amount` is required. tax_inclusive: type: boolean title: Tax Inclusive? default: false description: Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag. quantity: type: integer title: Quantity description: This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes. default: 1 description: type: string title: Description description: Description that appears on the invoice. If `item_code`/`item_id` is part of the request then `description` must be absent. maxLength: 255 item_code: type: string title: Item Code description: Unique code to identify an item. Available when the Credit Invoices feature is enabled. pattern: "/^[a-z0-9_+-]+$/" maxLength: 50 item_id: type: string title: Item ID description: System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled. maxLength: 13 revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/LineItemRevenueScheduleTypeEnum" type: title: Type description: Line item type. If `item_code`/`item_id` is present then `type` should not be present. If `item_code`/`item_id` is not present then `type` is required. "$ref": "#/components/schemas/LineItemTypeEnum" credit_reason_code: title: Credit reason code description: The reason the credit was given when line item is `type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to `general`. When the Credit Invoices feature is not enabled, the value will always be `null`. default: general "$ref": "#/components/schemas/PartialCreditReasonCodeEnum" accounting_code: type: string title: Accounting Code description: Accounting Code for the `LineItem`. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on charges, `false` applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature." avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_transaction_type` must be absent. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_service_type` must be absent. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. maxLength: 50 product_code: type: string title: Product code description: Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex `product` field. If `item_code`/`item_id` is part of the request then `product_code` must be absent. maxLength: 50 origin: title: Origin description: Origin `external_gift_card` is allowed if the Gift Cards feature is enabled on your site and `type` is `credit`. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements. Origin `prepayment` is only allowed if `type` is `charge` and `tax_exempt` is left blank or set to true. This origin creates a charge and opposite credit on the account to be used for future invoices. "$ref": "#/components/schemas/LineItemCreateOriginEnum" + custom_fields: + "$ref": "#/components/schemas/CustomFields" start_date: type: string format: date-time title: Start date description: If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. Defaults to the current date-time. end_date: type: string format: date-time title: End date description: If this date is provided, it indicates the end of a time range. required: - currency - unit_amount - type PlanMini: type: object title: Plan mini details description: Just the important parts. properties: id: type: string title: Plan ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Plan code description: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. maxLength: 255 Plan: type: object description: Full plan details. properties: id: type: string title: Plan ID maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Plan code description: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 state: title: State description: The current state of the plan. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" name: type: string title: Name description: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. maxLength: 255 description: type: string title: Description description: Optional description, not displayed. interval_unit: title: Interval unit description: Unit for the plan's billing interval. default: months "$ref": "#/components/schemas/IntervalUnitEnum" interval_length: type: integer title: Interval length description: Length of the plan's billing interval in `interval_unit`. default: 1 minimum: 1 trial_unit: title: Trial unit description: Units for the plan's trial period. default: months "$ref": "#/components/schemas/IntervalUnitEnum" trial_length: type: integer title: Trial length description: Length of plan's trial period in `trial_units`. `0` means `no trial`. default: 0 minimum: 0 trial_requires_billing_info: type: boolean title: Trial Requires BillingInfo description: Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee. default: true total_billing_cycles: type: integer title: Total billing cycles description: Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, automatic renewal. minimum: 0 auto_renew: type: boolean title: Auto renew default: true description: Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself. pricing_model: title: Pricing Model "$ref": "#/components/schemas/PricingModelTypeEnum" ramp_intervals: type: array title: Ramp Intervals items: "$ref": "#/components/schemas/PlanRampInterval" custom_fields: "$ref": "#/components/schemas/CustomFields" revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" setup_fee_revenue_schedule_type: title: Setup fee revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" accounting_code: type: string title: Plan accounting code description: Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 setup_fee_accounting_code: type: string title: Setup fee accounting code description: Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the plan, `false` applies tax on the plan." currencies: type: array title: Pricing items: "$ref": "#/components/schemas/PlanPricing" minItems: 1 hosted_pages: type: object title: Hosted pages settings "$ref": "#/components/schemas/PlanHostedPages" allow_any_item_on_subscriptions: type: boolean title: Allow any item on subscriptions description: | Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used. dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. created_at: type: string format: date-time title: Created at readOnly: true updated_at: type: string format: date-time title: Last updated at readOnly: true deleted_at: type: string format: date-time title: Deleted at readOnly: true required: - code - name PlanCreate: type: object properties: code: type: string title: Plan code description: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. maxLength: 255 description: type: string title: Description description: Optional description, not displayed. accounting_code: type: string title: Plan accounting code description: Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 interval_unit: title: Interval unit description: Unit for the plan's billing interval. default: months "$ref": "#/components/schemas/IntervalUnitEnum" interval_length: type: integer title: Interval length description: Length of the plan's billing interval in `interval_unit`. default: 1 minimum: 1 trial_unit: title: Trial unit description: Units for the plan's trial period. default: months "$ref": "#/components/schemas/IntervalUnitEnum" trial_length: type: integer title: Trial length description: Length of plan's trial period in `trial_units`. `0` means `no trial`. default: 0 minimum: 0 trial_requires_billing_info: type: boolean title: Trial Requires BillingInfo description: Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee. default: true total_billing_cycles: type: integer title: Total billing cycles description: Automatically terminate plans after a defined number of billing cycles. minimum: 0 auto_renew: type: boolean title: Auto renew default: true description: Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself. pricing_model: title: Pricing Model "$ref": "#/components/schemas/PricingModelTypeEnum" ramp_intervals: type: array title: Ramp Intervals items: "$ref": "#/components/schemas/PlanRampInterval" custom_fields: "$ref": "#/components/schemas/CustomFields" revenue_schedule_type: title: Revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" setup_fee_revenue_schedule_type: title: Setup fee revenue schedule type "$ref": "#/components/schemas/RevenueScheduleTypeEnum" setup_fee_accounting_code: type: string title: Setup fee accounting code description: Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 avalara_transaction_type: type: integer title: Avalara Transaction Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 avalara_service_type: type: integer title: Avalara Service Type description: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 tax_code: type: string title: Tax code description: Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. maxLength: 50 tax_exempt: type: boolean title: Tax exempt? description: "`true` exempts tax on the plan, `false` applies tax on the plan." currencies: type: array title: Pricing items: "$ref": "#/components/schemas/PlanPricing" minItems: 1 hosted_pages: type: object title: Hosted pages settings "$ref": "#/components/schemas/PlanHostedPages" add_ons: type: array title: Add Ons items: "$ref": "#/components/schemas/AddOnCreate" allow_any_item_on_subscriptions: type: boolean title: Allow any item on subscriptions default: false description: | Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used. dunning_campaign_id: type: string title: Dunning Campaign ID description: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used. required: - code - name - currencies PlanHostedPages: type: object properties: success_url: type: string title: Success redirect URL description: URL to redirect to after signup on the hosted payment pages. cancel_url: type: string title: Cancel redirect URL (deprecated) description: URL to redirect to on canceled signup on the hosted payment pages. bypass_confirmation: type: boolean title: Bypass confirmation page? description: If `true`, the customer will be sent directly to your `success_url` after a successful signup, bypassing Recurly's hosted confirmation page. display_quantity: type: boolean title: Display quantity? description: Determines if the quantity field is displayed on the hosted pages for the plan. PlanPricing: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 setup_fee: type: number format: float title: Setup fee description: Amount of one-time setup fee automatically charged at the beginning of a subscription billing cycle. For subscription plans with a trial, the setup fee will be charged at the time of signup. Setup fees do not increase with the quantity of a subscription plan. minimum: 0 maximum: 1000000 unit_amount: type: number format: float title: Unit price description: This field should not be sent when the pricing model is 'ramp'. minimum: 0 maximum: 1000000 tax_inclusive: type: boolean title: Tax Inclusive? default: false description: This field is deprecated. Please do not use it. deprecated: true PlanRampInterval: type: object title: Plan Ramp Interval properties: starting_billing_cycle: type: integer description: Represents the billing cycle where a ramp interval starts. default: 1 currencies: type: array description: Represents the price for the ramp interval. items: "$ref": "#/components/schemas/PlanRampPricing" PlanUpdate: type: object properties: id: type: string title: Plan ID maxLength: 13 readOnly: true code: type: string title: Plan code description: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. pattern: "/^[a-z0-9_+-]+$/i" maxLength: 50 name: type: string title: Name description: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. maxLength: 255 description: type: string title: Description description: Optional description, not displayed. accounting_code: type: string title: Plan accounting code description: Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. pattern: "/^[a-z0-9_+-]+$/" maxLength: 20 trial_unit: title: Trial unit description: Units for the plan's trial period. default: months "$ref": "#/components/schemas/IntervalUnitEnum" trial_length: type: integer title: Trial length description: Length of plan's trial period in `trial_units`. `0` means `no trial`. default: 0 minimum: 0 trial_requires_billing_info: type: boolean title: Trial Requires BillingInfo description: Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee. default: true total_billing_cycles: type: integer title: Total billing cycles description: Automatically terminate plans after a defined number of billing cycles. minimum: 0 auto_renew: type: boolean title: Auto renew default: true description: Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically @@ -22390,1024 +22402,1025 @@ components: title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" Entitlements: type: object description: A list of privileges granted to a customer through the purchase of a plan or item. properties: object: type: string title: Object Type has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Entitlement" Entitlement: type: object properties: object: type: string description: Entitlement customer_permission: "$ref": "#/components/schemas/CustomerPermission" granted_by: type: array description: Subscription or item that granted the customer permission. items: "$ref": "#/components/schemas/GrantedBy" created_at: type: string format: date-time description: Time object was created. updated_at: type: string format: date-time description: Time the object was last updated ExternalProduct: type: object description: Product from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External product ID. description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type name: type: string title: Name description: Name to identify the external product in Recurly. plan: "$ref": "#/components/schemas/PlanMini" created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. external_product_references: type: array title: External Product References description: List of external product references of the external product. items: "$ref": "#/components/schemas/ExternalProductReferenceMini" ExternalProductList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalProduct" ExternalProductReferenceMini: type: object title: External Product Reference details description: External Product Reference details properties: id: type: string title: External Product ID description: System-generated unique identifier for an external product ID, e.g. `e28zov4fw0v2`. object: type: string title: object reference_code: type: string title: reference_code description: A code which associates the external product to a corresponding object or resource in an external platform like the Apple App Store or Google Play Store. external_connection_type: type: string title: external_connection_type description: Source connection platform. created_at: type: string format: date-time description: When the external product was created in Recurly. updated_at: type: string format: date-time description: When the external product was updated in Recurly. ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store or Google Play Store. properties: id: type: string title: External subscription ID description: System-generated unique identifier for an external subscription ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type account: "$ref": "#/components/schemas/AccountMini" external_resource: "$ref": "#/components/schemas/ExternalResourceMini" external_product_reference: "$ref": "#/components/schemas/ExternalProductReferenceMini" last_purchased: type: string format: date-time title: Last purchased description: When a new billing event occurred on the external subscription in conjunction with a recent billing period, reactivation or upgrade/downgrade. auto_renew: type: boolean title: Auto-renew description: An indication of whether or not the external subscription will auto-renew at the expiration date. default: false app_identifier: type: string title: App identifier description: Identifier of the app that generated the external subscription. quantity: type: integer title: Quantity description: An indication of the quantity of a subscribed item's quantity. default: 1 minimum: 0 activated_at: type: string format: date-time title: Activated at description: When the external subscription was activated in the external platform. expires_at: type: string format: date-time title: Expires at description: When the external subscription expires in the external platform. created_at: type: string format: date-time title: Created at description: When the external subscription was created in Recurly. updated_at: type: string format: date-time title: Updated at description: When the external subscription was updated in Recurly. ExternalSubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ExternalSubscription" ExternalResourceMini: type: object title: External Resource mini details properties: id: type: string title: External resource ID description: System-generated unique identifier for an external resource ID, e.g. `e28zov4fw0v2`. object: type: string title: Object type external_object_reference: type: string title: External Object Reference description: Identifier or URL reference where the resource is canonically available in the external platform. maxLength: 255 readOnly: true CustomerPermission: type: object properties: id: type: string description: Customer permission ID. code: type: string description: Customer permission code. name: type: string description: Customer permission name. description: type: string description: Description of customer permission. object: type: string description: It will always be "customer_permission". GrantedBy: type: object description: The subscription or external subscription that grants customer permissions. properties: object: type: string title: Object Type id: type: string description: The ID of the subscription or external subscription that grants the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - plan - subscription + - charge RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. UsageCalculationTypeEnum: type: string description: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used. enum: - cumulative - last_in_period BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live FilterLimitedSubscriptionStateEnum: type: string enum: - active - canceled - expired - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-CA - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A
recurly/recurly-client-php
65afdf577118861951259475bc064654a1f24c4b
4.26.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3c0e86e..9822e3d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.25.0 +current_version = 4.26.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 632969b..1a91b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,334 +1,345 @@ # Changelog +## [4.26.0](https://github.com/recurly/recurly-client-php/tree/4.26.0) (2023-01-11) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.25.0...4.26.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) [#736](https://github.com/recurly/recurly-client-php/pull/736) ([douglasmiller](https://github.com/douglasmiller)) + + + ## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 50ccea7..81efd65 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.25.0", + "version": "4.26.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index e703d55..fa2c312 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.25.0'; + public const CURRENT = '4.26.0'; }
recurly/recurly-client-php
89098aa7b14889080aa3adf4579553857f100f45
4.25.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 3770111..3c0e86e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.24.0 +current_version = 4.25.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bb52e..632969b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,323 +1,334 @@ # Changelog +## [4.25.0](https://github.com/recurly/recurly-client-php/tree/4.25.0) (2022-11-17) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.24.0...4.25.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (Apply Credit Balance feature) [#732](https://github.com/recurly/recurly-client-php/pull/732) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index 305e017..50ccea7 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.24.0", + "version": "4.25.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 74c2e01..e703d55 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.24.0'; + public const CURRENT = '4.25.0'; }
recurly/recurly-client-php
097b09650f46806510d65f5223d754ff1581eb6c
4.24.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a5463ab..3770111 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.23.0 +current_version = 4.24.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eac914..57bb52e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,311 +1,323 @@ # Changelog +## [4.24.0](https://github.com/recurly/recurly-client-php/tree/4.24.0) (2022-11-15) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.23.0...4.24.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (External Subscriptions feature) [#729](https://github.com/recurly/recurly-client-php/pull/729) ([recurly-integrations](https://github.com/recurly-integrations)) +- Generated Latest Changes for v2021-02-25 [#728](https://github.com/recurly/recurly-client-php/pull/728) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index aeab139..305e017 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.23.0", + "version": "4.24.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 00bf87f..74c2e01 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.23.0'; + public const CURRENT = '4.24.0'; }
recurly/recurly-client-php
20df96b8776545bb674f1f05bbea43da832d1ef4
4.23.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 696df2b..a5463ab 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.22.0 +current_version = 4.23.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 5893ae3..9eac914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,300 +1,311 @@ # Changelog +## [4.23.0](https://github.com/recurly/recurly-client-php/tree/4.23.0) (2022-10-27) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.22.0...4.23.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25 (Entitlements feature) [#725](https://github.com/recurly/recurly-client-php/pull/725) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) **Merged Pull Requests** - feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index f4715ca..aeab139 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.22.0", + "version": "4.23.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index 7d4e0f3..00bf87f 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.22.0'; + public const CURRENT = '4.23.0'; }
recurly/recurly-client-php
12715993bc27da58a42326cfa706a0655470ad58
Generated Latest Changes for v2021-02-25
diff --git a/lib/recurly/client.php b/lib/recurly/client.php index 08e4257..59df6df 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -2452,513 +2452,535 @@ endpoint to obtain only the newly generated `UniqueCouponCodes`. * Delete the pending subscription change * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\EmptyResource Subscription change was deleted. * @link https://developers.recurly.com/api/v2021-02-25#operation/remove_subscription_change */ public function removeSubscriptionChange(string $subscription_id, array $options = []): \Recurly\EmptyResource { $path = $this->interpolatePath("/subscriptions/{subscription_id}/change", ['subscription_id' => $subscription_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * Preview a new subscription change * * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\SubscriptionChange A subscription change. * @link https://developers.recurly.com/api/v2021-02-25#operation/preview_subscription_change */ public function previewSubscriptionChange(string $subscription_id, array $body, array $options = []): \Recurly\Resources\SubscriptionChange { $path = $this->interpolatePath("/subscriptions/{subscription_id}/change/preview", ['subscription_id' => $subscription_id]); return $this->makeRequest('POST', $path, $body, $options); } /** * List a subscription's invoices * * @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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['type'] (string): Filter by type when: * - `type=charge`, only charge invoices will be returned. * - `type=credit`, only credit invoices will be returned. * - `type=non-legacy`, only charge and credit invoices will be returned. * - `type=legacy`, only legacy invoices will be returned. * * @return \Recurly\Pager A list of the subscription's invoices. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_invoices */ public function listSubscriptionInvoices(string $subscription_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/subscriptions/{subscription_id}/invoices", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } /** * List a subscription's line items * * @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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['original'] (string): Filter by original field. * - $options['params']['state'] (string): Filter by state field. * - $options['params']['type'] (string): Filter by type field. * * @return \Recurly\Pager A list of the subscription's line items. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_line_items */ public function listSubscriptionLineItems(string $subscription_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/subscriptions/{subscription_id}/line_items", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } /** * Show the coupon redemptions for a 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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * * @return \Recurly\Pager A list of the the coupon redemptions on a subscription. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_subscription_coupon_redemptions */ public function listSubscriptionCouponRedemptions(string $subscription_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/subscriptions/{subscription_id}/coupon_redemptions", ['subscription_id' => $subscription_id]); return new \Recurly\Pager($this, $path, $options); } /** * List a subscription add-on's usage records * * @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`. * @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`. * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `usage_timestamp` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['billing_status'] (string): Filter by usage record's billing status * * @return \Recurly\Pager A list of the subscription add-on's usage records. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_usage */ public function listUsage(string $subscription_id, string $add_on_id, array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", ['subscription_id' => $subscription_id, 'add_on_id' => $add_on_id]); return new \Recurly\Pager($this, $path, $options); } /** * Log a usage record on this subscription add-on * * @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`. * @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`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Usage The created usage record. * @link https://developers.recurly.com/api/v2021-02-25#operation/create_usage */ public function createUsage(string $subscription_id, string $add_on_id, array $body, array $options = []): \Recurly\Resources\Usage { $path = $this->interpolatePath("/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage", ['subscription_id' => $subscription_id, 'add_on_id' => $add_on_id]); return $this->makeRequest('POST', $path, $body, $options); } /** * Get a usage record * * @param string $usage_id Usage Record ID. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Usage The usage record. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_usage */ public function getUsage(string $usage_id, array $options = []): \Recurly\Resources\Usage { $path = $this->interpolatePath("/usage/{usage_id}", ['usage_id' => $usage_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Update a usage record * * @param string $usage_id Usage Record ID. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Usage The updated usage record. * @link https://developers.recurly.com/api/v2021-02-25#operation/update_usage */ public function updateUsage(string $usage_id, array $body, array $options = []): \Recurly\Resources\Usage { $path = $this->interpolatePath("/usage/{usage_id}", ['usage_id' => $usage_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Delete a usage record. * * @param string $usage_id Usage Record ID. * @param array $options Associative array of optional parameters * * @return \Recurly\EmptyResource Usage was successfully deleted. * @link https://developers.recurly.com/api/v2021-02-25#operation/remove_usage */ public function removeUsage(string $usage_id, array $options = []): \Recurly\EmptyResource { $path = $this->interpolatePath("/usage/{usage_id}", ['usage_id' => $usage_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * List a site's transactions * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['ids'] (array): Filter results by their IDs. Up to 200 IDs can be passed at once using * commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. * * **Important notes:** * * * The `ids` parameter cannot be used with any other ordering or filtering * parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * * Invalid or unknown IDs will be ignored, so you should check that the * results correspond to your request. * * Records are returned in an arbitrary order. Since results are all * returned at once you can sort the records yourself. * - $options['params']['limit'] (int): Limit number of records 1-200. * - $options['params']['order'] (string): Sort order. * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * - $options['params']['begin_time'] (string): Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. * **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. * - $options['params']['type'] (string): Filter by type field. The value `payment` will return both `purchase` and `capture` transactions. * - $options['params']['success'] (string): Filter by success field. * * @return \Recurly\Pager A list of the site's transactions. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_transactions */ public function listTransactions(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/transactions", []); return new \Recurly\Pager($this, $path, $options); } /** * Fetch a transaction * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\Transaction A transaction. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_transaction */ public function getTransaction(string $transaction_id, array $options = []): \Recurly\Resources\Transaction { $path = $this->interpolatePath("/transactions/{transaction_id}", ['transaction_id' => $transaction_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Fetch a unique coupon code * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\UniqueCouponCode A unique coupon code. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_unique_coupon_code */ public function getUniqueCouponCode(string $unique_coupon_code_id, array $options = []): \Recurly\Resources\UniqueCouponCode { $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Deactivate a unique coupon code * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\UniqueCouponCode A unique coupon code. * @link https://developers.recurly.com/api/v2021-02-25#operation/deactivate_unique_coupon_code */ public function deactivateUniqueCouponCode(string $unique_coupon_code_id, array $options = []): \Recurly\Resources\UniqueCouponCode { $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('DELETE', $path, [], $options); } /** * Restore a unique coupon code * * @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`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\UniqueCouponCode A unique coupon code. * @link https://developers.recurly.com/api/v2021-02-25#operation/reactivate_unique_coupon_code */ public function reactivateUniqueCouponCode(string $unique_coupon_code_id, array $options = []): \Recurly\Resources\UniqueCouponCode { $path = $this->interpolatePath("/unique_coupon_codes/{unique_coupon_code_id}/restore", ['unique_coupon_code_id' => $unique_coupon_code_id]); return $this->makeRequest('PUT', $path, [], $options); } /** * Create a new purchase * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\InvoiceCollection Returns the new invoices * @link https://developers.recurly.com/api/v2021-02-25#operation/create_purchase */ public function createPurchase(array $body, array $options = []): \Recurly\Resources\InvoiceCollection { $path = $this->interpolatePath("/purchases", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Preview a new purchase * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\InvoiceCollection Returns preview of the new invoices * @link https://developers.recurly.com/api/v2021-02-25#operation/preview_purchase */ public function previewPurchase(array $body, array $options = []): \Recurly\Resources\InvoiceCollection { $path = $this->interpolatePath("/purchases/preview", []); return $this->makeRequest('POST', $path, $body, $options); } /** * Create a pending purchase * * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\InvoiceCollection Returns the pending invoice * @link https://developers.recurly.com/api/v2021-02-25#operation/create_pending_purchase */ public function createPendingPurchase(array $body, array $options = []): \Recurly\Resources\InvoiceCollection { $path = $this->interpolatePath("/purchases/pending", []); return $this->makeRequest('POST', $path, $body, $options); } /** * List the dates that have an available export to download. * * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\ExportDates Returns a list of dates. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates */ public function getExportDates(array $options = []): \Recurly\Resources\ExportDates { $path = $this->interpolatePath("/export_dates", []); return $this->makeRequest('GET', $path, [], $options); } /** * List of the export files that are available to download. * * @param string $export_date Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\ExportFiles Returns a list of export files to download. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_export_files */ public function getExportFiles(string $export_date, array $options = []): \Recurly\Resources\ExportFiles { $path = $this->interpolatePath("/export_dates/{export_date}/export_files", ['export_date' => $export_date]); return $this->makeRequest('GET', $path, [], $options); } /** * Show the dunning campaigns for a site * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * * @return \Recurly\Pager A list of the the dunning_campaigns on an account. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_dunning_campaigns */ public function listDunningCampaigns(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/dunning_campaigns", []); return new \Recurly\Pager($this, $path, $options); } /** * Show the settings for a dunning campaign * * @param string $dunning_campaign_id Dunning Campaign ID, e.g. `e28zov4fw0v2`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\DunningCampaign Settings for a dunning campaign. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_dunning_campaign */ public function getDunningCampaign(string $dunning_campaign_id, array $options = []): \Recurly\Resources\DunningCampaign { $path = $this->interpolatePath("/dunning_campaigns/{dunning_campaign_id}", ['dunning_campaign_id' => $dunning_campaign_id]); return $this->makeRequest('GET', $path, [], $options); } /** * Assign a dunning campaign to multiple plans * * @param string $dunning_campaign_id Dunning Campaign ID, e.g. `e28zov4fw0v2`. * @param array $body The body of the request. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\DunningCampaignsBulkUpdateResponse A list of updated plans. * @link https://developers.recurly.com/api/v2021-02-25#operation/put_dunning_campaign_bulk_update */ public function putDunningCampaignBulkUpdate(string $dunning_campaign_id, array $body, array $options = []): \Recurly\Resources\DunningCampaignsBulkUpdateResponse { $path = $this->interpolatePath("/dunning_campaigns/{dunning_campaign_id}/bulk_update", ['dunning_campaign_id' => $dunning_campaign_id]); return $this->makeRequest('PUT', $path, $body, $options); } /** * Show the invoice templates for a site * * @param array $options Associative array of optional parameters * * Supported optional query string parameters: * * - $options['params']['sort'] (string): Sort field. You *really* only want to sort by `updated_at` in ascending * order. In descending order updated records will move behind the cursor and could * prevent some records from being returned. * * @return \Recurly\Pager A list of the the invoice templates on a site. * @link https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_templates */ public function listInvoiceTemplates(array $options = []): \Recurly\Pager { $path = $this->interpolatePath("/invoice_templates", []); return new \Recurly\Pager($this, $path, $options); } /** * Show the settings for an invoice template * * @param string $invoice_template_id Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. * @param array $options Associative array of optional parameters * * @return \Recurly\Resources\InvoiceTemplate Settings for an invoice template. * @link https://developers.recurly.com/api/v2021-02-25#operation/get_invoice_template */ public function getInvoiceTemplate(string $invoice_template_id, array $options = []): \Recurly\Resources\InvoiceTemplate { $path = $this->interpolatePath("/invoice_templates/{invoice_template_id}", ['invoice_template_id' => $invoice_template_id]); return $this->makeRequest('GET', $path, [], $options); } + /** + * Show all entitlements granted to an account + * + * @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`. + * @param array $options Associative array of optional parameters + * + * Supported optional query string parameters: + * + * - $options['params']['state'] (string): Filter the entitlements based on the state of the applicable subscription. + * + * - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned. + * - When no state is provided, subscriptions with active or canceled states will be returned. + * + * @return \Recurly\Pager A list of the entitlements granted to an account. + * @link https://developers.recurly.com/api/v2021-02-25#operation/list_entitlements + */ + public function listEntitlements(string $account_id, array $options = []): \Recurly\Pager + { + $path = $this->interpolatePath("/accounts/{account_id}/entitlements", ['account_id' => $account_id]); + return new \Recurly\Pager($this, $path, $options); + } + } \ No newline at end of file diff --git a/lib/recurly/resources/customer_permission.php b/lib/recurly/resources/customer_permission.php new file mode 100644 index 0000000..258105e --- /dev/null +++ b/lib/recurly/resources/customer_permission.php @@ -0,0 +1,139 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class CustomerPermission extends RecurlyResource +{ + private $_code; + private $_description; + private $_id; + private $_name; + private $_object; + + protected static $array_hints = [ + ]; + + + /** + * Getter method for the code attribute. + * Customer permission code. + * + * @return ?string + */ + public function getCode(): ?string + { + return $this->_code; + } + + /** + * Setter method for the code attribute. + * + * @param string $code + * + * @return void + */ + public function setCode(string $code): void + { + $this->_code = $code; + } + + /** + * Getter method for the description attribute. + * Description of customer permission. + * + * @return ?string + */ + public function getDescription(): ?string + { + return $this->_description; + } + + /** + * Setter method for the description attribute. + * + * @param string $description + * + * @return void + */ + public function setDescription(string $description): void + { + $this->_description = $description; + } + + /** + * Getter method for the id attribute. + * Customer permission ID. + * + * @return ?string + */ + public function getId(): ?string + { + return $this->_id; + } + + /** + * Setter method for the id attribute. + * + * @param string $id + * + * @return void + */ + public function setId(string $id): void + { + $this->_id = $id; + } + + /** + * Getter method for the name attribute. + * Customer permission name. + * + * @return ?string + */ + public function getName(): ?string + { + return $this->_name; + } + + /** + * Setter method for the name attribute. + * + * @param string $name + * + * @return void + */ + public function setName(string $name): void + { + $this->_name = $name; + } + + /** + * Getter method for the object attribute. + * It will always be "customer_permission". + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } +} \ No newline at end of file diff --git a/lib/recurly/resources/entitlement.php b/lib/recurly/resources/entitlement.php new file mode 100644 index 0000000..5715420 --- /dev/null +++ b/lib/recurly/resources/entitlement.php @@ -0,0 +1,140 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class Entitlement extends RecurlyResource +{ + private $_created_at; + private $_customer_permission; + private $_granted_by; + private $_object; + private $_updated_at; + + protected static $array_hints = [ + 'setGrantedBy' => '\Recurly\Resources\GrantedBy', + ]; + + + /** + * Getter method for the created_at attribute. + * Time object was created. + * + * @return ?string + */ + public function getCreatedAt(): ?string + { + return $this->_created_at; + } + + /** + * Setter method for the created_at attribute. + * + * @param string $created_at + * + * @return void + */ + public function setCreatedAt(string $created_at): void + { + $this->_created_at = $created_at; + } + + /** + * Getter method for the customer_permission attribute. + * + * + * @return ?\Recurly\Resources\CustomerPermission + */ + public function getCustomerPermission(): ?\Recurly\Resources\CustomerPermission + { + return $this->_customer_permission; + } + + /** + * Setter method for the customer_permission attribute. + * + * @param \Recurly\Resources\CustomerPermission $customer_permission + * + * @return void + */ + public function setCustomerPermission(\Recurly\Resources\CustomerPermission $customer_permission): void + { + $this->_customer_permission = $customer_permission; + } + + /** + * Getter method for the granted_by attribute. + * Subscription or item that granted the customer permission. + * + * @return array + */ + public function getGrantedBy(): array + { + return $this->_granted_by ?? [] ; + } + + /** + * Setter method for the granted_by attribute. + * + * @param array $granted_by + * + * @return void + */ + public function setGrantedBy(array $granted_by): void + { + $this->_granted_by = $granted_by; + } + + /** + * Getter method for the object attribute. + * Entitlement + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } + + /** + * Getter method for the updated_at attribute. + * Time the object was last updated + * + * @return ?string + */ + public function getUpdatedAt(): ?string + { + return $this->_updated_at; + } + + /** + * Setter method for the updated_at attribute. + * + * @param string $updated_at + * + * @return void + */ + public function setUpdatedAt(string $updated_at): void + { + $this->_updated_at = $updated_at; + } +} \ No newline at end of file diff --git a/lib/recurly/resources/entitlements.php b/lib/recurly/resources/entitlements.php new file mode 100644 index 0000000..9f448a1 --- /dev/null +++ b/lib/recurly/resources/entitlements.php @@ -0,0 +1,116 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class Entitlements extends RecurlyResource +{ + private $_data; + private $_has_more; + private $_next; + private $_object; + + protected static $array_hints = [ + 'setData' => '\Recurly\Resources\Entitlement', + ]; + + + /** + * Getter method for the data attribute. + * + * + * @return array + */ + public function getData(): array + { + return $this->_data ?? [] ; + } + + /** + * Setter method for the data attribute. + * + * @param array $data + * + * @return void + */ + public function setData(array $data): void + { + $this->_data = $data; + } + + /** + * Getter method for the has_more attribute. + * Indicates there are more results on subsequent pages. + * + * @return ?bool + */ + public function getHasMore(): ?bool + { + return $this->_has_more; + } + + /** + * Setter method for the has_more attribute. + * + * @param bool $has_more + * + * @return void + */ + public function setHasMore(bool $has_more): void + { + $this->_has_more = $has_more; + } + + /** + * Getter method for the next attribute. + * Path to subsequent page of results. + * + * @return ?string + */ + public function getNext(): ?string + { + return $this->_next; + } + + /** + * Setter method for the next attribute. + * + * @param string $next + * + * @return void + */ + public function setNext(string $next): void + { + $this->_next = $next; + } + + /** + * Getter method for the object attribute. + * Object Type + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } +} \ No newline at end of file diff --git a/lib/recurly/resources/granted_by.php b/lib/recurly/resources/granted_by.php new file mode 100644 index 0000000..08cdd2c --- /dev/null +++ b/lib/recurly/resources/granted_by.php @@ -0,0 +1,67 @@ +<?php +/** + * This file is automatically created by Recurly's OpenAPI generation process + * and thus any edits you make by hand will be lost. If you wish to make a + * change to this file, please create a Github issue explaining the changes you + * need and we will usher them to the appropriate places. + */ +namespace Recurly\Resources; + +use Recurly\RecurlyResource; + +// phpcs:disable +class GrantedBy extends RecurlyResource +{ + private $_id; + private $_object; + + protected static $array_hints = [ + ]; + + + /** + * Getter method for the id attribute. + * The ID of the subscription or external subscription that grants the permission to the account. + * + * @return ?string + */ + public function getId(): ?string + { + return $this->_id; + } + + /** + * Setter method for the id attribute. + * + * @param string $id + * + * @return void + */ + public function setId(string $id): void + { + $this->_id = $id; + } + + /** + * Getter method for the object attribute. + * Object Type + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } +} \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index 4d681c2..f75d8c9 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -1,819 +1,821 @@ --- openapi: 3.0.0 info: title: Recurly V3 API description: | # Getting Started ## Versioning The V3 API is versioned to allow stability for integrators and flexibility for Recurly to continue making improvements. The versions follow a format that incorporates the approximate date the changes were released in a YYYY-MM-DD format, e.g. `v2021-02-25`. > *WARNING*: Specifying a version is required to get a successful response. Each request should specify a version using the `Accept` header: * `Accept: application/vnd.recurly.v2021-02-25` * `Accept: application/vnd.recurly.v2021-02-25+json` All responses will include a `Recurly-Version` header with the API version used to process the request: ``` Recurly-Version: recurly.v2021-02-25 ``` Recurly's client libraries correspond with API versions as listed below. <table> <tr> <th>API Version</th> <th>Client Library Version</th> </tr> <tr> <td>v2021-02-25</td> <td>4.x</td> </tr> <tr> <td>v2019-10-10</td> <td>3.x</td> </tr> </table> Client library releases: * [Node.js](https://github.com/recurly/recurly-client-node/releases) * [Python](https://github.com/recurly/recurly-client-python/releases) * [.NET](https://github.com/recurly/recurly-client-dotnet/releases) * [Ruby](https://github.com/recurly/recurly-client-ruby/releases) * [Java](https://github.com/recurly/recurly-client-java/releases) * [PHP](https://github.com/recurly/recurly-client-php/releases) * [Go](https://github.com/recurly/recurly-client-go/releases) Client libraries follow semantic versioning. For example, [Ruby client library version 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1) represents major version `3`, minor version `18` with patch `1`. We encourage you to update to the latest version of the API and corresponding client library, as most recent versions are more performant than their predecessors. See the [changelog](https://developers.recurly.com/api/changelog.html) for a comprehensive list of changes introduced in the latest API version. ### Default Versions Specifying a version is required to get a successful response. If you wish to receive the latest version and are willing to accept the risk of breaking changes, you may specify a version of `latest`. The following media types will default the newest version of the API: * `application/vnd.recurly.latest` * `application/vnd.recurly.latest+json` ### Deprecation Responses for a deprecated version request will return two headers: ``` Recurly-Deprecated: TRUE Recurly-Sunset-Date: 2017-06-01T00:00:00+00:00 ``` The sunset date is an ISO-8601 formatted date time after which the version will no longer be accessible. ### Unsupported Versions A request for an unsupported version will return a status code of 406 and the body will include a list of supported versions: ``` { "error": { "type": "invalid_api_version", "message": "That accept header isn't in the format we use to specify an API version. Try one of these instead:", "acceptable_accept_headers": [ "application/vnd.recurly.v2016-03-01", "application/vnd.recurly.v2016-04-27", "application/vnd.recurly.v2016-07-27", "application/vnd.recurly.v2016-12-15", "application/vnd.recurly.v2017-01-12", "application/vnd.recurly.v2017-09-30", "application/vnd.recurly.v2018-01-24", "application/vnd.recurly.v2018-05-10", "application/vnd.recurly.v2018-06-06", "application/vnd.recurly.v2018-08-09", "application/vnd.recurly.v2019-10-10", "application/vnd.recurly.v2021-02-25" ] } } ``` ## Error Messages Error messages sent via the Recurly API are generally directed at developers and those who are familiar with API technology. When using the API and passing error messages to target systems, be mindful that these messages may not make sense in the context of the target system. Please consider changing these messages in the target system to be better suited to the audience of the system. Please see [transaction error codes](https://developers.recurly.com/pages/api-transaction-errors.html) for more details. ## Pagination ### Response Schema Every GET listing endpoint returns a response with the same schema: ``` { "object": "list", // Always "list" "has_more": true, // false if this is the last page of data "next": "https://...", // A URL pointing to the next page of data "data": [] // The data for this page as an array } ``` To page through every record, your code should continually call the URL at `next` until `has_more` is `false`. ### Query Parameters Most GET listing endpoints take query parameters that allow filtering and sorting the results. Some endpoints have additional parameters, which are documented on the respective endpoints, but most support the following parameters: * `ids`: A comma separated list of ids to match. * `limit`: The number of records to return per page. * `order`: The sort order of records. * `sort`: The date field to use in sorting. * `begin_time`: The start datetime to filter (ISO 8601). * `end_time`: The end datetime to filter (ISO 8601). ### Counting with HEAD Every GET listing endpoint also supports the HEAD HTTP method. Making a head request to the endpoint results in an empty body and an additional `Recurly-Total-Records` header. This is a count of the total number of records that the endpoint will return, taking into account the current filtering query parameters. ## Limits In order to provide a fast response time to all our customers, we may rate limit excessive requests. By default, new Recurly sites have the following API rate limits: * Sandbox sites: 400 requests/min. All requests count towards the rate limit. * Production sites: 1,000 requests/min. Only GET requests count towards the rate limit. Once your site moves into production mode, Recurly will only rate limit GET requests. New subscriptions, account modifications, and other requests using POST, PUT, or DELETE methods will not count against your rate limit. The rate limit is calculated over a sliding 5 minute window. This means a production site could make 4,000 requests within one minute and not hit the rate limit so long as the site made less than 1,000 requests during the prior 4 minutes. If an API request exceeds the rate limit, the API will return a `429 Too Many Requests` HTTP status. If your business needs a higher limit, please contact support. The rate limit applied to your client can be determined with the `X-RateLimit-Limit` header, and the number of remaining requests is sent in the `X-RateLimit-Remaining` header. Finally, the `X-RateLimit-Reset` header contains an integer value representing the time, measured in seconds since the UNIX Epoch, at which the request count will be reset. ## Change Log A list of changes for this version can be found [in the changelog](https://developers.recurly.com/api/changelog.html#v2021-02-25---current-ga-version). version: v2021-02-25 security: - api_key: [] x-tagGroups: - name: Customers tags: - account - note - account_acquisition - billing_info - billing_infos - subscription - subscription_change - shipping_address - purchase - usage - automated_exports - name: Products and Promotions tags: - item - plan - add-on - measured_unit - coupon - coupon_redemption - unique_coupon_code - name: Invoices and Payments tags: - invoice - line_item - credit_payment - transaction - name: Configuration tags: - site - custom_field_definition - shipping_method - dunning_campaigns tags: - name: site x-displayName: Site - name: custom_field_definition x-displayName: Custom Field Definition description: Describes the fields that can use used as custom fields on accounts or subscriptions. - name: item x-displayName: Item description: |- For merchants who sell the same things to many customers, documenting those offerings in a catalog allows for faster charge creation, easier management of offerings, and analytics about your offerings across all sales channels. Because your offerings can be physical, digital, or service-oriented, Recurly collectively calls these offerings "Items". Recurly's item catalog requires the Credit Invoices features to be enabled. - name: plan x-displayName: Plan description: A plan tells Recurly how often and how much to charge your customers. Plans can be created with free trials, optional products (called add-ons), setup fees, and more. - name: add-on x-displayName: Add-on description: An add-on is a charge billed each billing period in addition to a subscription’s base charge. Each plan may have one or more add-ons associated with it. - name: measured_unit x-displayName: Measured Unit description: A measured unit describes a usage-based add-on's usage. If different usage-based add-ons share the same measured unit, you can report on customer usage for those add-ons at the aggregated measured unit level. - name: account x-displayName: Account description: Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more. - name: note x-displayName: Account Note description: Account notes allow your team to leave notes on an account to add context, e.g. the reason for a refund, customer requests, and/or complaints. These notes are internal and not exposed to your customers. - name: account_acquisition x-displayName: Account Acquisition Info description: Recurly offers the ability to record marketing data on customer accounts to match this data with revenue and billing data events in Recurly. - name: billing_info x-displayName: Billing Info description: Without the premium Wallet feature, an account can only have one stored payment method at a time. Examples include credit cards, PayPal, or bank accounts. Billing info is filled out by the customer upon purchase or when they update their information. - name: billing_infos x-displayName: Billing Infos description: If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints. - name: subscription x-displayName: Subscription description: Subscriptions are created when your customers subscribe to one of your plans. The customer's subscription tells Recurly when and how much to bill the customer. - name: subscription_change x-displayName: Subscription Change description: Subscription changes alter subscription in a way that might affect the invoiced amount, such as changing the plan, add-ons, quantities, or shipping address. Changes can be made immediately in the current billing cycle or scheduled to take place at the next renewal. - name: shipping_address x-displayName: Shipping Address description: Shipping addresses are tied to a customer's account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription. - name: invoice x-displayName: Invoice description: An invoice relates charges, credits, and payments together. When a subscription is created or renewed or a charge is created on the account, Recurly will sum the charges, discount or tax as appropriate, and send the invoice out for collection. - name: line_item x-displayName: Line Item description: Line items are the charges and credits on your customer's invoices. - name: credit_payment x-displayName: Credit Payment - name: purchase x-displayName: Purchase description: A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction. + The purchases endpoint can also be used to immediately create a credit invoice + on an account, when Credit Invoices is enabled on your site. - name: usage x-displayName: Usage description: Send Recurly your customer usage and we will automatically bill them in arrears at the end of the billing cycle. For more info on usage-based billing, [click here](https://docs.recurly.com/docs/usage-based-billing). - name: transaction x-displayName: Transaction description: Purchasing information is sent to your payment gateway in an action called a transaction. This includes the customer's billing information and the amount of money to be charged, voided, or refunded. - name: coupon x-displayName: Coupon description: Coupons can either be single codes that easily allow mass distribution by many customers or bulk coupons that can generate many unique coupons that can allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption description: Coupon redemptions are created when a coupon is applied to an account or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. - name: shipping_method x-displayName: Shipping Method description: Shipping methods offered to send products to customers. - name: automated_exports x-displayName: Automated Exports description: Automated exports of customer data. - name: dunning_campaigns x-displayName: Dunning Campaigns description: Settings used when attempting to dun customers whose payments are declined. paths: "/sites": get: operationId: list_sites summary: List sites description: | This route is most useful for finding a site's ID for subsequent requests. See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. tags: - site parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_state" responses: '200': description: A list of sites. content: application/json: schema: "$ref": "#/components/schemas/SiteList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const sites = client.listSites({ params: { limit: 200 } }) for await (const site of sites.each()) { console.log(site.subdomain) } - lang: Python source: | params = {"limit": 200} sites = client.list_sites(params=params).items() for site in sites: print(site.subdomain) - lang: ".NET" source: | var optionalParams = new ListSitesParams() { Limit = 200 }; var sites = client.ListSites(optionalParams); foreach(Site site in sites) { Console.WriteLine(site.Subdomain); } - lang: Ruby source: | params = { limit: 200 } sites = @client.list_sites(params: params) sites.each do |site| puts "Site: #{site.subdomain}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Site> sites = client.listSites(params); for (Site site : sites) { System.out.println(site.getSubdomain()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $sites = $client->listSites($options); foreach($sites as $site) { echo 'Site: ' . $site->getSubdomain() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListSitesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"asc\"),\n\tLimit: recurly.Int(200),\n}\n\nsites, err := client.ListSites(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor sites.HasMore() {\n\terr := sites.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, site := range sites.Data() {\n\t\tfmt.Printf(\"Site %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tsite.Id,\n\t\t\tsite.Subdomain,\n\t\t)\n\t}\n}" "/sites/{site_id}": get: operationId: get_site summary: Fetch a site tags: - site parameters: - "$ref": "#/components/parameters/site_id" responses: '200': description: A site. content: application/json: schema: "$ref": "#/components/schemas/Site" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const site = await client.getSite(siteId) console.log('Fetched site: ', site) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: site = client.get_site(site_id) print("Got Site %s" % site) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { Site site = client.GetSite(siteId); Console.WriteLine($"Fetched site {site.Id}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin site = @client.get_site(site_id: site_id) puts "Got Site #{site}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final Site site = client.getSite(siteId); System.out.println("Fetched site: " + site.getId()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $site = $client->getSite($site_id); echo 'Got Site:' . PHP_EOL; var_dump($site); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "site, err := client.GetSite(siteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Site: %s\", site.Id)" "/accounts": get: tags: - account operationId: list_accounts summary: List a site's accounts description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_account_email" - "$ref": "#/components/parameters/filter_account_subscriber" - "$ref": "#/components/parameters/filter_account_past_due" responses: '200': description: A list of the site's accounts. content: application/json: schema: "$ref": "#/components/schemas/AccountList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const accounts = client.listAccounts({ params: { limit: 200 } }) for await (const account of accounts.each()) { console.log(account.code) } - lang: Python source: | params = {"limit": 200} accounts = client.list_accounts(params=params).items() for account in accounts: print(account.code) - lang: ".NET" source: | var optionalParams = new ListAccountsParams() { Limit = 200 }; var accounts = client.ListAccounts(optionalParams); foreach(Account account in accounts) { Console.WriteLine(account.Code); } - lang: Ruby source: | params = { limit: 200 } accounts = @client.list_accounts(params: params) accounts.each do |account| puts "Account: #{account.code}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time Pager<Account> accounts = client.listAccounts(params); for (Account acct : accounts) { System.out.println(acct.getCode()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $accounts = $client->listAccounts($options); foreach($accounts as $account) { echo 'Account code: ' . $account->getCode() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccounts, err := client.ListAccounts(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accounts.HasMore() {\n\terr := accounts.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, account := range accounts.Data() {\n\t\tfmt.Printf(\"Account %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\taccount.Id,\n\t\t\taccount.Code,\n\t\t)\n\t}\n}" post: tags: - account operationId: create_account summary: Create an account requestBody: content: application/json: schema: "$ref": "#/components/schemas/AccountCreate" required: true responses: '201': description: An account. content: application/json: schema: "$ref": "#/components/schemas/Account" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters or an error running the billing info verification transaction. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const accountCreate = { code: accountCode, firstName: 'Benjamin', lastName: 'Du Monde', address: { street1: '900 Camp St', city: 'New Orleans', region: 'LA', postalCode: '70115', country: 'US' } } const account = await client.createAccount(accountCreate) console.log('Created Account: ', account.code) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: account_create = { "code": account_code, "first_name": "Benjamin", "last_name": "Du Monde", "acquisition": { "campaign": "podcast-marketing", "channel": "social_media", "subchannel": "twitter", "cost": {"currency": "USD", "amount": 0.50}, }, "shipping_addresses": [ { "nickname": "Home", "street1": "1 Tchoupitoulas St", "city": "New Orleans", "region": "LA", "country": "US", "postal_code": "70115", "first_name": "Aaron", "last_name": "Du Monde", } ], } account = client.create_account(account_create) print("Created Account %s" % account) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { var accountReq = new AccountCreate() { Code = accountCode, FirstName = "Benjamin", LastName = "Du Monde", Address = new Address() { City = "New Orleans", Region = "LA", Country = "US", PostalCode = "70115", Street1 = "900 Camp St." } }; Account account = client.CreateAccount(accountReq); Console.WriteLine($"Created account {account.Code}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin account_create = { code: account_code, first_name: "Benjamin", last_name: "Du Monde", acquisition: { campaign: "podcast-marketing", channel: "social_media", subchannel: "twitter", cost: { currency: "USD", amount: 0.50 } }, shipping_addresses: [ { nickname: "Home", street1: "1 Tchoupitoulas St", city: "New Orleans", region: "LA", country: "US", @@ -3264,1024 +3266,1026 @@ paths: x-code-samples: - lang: Node.js source: | const invoices = client.listAccountInvoices(accountId, { params: { limit: 200 } }) for await (const invoice of invoices.each()) { console.log(invoice.number) } - lang: Python source: | params = {"limit": 200} invoices = client.list_account_invoices(account_id, params=params).items() for invoice in invoices: print(invoice.number) - lang: ".NET" source: | var invoices = client.ListAccountInvoices(accountId); foreach(Invoice invoice in invoices) { Console.WriteLine(invoice.Id); } - lang: Ruby source: | params = { limit: 200 } invoices = @client.list_account_invoices( account_id: account_id, params: params ) invoices.each do |invoice| puts "Invoice: #{invoice.number}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<Invoice> invoices = client.listAccountInvoices(accountId, params); for (Invoice invoice : invoices) { System.out.println(invoice.getNumber()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $invoices = $client->listAccountInvoices($account->getId(), $options); foreach($invoices as $invoice) { echo 'Account invoice: ' . $invoice->getNumber() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountInvoicesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccountInvoices, err := client.ListAccountInvoices(accountID, listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accountInvoices.HasMore() {\n\terr := accountInvoices.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, invoice := range accountInvoices.Data() {\n\t\tfmt.Printf(\"Account Invoice %3d: %s\\n\",\n\t\t\ti,\n\t\t\tinvoice.Id,\n\t\t)\n\t}\n}" post: tags: - invoice operationId: create_invoice summary: Create an invoice for pending line items parameters: - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/InvoiceCreate" required: true responses: '201': description: Returns the new invoices. content: application/json: schema: "$ref": "#/components/schemas/InvoiceCollection" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameters, no pending line items, or error running the transaction. content: application/json: schema: "$ref": "#/components/schemas/ErrorMayHaveTransaction" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { let invoiceCreate = { currency: 'USD', collectionMethod: 'automatic' } let invoiceCollection = await client.createInvoice(accountId, invoiceCreate) console.log('Created Invoice') console.log('Charge Invoice: ', invoiceCollection.chargeInvoice) console.log('Credit Invoices: ', invoiceCollection.creditInvoices) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: invoice_create = {"currency": "USD", "collection_method": "automatic"} invoice_collection = client.create_invoice(account_id, invoice_create) print("Created InvoiceCollection %s" % invoice_collection) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { // creates an invoice based on pending charges or credits on account var collection = client.CreateInvoice(accountId, new InvoiceCreate() { Currency = "USD", CollectionMethod = CollectionMethod.Automatic }); Console.WriteLine("Created Invoice"); Console.WriteLine(collection.ChargeInvoice); Console.WriteLine(collection.CreditInvoices); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin invoice_create = { currency: 'USD', collection_method: 'automatic' } collection = @client.create_invoice( account_id: account_id, body: invoice_create ) puts "Created InvoiceCollection #{collection}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { InvoiceCreate invoiceCreate = new InvoiceCreate(); invoiceCreate.setCurrency("USD"); invoiceCreate.setCollectionMethod(Constants.CollectionMethod.AUTOMATIC); InvoiceCollection collection = client.createInvoice(accountId, invoiceCreate); System.out.println("Created Invoice"); System.out.println(collection.getChargeInvoice()); System.out.println(collection.getCreditInvoices()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: |- try { $invoice_create = [ "currency" => "USD", "collection_method" => "automatic" ]; $invoice_collection = $client->createInvoice( $account_id, $invoice_create ); echo "Created Invoice:" . PHP_EOL; var_dump($invoice_collection); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "invoiceReq := &recurly.InvoiceCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tCollectionMethod: recurly.String(\"automatic\"),\n}\n\ncollection, err := client.CreateInvoice(accountID, invoiceReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Invoice Collection: %v\", collection)" "/accounts/{account_id}/invoices/preview": post: tags: - invoice operationId: preview_invoice summary: Preview new invoice for pending line items parameters: - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/InvoiceCreate" required: true responses: '200': description: Returns the invoice previews. content: application/json: schema: "$ref": "#/components/schemas/InvoiceCollection" '400': description: Bad request, perhaps invalid JSON? content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: Invalid parameter or pending line items. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const collection = await client.previewInvoice(accountId, { currency: "USD", collectionMethod: "automatic" }) console.log(`Previewed invoice due at ${collection.chargeInvoice.dueAt}`) console.log(collection.chargeInvoice) console.log(collection.creditInvoices) } catch(err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: invoice_preview = {"currency": "USD", "collection_method": "automatic"} invoice_collection = client.preview_invoice(account_id, invoice_preview) print("Preview InvoiceCollection %s" % invoice_collection) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { // creates a preview invoice based on pending charges or credits on account var collection = client.PreviewInvoice(accountId, new InvoiceCreate() { Currency = "USD", CollectionMethod = CollectionMethod.Automatic }); Console.WriteLine($"Previewed invoice DueAt {collection.ChargeInvoice.DueAt}"); Console.WriteLine(collection.ChargeInvoice); Console.WriteLine(collection.CreditInvoices); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin invoice_preview = { currency: "USD", collection_method: "automatic" } collection = @client.create_invoice( account_id: account_id, body: invoice_preview ) puts "Created InvoiceCollection #{collection}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { InvoiceCreate invoiceCreate = new InvoiceCreate(); invoiceCreate.setCurrency("USD"); invoiceCreate.setCollectionMethod(Constants.CollectionMethod.AUTOMATIC); InvoiceCollection collection = client.previewInvoice(accountId, invoiceCreate); System.out.println("Previewed Invoice due at " + collection.getChargeInvoice().getDueAt()); System.out.println(collection.getChargeInvoice()); System.out.println(collection.getCreditInvoices()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: |- try { $invoice_preview = [ "currency" => "USD", "collection_method" => "automatic" ]; $invoice_collection = $client->previewInvoice( $account_id, $invoice_preview ); echo "Previewed Invoice:" . PHP_EOL; var_dump($invoice_collection); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "invoiceReq := &recurly.InvoiceCreate{\n\tCurrency: recurly.String(\"USD\"),\n}\n\ncollection, err := client.PreviewInvoice(accountID, invoiceReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Preview Invoice %v\", collection.ChargeInvoice)" "/accounts/{account_id}/line_items": get: tags: - line_item operationId: list_account_line_items summary: List an account's line items description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" - "$ref": "#/components/parameters/filter_line_item_original" - "$ref": "#/components/parameters/filter_line_item_state" - "$ref": "#/components/parameters/filter_line_item_type" responses: '200': description: A list of the account's line items. content: application/json: schema: "$ref": "#/components/schemas/LineItemList" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const lineItems = client.listAccountLineItems(accountId, { params: { limit: 200 } }) for await (const lineItem of lineItems.each()) { console.log(lineItem.id) } - lang: Python source: | params = {"limit": 200} line_items = client.list_account_line_items(account_id, params=params).items() for line_item in line_items: print(line_item.id) - lang: ".NET" source: | var lineItems = client.ListAccountLineItems(accountId); foreach(LineItem lineItem in lineItems) { Console.WriteLine(lineItem.Id); } - lang: Ruby source: | params = { limit: 200 } line_items = @client.list_account_line_items( account_id: account_id, params: params ) line_items.each do |line_item| puts "LineItem: #{line_item.id}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<LineItem> lineItems = client.listAccountLineItems(accountId, params); for (LineItem lineItem : lineItems) { System.out.println(lineItem.getId()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $account_line_items = $client->listAccountLineItems($account_id, $options); foreach($account_line_items as $line_item) { echo 'Account line item: ' . $line_item->getId() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountLineItemsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\naccountLineItems, err := client.ListAccountLineItems(accountID, listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accountLineItems.HasMore() {\n\terr := accountLineItems.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, lineItem := range accountLineItems.Data() {\n\t\tfmt.Printf(\"Account Line Item %3d: %s\\n\",\n\t\t\ti,\n\t\t\tlineItem.Id,\n\t\t)\n\t}\n}" post: tags: - line_item operationId: create_line_item summary: Create a new line item for the account + description: When using the Credit Invoices feature, utilize the purchases endpoint + in order to immediately post credit to a credit invoice. parameters: - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/LineItemCreate" required: true responses: '201': description: Returns the new line item. content: application/json: schema: "$ref": "#/components/schemas/LineItem" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: A validation error. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { let lineItemReq = { currency: 'USD', unitAmount: 1000, type: 'charge' // choose "credit" for a credit } let lineItem = await client.createLineItem(accountId, lineItemReq) console.log('Created Line Item: ', lineItem.uuid) } catch (err) { if (err instanceof recurly.errors.ValidationError) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params console.log('Failed validation', err.params) } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: line_item_create = { "currency": "USD", "unit_amount": 1000, "type": "charge", # choose "credit" for a credit } line_item = client.create_line_item(account_id, line_item_create) print("Created LineItem %s" % line_item) except recurly.errors.ValidationError as e: # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.error.params print("ValidationError: %s" % e.error.message) print(e.error.params) - lang: ".NET" source: | try { // creates a pending charge or credit on the account var lineItemReq = new LineItemCreate() { Currency = "USD", UnitAmount = 1000, Type = LineItemType.Charge // choose "credit" for a credit }; LineItem lineItem = client.CreateLineItem(accountId, lineItemReq); Console.WriteLine($"Created line item {lineItem.Uuid}"); } catch (Recurly.Errors.Validation ex) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in ex.Error.Params Console.WriteLine($"Failed validation: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin line_item_create = { currency: 'USD', unit_amount: 1_000, type: :charge } line_item = @client.create_line_item( account_id: account_id, body: line_item_create ) puts "Created LineItem #{line_item}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { LineItemCreate lineItemCreate = new LineItemCreate(); lineItemCreate.setCurrency("USD"); lineItemCreate.setUnitAmount(new BigDecimal("1000.0")); lineItemCreate.setType(Constants.LineItemType.CHARGE); // choose "credit" for a credit LineItem lineItem = client.createLineItem(accountId, lineItemCreate); System.out.println("Created line item " + lineItem.getUuid()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: |- try { $line_item_create = [ 'currency' => 'USD', 'unit_amount' => 1000, 'type' => 'charge' ]; $line_item = $client->createLineItem( $account->getId(), $line_item_create ); echo 'Created Line Item:' . PHP_EOL; var_dump($line_item); } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "lineItemReq := &recurly.LineItemCreate{\n\tCurrency: recurly.String(\"USD\"),\n\tUnitAmount: recurly.Float(1000),\n\tType: recurly.String(\"charge\"),\n}\n\nlineItem, err := client.CreateLineItem(accountID, lineItemReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Created Line Item: %v\", lineItem)" "/accounts/{account_id}/notes": get: tags: - note operationId: list_account_notes summary: Fetch a list of an account's notes description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" responses: '200': description: A list of an account's notes. content: application/json: schema: "$ref": "#/components/schemas/AccountNoteList" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const notes = client.listAccountNotes(accountId, { params: { limit: 200 } }) for await (const note of notes.each()) { console.log(note.message) } - lang: Python source: | params = {"limit": 200} line_items = client.list_account_line_items(account_id, params=params).items() for line_item in line_items: print(line_item.id) - lang: ".NET" source: | var notes = client.ListAccountNotes(accountId); foreach(AccountNote note in notes) { Console.WriteLine(note.Message); } - lang: Ruby source: | params = { limit: 200 } account_notes = @client.list_account_notes(account_id: account_id, params: params) account_notes.each do |note| puts "AccountNote: #{note.message}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<AccountNote> notes = client.listAccountNotes(accountId, params); for (AccountNote note : notes) { System.out.println(note.getMessage()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $account_notes = $client->listAccountNotes($account_id, $options); foreach($account_notes as $note) { echo 'Account note: ' . $note->getMessage() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListAccountNotesParams{}\naccountNotes, err := client.ListAccountNotes(accountID, listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor accountNotes.HasMore() {\n\terr := accountNotes.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, note := range accountNotes.Data() {\n\t\tfmt.Printf(\"Account Note %3d: %s\\n\",\n\t\t\ti,\n\t\t\tnote.Id,\n\t\t)\n\t}\n}" "/accounts/{account_id}/notes/{account_note_id}": get: tags: - note operationId: get_account_note summary: Fetch an account note parameters: - "$ref": "#/components/parameters/account_id" - name: account_note_id in: path description: Account Note ID. required: true schema: type: string responses: '200': description: An account note. content: application/json: schema: "$ref": "#/components/schemas/AccountNote" '404': description: Incorrect site, account or note ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { console.log(accountId) const note = await client.getAccountNote(accountId, accountNoteId) console.log('Fetched account note: ', note.message) } catch (err) { if (err instanceof recurly.errors.NotFoundError) { // If the request was not found, you may want to alert the user or // just return null console.log('Resource Not Found') } else { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it console.log('Unknown Error: ', err) } } - lang: Python source: | try: note = client.get_account_note(account_id, note_id) print("Got AccountNote %s" % note) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { AccountNote note = client.GetAccountNote(accountId, accountNoteId); Console.WriteLine($"Fetched account note: {note.Message}"); } catch (Recurly.Errors.NotFound ex) { // If the resource was not found // we may want to alert the user or just return null Console.WriteLine($"Resource Not Found: {ex.Error.Message}"); } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin note = @client.get_account_note( account_id: account_id, account_note_id: note_id ) puts "Got AccountNote #{note}" rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { final AccountNote note = client.getAccountNote(accountId, accountNoteId); System.out.println("Fetched account note: " + note.getMessage()); } catch (NotFoundException e) { // If the resource was not found // we may want to alert the user or just return null System.out.println("Resource Not Found: " + e.getError().getMessage()); } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $note = $client->getAccountNote($account_id, $account_node_id); echo 'Got Account Note:' . PHP_EOL; var_dump($note); } catch (\Recurly\Errors\NotFound $e) { // Could not find the resource, you may want to inform the user // or just return a NULL echo 'Could not find resource.' . PHP_EOL; var_dump($e); } catch (\Recurly\RecurlyError $e) { // Something bad happened... tell the user so that they can fix it? echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "accountNote, err := client.GetAccountNote(accountID, accountNoteID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Account Note: %v\", accountNote)" "/accounts/{account_id}/shipping_addresses": get: tags: - shipping_address operationId: list_shipping_addresses summary: Fetch a list of an account's shipping addresses description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/account_id" - "$ref": "#/components/parameters/ids" - "$ref": "#/components/parameters/limit" - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/sort_dates" - "$ref": "#/components/parameters/filter_begin_time" - "$ref": "#/components/parameters/filter_end_time" responses: '200': description: A list of an account's shipping addresses. content: application/json: schema: "$ref": "#/components/schemas/ShippingAddressList" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | const addresses = client.listShippingAddresses(accountId, { params: { limit: 200 } }) for await (const address of addresses.each()) { console.log(address.street1) } - lang: Python source: | shipping_addresses = client.list_shipping_addresses(account_id).items() for shipping_address in shipping_addresses: print(shipping_address.id) - lang: ".NET" source: | var addresses = client.ListShippingAddresses(accountId); foreach(ShippingAddress address in addresses) { Console.WriteLine(address.Street1); } - lang: Ruby source: | params = { limit: 200 } shipping_addresses = @client.list_shipping_addresses( account_id: account_id, params: params ) shipping_addresses.each do |addr| puts "ShippingAddress: #{addr.nickname} - #{addr.street1}" end - lang: Java source: | QueryParams params = new QueryParams(); params.setLimit(200); // Pull 200 records at a time final Pager<ShippingAddress> addresses = client.listShippingAddresses(accountId, params); for (ShippingAddress address : addresses) { System.out.println(address.getStreet1()); } - lang: PHP source: | $options = [ 'params' => [ 'limit' => 200 ] ]; $shippingAddresses = $client->listShippingAddresses($account_id, $options); foreach($shippingAddresses as $address) { echo 'Shipping Address: ' . $address->getId() . PHP_EOL; } - lang: Go source: "listParams := &recurly.ListShippingAddressesParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\nshippingAddresses, err := client.ListShippingAddresses(accountID, listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor shippingAddresses.HasMore() {\n\terr := shippingAddresses.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, shippingAddress := range shippingAddresses.Data() {\n\t\tfmt.Printf(\"Shipping Address %3d: %s, %s\\n\",\n\t\t\ti,\n\t\t\tshippingAddress.Id,\n\t\t\tshippingAddress.Street1,\n\t\t)\n\t}\n}" post: tags: - shipping_address operationId: create_shipping_address summary: Create a new shipping address for the account parameters: - "$ref": "#/components/parameters/account_id" requestBody: content: application/json: schema: "$ref": "#/components/schemas/ShippingAddressCreate" required: true responses: '200': description: Returns the new shipping address. content: application/json: schema: "$ref": "#/components/schemas/ShippingAddress" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or account ID. content: application/json: schema: "$ref": "#/components/schemas/Error" '422': description: A validation error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: @@ -14556,1265 +14560,1304 @@ paths: catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin purchase = { currency: 'EUR', account: { code: account_code, email: 'benjamin@example.com', billing_info: { first_name: 'Benjamin', last_name: 'Du Monde', online_banking_payment_type: 'ideal' }, }, line_items: [ { currency: 'EUR', unit_amount: 1000, type: 'charge' } ] } invoice_collection = @client.create_pending_purchase(body: purchase) puts "Created ChargeInvoice with UUID: #{invoice_collection.charge_invoice.uuid}" rescue Recurly::Errors::ValidationError => e # If the request was invalid, you may want to tell your user # why. You can find the invalid params and reasons in e.recurly_error.params puts "ValidationError: #{e.recurly_error.params}" end - lang: Java source: | try { AccountPurchase account = new AccountPurchase(); account.setCode(accountCode); account.setEmail("benjamin@example.com"); BillingInfoCreate billingInfo = new BillingInfoCreate(); billingInfo.setFirstName("Benjamin"); billingInfo.setLastName("Du Monde"); billingInfo.setOnlineBankingPaymentType(Constants.OnlineBankingPaymentType.IDEAL); account.setBillingInfo(billingInfo); List<LineItemCreate> lineItems = new ArrayList<LineItemCreate>(); LineItemCreate lineItem = new LineItemCreate(); lineItem.setCurrency("EUR"); lineItem.setUnitAmount(new BigDecimal("1000.0")); lineItem.setType(Constants.LineItemType.CHARGE); lineItems.add(lineItem); PurchaseCreate purchase = new PurchaseCreate(); purchase.setCurrency("EUR"); purchase.setAccount(account); purchase.setLineItems(lineItems); InvoiceCollection collection = client.createPendingPurchase(purchase); System.out.println("Created ChargeInvoice with UUID: " + collection.getChargeInvoice().getUuid()); } catch (ValidationException e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in e.getError().getParams() System.out.println("Failed validation: " + e.getError().getMessage()); System.out.println("Params: " + e.getError().getParams()); } catch (TransactionException e) { TransactionError tError = e.getError().getTransactionError(); if (tError.getCategory() == Constants.ErrorCategory.THREE_D_SECURE_ACTION_REQUIRED) { String actionTokenId = tError.getThreeDSecureActionTokenId(); System.out.println("Got 3DSecure TransactionError token: " + actionTokenId); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $purchase_create = [ "currency" => "EUR", "account" => [ "code" => $account_code, "email" => "benjamin@example.com", "billing_info" => [ "first_name" => "Benjamin", "last_name" => "Du Monde", "online_banking_payment_type" => "ideal" ], ], "line_items" => [ [ "currency" => "EUR", "unit_amount" => 1000, "type" => "charge", ] ] ]; $invoice_collection = $client->createPendingPurchase($purchase_create); echo 'Created ChargeInvoice with UUID' . $invoice_collection->getChargeInvoice()->getUuid() . PHP_EOL; } catch (\Recurly\Errors\Validation $e) { // If the request was not valid, you may want to tell your user // why. You can find the invalid params and reasons in err.params var_dump($e); } catch (\Recurly\RecurlyError $e) { // If we don't know what to do with the err, we should // probably re-raise and let our web framework and logger handle it var_dump($e); } - lang: Go source: "purchaseReq := &recurly.PurchaseCreate{\n\tCurrency: recurly.String(\"EUR\"),\n\tAccount: &recurly.AccountPurchase{\n\t\tCode: recurly.String(accountCode),\n\t\tEmail: recurly.String(\"benjamin@example.com\"),\n\t\tBillingInfo: &recurly.BillingInfoCreate{\n\t\t\tFirstName: \ recurly.String(\"Benjamin\"),\n\t\t\tLastName: recurly.String(\"Du Monde\"),\n\t\t\tOnlineBankingPaymentType: recurly.String(\"ideal\"),\n\t\t},\n\t},\n\tLineItems: []recurly.LineItemCreate{\n\t\t{\n\t\t\tCurrency: recurly.String(\"EUR\"),\n\t\t\tUnitAmount: recurly.Float(1000),\n\t\t\tType: recurly.String(\"charge\"),\n\t\t},\n\t},\n}\ncollection, err := client.CreatePendingPurchase(purchaseReq)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeValidation {\n\t\tfmt.Printf(\"Failed validation: %v\", e)\n\t\treturn nil, err\n\t}\n\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Created ChargeInvoice with UUID: %s.\\n\", collection.ChargeInvoice.Uuid)\n" "/export_dates": get: tags: - automated_exports operationId: get_export_dates summary: List the dates that have an available export to download. description: Returns a list of dates for which export files are available for download. responses: '200': description: Returns a list of dates. content: application/json: schema: "$ref": "#/components/schemas/ExportDates" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const export_dates = await client.getExportDates() export_dates.dates.forEach(date => { console.log(`Exports are available for: ${date}`) }) } catch (err) { if (err instanceof recurly.ApiError) { console.log('Unexpected error', err) } } - lang: Python source: | try: export_dates = client.get_export_dates() for date in export_dates.dates: print( "Exports are available for: %s" % date) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { ExportDates exportDates = client.GetExportDates(); foreach (var date in exportDates.Dates) { System.Console.WriteLine($"Exports are available for: {date}"); } } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin export_dates = @client.get_export_dates() export_dates.dates.each do |date| puts "Exports are available for: #{date}" end rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { ExportDates exportDates = client.getExportDates(); for (String date : exportDates.getDates()) { System.out.println("Exports are available for: " + date); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError().getMessage()); } - lang: PHP source: | try { $export_dates = $client->getExportDates(); foreach($export_dates->getDates() as $date) { echo "Exports are available for: {$date}" . PHP_EOL; } } catch (\Recurly\RecurlyError $e) { echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "exportDates, err := client.GetExportDates()\nif e, ok := err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfor _, date := range exportDates.Dates {\n\tfmt.Println(\"Exports are available for: \", date)\n}" "/export_dates/{export_date}/export_files": parameters: - "$ref": "#/components/parameters/export_date" get: tags: - automated_exports operationId: get_export_files summary: List of the export files that are available to download. description: Returns a list of presigned URLs to download export files for the given date, with their MD5 sums. responses: '200': description: Returns a list of export files to download. content: application/json: schema: "$ref": "#/components/schemas/ExportFiles" '400': description: Invalid or unpermitted parameter. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site ID or date. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: - lang: Node.js source: | try { const export_files = await client.getExportFiles(export_date) export_files.files.forEach(file => { console.log(`Export file download URL: ${file.href}`) }) } catch (err) { if (err instanceof recurly.ApiError) { console.log('Unexpected error', err) } } - lang: Python source: | try: export_files = client.get_export_files(export_date) for file in export_files.files: print( "Export file download URL: %s" % file.href) except recurly.errors.NotFoundError: # If the resource was not found, you may want to alert the user or # just return nil print("Resource Not Found") - lang: ".NET" source: | try { ExportFiles exportFiles = client.GetExportFiles(exportDate: exportDate); foreach (var file in exportFiles.Files) { System.Console.WriteLine($"Export file download URL: {file.Href}"); } } catch (Recurly.Errors.ApiError ex) { // Use ApiError to catch a generic error from the API Console.WriteLine($"Unexpected Recurly Error: {ex.Error.Message}"); } - lang: Ruby source: | begin export_files = @client.get_export_files(export_date: export_date) export_files.files.each do |file| puts "Export file download URL: #{file.href}" end rescue Recurly::Errors::NotFoundError # If the resource was not found, you may want to alert the user or # just return nil puts "Resource Not Found" end - lang: Java source: | try { ExportFiles exportFiles = client.getExportFiles(exportDate); for (ExportFile file : exportFiles.getFiles()) { System.out.println("Export file download URL: " + file.getHref()); } } catch (ApiException e) { // Use ApiException to catch a generic error from the API System.out.println("Unexpected Recurly Error: " + e.getError()); } - lang: PHP source: | try { $export_files = $client->getExportFiles($export_date); foreach($export_files->getFiles() as $file) { echo "Export file download URL: {$file->getHref()}" . PHP_EOL; } } catch (\Recurly\RecurlyError $e) { echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL; } - lang: Go source: "exportFiles, err := client.GetExportFiles(exportDate)\nif e, ok := err.(*recurly.Error); ok {\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfor _, file := range exportFiles.Files {\n\tfmt.Println(\"Export file download URL: \", file.Href)\n}" "/dunning_campaigns": get: tags: - dunning_campaigns operationId: list_dunning_campaigns summary: Show the dunning campaigns for a site description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the dunning_campaigns on an account. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/dunning_campaigns/{dunning_campaign_id}": parameters: - "$ref": "#/components/parameters/dunning_campaign_id" get: tags: - dunning_campaigns operationId: get_dunning_campaign summary: Show the settings for a dunning campaign responses: '200': description: Settings for a dunning campaign. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaign" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or campaign ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/dunning_campaigns/{dunning_campaign_id}/bulk_update": parameters: - "$ref": "#/components/parameters/dunning_campaign_id" put: tags: - dunning_campaigns operationId: put_dunning_campaign_bulk_update summary: Assign a dunning campaign to multiple plans requestBody: content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignsBulkUpdate" responses: '200': description: A list of updated plans. content: application/json: schema: "$ref": "#/components/schemas/DunningCampaignsBulkUpdateResponse" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or campaign ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/invoice_templates": get: tags: - invoice_templates operationId: list_invoice_templates summary: Show the invoice templates for a site description: See the [Pagination Guide](/guides/pagination.html) to learn how to use pagination in the API and Client Libraries. parameters: - "$ref": "#/components/parameters/sort_dates" responses: '200': description: A list of the the invoice templates on a site. content: application/json: schema: "$ref": "#/components/schemas/InvoiceTemplateList" '404': description: Incorrect site. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] "/invoice_templates/{invoice_template_id}": parameters: - "$ref": "#/components/parameters/invoice_template_id" get: tags: - invoice_templates operationId: get_invoice_template summary: Show the settings for an invoice template responses: '200': description: Settings for an invoice template. content: application/json: schema: "$ref": "#/components/schemas/InvoiceTemplate" '400': description: Bad request; perhaps missing or invalid parameters. content: application/json: schema: "$ref": "#/components/schemas/Error" '404': description: Incorrect site or invoice template ID. content: application/json: schema: "$ref": "#/components/schemas/Error" default: description: Unexpected error. content: application/json: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + "/accounts/{account_id}/entitlements": + parameters: + - "$ref": "#/components/parameters/account_id" + - "$ref": "#/components/parameters/filter_limited_subscription_state" + get: + tags: + - account + operationId: list_entitlements + summary: Show all entitlements granted to an account + responses: + '200': + description: A list of the entitlements granted to an account. + content: + application/json: + schema: + "$ref": "#/components/schemas/Entitlements" + '404': + description: Incorrect site or account ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] servers: - url: https://v3.recurly.com - url: https://v3.eu.recurly.com components: parameters: site_id: name: site_id in: path description: Site ID or subdomain. For ID no prefix is used e.g. `e28zov4fw0v2`. For subdomain use prefix `subdomain-`, e.g. `subdomain-recurly`. required: true schema: type: string account_id: name: account_id in: path description: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. required: true schema: type: string add_on_id: name: add_on_id in: path description: Add-on ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. required: true schema: type: string billing_info_id: name: billing_info_id in: path description: Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature. required: true schema: type: string usage_id: name: usage_id in: path description: Usage Record ID. required: true schema: type: string coupon_id: name: coupon_id in: path description: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. required: true schema: type: string credit_payment_id: name: credit_payment_id in: path description: Credit Payment ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string custom_field_definition_id: name: custom_field_definition_id in: path description: Custom Field Definition ID required: true schema: type: string invoice_template_id: name: invoice_template_id in: path description: Invoice template ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. required: true schema: type: string item_id: name: item_id in: path description: Item ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-red`. required: true schema: type: string invoice_id: name: invoice_id in: path description: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. required: true schema: type: string measured_unit_id: name: measured_unit_id in: path description: Measured unit ID or name. For ID no prefix is used e.g. `e28zov4fw0v2`. For name use prefix `name-`, e.g. `name-Storage`. required: true schema: type: string line_item_id: name: line_item_id in: path description: Line Item ID. required: true schema: type: string plan_id: name: plan_id in: path description: Plan ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-gold`. required: true schema: type: string shipping_address_id: name: shipping_address_id in: path description: Shipping Address ID. required: true schema: type: string shipping_method_id: name: shipping_method_id in: path description: 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`. required: true schema: type: string subscription_id: name: subscription_id in: path description: Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string transaction_id: name: transaction_id in: path description: Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. required: true schema: type: string unique_coupon_code_id: name: unique_coupon_code_id in: path description: 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`. required: true schema: type: string dunning_campaign_id: name: dunning_campaign_id in: path description: Dunning Campaign ID, e.g. `e28zov4fw0v2`. required: true schema: type: string ids: name: ids in: query description: | Filter results by their IDs. Up to 200 IDs can be passed at once using commas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`. **Important notes:** * The `ids` parameter cannot be used with any other ordering or filtering parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc) * Invalid or unknown IDs will be ignored, so you should check that the results correspond to your request. * Records are returned in an arbitrary order. Since results are all returned at once you can sort the records yourself. style: form explode: false schema: type: array items: type: string limit: name: limit in: query description: Limit number of records 1-200. schema: type: integer minimum: 1 maximum: 200 default: 20 order: name: order in: query description: Sort order. schema: default: desc "$ref": "#/components/schemas/AlphanumericSortEnum" sort_dates: name: sort in: query description: | Sort field. You *really* only want to sort by `updated_at` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned. schema: default: created_at "$ref": "#/components/schemas/TimestampSortEnum" usage_sort_dates: name: sort in: query description: | Sort field. You *really* only want to sort by `usage_timestamp` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned. schema: type: string "$ref": "#/components/schemas/UsageSortEnum" billing_status: name: billing_status in: query description: Filter by usage record's billing status schema: type: string "$ref": "#/components/schemas/BillingStatusEnum" filter_state: name: state in: query description: Filter by state. schema: "$ref": "#/components/schemas/ActiveStateEnum" filter_subscription_state: name: state in: query description: | Filter by state. - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned. - When `state=in_trial`, only subscriptions that have a trial_started_at date earlier than now and a trial_ends_at date later than now will be returned. - When `state=live`, only subscriptions that are in an active, canceled, or future state or are in trial will be returned. schema: "$ref": "#/components/schemas/FilterSubscriptionStateEnum" + filter_limited_subscription_state: + name: state + in: query + description: | + Filter the entitlements based on the state of the applicable subscription. + + - When `state=active`, `state=canceled`, `state=expired`, or `state=future`, subscriptions with states that match the query and only those subscriptions will be returned. + - When no state is provided, subscriptions with active or canceled states will be returned. + schema: + "$ref": "#/components/schemas/FilterLimitedSubscriptionStateEnum" filter_begin_time: name: begin_time in: query description: | Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_end_time: name: end_time in: query description: | Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_usage_begin_time: name: begin_time in: query description: | Inclusively filter by begin_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_usage_end_time: name: end_time in: query description: | Inclusively filter by end_time when `sort=usage_timestamp` or `sort=recorded_timestamp`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC. schema: type: string format: date-time filter_account_email: name: email in: query description: Filter for accounts with this exact email address. A blank value will return accounts with both `null` and `""` email addresses. Note that multiple accounts can share one email address. schema: type: string filter_account_subscriber: name: subscriber in: query description: | Filter for accounts with or without a subscription in the `active`, `canceled`, or `future` state. schema: type: boolean filter_account_past_due: name: past_due in: query description: Filter for accounts with an invoice in the `past_due` state. schema: "$ref": "#/components/schemas/TrueEnum" filter_line_item_original: name: original in: query description: Filter by original field. schema: "$ref": "#/components/schemas/TrueEnum" filter_line_item_state: name: state in: query description: Filter by state field. schema: "$ref": "#/components/schemas/LineItemStateEnum" filter_line_item_type: name: type in: query description: Filter by type field. schema: "$ref": "#/components/schemas/LineItemTypeEnum" filter_transaction_type: name: type in: query description: Filter by type field. The value `payment` will return both `purchase` and `capture` transactions. schema: "$ref": "#/components/schemas/FilterTransactionTypeEnum" filter_transaction_success: name: success in: query description: Filter by success field. schema: "$ref": "#/components/schemas/TrueEnum" filter_invoice_type: name: type in: query description: | Filter by type when: - `type=charge`, only charge invoices will be returned. - `type=credit`, only credit invoices will be returned. - `type=non-legacy`, only charge and credit invoices will be returned. - `type=legacy`, only legacy invoices will be returned. schema: "$ref": "#/components/schemas/FilterInvoiceTypeEnum" export_date: name: export_date in: path description: Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format. required: true schema: type: string securitySchemes: api_key: type: http description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page. scheme: basic schemas: Empty: type: object properties: {} BinaryFile: type: string format: binary readOnly: true AccountAcquisitionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AccountAcquisition" AccountList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Account" AccountNoteList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AccountNote" AddOnList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/AddOn" BillingInfoList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/BillingInfo" CreditPaymentList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CreditPayment" CouponList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Coupon" CouponRedemptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CouponRedemption" CustomFieldDefinitionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/CustomFieldDefinition" ItemList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Item" InvoiceList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Invoice" MeasuredUnitList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/MeasuredUnit" LineItemList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/LineItem" PlanList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Plan" SiteList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Site" ShippingMethodList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/ShippingMethod" SubscriptionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Subscription" TransactionList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Transaction" Account: allOf: - "$ref": "#/components/schemas/AccountReadOnly" - "$ref": "#/components/schemas/AccountResponse" AccountAcquisition: allOf: - "$ref": "#/components/schemas/AccountAcquisitionUpdate" - "$ref": "#/components/schemas/AccountAcquisitionReadOnly" AccountAcquisitionUpdate: type: object properties: cost: type: object x-class-name: AccountAcquisitionCost title: Account balance items: type: object properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 amount: type: number format: float title: Amount description: The amount of the corresponding currency used to acquire the account. channel: description: The channel through which the account was acquired. "$ref": "#/components/schemas/ChannelEnum" subchannel: type: string description: An arbitrary subchannel string representing a distinction/subcategory within a broader channel. campaign: type: string description: An arbitrary identifier for the marketing campaign that led to the acquisition of this account. AccountAcquisitionReadOnly: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true account: "$ref": "#/components/schemas/AccountMini" created_at: type: string format: date-time description: When the account acquisition data was created. readOnly: true updated_at: type: string format: date-time description: When the account acquisition data was last changed. readOnly: true AccountReadOnly: type: object properties: id: type: string maxLength: 13 readOnly: true object: type: string title: Object type readOnly: true state: description: Accounts can be either active or inactive. readOnly: true "$ref": "#/components/schemas/ActiveStateEnum" hosted_login_token: type: string description: '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}`.' @@ -21584,1237 +21627,1313 @@ components: amount: type: number format: float title: Amount description: The total amount of the transcaction. Cannot excceed the invoice total. collected_at: type: string format: date-time title: Collected At description: Datetime that the external payment was collected. Defaults to current datetime. UniqueCouponCode: type: object description: A unique coupon code for a bulk coupon. properties: id: type: string title: Unique Coupon Code ID readOnly: true object: type: string title: Object type readOnly: true code: type: string title: Coupon code description: The code the customer enters to redeem the coupon. state: title: State description: Indicates if the unique coupon code is redeemable or why not. "$ref": "#/components/schemas/CouponCodeStateEnum" bulk_coupon_id: type: string title: Bulk Coupon ID description: The Coupon ID of the parent Bulk Coupon readOnly: true bulk_coupon_code: type: string title: Bulk Coupon code description: The Coupon code of the parent Bulk Coupon created_at: type: string title: Created at format: date-time readOnly: true updated_at: type: string title: Updated at format: date-time readOnly: true redeemed_at: type: string title: Redeemed at description: The date and time the unique coupon code was redeemed. format: date-time readOnly: true expired_at: type: string title: Expired at description: The date and time the coupon was expired early or reached its `max_redemptions`. format: date-time UniqueCouponCodeList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/UniqueCouponCode" UniqueCouponCodeParams: type: object description: Parameters to be passed to the `list_unique_coupon_codes` endpoint to obtain the newly generated codes. properties: limit: type: integer title: The number of UniqueCouponCodes that will be generated order: type: string title: Sort order to list newly generated UniqueCouponCodes (should always be `asc`) sort: type: string title: Sort field to list newly generated UniqueCouponCodes (should always be `created_at`) begin_time: type: string title: Begin time query parameter description: The date-time to be included when listing UniqueCouponCodes format: date-time Usage: type: object properties: id: type: string object: type: string title: Object type merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). usage_type: "$ref": "#/components/schemas/UsageTypeEnum" tier_type: "$ref": "#/components/schemas/TierTypeEnum" tiers: type: array title: Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnTier" description: The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = [] percentage_tiers: type: array title: Percentage Tiers items: "$ref": "#/components/schemas/SubscriptionAddOnPercentageTier" description: The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = [] measured_unit_id: type: string description: The ID of the measured unit associated with the add-on the usage record is for. recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. usage_percentage: type: number format: float title: Usage Percentage description: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. unit_amount: type: number format: float title: Unit price unit_amount_decimal: type: string title: Unit Amount Decimal minimum: 0 maximum: 1000000 description: Unit price that can optionally support a sub-cent value. billed_at: type: string format: date-time description: When the usage record was billed on an invoice. created_at: type: string format: date-time description: When the usage record was created in Recurly. updated_at: type: string format: date-time description: When the usage record was billed on an invoice. UsageCreate: type: object properties: merchant_tag: type: string description: Custom field for recording the id in your own system associated with the usage, so you can provide auditable usage displays to your customers using a GET on this endpoint. amount: type: number format: float description: The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). recording_timestamp: type: string format: date-time description: When the usage was recorded in your system. usage_timestamp: type: string format: date-time description: When the usage actually happened. This will define the line item dates this usage is billed under and is important for revenue recognition. UsageList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/Usage" User: type: object properties: id: type: string readOnly: true object: type: string title: Object type readOnly: true email: type: string format: email first_name: type: string last_name: type: string time_zone: type: string created_at: type: string format: date-time readOnly: true deleted_at: type: string format: date-time readOnly: true PurchaseCreate: type: object description: A purchase is only a request data type and is not persistent in Recurly, an InvoiceCollection will be the returned type. properties: currency: type: string title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 account: "$ref": "#/components/schemas/AccountPurchase" billing_info_id: type: string description: The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature. collection_method: title: Collection method description: Must be set to manual in order to preview a purchase for an Account that does not have payment information associated with the Billing Info. default: automatic "$ref": "#/components/schemas/CollectionMethodEnum" po_number: type: string title: Purchase order number description: For manual invoicing, this identifies the PO number associated with the subscription. maxLength: 50 net_terms: type: integer title: Net terms description: Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly. minimum: 0 default: 0 terms_and_conditions: type: string title: Terms and conditions description: Terms and conditions to be put on the purchase invoice. customer_notes: type: string title: Customer notes vat_reverse_charge_notes: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. credit_customer_notes: type: string title: Credit customer notes description: Notes to be put on the credit invoice resulting from credits in the purchase, if any. gateway_code: type: string title: Gateway Code description: The default payment gateway identifier to be used for the purchase transaction. This will also be applied as the default for any subscriptions included in the purchase request. maxLength: 13 shipping: type: object x-class-name: ShippingPurchase properties: address_id: type: string title: Shipping address ID description: Assign a shipping address from the account's existing shipping addresses. If this and `address` are both present, `address` will take precedence. maxLength: 13 address: "$ref": "#/components/schemas/ShippingAddressCreate" fees: type: array title: Shipping fees description: A list of shipping fees to be created as charges with the purchase. items: "$ref": "#/components/schemas/ShippingFeeCreate" line_items: type: array title: Line items description: A list of one time charges or credits to be created with the purchase. items: "$ref": "#/components/schemas/LineItemCreate" subscriptions: type: array title: Subscriptions description: A list of subscriptions to be created with the purchase. items: "$ref": "#/components/schemas/SubscriptionPurchase" coupon_codes: type: array title: Coupon codes description: A list of coupon_codes to be redeemed on the subscription or account during the purchase. items: type: string gift_card_redemption_code: type: string title: Gift card redemption code description: A gift card redemption code to be redeemed on the purchase invoice. transaction_type: description: An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions. "$ref": "#/components/schemas/GatewayTransactionTypeEnum" required: - currency - account DunningCampaign: type: object description: Settings for a dunning campaign. properties: id: type: string object: type: string title: Object type code: type: string description: Campaign code. name: type: string description: Campaign name. description: type: string description: Campaign description. default_campaign: type: boolean description: Whether or not this is the default campaign for accounts or plans without an assigned dunning campaign. dunning_cycles: type: array description: Dunning Cycle settings. items: "$ref": "#/components/schemas/DunningCycle" created_at: type: string format: date-time description: When the current campaign was created in Recurly. updated_at: type: string format: date-time description: When the current campaign was updated in Recurly. deleted_at: type: string format: date-time description: When the current campaign was deleted in Recurly. DunningCampaignList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/DunningCampaign" DunningCycle: type: object properties: type: "$ref": "#/components/schemas/DunningCycleTypeEnum" applies_to_manual_trial: type: boolean description: Whether the dunning settings will be applied to manual trials. Only applies to trial cycles. first_communication_interval: type: integer description: The number of days after a transaction failure before the first dunning email is sent. send_immediately_on_hard_decline: type: boolean description: Whether or not to send an extra email immediately to customers whose initial payment attempt fails with either a hard decline or invalid billing info. intervals: type: array description: Dunning intervals. items: "$ref": "#/components/schemas/DunningInterval" expire_subscription: type: boolean description: Whether the subscription(s) should be cancelled at the end of the dunning cycle. fail_invoice: type: boolean description: Whether the invoice should be failed at the end of the dunning cycle. total_dunning_days: type: integer description: The number of days between the first dunning email being sent and the end of the dunning cycle. total_recycling_days: type: integer description: The number of days between a transaction failure and the end of the dunning cycle. version: type: integer description: Current campaign version. created_at: type: string format: date-time description: When the current settings were created in Recurly. updated_at: type: string format: date-time description: When the current settings were updated in Recurly. DunningInterval: properties: days: type: integer description: Number of days before sending the next email. email_template: type: string description: Email template being used. DunningCampaignsBulkUpdate: properties: plan_codes: type: array maxItems: 200 description: List of `plan_codes` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_ids` is present. items: type: string plan_ids: type: array maxItems: 200 description: List of `plan_ids` associated with the Plans for which the dunning campaign should be updated. Required unless `plan_codes` is present. items: type: string DunningCampaignsBulkUpdateResponse: properties: object: type: string title: Object type readOnly: true plans: type: array title: Plans description: An array containing all of the `Plan` resources that have been updated. maxItems: 200 items: "$ref": "#/components/schemas/Plan" + Entitlements: + type: object + description: A list of privileges granted to a customer through the purchase + of a plan or item. + properties: + object: + type: string + title: Object Type + has_more: + type: boolean + description: Indicates there are more results on subsequent pages. + next: + type: string + description: Path to subsequent page of results. + data: + type: array + items: + "$ref": "#/components/schemas/Entitlement" + Entitlement: + type: object + properties: + object: + type: string + description: Entitlement + customer_permission: + "$ref": "#/components/schemas/CustomerPermission" + granted_by: + type: array + description: Subscription or item that granted the customer permission. + items: + "$ref": "#/components/schemas/GrantedBy" + created_at: + type: string + format: date-time + description: Time object was created. + updated_at: + type: string + format: date-time + description: Time the object was last updated + CustomerPermission: + type: object + properties: + id: + type: string + description: Customer permission ID. + code: + type: string + description: Customer permission code. + name: + type: string + description: Customer permission name. + description: + type: string + description: Description of customer permission. + object: + type: string + description: It will always be "customer_permission". + GrantedBy: + type: object + description: The subscription or external subscription that grants customer + permissions. + properties: + object: + type: string + title: Object Type + id: + type: string + description: The ID of the subscription or external subscription that grants + the permission to the account. InvoiceTemplateList: type: object properties: object: type: string title: Object type description: Will always be List. has_more: type: boolean description: Indicates there are more results on subsequent pages. next: type: string description: Path to subsequent page of results. data: type: array items: "$ref": "#/components/schemas/InvoiceTemplate" InvoiceTemplate: type: object description: Settings for an invoice template. properties: id: type: string code: type: string description: Invoice template code. name: type: string description: Invoice template name. description: type: string description: Invoice template description. created_at: type: string format: date-time description: When the invoice template was created in Recurly. updated_at: type: string format: date-time description: When the invoice template was updated in Recurly. PaymentMethod: properties: object: "$ref": "#/components/schemas/PaymentMethodEnum" card_type: description: Visa, MasterCard, American Express, Discover, JCB, etc. "$ref": "#/components/schemas/CardTypeEnum" first_six: type: string description: Credit card number's first six digits. maxLength: 6 last_four: type: string description: Credit card number's last four digits. Will refer to bank account if payment method is ACH. maxLength: 4 last_two: type: string description: The IBAN bank account's last two digits. maxLength: 2 exp_month: type: integer description: Expiration month. maxLength: 2 exp_year: type: integer description: Expiration year. maxLength: 4 gateway_token: type: string description: A token used in place of a credit card in order to perform transactions. maxLength: 50 cc_bin_country: type: string description: The 2-letter ISO 3166-1 alpha-2 country code associated with the credit card BIN, if known by Recurly. Available on the BillingInfo object only. Available when the BIN country lookup feature is enabled. gateway_code: type: string description: An identifier for a specific payment gateway. maxLength: 13 billing_agreement_id: type: string description: Billing Agreement identifier. Only present for Amazon or Paypal payment methods. name_on_account: type: string description: The name associated with the bank account. account_type: description: The bank account type. Only present for ACH payment methods. "$ref": "#/components/schemas/AccountTypeEnum" routing_number: type: string description: The bank account's routing number. Only present for ACH payment methods. routing_number_bank: type: string description: The bank name of this routing number. username: type: string description: Username of the associated payment method. Currently only associated with Venmo. Error: type: object properties: type: title: Type "$ref": "#/components/schemas/ErrorTypeEnum" message: type: string title: Message params: type: array title: Parameter specific errors items: type: object properties: param: type: string ErrorMayHaveTransaction: allOf: - "$ref": "#/components/schemas/Error" - type: object properties: transaction_error: type: object x-class-name: TransactionError title: Transaction error details description: This is only included on errors with `type=transaction`. properties: object: type: string title: Object type transaction_id: type: string title: Transaction ID maxLength: 13 category: title: Category "$ref": "#/components/schemas/ErrorCategoryEnum" code: title: Code "$ref": "#/components/schemas/ErrorCodeEnum" message: type: string title: Customer message merchant_advice: type: string title: Merchant message three_d_secure_action_token_id: type: string title: 3-D Secure action token id description: Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow. maxLength: 22 RelatedTypeEnum: type: string enum: - account - item - subscription RefundTypeEnum: type: string enum: - full - none - partial AlphanumericSortEnum: type: string enum: - asc - desc UsageSortEnum: type: string default: usage_timestamp enum: - recorded_timestamp - usage_timestamp UsageTypeEnum: type: string enum: - price - percentage title: Usage Type description: Type of usage, returns usage type if `add_on_type` is `usage`. BillingStatusEnum: type: string default: unbilled enum: - unbilled - billed - all TimestampSortEnum: type: string enum: - created_at - updated_at ActiveStateEnum: type: string enum: - active - inactive FilterSubscriptionStateEnum: type: string enum: - active - canceled - expired - future - in_trial - live + FilterLimitedSubscriptionStateEnum: + type: string + enum: + - active + - canceled + - expired + - future TrueEnum: type: string enum: - true LineItemStateEnum: type: string enum: - invoiced - pending LineItemTypeEnum: type: string enum: - charge - credit FilterTransactionTypeEnum: type: string enum: - authorization - capture - payment - purchase - refund - verify FilterInvoiceTypeEnum: type: string enum: - charge - credit - legacy - non-legacy ChannelEnum: type: string enum: - advertising - blog - direct_traffic - email - events - marketing_content - organic_search - other - outbound_sales - paid_search - public_relations - referral - social_media PreferredLocaleEnum: type: string enum: - da-DK - de-CH - de-DE - en-AU - en-CA - en-GB - en-IE - en-NZ - en-US - es-ES - es-MX - es-US - fi-FI - fr-CA - fr-FR - hi-IN - it-IT - ja-JP - ko-KR - nl-BE - nl-NL - pl-PL - pt-BR - pt-PT - ro-RO - ru-RU - sk-SK - sv-SE - tr-TR - zh-CN BillToEnum: type: string enum: - parent - self GatewayTransactionTypeEnum: type: string enum: - moto KountDecisionEnum: type: string enum: - approve - decline - escalate - review CouponStateEnum: type: string enum: - expired - maxed_out - redeemable CouponDurationEnum: type: string enum: - forever - single_use - temporal TemporalUnitEnum: type: string enum: - day - month - week - year FreeTrialUnitEnum: type: string enum: - day - month - week RedemptionResourceEnum: type: string enum: - account - subscription CouponTypeEnum: type: string enum: - bulk - single_code DiscountTypeEnum: type: string enum: - fixed - free_trial - percent AddOnSourceEnum: type: string title: Add-on source description: | Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog. default: plan_add_on enum: - plan_add_on - item AddOnTypeEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. AddOnTypeCreateEnum: type: string enum: - fixed - usage title: Add-on Type description: Whether the add-on type is fixed, or usage-based. default: fixed UsageTypeCreateEnum: type: string enum: - price - percentage title: Usage Type description: | Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. TierTypeEnum: type: string title: Tier type description: | The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. default: flat enum: - flat - tiered - stairstep - volume UsageTimeframeEnum: type: string title: Usage Timeframe description: The time at which usage totals are reset for billing purposes. enum: - billing_period - subscription_term default: billing_period UsageTimeframeCreateEnum: type: string title: Usage Timeframe description: | The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. enum: - billing_period - subscription_term default: billing_period CreditPaymentActionEnum: type: string enum: - payment - reduction - refund - write_off UserAccessEnum: type: string enum: - api_only - read_only - write PricingModelTypeEnum: type: string enum: - fixed - ramp default: fixed description: | A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease. RevenueScheduleTypeEnum: type: string enum: - at_range_end - at_range_start - evenly - never InvoiceTypeEnum: type: string enum: - charge - credit - legacy OriginEnum: type: string enum: - carryforward_credit - carryforward_gift_credit - credit - external_refund - gift_card - immediate_change - import - line_item_refund - open_amount_refund - prepayment - purchase - refund - renewal - termination - usage_correction - write_off InvoiceStateEnum: type: string enum: - open - pending - processing - past_due - paid - closed - failed - voided CollectionMethodEnum: type: string enum: - automatic - manual InvoiceRefundTypeEnum: type: string enum: - amount - line_items RefuneMethodEnum: type: string enum: - all_credit - all_transaction - credit_first - transaction_first ExternalPaymentMethodEnum: type: string enum: - ach - amazon - apple_pay - check - credit_card - eft - money_order - other - paypal - roku - sepadirectdebit - wire_transfer LineItemRevenueScheduleTypeEnum: type: string enum: - at_invoice - at_range_end - at_range_start - evenly - never LegacyCategoryEnum: type: string enum: - applied_credit - carryforward - charge - credit LineItemOriginEnum: type: string enum: - add_on - add_on_trial - carryforward - coupon - credit - debit - one_time - plan - plan_trial - setup_fee - prepayment FullCreditReasonCodeEnum: type: string enum: - general - gift_card - promotional - refund - service - write_off PartialCreditReasonCodeEnum: type: string enum: - general - promotional - service LineItemCreateOriginEnum: type: string enum: - external_gift_card - prepayment IntervalUnitEnum: type: string enum: - days - months AddressRequirementEnum: type: string enum: - full - none - streetzip - zip SiteModeEnum: type: string enum: - development - production - sandbox FeaturesEnum: type: string enum: - credit_memos - manual_invoicing - only_bill_what_changed - subscription_terms SubscriptionStateEnum: type: string enum: - active - canceled - expired - failed - future - paused TimeframeEnum: type: string enum: - bill_date - term_end ChangeTimeframeEnum: type: string enum: - bill_date - now - renewal - term_end TransactionTypeEnum: type: string enum: - authorization - capture - purchase - refund - verify TransactionOriginEnum: type: string enum: - api - chargeback - force_collect - hpp - merchant - recurly_admin - recurlyjs - recurring - refunded_externally - transparent TransactionStatusEnum: type: string enum: - chargeback - declined - error - pending - processing - scheduled - success - void CvvCheckEnum: type: string enum: - D - I - M - N - P - S - U - X AvsCheckEnum: type: string enum: - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z CouponCodeStateEnum: type: string enum: - expired - inactive - maxed_out - redeemable PaymentMethodEnum: type: string enum: - amazon - amazon_billing_agreement - apple_pay - bank_account_info - check - credit_card - eft - gateway_token - iban_bank_account - money_order - other - paypal - paypal_billing_agreement - roku - sepadirectdebit - venmo - wire_transfer - braintree_v_zero CardTypeEnum: type: string enum: - American Express - Dankort - Diners Club - Discover - Forbrugsforeningen - JCB - Laser - Maestro - MasterCard - Test Card
recurly/recurly-client-php
85eec8e16a6d24a68874f353f991eb4f49485d7a
4.22.0
diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 294f3cc..696df2b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,11 @@ [bumpversion] -current_version = 4.21.2 +current_version = 4.22.0 parse = (?P<major>\d+) \.(?P<minor>\d+) \.(?P<patch>\d+) serialize = {major}.{minor}.{patch} [bumpversion:file:composer.json] [bumpversion:file:lib/recurly/version.php] diff --git a/CHANGELOG.md b/CHANGELOG.md index 348827f..5893ae3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,286 +1,300 @@ # Changelog +## [4.22.0](https://github.com/recurly/recurly-client-php/tree/4.22.0) (2022-10-21) + +[Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.2...4.22.0) + + +**Merged Pull Requests** + +- Generated Latest Changes for v2021-02-25(Decimal Usage and Quantities and DunningEvent new fields) [#722](https://github.com/recurly/recurly-client-php/pull/722) ([recurly-integrations](https://github.com/recurly-integrations)) + + + ## [4.21.2](https://github.com/recurly/recurly-client-php/tree/4.21.2) (2022-09-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.1...4.21.2) +**Merged Pull Requests** + +- feat: allow for psr/log ^2/3 [#716](https://github.com/recurly/recurly-client-php/pull/716) ([trickeyone](https://github.com/trickeyone)) ## [4.21.1](https://github.com/recurly/recurly-client-php/tree/4.21.1) (2022-09-08) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.21.0...4.21.1) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#714](https://github.com/recurly/recurly-client-php/pull/714) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.21.0](https://github.com/recurly/recurly-client-php/tree/4.21.0) (2022-09-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.20.0...4.21.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#713](https://github.com/recurly/recurly-client-php/pull/713) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixes bug with putDunningCampaignBulkUpdate [#706](https://github.com/recurly/recurly-client-php/pull/706) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.20.0](https://github.com/recurly/recurly-client-php/tree/4.20.0) (2022-08-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.19.0...4.20.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#701](https://github.com/recurly/recurly-client-php/pull/701) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.19.0](https://github.com/recurly/recurly-client-php/tree/4.19.0) (2022-07-07) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.18.0...4.19.0) **Merged Pull Requests** - Fixing deprecation warnings in client [#697](https://github.com/recurly/recurly-client-php/pull/697) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#695](https://github.com/recurly/recurly-client-php/pull/695) ([recurly-integrations](https://github.com/recurly-integrations)) **Closed Issues** - Recurly\Pager and \Iterator return type mismatch (PHP 8.1 deprecation) [#677](https://github.com/recurly/recurly-client-php/issues/677) ## [4.18.0](https://github.com/recurly/recurly-client-php/tree/4.18.0) (2022-06-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.17.0...4.18.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#693](https://github.com/recurly/recurly-client-php/pull/693) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.17.0](https://github.com/recurly/recurly-client-php/tree/4.17.0) (2022-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.16.0...4.17.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#679](https://github.com/recurly/recurly-client-php/pull/679) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.16.0](https://github.com/recurly/recurly-client-php/tree/4.16.0) (2022-03-24) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.15.0...4.16.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#676](https://github.com/recurly/recurly-client-php/pull/676) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.15.0](https://github.com/recurly/recurly-client-php/tree/4.15.0) (2022-03-14) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.14.0...4.15.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Percentage tiers feature) [#668](https://github.com/recurly/recurly-client-php/pull/668) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.14.0](https://github.com/recurly/recurly-client-php/tree/4.14.0) (2022-03-03) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.13.0...4.14.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#664](https://github.com/recurly/recurly-client-php/pull/664) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.13.0](https://github.com/recurly/recurly-client-php/tree/4.13.0) (2022-01-31) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.12.0...4.13.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#655](https://github.com/recurly/recurly-client-php/pull/655) ([recurly-integrations](https://github.com/recurly-integrations)) - Add region argument to client to connect in EU data center [#653](https://github.com/recurly/recurly-client-php/pull/653) ([FabricioCoutinho](https://github.com/FabricioCoutinho)) ## [4.12.0](https://github.com/recurly/recurly-client-php/tree/4.12.0) (2022-01-28) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.11.0...4.12.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Invoice Customization) [#654](https://github.com/recurly/recurly-client-php/pull/654) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#651](https://github.com/recurly/recurly-client-php/pull/651) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.11.0](https://github.com/recurly/recurly-client-php/tree/4.11.0) (2021-12-29) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.10.0...4.11.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Tax Inclusive Pricing) [#650](https://github.com/recurly/recurly-client-php/pull/650) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.10.0](https://github.com/recurly/recurly-client-php/tree/4.10.0) (2021-11-22) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.9.0...4.10.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#647](https://github.com/recurly/recurly-client-php/pull/647) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#645](https://github.com/recurly/recurly-client-php/pull/645) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#644](https://github.com/recurly/recurly-client-php/pull/644) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#639](https://github.com/recurly/recurly-client-php/pull/639) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.9.0](https://github.com/recurly/recurly-client-php/tree/4.9.0) (2021-09-16) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.8.0...4.9.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Support to new subscription fields and response) [#633](https://github.com/recurly/recurly-client-php/pull/633) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.8.0](https://github.com/recurly/recurly-client-php/tree/4.8.0) (2021-09-01) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.7.0...4.8.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Dunning Campaigns feature) [#632](https://github.com/recurly/recurly-client-php/pull/632) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.7.0](https://github.com/recurly/recurly-client-php/tree/4.7.0) (2021-08-19) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.6.0...4.7.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (get_preview_renewal) [#630](https://github.com/recurly/recurly-client-php/pull/630) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.6.0](https://github.com/recurly/recurly-client-php/tree/4.6.0) (2021-08-11) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.5.0...4.6.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#628](https://github.com/recurly/recurly-client-php/pull/628) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.5.0](https://github.com/recurly/recurly-client-php/tree/4.5.0) (2021-08-02) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.4.0...4.5.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#623](https://github.com/recurly/recurly-client-php/pull/623) ([recurly-integrations](https://github.com/recurly-integrations)) - Fixing issue with http_build_query converting booleans in params to integers [#621](https://github.com/recurly/recurly-client-php/pull/621) ([ZloeSabo](https://github.com/ZloeSabo)) ## [4.4.0](https://github.com/recurly/recurly-client-php/tree/4.4.0) (2021-06-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.3.0...4.4.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#613](https://github.com/recurly/recurly-client-php/pull/613) ([recurly-integrations](https://github.com/recurly-integrations)) - Add PHP 8.0 to travis matrix [#592](https://github.com/recurly/recurly-client-php/pull/592) ([douglasmiller](https://github.com/douglasmiller)) ## [4.3.0](https://github.com/recurly/recurly-client-php/tree/4.3.0) (2021-06-04) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.2.0...4.3.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#612](https://github.com/recurly/recurly-client-php/pull/612) ([recurly-integrations](https://github.com/recurly-integrations)) - Adding psr/log requirement to composer.json [#611](https://github.com/recurly/recurly-client-php/pull/611) ([douglasmiller](https://github.com/douglasmiller)) ## [4.2.0](https://github.com/recurly/recurly-client-php/tree/4.2.0) (2021-04-21) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.1.0...4.2.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 [#606](https://github.com/recurly/recurly-client-php/pull/606) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.1.0](https://github.com/recurly/recurly-client-php/tree/4.1.0) (2021-04-15) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.1...4.1.0) **Merged Pull Requests** - Generated Latest Changes for v2021-02-25 (Backup Payment Method) [#603](https://github.com/recurly/recurly-client-php/pull/603) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 [#599](https://github.com/recurly/recurly-client-php/pull/599) ([recurly-integrations](https://github.com/recurly-integrations)) - Generated Latest Changes for v2021-02-25 (Usage Percentage on Tiers) [#598](https://github.com/recurly/recurly-client-php/pull/598) ([recurly-integrations](https://github.com/recurly-integrations)) ## [4.0.1](https://github.com/recurly/recurly-client-php/tree/4.0.1) (2021-03-23) [Full Changelog](https://github.com/recurly/recurly-client-php/compare/4.0.0...4.0.1) **Merged Pull Requests** - Release 4.0.1 [#596](https://github.com/recurly/recurly-client-php/pull/596) ([douglasmiller](https://github.com/douglasmiller)) - Generated Latest Changes for v2021-02-25 [#595](https://github.com/recurly/recurly-client-php/pull/595) ([recurly-integrations](https://github.com/recurly-integrations)) - Sync updates not ported from 3.x client [#590](https://github.com/recurly/recurly-client-php/pull/590) ([douglasmiller](https://github.com/douglasmiller)) - Replace empty() with is_null() [#588](https://github.com/recurly/recurly-client-php/pull/588) ([joannasese](https://github.com/joannasese)) ## [4.0.0](https://github.com/recurly/recurly-client-php/tree/4.0.0) (2021-03-01) diff --git a/composer.json b/composer.json index fd582e5..f4715ca 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,38 @@ { "name": "recurly/recurly-client", - "version": "4.21.2", + "version": "4.22.0", "type": "library", "description": "The PHP client library for the Recurly API", "keywords": ["recurly", "payments", "pay"], "homepage": "https://github.com/recurly/recurly-client-php", "license": "MIT", "authors": [], "require": { "php": ">= 7.2.0", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "phpcompatibility/php-compatibility": "^9.3", "phpdocumentor/phpdocumentor": "~3.0.0", "phpstan/phpstan": "^0.12.11", "phpunit/phpunit": "^8", "squizlabs/php_codesniffer": "^3.5" }, "autoload": { "classmap": ["lib"], "files": ["lib/recurly.php"] }, "autoload-dev": { "classmap": ["tests"] }, "config": { "preferred-install": "dist", "sort-packages": true, "optimize-autoloader": true, "allow-plugins": { "symfony/flex": true, "dealerdirect/phpcodesniffer-composer-installer": true } } } diff --git a/lib/recurly/version.php b/lib/recurly/version.php index b1cc2d0..7d4e0f3 100644 --- a/lib/recurly/version.php +++ b/lib/recurly/version.php @@ -1,8 +1,8 @@ <?php namespace Recurly; class Version { - public const CURRENT = '4.21.2'; + public const CURRENT = '4.22.0'; }
choosy-app/choosy-help
a355f03b8c4d60aa3c85f2a725b1ef4e0c5117fa
Document Shortcuts integration.
diff --git a/ChoosyHelp.help/Contents/Resources/index.html b/ChoosyHelp.help/Contents/Resources/index.html index 71a65f9..7e3d4ff 100644 --- a/ChoosyHelp.help/Contents/Resources/index.html +++ b/ChoosyHelp.help/Contents/Resources/index.html @@ -1,66 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Contents</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style/main.css" type="text/css" media="all" /> <meta name="AppleTitle" content="Choosy Help" /> <meta name="AppleIcon" content="ChoosyHelp/images/icon.png" /> </head> <body> <a name="ChoosyHelpContents"></a> <h1>Choosy Help</h1> <h2>Contents</h2> <ul> <li> <h3>Getting started</h3> <p>The basics: What Choosy can do and how to use it.</p> <ul> <li><a href="basic/choosy.html">What is Choosy?</a></li> <li><a href="basic/installation.html">Installation guide</a></li> <li><a href="basic/configuration.html">Configuration guide</a></li> </ul> </li> <li> <h3>Choosy settings</h3> <p>Detailed information on all of Choosy's settings.</p> <ul> <li><a href="settings/browsers.html">Browser settings</a></li> <li> <a href="settings/rules.html">Rule settings</a> <ul> <li><a href="settings/rules/urls.html">Web address rules</a></li> <li><a href="settings/rules/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> </ul> </li> <li><a href="settings/prompt.html">Prompt settings</a></li> <li><a href="settings/advanced.html">Advanced settings</a></li> </ul> </li> <li> <h3>Miscelaneous topics</h3> <ul> + <li><a href="misc/shortcuts.html">Shortcuts integration</a></li> <li><a href="misc/browsers.html">Browser integration</a></li> <li><a href="misc/uninstalling.html">Uninstalling Choosy</a></li> <li><a href="misc/registration.html">Trials &amp; registration</a></li> </ul> </li> <li> <h3>Online resources</h3> <p>More help and resources on the internet.</p> <ul> <li><a href="https://choosy.app">Choosy web site</a></li> <li class="vcard"><a class="url" href="https://www.georgebrock.com"><span class="fn">George Brocklehurst</span>'s web site</a></li> <li><a href="https://mastodon.social/@choosy">@choosy on mastodon.social</a></li> </ul> </li> </ul> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/misc/shortcuts.html b/ChoosyHelp.help/Contents/Resources/misc/shortcuts.html new file mode 100644 index 0000000..6f7af58 --- /dev/null +++ b/ChoosyHelp.help/Contents/Resources/misc/shortcuts.html @@ -0,0 +1,34 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Choosy Help: Shortcuts integration</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> +</head> + +<body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Miscelaneous topics / + </p> + + <h1>Choosy Help: Shortcuts integration</h1> + + <p> + Choosy integrates with the macOS Shortcuts app, exposing two actions that + you can use in your Shortcuts: + </p> + + <ul> + <li>The <b>open a URL</b> action will open the given URL with Choosy, + applying your rules just as if you'd clicked on a link.</li> + <li>The <b>prompt to select a browser</b> action will prompt you to + select a browser from all the browsers in your list, and will send the + given URL to that browser.</li> + </ul> +</body> + +</html>
choosy-app/choosy-help
e24a4d84241c1d5a6d289255568b06adbf4668a2
Version bump: 2.4
diff --git a/ChoosyHelp.help/Contents/Info.plist b/ChoosyHelp.help/Contents/Info.plist index d7a7fcc..7cd8bdb 100644 --- a/ChoosyHelp.help/Contents/Info.plist +++ b/ChoosyHelp.help/Contents/Info.plist @@ -1,30 +1,30 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en-gb</string> <key>CFBundleIdentifier</key> <string>com.choosyosx.Choosy.help</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleSignature</key> <string>hbwr</string> <key>CFBundleName</key> <string>ChoosyHelp</string> <key>CFBundleShortVersionString</key> - <string>2.3.2</string> + <string>2.4</string> <key>HPDBookAccessPath</key> <string>index.html</string> <key>HPDBookIndexPath</key> <string>ChoosyHelp.helpindex</string> <key>HPDBookTitle</key> <string>Choosy Help</string> <key>HPDBookType</key> <string>3</string> <key>HPDBookIconPath</key> <string>images/icon.png</string> </dict> </plist>
choosy-app/choosy-help
0b9b05861374a9f31b5435952fcc365a079e8576
Expand URL matching info.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html b/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html index 727e5e6..d1cf10d 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html @@ -1,113 +1,118 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / <a href="../../settings/rules.html">Rules settings</a> / </p> <h1>Choosy Help: Web address rules</h1> <p> You can create rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains <code>facebook</code>&rdquo; matching addresses would include <code>https://www.facebook.com/</code> and <code>https://example.com/facebook</code> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>). For example, if the rule was &ldquo;begins with <code>https://www.google.</code>&rdquo; matching addresses would include <code>https://www.google.com/</code>, <code>https://www.google.co.uk/</code> and <code>https://www.google.com/search?q=choosy</code> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends - with <code>.pdf</code>&rdquo; it would match any direct links to PDF files. + with <code>.pdf</code>&rdquo; it would match URLs like <code>https://example.com/download.pdf</code>, but + not <code>https://example.com/download.pdf?key=123</code>. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. + The pattern must match the whole URL, which means you might need to add `*` character to + the beginning or end of the pattern. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> The pattern <code>a?c</code> would match <code>abc</code> but not <code>ac</code> or <code>abbc</code> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> The pattern <code>a*c</code> would match <code>ac</code>, <code>abc</code> and <code>abbc</code> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are not already familiar with regular expressions there are various web sites with indepth tutorials, several of which are linked from the <a href="https://en.wikipedia.org/wiki/Regular_expression">Wikipedia article on - regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the - <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU - project web site</a>. + regular expressions</a>. Choosy uses the ICU version of regular expressions; you can find documentation on the + <a href="https://unicode-org.github.io/icu/userguide/strings/regexp.html" title="ICU Regular Expressions documentation">ICU + project web site</a>. Your regular expression must match the whole pattern, which means you might need to add + <code>.*</code> to the beginning or end of the expression (if you're used to working with regular expressions, + you can think of the pattern as implicitly starting with <code>^</code> and ending with <code>$</code>). </dd> </dl> </body> </html>
choosy-app/choosy-help
c96d4a38e2febddca49603d79cca881b1bd0b651
System Preferences is called System Settings now.
diff --git a/ChoosyHelp.help/Contents/Resources/basic/configuration.html b/ChoosyHelp.help/Contents/Resources/basic/configuration.html index dca102d..cc9b7ac 100644 --- a/ChoosyHelp.help/Contents/Resources/basic/configuration.html +++ b/ChoosyHelp.help/Contents/Resources/basic/configuration.html @@ -1,118 +1,118 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Configuration guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: Configuration guide</h1> <p>A step by step guide to setting up Choosy.</p> <ol> <li> <h2>Set Choosy as your default browser</h2> <p> The first thing to do is to tell macOS that it should use Choosy as the default browser. This will allow Choosy to receive links you click on and decide which browser to send them to. </p> <p> Whenever Choosy isn't set as your default browser, it will display a prompt at the bottom of the settings window: </p> <img src="../images/basic_configuration_default.png" alt="A screenshot of Choosy's default browser prompt" width="601" height="66" /> <p> You can change also your macOS default browser any time in the macOS - System Preferences app. + <i>System Settings</i> app, in the <i>Desktop &amp; Dock</i> section. </p> </li> <li> <h2>Browsers</h2> <p> Next, set up the list of browsers that you want Choosy to use. When you first install Choosy the browser list will be populated with all the browsers that macOS knows are installed on your system. This list won't be perfect: it might include some apps that aren't really browsers, but happen to be able to open links; it might be missing some browsers, especially if you have more than one version of the same browser installed. </p> <p> The <strong>order of the browser list</strong> is important: they should be in order of preference, with the browser you'd most often like to use at the top. When we configure Choosy's rules, any settings that refer to the &ldquo;favourite&rdquo; browser are talking about the browser at the top of the list. Similarly settings that talk about the &ldquo;best running browser&rdquo; are referring to the running browser that is highest up the list. </p> <p> There are more details on how to edit your browsers list in the <a href="../settings/browsers.html">browser settings</a> section. </p> </li> <li> <h2>Rules</h2> <p> Next we should configure some rules. Rules tell Choosy what to do when you open a link. Each rule has two parts: the <i>conditions</i> when Choosy will apply the rule, and Choosy's <i>behaviour</i> when the rule is applied. </p> <p> For example, here's one of the default rules that Choosy sets up for you when first installed: </p> <img src="../images/basic_configuration_rule.png" alt="A screenshot of Choosy's rule editor, showing one of the default rules" width="640" height="355" /> <p> The condition for this rule is that some of the browsers in your browser list must be running. When that condition is met, the behaviour is for Choosy to prompt you to select from one of the running browsers. </p> <p> The <strong>order of the rules list</strong> is important: Choosy will try the rules in order, and use the first one where the conditions are met. The last rule in the list is special—it defines the default behaviour that will be used when no other rule is appropriate. </p> <p> There are more details about creating and editing rules in the <a href="../settings/rules.html">rules settings</a> section. </p> </li> <li> <h2>Browser plugins</h2> <p> If you want to use Choosy's functionality from inside your browser there are a variety of browser plugins and bookmarklets that you can install. There is more information in the <a href="../misc/browsers.html">browser integration</a> section. </p> </li> </ol> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html b/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html index a13fd41..5996018 100644 --- a/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html +++ b/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html @@ -1,43 +1,44 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Miscelaneous topics / </p> <h1>Choosy Help: Uninstalling Choosy</h1> <p>To remove Choosy from your system, follow these steps:</p> <ol> - <li>Open System Preference, and click <i>General</i>.</li> - <li>Change the <i>Default web browser</i> setting to something other than Choosy, e.g. <i>Safari</i> or <i>Google Chrome</i>.</li> + <li>Open <i>System Settings</i>, and click <i>Default &amp; Dock</i>.</li> + <li>Scroll down until you find the <i>Default web browser</i> setting.</li> + <li>Change the <i>Default web browser</i> to something other than Choosy, e.g. <i>Safari</i> or <i>Google Chrome</i>.</li> <li>Find <i>Choosy.app</i> in your Applications folder, and drag it to the trash.</li> </ol> <p> If you want to completely remove all traces of Choosy you can also remove Choosy's configuration files and user defaults. Note that if you do this, and later change your mind a re-install Choosy, you will have to configure it again. </p> <ol> <li>Remove settings files, by dragging the folder at <code>/Users/<var>you</var>/Application Support/Choosy</code> to the trash (replacing <var>you</var> with your username).</li> <li>Remove settings managed by macOS, by opening a Terminal and running the command <code>defaults delete com.choosyosx.choosy</code></li> </ol> </body> </html>
choosy-app/choosy-help
149228aad7225ac80b5878dfc2fd0d49e69950e6
Version bump: 2.3.2
diff --git a/ChoosyHelp.help/Contents/Info.plist b/ChoosyHelp.help/Contents/Info.plist index 1ffe014..d7a7fcc 100644 --- a/ChoosyHelp.help/Contents/Info.plist +++ b/ChoosyHelp.help/Contents/Info.plist @@ -1,30 +1,30 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en-gb</string> <key>CFBundleIdentifier</key> <string>com.choosyosx.Choosy.help</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleSignature</key> <string>hbwr</string> <key>CFBundleName</key> <string>ChoosyHelp</string> <key>CFBundleShortVersionString</key> - <string>1.2</string> + <string>2.3.2</string> <key>HPDBookAccessPath</key> <string>index.html</string> <key>HPDBookIndexPath</key> <string>ChoosyHelp.helpindex</string> <key>HPDBookTitle</key> <string>Choosy Help</string> <key>HPDBookType</key> <string>3</string> <key>HPDBookIconPath</key> <string>images/icon.png</string> </dict> </plist>
choosy-app/choosy-help
e338ebe431daa8bd73b07413225703f74ee73b62
Add information about browser profiles.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/browsers.html b/ChoosyHelp.help/Contents/Resources/settings/browsers.html index ed10c0c..a6b088c 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/browsers.html +++ b/ChoosyHelp.help/Contents/Resources/settings/browsers.html @@ -1,100 +1,133 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBrowsers"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Browsers tab. </p> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a browser app from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that macOS knows about, or to browse and select an app. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't a browser it may not function correctly. </p> - + + <h3>Add profiles</h3> + <p> + Many browsers allow you to have multiple profiles, for example to keep + your home and work browsing separately. Choosy is able to send links to + a specific profile in the following browsers: + </p> + + <ul> + <li>Google Chrome</li> + <li>Microsoft Edge</li> + <li>Brave Browser</li> + <li>Vivaldi</li> + </ul> + + <p> + To add a profile to your browser list: + </p> + + <ol> + <li>Click on the plus button below the browsers list.</li> + <li>Find the browser with the profile in the list.</li> + <li>Hover ovr that browser, and you will see a pop-out menu containing all of your profiles.</li> + </ol> + + <p> + Note that Choosy will do its best to determine the correct icon for your + profile, but may not always be able to do so. Microsoft Edge profile + images are not supported, and profiles in other browsers may sometimes + have to fall back to the browser's default icon. After changing a + profile's icon in your browser, you may need to restart Choosy to see + the change reflected in Choosy's browser list and prompt. + </p> + <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list, drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/rules.html">Rule settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html>
choosy-app/choosy-help
7fdbf2b2b03ca29ac13c0f11e72afb75ae3eb256
Add new criteria to help.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/rules.html b/ChoosyHelp.help/Contents/Resources/settings/rules.html index a7d7da1..604540d 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/rules.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules.html @@ -1,445 +1,477 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Rules settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsRules"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Rules settings</h1> <p> This page describes the settings on Choosy's &ldquo;Rules&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Rules tab. </p> <p> Rules allow you to define how Choosy will behave in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule double click on the rule in the list, or select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's rule editing interface" width="712" height="643" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use the rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" width="503" height="31" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" width="503" height="31" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will have a text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this type of criterion to set up a rule that sends all links to <code>google.com</code> to <i>Firefox</i>. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/rules/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). </p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" width="503" height="31" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a web site</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to web sites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" width="503" height="31" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" width="503" height="31" /> <p> This type of criterion lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up most of your rules to never prompt you to select a browser, with a single rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" width="503" height="31" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/https://www.google.com</code> </p> <p> The <a href="../settings/rules/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> <dt>URL shortening service</dt> <dd> <img src="../images/rule_editor_short_url.png" alt="A screenshot of a short URL criteron row in the rule editor" width="503" height="31" /> <p> - This type of criteria allow you to define rules that are only triggered when Choosy + This type of cirterion allows you to define rules that are only triggered when Choosy opens a link to a URL shortening service, like bit.ly or tinyurl. </p> <p> This is useful when combined with the <a href="../settings/advanced.html#short">short URL expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that you will be able to check the expanded URL in the prompt before you open the site in a browser. </p> <p> A list of supported URL shortening services, and instructions for adding your own are in the <a href="../settings/advanced.html#short">short URL expansion section on the advanced settings page</a>. </p> </dd> + + <dt>Airdrop</dt> + <dd> + <p> + Using this criterion allows you to specify what should happen when + a URL is sent to your Mac from another Apple device using Airdrop. + </p> + </dd> + + <dt>Share extension</dt> + <dd> + <p> + Choosy appears in the Share menu in other macOS apps. This criterion + allows you to specify what Choosy should do when URLs are sent to it + via the Share menu. + </p> + </dd> + + <dt>Handoff</dt> + <dd> + <p> + Handoff allows you to resume an activity from one of your other + Apple devices on your Mac, for example when you're browsing the Web + in Safari on your iPhone you can continue lookin at the same page + on your Mac. + </p> + <p> + As your default browser, Choosy is sent URLs from your other + devices when you use Handoff, and you can use this criterion to + define specific behaviour that Choosy should follow. + </p> + </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will skip forward to the default rule at the end of the rules list and use its behaviour, just as it would have done if no rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. If no browsers are running, Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. If no browsers are running, Choosy will prompt you to select from all of the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from these browsers &hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" width="600" height="219" /> </dd> <dt>Always use this browser &hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" width="600" height="120" /> </dd> <dt>Use all of these browsers &hellip;</dt> <dd> <p> Choosy will open all of the browsers you specify. The browsers will be opened in the order that you specify. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_all.png" alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" width="601" height="220" /> </dd> <dt>Open the macOS Share menu</dt> <dd> <p> Choosy will open the <a href="https://support.apple.com/en-gb/guide/mac-help/mh40614/mac">Share menu</a>, allowing you to send the link to a variety of non-browser apps. </p> <p> The exact set of options on this menu will vary depending on the apps you have installed on your Mac, but they will typically allow you to send the link to another person (e.g. using <i>Messages</i>, <i>Mail</i>, or <i>AirDrop</i>), or to save the link somewhere (e.g. in <i>Notes</i> or <i>Reminders</i>). </p> </dd> <dt>Use this sharing service &hellip;</dt> <dd> <p> Choosy will send the link directly to a specific item in the macOS Share menu. </p> <p> For example, if you make frequent use of Apple's <i>Reminders</i> app, you could create a Choosy rule to send links directly to <i>Reminders</i> whenever you hold down a particular key combination while clicking on a link. </p> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules, drag and drop each rule into a new position. </p> <p> The last rule in the list defines the default behaviour that Choosy will fall back on if no other rule matched. This rule supports all the same behaviours as normal rules, but you cannot edit the conditions in which it applies, or move it out of its position at the end off the list. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> </body>
choosy-app/choosy-help
ac48ab4c7fcb1a925e2b7f3934be7c7f0328f7a0
Add new sharing behaviours to help.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/rules.html b/ChoosyHelp.help/Contents/Resources/settings/rules.html index 1ff325a..a7d7da1 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/rules.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules.html @@ -1,414 +1,445 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Rules settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsRules"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Rules settings</h1> <p> This page describes the settings on Choosy's &ldquo;Rules&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Rules tab. </p> <p> Rules allow you to define how Choosy will behave in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule double click on the rule in the list, or select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's rule editing interface" width="712" height="643" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use the rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" width="503" height="31" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" width="503" height="31" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will have a text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this type of criterion to set up a rule that sends all links to <code>google.com</code> to <i>Firefox</i>. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/rules/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). </p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" width="503" height="31" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a web site</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to web sites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" width="503" height="31" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" width="503" height="31" /> <p> This type of criterion lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up most of your rules to never prompt you to select a browser, with a single rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" width="503" height="31" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/https://www.google.com</code> </p> <p> The <a href="../settings/rules/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> <dt>URL shortening service</dt> <dd> <img src="../images/rule_editor_short_url.png" alt="A screenshot of a short URL criteron row in the rule editor" width="503" height="31" /> <p> This type of criteria allow you to define rules that are only triggered when Choosy opens a link to a URL shortening service, like bit.ly or tinyurl. </p> <p> This is useful when combined with the <a href="../settings/advanced.html#short">short URL expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that you will be able to check the expanded URL in the prompt before you open the site in a browser. </p> <p> A list of supported URL shortening services, and instructions for adding your own are in the <a href="../settings/advanced.html#short">short URL expansion section on the advanced settings page</a>. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will skip forward to the default rule at the end of the rules list and use its behaviour, just as it would have done if no rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. If no browsers are running, Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. If no browsers are running, Choosy will prompt you to select from all of the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> - <dt>Prompt to select from these browsers&hellip;</dt> + <dt>Prompt to select from these browsers &hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" width="600" height="219" /> </dd> - <dt>Always use this browser&hellip;</dt> + <dt>Always use this browser &hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" width="600" height="120" /> </dd> - <dt>Use all of these browsers&hellip;</dt> + <dt>Use all of these browsers &hellip;</dt> <dd> <p> Choosy will open all of the browsers you specify. The browsers will be opened in the order that you specify. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_all.png" alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" width="601" height="220" /> </dd> + + <dt>Open the macOS Share menu</dt> + <dd> + <p> + Choosy will open the + <a href="https://support.apple.com/en-gb/guide/mac-help/mh40614/mac">Share menu</a>, + allowing you to send the link to a variety of non-browser apps. + </p> + <p> + The exact set of options on this menu will vary depending on the + apps you have installed on your Mac, but they will typically allow + you to send the link to another person (e.g. using <i>Messages</i>, + <i>Mail</i>, or <i>AirDrop</i>), or to save the link somewhere + (e.g. in <i>Notes</i> or <i>Reminders</i>). + </p> + </dd> + + <dt>Use this sharing service &hellip;</dt> + <dd> + <p> + Choosy will send the link directly to a specific item in the macOS + Share menu. + </p> + <p> + For example, if you make frequent use of Apple's <i>Reminders</i> + app, you could create a Choosy rule to send links directly to + <i>Reminders</i> whenever you hold down a particular key combination + while clicking on a link. + </p> + </dd> + </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules, drag and drop each rule into a new position. </p> <p> The last rule in the list defines the default behaviour that Choosy will fall back on if no other rule matched. This rule supports all the same behaviours as normal rules, but you cannot edit the conditions in which it applies, or move it out of its position at the end off the list. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> </body>
choosy-app/choosy-help
d6257440f53daac390085ad6a90782bebcc12f68
Fix broken link.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/rules.html b/ChoosyHelp.help/Contents/Resources/settings/rules.html index d21992a..1ff325a 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/rules.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules.html @@ -1,414 +1,414 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Rules settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsRules"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Rules settings</h1> <p> This page describes the settings on Choosy's &ldquo;Rules&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Rules tab. </p> <p> Rules allow you to define how Choosy will behave in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule double click on the rule in the list, or select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's rule editing interface" width="712" height="643" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use the rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" width="503" height="31" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" width="503" height="31" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will have a text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this type of criterion to set up a rule that sends all links to <code>google.com</code> to <i>Firefox</i>. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/rules/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" width="503" height="31" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). </p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" width="503" height="31" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a web site</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to web sites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" width="503" height="31" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" width="503" height="31" /> <p> This type of criterion lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up most of your rules to never prompt you to select a browser, with a single rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" width="503" height="31" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/https://www.google.com</code> </p> <p> The <a href="../settings/rules/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> <dt>URL shortening service</dt> <dd> <img src="../images/rule_editor_short_url.png" alt="A screenshot of a short URL criteron row in the rule editor" width="503" height="31" /> <p> This type of criteria allow you to define rules that are only triggered when Choosy opens a link to a URL shortening service, like bit.ly or tinyurl. </p> <p> - This is useful when combined with the <a href="../settings/behaviour.html#short">short URL + This is useful when combined with the <a href="../settings/advanced.html#short">short URL expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that you will be able to check the expanded URL in the prompt before you open the site in a browser. </p> <p> A list of supported URL shortening services, and instructions for adding your own are in the <a href="../settings/advanced.html#short">short URL expansion section on the advanced settings page</a>. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will skip forward to the default rule at the end of the rules list and use its behaviour, just as it would have done if no rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. If no browsers are running, Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. If no browsers are running, Choosy will prompt you to select from all of the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" width="600" height="219" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" width="600" height="120" /> </dd> <dt>Use all of these browsers&hellip;</dt> <dd> <p> Choosy will open all of the browsers you specify. The browsers will be opened in the order that you specify. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_all.png" alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" width="601" height="220" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules, drag and drop each rule into a new position. </p> <p> The last rule in the list defines the default behaviour that Choosy will fall back on if no other rule matched. This rule supports all the same behaviours as normal rules, but you cannot edit the conditions in which it applies, or move it out of its position at the end off the list. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> </body>
choosy-app/choosy-help
cd2254df1c9edee4799c7c37f8d8cb107e590f19
Re-write help for new UI in version 2.2.
diff --git a/ChoosyHelp.help/Contents/Resources/basic/choosy.html b/ChoosyHelp.help/Contents/Resources/basic/choosy.html index 435e207..2d46b64 100644 --- a/ChoosyHelp.help/Contents/Resources/basic/choosy.html +++ b/ChoosyHelp.help/Contents/Resources/basic/choosy.html @@ -1,45 +1,44 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: What is Choosy?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpIntro"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: What is Choosy?</h1> <h2>A smarter default browser</h2> <p> When you click on a link outside of your web browser it opens in your default web browser. If you use more than one web browser on a regular basis having a single default web browser can be very restrictive. That's where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser for that particular situation. </p> <h2>How does Choosy decide which browser to use?</h2> <p> In some situations Choosy will display a prompt and allow you to select from a list of browsers. In other situations Choosy will automatically select which browser. Exactly what happens is completely based on your - settings. Your <a href="../settings/advanced.html">advanced behaviour rules</a> will be applied first, and - then if none of them match, then your <a href="../settings/behaviour.html">standard behaviours</a> will be - applied. + settings. Your <a href="../settings/rules.html">rules</a> will be tried in order, and the first one that + matches the current situation defines what Choosy will do. </p> <p> If you're setting Choosy up for the first time, have a look at the <a href="../basic/configuration.html">configuration guide</a>. </p> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/basic/configuration.html b/ChoosyHelp.help/Contents/Resources/basic/configuration.html index d49b1fa..8a6f247 100644 --- a/ChoosyHelp.help/Contents/Resources/basic/configuration.html +++ b/ChoosyHelp.help/Contents/Resources/basic/configuration.html @@ -1,114 +1,108 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Configuration guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: Configuration guide</h1> <p>A step by step guide to setting up Choosy.</p> <ol> <li> - <h2>Browsers</h2> + <h2>Set Choosy as your default browser</h2> + <p> + The first thing to do is to tell macOS that it should use Choosy as the + default browser. This will allow Choosy to receive links you click on + and decide which browser to send them to. + </p> + <p> + Whenever Choosy isn't set as your default browser, it will display a + prompt at the bottom of the settings window: + </p> + <p style="background:#fee;border:5px dashed red;color:red;padding:1em;"><strong>TODO:</strong> screenshot</p> <p> - The first thing to set up is the browsers that you want Choosy to use. When you first install Choosy - the browser list will be populated with all the browsers that macOS knows are installed on your system. - This list won't be perfect: it might include some apps that aren't really browsers, but happen to be - able to open links; it might be missing some browsers, especially if you have more than one version of - the same browser installed. + You can change also your macOS default browser any time in the macOS + System Preferences app. </p> + </li> + <li> + <h2>Browsers</h2> <p> - The <strong>order of the browser list</strong> is important: they should be in order of preference, with - the browser you'd most often like to use at the top. When we configure the behaviour later any - settings that refer to the &ldquo;favourite&rdquo; browser are talking about the browser at the top of - the list. Similarly settings that talk about the &ldquo;best running browser&rdquo; are referring to - the running browser that is highest up the list. + Next, set up the list of browsers that you want Choosy to use. When you + first install Choosy the browser list will be populated with all the + browsers that macOS knows are installed on your system. This list won't + be perfect: it might include some apps that aren't really browsers, but + happen to be able to open links; it might be missing some browsers, + especially if you have more than one version of the same browser + installed. </p> <p> - To customise the browser list: + The <strong>order of the browser list</strong> is important: they + should be in order of preference, with the browser you'd most often + like to use at the top. When we configure Choosy's rules, any settings + that refer to the &ldquo;favourite&rdquo; browser are talking about + the browser at the top of the list. Similarly settings that talk about + the &ldquo;best running browser&rdquo; are referring to the running + browser that is highest up the list. </p> - <ol> - <li> - Launch the Choosy app (from Launchpad, Finder, etc.) - </li> - <li> - Click on the &ldquo;Browsers&rdquo; tab. - </li> - <li> - Remove any browser you don't want Choosy to use by clicking on the browser in the list and clicking - the minus button below the list. - </li> - <li> - Add any missing browsers either using the plus button below the list, or by dragging the browsers - into the list from the Finder. - </li> - <li> - Change the order of the list so your favourite browser is first by dragging and dropping the browser - in the list. - </li> - </ol> <p> - There are more details on the settings in the browsers tab in the + There are more details on how to edit your browsers list in the <a href="../settings/browsers.html">browser settings</a> section. </p> </li> <li> - <h2>Basic behaviour</h2> + <h2>Rules</h2> <p> - Next we should configure the basic behaviour. This is what Choosy will usually do when you click on - a link. There are two settings to consider: What Choosy should do when <strong>no browsers are - running</strong> and when <strong>one or more browsers are running</strong>. To customise the - behaviour: + Next we should configure some rules. Rules tell Choosy what to do when + you open a link. Each rule has two parts: the <i>conditions</i> when + Choosy will apply the rule, and Choosy's <i>behaviour</i> when the rule + is applied. </p> - <ol> - <li>Launch the Choosy app (from Launchpad, Finder, etc.)</li> - <li>Click on the &ldquo;Behaviour&rdquo; tab.</li> - <li>Select the behaviours that seem most appropriate (you can always change them later).</li> - </ol> <p> - There are more details about the individual settings on the behaviour tab in the - <a href="../settings/behaviour.html">behaviour settings</a> section. + For example, here's one of the default rules that Choosy sets up for + you when first installed: + </p> + <p style="background:#fee;border:5px dashed red;color:red;padding:1em;"><strong>TODO:</strong> screenshot</p> + <p> + The condition for this rule is that some of the browsers in your browser + list must be running. When that condition is met, the behaviour is for + Choosy to prompt you to select from one of the running browsers. + </p> + <p> + The <strong>order of the rules list</strong> is important: Choosy will + try the rules in order, and use the first one where the conditions are + met. The last rule in the list is special—it defines the default + behaviour that will be used when no other rule is appropriate. + </p> + <p> + There are more details about creating and editing rules in the + <a href="../settings/rules.html">rules settings</a> section. </p> </li> <li> - <h2>Next steps</h2> - <ol> - <li> - <h3>Advanced behaviour rules</h3> - <p> - You might also want to tweak Choosy's behaviour and create exceptions to your basic behaviour - rules that apply in specific circumstances. These could be based on the link you're opening, - on the modifier keys you're holding when you click on a link or on a variety of other criteria. - There is a great deal of flexibility, and many different ways you can use advanced rules. - For more information see the <a href="../settings/advanced.html">advanced behaviour settings</a> - section. - </p> - </li> - <li> - <h3>Browser plugins</h3> - <p> - If you want to use Choosy's functionality from inside your browser there are a variety of - browser plugins and bookmarklets that you can install. There is more information in the - <a href="../misc/browsers.html">browser integration</a> section. - </p> - </li> - </ol> + <h2>Browser plugins</h2> + <p> + If you want to use Choosy's functionality from inside your browser + there are a variety of browser plugins and bookmarklets that you can + install. There is more information in the + <a href="../misc/browsers.html">browser integration</a> section. + </p> </li> </ol> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/index.html b/ChoosyHelp.help/Contents/Resources/index.html index 7fbeb75..80e7845 100644 --- a/ChoosyHelp.help/Contents/Resources/index.html +++ b/ChoosyHelp.help/Contents/Resources/index.html @@ -1,66 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Contents</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style/main.css" type="text/css" media="all" /> <meta name="AppleTitle" content="Choosy Help" /> <meta name="AppleIcon" content="ChoosyHelp/images/icon.png" /> </head> <body> <a name="ChoosyHelpContents"></a> <h1>Choosy Help</h1> <h2>Contents</h2> <ul> <li> <h3>Getting started</h3> <p>The basics: What Choosy can do and how to use it.</p> <ul> <li><a href="basic/choosy.html">What is Choosy?</a></li> <li><a href="basic/installation.html">Installation guide</a></li> <li><a href="basic/configuration.html">Configuration guide</a></li> </ul> </li> <li> <h3>Choosy settings</h3> <p>Detailed information on all of Choosy's settings.</p> <ul> - <li><a href="settings/general.html">General settings</a></li> <li><a href="settings/browsers.html">Browser settings</a></li> - <li><a href="settings/behaviour.html">Behaviour settings</a></li> - <li><a href="settings/appearance.html">Appearance settings</a></li> <li> - <a href="settings/advanced.html">Advanced behaviour settings</a> + <a href="settings/rules.html">Rule settings</a> <ul> - <li><a href="settings/advanced/urls.html">Web address rules</a></li> - <li><a href="settings/advanced/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> + <li><a href="settings/rules/urls.html">Web address rules</a></li> + <li><a href="settings/rules/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> </ul> </li> + <li><a href="settings/prompt.html">Prompt settings</a></li> + <li><a href="settings/advanced.html">Advanced settings</a></li> </ul> </li> <li> <h3>Miscelaneous topics</h3> <ul> <li><a href="misc/browsers.html">Browser integration</a></li> <li><a href="misc/uninstalling.html">Uninstalling Choosy</a></li> + <li><a href="misc/registration.html">Trials &amp; registration</a></li> </ul> </li> <li> <h3>Online resources</h3> <p>More help and resources on the internet.</p> <ul> <li><a href="http://feedback.choosyosx.com">Choosy feedback forum</a></li> <li><a href="https://www.choosyosx.com">Choosy web site</a></li> <li class="vcard"><a class="url" href="https://www.georgebrock.com"><span class="fn">George Brocklehurst</span>'s web site</a></li> </ul> </li> </ul> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/misc/registration.html b/ChoosyHelp.help/Contents/Resources/misc/registration.html new file mode 100644 index 0000000..b1f0fef --- /dev/null +++ b/ChoosyHelp.help/Contents/Resources/misc/registration.html @@ -0,0 +1,42 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Choosy Help: Trials &amp; registration</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> +</head> + +<body> + + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Miscelaneous topics / + </p> + + <h1>Choosy Help: Trials &amp; registration</h1> + + <p> + Choosy is free to use without any limitations for 45 days. + While you are in your trial period, a reminder will be displayed at the + bottom of the settings window: + </p> + + <p style="background:#fee;border:5px dashed red;color:red;padding:1em;"><strong>TODO:</strong> screenshot</p> + + <p> + If you find Choosy useful and want to continue using it beyond the trial + period, you must + <a href="https://www.choosyosx.com/buy">purchase a licence</a> + from the Choosy web site. + </p> + + <p> + You are free to use the same licence key on all the Macs you use + (your MacBook and your iMac, your home computer and your work computer, etc.). + </p> +</body> + +</html> diff --git a/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html b/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html index 6d5b2cb..a13fd41 100644 --- a/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html +++ b/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html @@ -1,31 +1,43 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Miscelaneous topics / </p> <h1>Choosy Help: Uninstalling Choosy</h1> <p>To remove Choosy from your system, follow these steps:</p> - <ul> + <ol> <li>Open System Preference, and click <i>General</i>.</li> <li>Change the <i>Default web browser</i> setting to something other than Choosy, e.g. <i>Safari</i> or <i>Google Chrome</i>.</li> - <li>Find `Choosy.app` in your Applications folder, and drag it to the trash.</li> + <li>Find <i>Choosy.app</i> in your Applications folder, and drag it to the trash.</li> + </ol> + + <p> + If you want to completely remove all traces of Choosy you can also remove + Choosy's configuration files and user defaults. Note that if you do this, + and later change your mind a re-install Choosy, you will have to configure + it again. + </p> + + <ol> + <li>Remove settings files, by dragging the folder at <code>/Users/<var>you</var>/Application Support/Choosy</code> to the trash (replacing <var>you</var> with your username).</li> + <li>Remove settings managed by macOS, by opening a Terminal and running the command <code>defaults delete com.choosyosx.choosy</code></li> </ol> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/advanced.html b/ChoosyHelp.help/Contents/Resources/settings/advanced.html index dec40e6..fbd22a3 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/advanced.html +++ b/ChoosyHelp.help/Contents/Resources/settings/advanced.html @@ -1,407 +1,164 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <title>Choosy Help: Advanced behaviour settings</title> + <title>Choosy Help: Advanced settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> - <h1>Choosy Help: Advanced behaviour settings</h1> + <h1>Choosy Help: Advanced settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Advanced tab. </p> - <p> - Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific - circumstances. - </p> - <ol> - <li><a href="#edit">Adding and editing rules</a></li> - <li><a href="#ordering">Ordering rules</a></li> - <li><a href="#disabling">Disabling rules</a></li> + <li><a href="#start-at-login">Start Choosy at login</a></li> + <li><a href="#menu-bar">Display Choosy icon in the menu bar</a></li> + <li><a href="#short">Expanding short URLs in the prompt</a></li> </ol> - - <div id="edit"> - <h2>Adding and editing rules</h2> + + <div id="start-at-login"> + <h2>Start Choosy at login</h2> <p> - To add a rule, click on the plus button below the list of rules. + Enable this option to have Choosy start whenever you login to your Mac. + If you disable this option, Choosy will start up the first time you + click on a link. This option is probably most useful when paired + with the <i>Display Choosy icon in the menu bar</i> option (see below). </p> + </div> + + <div id="menu-bar"> + <h2>Display Choosy icon in the menu bar</h2> <p> - To edit a rule double click on the rule in the list, or select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; - button on the right hand side below the list. + Allows you to display a Choosy icon at the top right of your screen in the menu bar. This + gives you access to a menu which allows you to quickly + launch browsers and access Choosy's settings. Note that the menu bar icon will only be + displayed while Choosy is running, so you will probably want to use + this setting in conjunction with the <i>start Choosy at login</i> option. </p> + </div> + + <div id="short"> + <h2>Expanding short URLs in the prompt</h2> + <p> - When adding or editing rules this window will be displayed: + When Choosy is displaying a URL in the prompt, it can optionally try to + expand a short URL (bit.ly, tinyurl.com, etc.) to the full URL it points + to. </p> - <img - src="../images/settings_advanced_edit.png" - alt="A screenshot of Choosy's editing interface for advanced behaviour rules" - width="708" height="726" /> - <p> - This window contains three groups of options: + Short URLs are expanded by making a request to the short URL, and seeing + where it redirects to. This has two important implications: </p> - + <ol> - <li><a href="#edit-general">General rule settings</a></li> - <li><a href="#edit-rule">When Choosy should use this rule</a></li> - <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> + <li> + Choosy will have to make network requests to expand short URLs. + If you enable this feature, and you run firewall software on your Mac + you may be prompted to allow Choosy to make network requests. + </li> + <li> + Resolving a short URL can be quite slow, depending on a huge number of + factors (how fast your Internet connection is, how quickly the URL + shortening service responds, etc.). Because this can be time consuming + Choosy only expands short URLs when displaying them in the prompt, it + will not try to expand short URLs before applying your rules. For + example, if you have a rule to open links containing + <code>apple.com</code> in Safari, a <code>bit.ly</code> link that + resolves to <code>apple.com</code> will not trigger that rule. + </li> </ol> - - <div id="edit-general"> - <h3>General rule settings</h3> - - <dl> - <dt>Title</dt> - <dd> - <p> - The title setting is located at the top of the rule editing window. It allows you to - give the rule a name that will be displayed in the rules list. Choose something specific - enough to distinguish this from other rules. - </p> - </dd> - <dt>Enabled</dt> - <dd> - <p> - The enabled checkbox is located at the bottom of the rule editting window. This allows - you to disable rules without deleting them. If a rule is not enabled (i.e. if this box - is not checked) then Choosy will ignore the rule. - </p> - </dd> - </dl> - </div> - - <div id="edit-rule"> - <h3>When Choosy should use this rule</h3> - - <p> - This section allows you to define the conditions that must be met in order for Choosy to - use this rule. - </p> - - <p> - The first row of the rule editor lets you select what type of rule it is, and which of the - rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be - triggered:<br/> - <img - src="../images/rule_editor_type.png" - alt="A screenshot of the first row of the rule editor" - width="503" height="31" /> - </p> - - <p> - The subsequent rows of the rule editor show the different criteria that make up the rule. - You can add new criteria by clicking on the plus button at the end of any row, and you can - remove a criteron by clicking on the minus button at the end of its row:<br/> - <img - src="../images/rule_editor_web_address.png" - alt="A screenshot of a criteron row in the rule editor" - width="503" height="31" /> - </p> - - <p> - The dropdown list at the beginning of the row lets you select what this criterion will match. - The rest of the options in the row will depend on what type of criterion it is. Some types - will have several options, others will have a text box where you can type in a value. - </p> - - <p> - The following types of criteria are available: - </p> - - <dl> - <dt>Web address</dt> - <dd> - <img - src="../images/rule_editor_web_address.png" - alt="A screenshot of a web address criteron row in the rule editor" - width="503" height="31" /> - <p> - This allows rules to be set up for certain web sites, or groups of web sites. For - example you could use this type of criterion to set up a rule that sends all links - to <code>google.com</code> to <i>Firefox</i>. - </p> - <p> - Web address criteria are very flexible: You can match exact addresses, addresses - that start with, end with or contain certain words or even addresses that match - patterns and regular expressions. The - <a href="../settings/advanced/urls.html">web address rules</a> section describes - these options in more detail. - </p> - </dd> - - <dt>Source application</dt> - <dd> - <img - src="../images/rule_editor_source_app.png" - alt="A screenshot of a source application criteron row in the rule editor" - width="503" height="31" /> - <p> - This allows rules to be created that will be triggered when you click on a link in a - specific application. The browse button lets you pick an application from your - Applications folder (or elsewhere on your Mac). - </p> - <p> - By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also - create rules that target links from all source applications except for the application - selected in this row. - </p> - </dd> - - <dt>Link type</dt> - <dd> - <img - src="../images/rule_editor_link_type.png" - alt="A screenshot of a link type criteron row in the rule editor" - width="503" height="31" /> - <p> - Link type lets you select from the following options: - </p> - <ul> - <li>a link to a web site</li> - <li>an HTML file on your computer</li> - </ul> - <p> - This lets you set up rules that only apply either to HTML files on your computer, or - to links to web sites. For example you might want to set up a custom prompt for HTML - files on your computer that includes editing tools that wouldn't be able to open - normal web links. - </p> - </dd> - - <dt>Number of running browsers</dt> - <dd> - <img - src="../images/rule_editor_running_browsers.png" - alt="A screenshot of a running browsers criteron row in the rule editor" - width="503" height="31" /> - <p> - This lets you set up rules that only trigger when a certain number of browsers are - running, or when more than or less than a certain number of browsers are running. - The second dropdown list lets you select from the following options: - </p> - <ul> - <li>is</li> - <li>is not</li> - <li>is less than</li> - <li>is greater than</li> - </ul> - <p> - The third dropdown list lets you select a number from 0 to 10. - </p> - <p> - When you click on a link the number of running browsers is calculated as the number - of applications from your <a href="../settings/browsers.html">browsers list</a> that - are currently running. - </p> - </dd> - - <dt>Modifier keys</dt> - <dd> - <img - src="../images/rule_editor_modifier_keys.png" - alt="A screenshot of a modifier keys criteron row in the rule editor" - width="503" height="31" /> - <p> - This type of criterion lets you set up rules that are only triggered when you are - holding down a modifier key or a combination of modifier keys when you click on - the link. - </p> - <p> - This is useful for behaviours that you only want to occur sometimes. For example - you could set up your <a href="../settings/behaviour.html">behaviour settings</a> - to never prompt you to select a browser, and then set up an advanced behaviour - rule to prompt you to select from all browsers when you hold shift while clicking - on a link. - </p> - <p> - Modifier keys criteria can use combinations of the following keys: - </p> - <ul> - <li>&#x21E7; Shift</li> - <li>&#x2303; Control</li> - <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> - <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> - <li>&#x21E5; Tab</li> - <li>&#x238B; Escape</li> - </ul> - </dd> - - <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> - <dd> - <img - src="../images/rule_editor_custom_api.png" - alt="A screenshot of a custom API method criteron row in the rule editor" - width="503" height="31" /> - <p> - Custom API methods let you extend Choosy's API and add your own behaviours to it. - </p> - <p> - If you were to create a rule that responded to a custom API method called - &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API - method, e.g. by loading the URL <code>x-choosy://my.rule/https://www.google.com</code> - </p> - <p> - The <a href="../settings/advanced/customapi.html">custom API methods</a> page - contains more information about creating and using your own custom API methods. - </p> - </dd> - - <dt>URL shortening service</dt> - <dd> - <img - src="../images/rule_editor_short_url.png" - alt="A screenshot of a short URL criteron row in the rule editor" - width="503" height="31" /> - <p> - This type of criteria allow you to define rules that are only triggered when Choosy - opens a link to a URL shortening service, like bit.ly or tinyurl. - </p> - <p> - This is useful when combined with the <a href="../settings/behaviour.html#short">short URL - expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that - you will be able to check the expanded URL in the prompt before you open the site in a browser. - </p> - <p> - A list of supported URL shortening services, and instructions for adding your own are in the - <a href="../settings/behaviour.html#short">short URL expansion section on the behaviour page</a>. - </p> - </dd> - </dl> - </div> + <p> + There are three options for expanding short URLs: + </p> - <div id="edit-behaviour"> - <h3>What Choosy should do when it uses this rule</h3> - - <p> - At the bottom of the rule editing window are the rule's behaviour settings. This is where you - tell Choosy what to do when all the rule's criteria match the link that is being clicked. - </p> + <dl> + <dt>Never expand URLs</dt> + <dd> + Choosy will never try to expand URLs for you. + </dd> - <p> - The following behaviours are available: - </p> + <dt>Only expand known short URLs (bit.ly, tinyurl etc.)</dt> + <dd> + Choosy will only try to expand URLs for you if they are from a known URL shortening service. + See below for more information about which services are supported. + </dd> - <dl> - <dt>Use the default behaviour</dt> - <dd> - Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour - settings</a>, just as it would have done if no advanced behaviour rules had been triggered. - </dd> - - <dt>Use my favourite browser</dt> - <dd> - Choosy will use the browser at the top of your - <a href="../settings/browsers.html">browsers list</a>. - </dd> - - <dt>Use the best running browser</dt> - <dd> - Choosy will use the running browser closest to the top of your - <a href="../settings/browsers.html">browsers list</a>. - If no browsers are running, Choosy will use the browser at the top - of your <a href="../settings/browsers.html">browsers list</a>. - </dd> - - <dt>Prompt to select from all browsers</dt> - <dd> - Choosy will prompt you to select from all the browsers in your - <a href="../settings/browsers.html">browsers list</a>. - </dd> - - <dt>Prompt to select from running browsers</dt> - <dd> - Choosy will prompt you to select from all the browsers in your - <a href="../settings/browsers.html">browsers list</a> that are currently running. - If no browsers are running, Choosy will prompt you to select from all - of the browsers in - your <a href="../settings/browsers.html">browsers list</a>. - </dd> - - <dt>Prompt to select from these browsers&hellip;</dt> - <dd> - <p> - Choosy will prompt you to select from a custom list of browsers that you set up only - for this rule. When you select this option an interface very similar to the - <a href="../settings/browsers.html">browsers list</a> will appear where you can set - up a custom browser list. - </p> - <img - src="../images/settings_advanced_behaviour_custom.png" - alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" - width="526" height="223" /> - </dd> - - <dt>Always use this browser&hellip;</dt> - <dd> - <p> - Choosy will always use the same browser. When you select this option an interface will - appear that allows you to select the browser that Choosy should always use with this - rule. - </p> - <img - src="../images/settings_advanced_behaviour_specific.png" - alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" - width="530" height="107" /> - </dd> - - <dt>Use all of these browsers&hellip;</dt> - <dd> - <p> - Choosy will open all of the browsers you specify. The browsers will be opened in the order - that you specify. When you select this option an interface very similar to the - <a href="../settings/browsers.html">browsers list</a> will appear where you can set - up a custom browser list. - </p> - <img - src="../images/settings_advanced_behaviour_all.png" - alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" - width="526" height="222" /> - </dd> - </dl> - - </div> - - </div> - - <div id="ordering"> - <h2>Ordering rules</h2> - <p> - The order of your behaviour rules is important. When more than one rule matches the current situation - Choosy will use the rule that is nearest to the top of the list. This means that a very general rule - would take priority over a very specific rule when both rules match but the general rule is higher - up the list. - </p> - <p> - To change the order of the rules, drag and drop each rule into a new position. - </p> - </div> - - <div id="disabling"> - <h2>Disabling rules</h2> + <dt>Try to expand all URLs</dt> + <dd> + Choosy will make a request to all URLs that it opens to see if they respond by redirecting to + another web site. + </dd> + </dl> + + <h3>Supported URL shortening services</h3> + + <ul> + <li>4sq.com</li> + <li>amzn.to</li> + <li>bit.ly</li> + <li>cl.ly</li> + <li>flic.kr</li> + <li>gbrck.com</li> + <li>gdzl.la</li> + <li>goo.gl</li> + <li>gowal.la</li> + <li>gu.com</li> + <li>is.gd</li> + <li>j.mp</li> + <li>ow.ly</li> + <li>post.ly</li> + <li>t.co</li> + <li>tinyurl.com</li> + <li>tr.im</li> + <li>youtu.be</li> + </ul> + + <h3>Adding more URL shortening services</h3> <p> - The checkboxes in the list of rules allow you to disable rules without removing them completely. If a - rule's checkbox is not checked then Choosy will ignore that rule. + You can add more URL shortening services to Choosy by creating a property list file that lists + their domains. </p> + + <ol> + <li> + Copy and paste the following code into a new TextEdit file: + <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; +&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt; +&lt;plist version=&quot;1.0&quot;&gt; +&lt;array&gt; + &lt;string&gt;example.org&lt;/string&gt; +&lt;/array&gt; +&lt;/plist&gt;</code></pre> + </li> + <li>Replace <code>example.org</code> with the URL shortener that you want to use</li> + <li> + Add any other shorteners on subsequent lines, e.g.: + <pre><code> &lt;string&gt;example.org&lt;/string&gt; + &lt;string&gt;example.com&lt;/string&gt;</code></pre> + </li> + <li> + Save the file to <code>/Users/<var>you</var>/Library/Application Support/Choosy/short_urls.plist</code> + (replacing <var>you</var> with your own username) + </li> + </ol> </div> - </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/behaviour.html b/ChoosyHelp.help/Contents/Resources/settings/behaviour.html deleted file mode 100644 index 26ea841..0000000 --- a/ChoosyHelp.help/Contents/Resources/settings/behaviour.html +++ /dev/null @@ -1,193 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Choosy Help: Behaviour settings</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> -</head> - -<body> -<a name="ChoosyHelpSettingsBehaviour"></a> - - <p class="breadcrumbs"> - <strong>You are here:</strong> - <a href="../index.html">Choosy help</a> / - Settings / - </p> - - <h1>Choosy Help: Behaviour settings</h1> - - <p> - This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings - launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Behaviour tab. - </p> - - <p> - The settings on this tab allow you to set how Choosy will behave in various situations: - </p> - - <ol> - <li><a href="#running">When one or more browsers are running</a></li> - <li><a href="#normal">When no browsers are running</a></li> - <li><a href="#short">When an URL shortening service has been used</a></li> - </ol> - - <div id="running"> - <h2>When one or more browsers are running</h2> - - <p> - This setting defines what will happen when you click on a link and one or more of the - browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already - running. If another browser that is not in your browser list is running the - &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. - </p> - - <dl> - <dt>Use best running browser</dt> - <dd> - When you click on a link Choosy will pass the link on to the best running browser. - &ldquo;Best&rdquo; here means the browser that is nearest to the top of your - <a href="../settings/browsers.html">browser list</a>. - </dd> - - <dt>Prompt to select from running browsers</dt> - <dd> - When you click on a link Choosy will prompt you to select from all the browsers (from - your <a href="../settings/browsers.html">browser list</a>) that are running. If only - one browser is running that browser will be used and no prompt will be displayed. - </dd> - - <dt>Prompt to select from all browsers</dt> - <dd> - When you click on a link Choosy will prompt you to select from all the browsers in - your <a href="../settings/browsers.html">browser list</a>. The icons for running - browsers will be solid, the icons for browsers that are not running will be - semi-transparent. - </dd> - - <dt>Use my favourite browser (even if it's not already running)</dt> - <dd> - When you click on a link Choosy will use the browser at the top of your - <a href="../settings/browsers.html">browser list</a> regardless of whether or not - it is currently running. - </dd> - </dl> - - </div> - - <div id="normal"> - <h2>When no browsers are running</h2> - - <p> - This setting defines what will happen when you click on a link and none of the browsers - in your Choosy <a href="../settings/browsers.html">browser list</a> are running. - </p> - - <dl> - <dt>Use my favourite browser</dt> - <dd> - When you click on a link Choosy will use the browser at the top of your - <a href="../settings/browsers.html">browser list</a>. - </dd> - - <dt>Prompt to select from all browsers</dt> - <dd> - When you click on a link Choosy will prompt you to select from all the browsers in - your <a href="../settings/browsers.html">browser list</a>. - </dd> - </dl> - - </div> - - <div id="short"> - <h2>When an URL shortening service has been used</h2> - - <p> - This setting defines how URLs that have been shortened using a service like bit.ly or - tinyURL will be displayed in the browser prompt. - </p> - - <p> - Because it is specific to how URLs are displayed this setting is only available if the - <a href="../settings/appearance.html#text">&ldquo;Display the URL in the prompt&rdquo; - setting</a> is enabled. - </p> - - <dl> - <dt>Never expand URLs</dt> - <dd> - Choosy will never try to expand URLs for you. - </dd> - - <dt>Only expand known short URLs (bit.ly, tinyurl etc.)</dt> - <dd> - Choosy will only try to expand URLs for you if they are from a known URL shortening service. - See below for more information about which services are supported. - </dd> - - <dt>Try to expand all URLs</dt> - <dd> - Choosy will make a request to all URLs that it opens to see if they respond by redirecting to - another web site. - </dd> - </dl> - - <h3>Supported URL shortening services</h3> - - <ul> - <li>4sq.com</li> - <li>amzn.to</li> - <li>bit.ly</li> - <li>cl.ly</li> - <li>flic.kr</li> - <li>gbrck.com</li> - <li>gdzl.la</li> - <li>goo.gl</li> - <li>gowal.la</li> - <li>gu.com</li> - <li>is.gd</li> - <li>j.mp</li> - <li>ow.ly</li> - <li>post.ly</li> - <li>t.co</li> - <li>tinyurl.com</li> - <li>tr.im</li> - <li>youtu.be</li> - </ul> - - <h3>Adding more URL shortening services</h3> - - <p> - You can add more URL shortening services to Choosy by creating a property list file that lists - their domains. - </p> - - <ol> - <li> - Copy and paste the following code into a new TextEdit file: - <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; -&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt; -&lt;plist version=&quot;1.0&quot;&gt; -&lt;array&gt; - &lt;string&gt;example.org&lt;/string&gt; -&lt;/array&gt; -&lt;/plist&gt;</code></pre> - </li> - <li>Replace <code>example.org</code> with the URL shortener that you want to use</li> - <li> - Add any other shorteners on subsequent lines, e.g.: - <pre><code> &lt;string&gt;example.org&lt;/string&gt; - &lt;string&gt;example.com&lt;/string&gt;</code></pre> - </li> - <li> - Save the file to <code>/Users/<var>you</var>/Library/Application Support/Choosy/short_urls.plist</code> - (replacing <var>you</var> with your own username) - </li> - </ol> - </div> - -</body> - -</html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/browsers.html b/ChoosyHelp.help/Contents/Resources/settings/browsers.html index d17161a..ed10c0c 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/browsers.html +++ b/ChoosyHelp.help/Contents/Resources/settings/browsers.html @@ -1,100 +1,100 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBrowsers"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Browsers tab. </p> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a browser app from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that macOS knows about, or to browse and select an app. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list, drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> - <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the + <a href="../settings/rules.html">Rule settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/general.html b/ChoosyHelp.help/Contents/Resources/settings/general.html deleted file mode 100644 index 39a8f76..0000000 --- a/ChoosyHelp.help/Contents/Resources/settings/general.html +++ /dev/null @@ -1,122 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Choosy Help: General settings</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> -</head> - -<body> -<a name="ChoosyHelpSettingsGeneral"></a> - - <p class="breadcrumbs"> - <strong>You are here:</strong> - <a href="../index.html">Choosy help</a> / - Settings / - </p> - - <h1>Choosy Help: General settings</h1> - - <p> - This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings - launch the Choosy app (from Finder, Launchpad, etc.) and then click on the General tab. - </p> - - <p> - The general settings are grouped into three sections: - </p> - - <ol> - <li><a href="#enable">Enable Choosy</a></li> - <li><a href="#version">Version</a></li> - <li><a href="#licence">Licence</a></li> - </ol> - - <div id="enable"> - <h2>Enable Choosy</h2> - - <p> - This section contains settings that allow you to enable and disable various aspects of Choosy. - </p> - - <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" width="544" height="113" /> - - <dl> - <dt>Enable Choosy for links</dt> - <dd> - This checkbox determines whether or not Choosy will be used when clicking on links to web sites. - If you disable this option whichever browser is at the top of your Choosy browsers list (see - <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. - If you enable this option then Choosy will be used whenever the default browser would normally - be used. - </dd> - - <dt>Start Choosy at login</dt> - <dd> - Enable this option to have Choosy start whenever you login to your Mac. - If you disable this option, Choosy will start up the first time you - click on a link. This option is probably most useful when paired - with the <i>Display Choosy icon in the menu bar</i> option (see below). - </dd> - - <dt>Display Choosy icon in the menu bar</dt> - <dd> - Allows you to display a Choosy icon at the top right of your screen in the menu bar. This - gives you access to a menu which allows you to quickly - launch browsers and access Choosy's settings. Note that the menu bar icon will only be - displayed while Choosy is running, so you will probably want to use - this setting in conjunction with the <i>start Choosy at login</i> option. - </dd> - </dl> - </div> - - <div id="version"> - <h2>Version</h2> - - <p> - This section contains information about which version of Choosy you have installed and any updates - that are available. - </p> - - <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" width="544" height="110" /> - - <p> - If an update is available you can see full details of the new version and install it by clicking on - the <i>Update details</i> button. - </p> - </div> - - <div id="licence"> - <h2>Licence</h2> - - <p> - This section allows contains information about licensing. - </p> - - <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" width="544" height="145" /> - - <p> - If Choosy is not registered the number of days remaining in the trial period will be displayed here. - If you decide to <a href="https://www.choosyosx.com/buy">purchase a Choosy licence</a> you enter your - licence information in the following fields: - </p> - - <dl> - <dt>E-mail address</dt> - <dd> - This must be the e-mail address that you provided when purchasing your licence from the Choosy - web site. - </dd> - - <dt>Licence key</dt> - <dd> - This key will be emailed to you when you purchase a licence. - </dd> - </dl> - </div> - -</body> - -</html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/appearance.html b/ChoosyHelp.help/Contents/Resources/settings/prompt.html similarity index 87% rename from ChoosyHelp.help/Contents/Resources/settings/appearance.html rename to ChoosyHelp.help/Contents/Resources/settings/prompt.html index bd1a743..14dc894 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/appearance.html +++ b/ChoosyHelp.help/Contents/Resources/settings/prompt.html @@ -1,108 +1,106 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <title>Choosy Help: Appearance settings</title> + <title>Choosy Help: Prompt settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> -<a name="ChoosyHelpSettingsAppearance"></a> +<a name="ChoosyHelpSettingsPrompt"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> - <h1>Choosy Help: Appearance settings</h1> + <h1>Choosy Help: Prompt settings</h1> <p> - This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings - launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Appearance tab. + This page describes the settings on Choosy's &ldquo;Prompt&rdquo; tab. To find these settings + launch the Choosy app (from Finder, Launchpad, etc.) and then click on the Prompt tab. </p> <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> - When Choosy prompts you to select a browser (enable this in the - <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt + When Choosy prompts you to select a browser (based on your + <a href="../settings/rules.html">rules settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" width="306" height="124" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" width="189" height="239" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> If the &ldquo;display the URL in the prompt&rdquo; is switched on and the URL is too long to be displayed in the prompt, moving the mouse over the URL will cause it to expand and show the complete text: </p> <img src="../images/prompt_row_expanded_url.png" alt="Screenshot of the Choosy browser prompt in row mode with a long URL" width="256" height="124" /> <p> The screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" width="306" height="84" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" width="189" height="189" /> </div> <div id="icons"> <h2>Icon size</h2> <p> - The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon - below the slider gives a full size preview of what the prompt icons will look like. + The icon size slider allows you to change the size of the icons in the prompts. </p> </div> - </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/rules.html b/ChoosyHelp.help/Contents/Resources/settings/rules.html new file mode 100644 index 0000000..92ba8ce --- /dev/null +++ b/ChoosyHelp.help/Contents/Resources/settings/rules.html @@ -0,0 +1,414 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Choosy Help: Rules settings</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> +</head> + +<body> +<a name="ChoosyHelpSettingsRules"></a> + + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + + <h1>Choosy Help: Rules settings</h1> + + <p> + This page describes the settings on Choosy's &ldquo;Rules&rdquo; tab. To + find these settings launch the Choosy app (from Finder, Launchpad, etc.) + and then click on the Rules tab. + </p> + + <p> + Rules allow you to define how Choosy will behave in specific circumstances. + </p> + + <ol> + <li><a href="#edit">Adding and editing rules</a></li> + <li><a href="#ordering">Ordering rules</a></li> + <li><a href="#disabling">Disabling rules</a></li> + </ol> + + <div id="edit"> + <h2>Adding and editing rules</h2> + <p> + To add a rule, click on the plus button below the list of rules. + </p> + <p> + To edit a rule double click on the rule in the list, or select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; + button on the right hand side below the list. + </p> + <p> + When adding or editing rules this window will be displayed: + </p> + <img + src="../images/settings_advanced_edit.png" + alt="A screenshot of Choosy's rule editing interface" + width="708" height="726" /> + + + <p> + This window contains three groups of options: + </p> + + <ol> + <li><a href="#edit-general">General rule settings</a></li> + <li><a href="#edit-rule">When Choosy should use this rule</a></li> + <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> + </ol> + + <div id="edit-general"> + <h3>General rule settings</h3> + + <dl> + <dt>Title</dt> + <dd> + <p> + The title setting is located at the top of the rule editing window. It allows you to + give the rule a name that will be displayed in the rules list. Choose something specific + enough to distinguish this from other rules. + </p> + </dd> + <dt>Enabled</dt> + <dd> + <p> + The enabled checkbox is located at the bottom of the rule editting window. This allows + you to disable rules without deleting them. If a rule is not enabled (i.e. if this box + is not checked) then Choosy will ignore the rule. + </p> + </dd> + </dl> + </div> + + <div id="edit-rule"> + <h3>When Choosy should use this rule</h3> + + <p> + This section allows you to define the conditions that must be met in order for Choosy to + use the rule. + </p> + + <p> + The first row of the rule editor lets you select what type of rule it is, and which of the + rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be + triggered:<br/> + <img + src="../images/rule_editor_type.png" + alt="A screenshot of the first row of the rule editor" + width="503" height="31" /> + </p> + + <p> + The subsequent rows of the rule editor show the different criteria that make up the rule. + You can add new criteria by clicking on the plus button at the end of any row, and you can + remove a criteron by clicking on the minus button at the end of its row:<br/> + <img + src="../images/rule_editor_web_address.png" + alt="A screenshot of a criteron row in the rule editor" + width="503" height="31" /> + </p> + + <p> + The dropdown list at the beginning of the row lets you select what this criterion will match. + The rest of the options in the row will depend on what type of criterion it is. Some types + will have several options, others will have a text box where you can type in a value. + </p> + + <p> + The following types of criteria are available: + </p> + + <dl> + <dt>Web address</dt> + <dd> + <img + src="../images/rule_editor_web_address.png" + alt="A screenshot of a web address criteron row in the rule editor" + width="503" height="31" /> + <p> + This allows rules to be set up for certain web sites, or groups of web sites. For + example you could use this type of criterion to set up a rule that sends all links + to <code>google.com</code> to <i>Firefox</i>. + </p> + <p> + Web address criteria are very flexible: You can match exact addresses, addresses + that start with, end with or contain certain words or even addresses that match + patterns and regular expressions. The + <a href="../settings/rules/urls.html">web address rules</a> section describes + these options in more detail. + </p> + </dd> + + <dt>Source application</dt> + <dd> + <img + src="../images/rule_editor_source_app.png" + alt="A screenshot of a source application criteron row in the rule editor" + width="503" height="31" /> + <p> + This allows rules to be created that will be triggered when you click on a link in a + specific application. The browse button lets you pick an application from your + Applications folder (or elsewhere on your Mac). + </p> + <p> + By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also + create rules that target links from all source applications except for the application + selected in this row. + </p> + </dd> + + <dt>Link type</dt> + <dd> + <img + src="../images/rule_editor_link_type.png" + alt="A screenshot of a link type criteron row in the rule editor" + width="503" height="31" /> + <p> + Link type lets you select from the following options: + </p> + <ul> + <li>a link to a web site</li> + <li>an HTML file on your computer</li> + </ul> + <p> + This lets you set up rules that only apply either to HTML files on your computer, or + to links to web sites. For example you might want to set up a custom prompt for HTML + files on your computer that includes editing tools that wouldn't be able to open + normal web links. + </p> + </dd> + + <dt>Number of running browsers</dt> + <dd> + <img + src="../images/rule_editor_running_browsers.png" + alt="A screenshot of a running browsers criteron row in the rule editor" + width="503" height="31" /> + <p> + This lets you set up rules that only trigger when a certain number of browsers are + running, or when more than or less than a certain number of browsers are running. + The second dropdown list lets you select from the following options: + </p> + <ul> + <li>is</li> + <li>is not</li> + <li>is less than</li> + <li>is greater than</li> + </ul> + <p> + The third dropdown list lets you select a number from 0 to 10. + </p> + <p> + When you click on a link the number of running browsers is calculated as the number + of applications from your <a href="../settings/browsers.html">browsers list</a> that + are currently running. + </p> + </dd> + + <dt>Modifier keys</dt> + <dd> + <img + src="../images/rule_editor_modifier_keys.png" + alt="A screenshot of a modifier keys criteron row in the rule editor" + width="503" height="31" /> + <p> + This type of criterion lets you set up rules that are only triggered when you are + holding down a modifier key or a combination of modifier keys when you click on + the link. + </p> + <p> + This is useful for behaviours that you only want to occur sometimes. + For example you could set up most of your rules to never prompt you + to select a browser, with a single rule to prompt you to select + from all browsers when you hold shift while clicking on a link. + </p> + <p> + Modifier keys criteria can use combinations of the following keys: + </p> + <ul> + <li>&#x21E7; Shift</li> + <li>&#x2303; Control</li> + <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> + <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> + <li>&#x21E5; Tab</li> + <li>&#x238B; Escape</li> + </ul> + </dd> + + <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> + <dd> + <img + src="../images/rule_editor_custom_api.png" + alt="A screenshot of a custom API method criteron row in the rule editor" + width="503" height="31" /> + <p> + Custom API methods let you extend Choosy's API and add your own behaviours to it. + </p> + <p> + If you were to create a rule that responded to a custom API method called + &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API + method, e.g. by loading the URL <code>x-choosy://my.rule/https://www.google.com</code> + </p> + <p> + The <a href="../settings/rules/customapi.html">custom API methods</a> page + contains more information about creating and using your own custom API methods. + </p> + </dd> + + <dt>URL shortening service</dt> + <dd> + <img + src="../images/rule_editor_short_url.png" + alt="A screenshot of a short URL criteron row in the rule editor" + width="503" height="31" /> + <p> + This type of criteria allow you to define rules that are only triggered when Choosy + opens a link to a URL shortening service, like bit.ly or tinyurl. + </p> + <p> + This is useful when combined with the <a href="../settings/behaviour.html#short">short URL + expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that + you will be able to check the expanded URL in the prompt before you open the site in a browser. + </p> + <p> + A list of supported URL shortening services, and instructions for adding your own are in the + <a href="../settings/advanced.html#short">short URL expansion section on the advanced settings page</a>. + </p> + </dd> + </dl> + + </div> + + <div id="edit-behaviour"> + <h3>What Choosy should do when it uses this rule</h3> + + <p> + At the bottom of the rule editing window are the rule's behaviour settings. This is where you + tell Choosy what to do when all the rule's criteria match the link that is being clicked. + </p> + + <p> + The following behaviours are available: + </p> + + <dl> + <dt>Use the default behaviour</dt> + <dd> + Choosy will skip forward to the default rule at the end of the rules + list and use its behaviour, just as it would have done if no rules + had been triggered. + </dd> + + <dt>Use my favourite browser</dt> + <dd> + Choosy will use the browser at the top of your + <a href="../settings/browsers.html">browsers list</a>. + </dd> + + <dt>Use the best running browser</dt> + <dd> + Choosy will use the running browser closest to the top of your + <a href="../settings/browsers.html">browsers list</a>. + If no browsers are running, Choosy will use the browser at the top + of your <a href="../settings/browsers.html">browsers list</a>. + </dd> + + <dt>Prompt to select from all browsers</dt> + <dd> + Choosy will prompt you to select from all the browsers in your + <a href="../settings/browsers.html">browsers list</a>. + </dd> + + <dt>Prompt to select from running browsers</dt> + <dd> + Choosy will prompt you to select from all the browsers in your + <a href="../settings/browsers.html">browsers list</a> that are currently running. + If no browsers are running, Choosy will prompt you to select from all + of the browsers in + your <a href="../settings/browsers.html">browsers list</a>. + </dd> + + <dt>Prompt to select from these browsers&hellip;</dt> + <dd> + <p> + Choosy will prompt you to select from a custom list of browsers that you set up only + for this rule. When you select this option an interface very similar to the + <a href="../settings/browsers.html">browsers list</a> will appear where you can set + up a custom browser list. + </p> + <img + src="../images/settings_advanced_behaviour_custom.png" + alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" + width="526" height="223" /> + </dd> + + <dt>Always use this browser&hellip;</dt> + <dd> + <p> + Choosy will always use the same browser. When you select this option an interface will + appear that allows you to select the browser that Choosy should always use with this + rule. + </p> + <img + src="../images/settings_advanced_behaviour_specific.png" + alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" + width="530" height="107" /> + </dd> + + <dt>Use all of these browsers&hellip;</dt> + <dd> + <p> + Choosy will open all of the browsers you specify. The browsers will be opened in the order + that you specify. When you select this option an interface very similar to the + <a href="../settings/browsers.html">browsers list</a> will appear where you can set + up a custom browser list. + </p> + <img + src="../images/settings_advanced_behaviour_all.png" + alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" + width="526" height="222" /> + </dd> + </dl> + + </div> + + </div> + + <div id="ordering"> + <h2>Ordering rules</h2> + <p> + The order of your rules is important. When more than one rule matches the current situation + Choosy will use the rule that is nearest to the top of the list. This means that a very general rule + would take priority over a very specific rule when both rules match but the general rule is higher + up the list. + </p> + <p> + To change the order of the rules, drag and drop each rule into a new position. + </p> + <p> + The last rule in the list defines the default behaviour that Choosy will + fall back on if no other rule matched. This rule supports all the same + behaviours as normal rules, but you cannot edit the conditions in which + it applies, or move it out of its position at the end off the list. + </p> + </div> + + <div id="disabling"> + <h2>Disabling rules</h2> + + <p> + The checkboxes in the list of rules allow you to disable rules without removing them completely. If a + rule's checkbox is not checked then Choosy will ignore that rule. + </p> + </div> + +</body> + +</html> +</body> diff --git a/ChoosyHelp.help/Contents/Resources/settings/advanced/customapi.html b/ChoosyHelp.help/Contents/Resources/settings/rules/customapi.html similarity index 70% rename from ChoosyHelp.help/Contents/Resources/settings/advanced/customapi.html rename to ChoosyHelp.help/Contents/Resources/settings/rules/customapi.html index 1522afa..f19e652 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/advanced/customapi.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules/customapi.html @@ -1,50 +1,50 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / - <a href="../../settings/advanced.html">Advanced behaviour settings</a> / + <a href="../../settings/rules.html">Rules settings</a> / </p> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> - <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> + <p>To create a custom API method you need to create a <a href="../../settings/rules.html">rule</a> with an API method criterion:</p> <ol> - <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> + <li>Create a new rule by clicking on the plus button below the rules list.</li> <li> Change the type of the second row in the rule editor to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" width="503" height="31" /> </li> <li>Enter the name of your custom API method into the text field on this row.</li> - <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> + <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other rule (see the section on <a href="../../settings/rules.html#edit-behaviour">behaviour of rules</a> for more information)</li> </ol> - <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated. + <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated. </p> </div> <div id="use"> <h2>Using custom API methods</h2> <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/https://www.example.com</code> (replacing <code>https://www.example.com</code> with whatever URL you wanted the custom API method to apply to).</p> <p>For more information on calling API methods, including code examples for various languages, see the <a href="https://www.choosyosx.com/api">API documentation on the Choosy web site</a>.</p> </div> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/settings/advanced/urls.html b/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html similarity index 95% rename from ChoosyHelp.help/Contents/Resources/settings/advanced/urls.html rename to ChoosyHelp.help/Contents/Resources/settings/rules/urls.html index 6eb2f59..727e5e6 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/advanced/urls.html +++ b/ChoosyHelp.help/Contents/Resources/settings/rules/urls.html @@ -1,113 +1,113 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / - <a href="../../settings/advanced.html">Advanced behaviour settings</a> / + <a href="../../settings/rules.html">Rules settings</a> / </p> <h1>Choosy Help: Web address rules</h1> <p> - You can create advanced behaviour rules that are triggered by clicking on a link to a web + You can create rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains <code>facebook</code>&rdquo; matching addresses would include <code>https://www.facebook.com/</code> and <code>https://example.com/facebook</code> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at the start of the URL (i.e. <code>https://</code> or <code>http://</code>). For example, if the rule was &ldquo;begins with <code>https://www.google.</code>&rdquo; matching addresses would include <code>https://www.google.com/</code>, <code>https://www.google.co.uk/</code> and <code>https://www.google.com/search?q=choosy</code> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends with <code>.pdf</code>&rdquo; it would match any direct links to PDF files. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> The pattern <code>a?c</code> would match <code>abc</code> but not <code>ac</code> or <code>abbc</code> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> The pattern <code>a*c</code> would match <code>ac</code>, <code>abc</code> and <code>abbc</code> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are not already familiar with regular expressions there are various web sites with indepth tutorials, several of which are linked from the <a href="https://en.wikipedia.org/wiki/Regular_expression">Wikipedia article on regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU project web site</a>. </dd> </dl> </body> </html>
choosy-app/choosy-help
4278ae410abd385f95b6e97242b22325588dcc52
Add dark mode versions of screenshots.
diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_custom_api-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_custom_api-dark.png new file mode 100644 index 0000000..5abd1db Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_custom_api-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_link_type-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_link_type-dark.png new file mode 100644 index 0000000..0ce10ae Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_link_type-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_modifier_keys-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_modifier_keys-dark.png new file mode 100644 index 0000000..c52c760 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_modifier_keys-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_running_browsers-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_running_browsers-dark.png new file mode 100644 index 0000000..18f7daf Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_running_browsers-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_short_url-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_short_url-dark.png new file mode 100644 index 0000000..b65d72b Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_short_url-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_source_app-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_source_app-dark.png new file mode 100644 index 0000000..6fecd61 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_source_app-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_type-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_type-dark.png new file mode 100644 index 0000000..32e0e11 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_type-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/rule_editor_web_address-dark.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_web_address-dark.png new file mode 100644 index 0000000..fedd0af Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/rule_editor_web_address-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_all-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_all-dark.png new file mode 100644 index 0000000..7af9c12 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_all-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_custom-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_custom-dark.png new file mode 100644 index 0000000..a35524b Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_custom-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_specific-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_specific-dark.png new file mode 100644 index 0000000..5742326 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_specific-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_advanced_edit-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_edit-dark.png new file mode 100644 index 0000000..e7d9fd2 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_edit-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_general_enable-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_enable-dark.png new file mode 100644 index 0000000..f2fbe92 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_general_enable-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_general_licence-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_licence-dark.png new file mode 100644 index 0000000..f520aed Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_general_licence-dark.png differ diff --git a/ChoosyHelp.help/Contents/Resources/images/settings_general_version-dark.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_version-dark.png new file mode 100644 index 0000000..4572bd0 Binary files /dev/null and b/ChoosyHelp.help/Contents/Resources/images/settings_general_version-dark.png differ
choosy-app/choosy-help
40f4e64e3ac9ad60c421beba1fff33d20e3100b1
Correct spelling of "licence"
diff --git a/ChoosyHelp.help/Contents/Resources/settings/general.html b/ChoosyHelp.help/Contents/Resources/settings/general.html index b789512..f5f197c 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/general.html +++ b/ChoosyHelp.help/Contents/Resources/settings/general.html @@ -1,122 +1,122 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings launch the Choosy app (from Finder, Launchpad, etc.) and then click on the General tab. </p> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" width="548" height="117" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to web sites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Start Choosy at login</dt> <dd> Enable this option to have Choosy start whenever you login to your Mac. If you disable this option, Choosy will start up the first time you click on a link. This option is probably most useful when paired with the <i>Display Choosy icon in the menu bar</i> option (see below). </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while Choosy is running, so you will probably want to use this setting in conjunction with the <i>start Choosy at login</i> option. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" width="549" height="115" /> <p> If an update is available you can see full details of the new version and install it by clicking on the <i>Update details</i> button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" width="548" height="149" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. - If you decide to <a href="https://www.choosyosx.com/buy">purchase a Choosy license</a> you enter your - license information in the following fields: + If you decide to <a href="https://www.choosyosx.com/buy">purchase a Choosy licence</a> you enter your + licence information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> - This must be the e-mail address that you provided when purchasing your license from the Choosy + This must be the e-mail address that you provided when purchasing your licence from the Choosy web site. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
4021b9a4dbc688c1903acd28e03df297bb76121b
Add info.plist file.
diff --git a/ChoosyHelp.help/Contents/Info.plist b/ChoosyHelp.help/Contents/Info.plist new file mode 100644 index 0000000..1ffe014 --- /dev/null +++ b/ChoosyHelp.help/Contents/Info.plist @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en-gb</string> + <key>CFBundleIdentifier</key> + <string>com.choosyosx.Choosy.help</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleSignature</key> + <string>hbwr</string> + <key>CFBundleName</key> + <string>ChoosyHelp</string> + <key>CFBundleShortVersionString</key> + <string>1.2</string> + <key>HPDBookAccessPath</key> + <string>index.html</string> + <key>HPDBookIndexPath</key> + <string>ChoosyHelp.helpindex</string> + <key>HPDBookTitle</key> + <string>Choosy Help</string> + <key>HPDBookType</key> + <string>3</string> + <key>HPDBookIconPath</key> + <string>images/icon.png</string> +</dict> +</plist>
choosy-app/choosy-help
586000a02b7e7e1ded25246ac0293b77b4788ba1
Ignore generated index file.
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4b9be8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ChoosyHelp.help/Contents/Resources/ChoosyHelp.helpindex
choosy-app/choosy-help
86df71ac08231ad8c754a75d0c8106c662f8df2f
Makefile improvements.
diff --git a/Makefile b/Makefile index 17a739d..6249032 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,11 @@ SOURCES = $(shell find . -type f -name '*.html') +.PHONY: echo index + echo: echo $(SOURCES) -ChoosyHelp.help/Contents/Resources/English.lproj/ChoosyHelp.helpindex: $(SOURCES) - hiutil -1 -vv --create --locale=en --file $@ ChoosyHelp.help +index: ChoosyHelp.help/Contents/Resources/ChoosyHelp.helpindex + +ChoosyHelp.help/Contents/Resources/ChoosyHelp.helpindex: $(SOURCES) + hiutil -1 -vvv --anchors --create --locale=en --file $@ ChoosyHelp.help/Contents/Resources
choosy-app/choosy-help
be81cbc403f43d4093c0b4243da6c73cb518ef74
Fix CSS line height.
diff --git a/ChoosyHelp.help/Contents/Resources/style/main.css b/ChoosyHelp.help/Contents/Resources/style/main.css index 78fd186..b642144 100644 --- a/ChoosyHelp.help/Contents/Resources/style/main.css +++ b/ChoosyHelp.help/Contents/Resources/style/main.css @@ -1,76 +1,76 @@ html, body { margin:0; padding:0; } body { font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif; font-size:small; - line-height:1.4em; + line-height:1.4; color:#444; padding:2em 2em; } h1 { font-size:2em; margin:0 0 1em; } h2 { margin-top:1.5em; } a { color:#2E85B4; text-decoration:none; } a:hover, a:focus, a:active { text-decoration:underline; } ol, ul { margin-bottom: 1em; } dl dt { font-style:italic; font-size:1.1em; } dl dd { margin-bottom:0.75em; } img { display:block; margin:1em 0; } table { border-collapse:collapse; margin:1em 0; } table th, table td { border:1px solid #ccc; padding:0.3em 0.5em; text-align:left; } table th { background-color:#eee; } p { margin:0 0 1em 0; } p.breadcrumbs { margin:0 0 0.5em; font-size:0.8em; }
choosy-app/choosy-help
6da18f6e39cfe34c58e1d7dca05d1bf9d8e2ca88
Add more anchors.
diff --git a/ChoosyHelp.help/Contents/Resources/basic/choosy.html b/ChoosyHelp.help/Contents/Resources/basic/choosy.html index 063cce7..435e207 100644 --- a/ChoosyHelp.help/Contents/Resources/basic/choosy.html +++ b/ChoosyHelp.help/Contents/Resources/basic/choosy.html @@ -1,44 +1,45 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: What is Choosy?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpIntro"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: What is Choosy?</h1> <h2>A smarter default browser</h2> <p> When you click on a link outside of your web browser it opens in your default web browser. If you use more than one web browser on a regular basis having a single default web browser can be very restrictive. That's where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser for that particular situation. </p> <h2>How does Choosy decide which browser to use?</h2> <p> In some situations Choosy will display a prompt and allow you to select from a list of browsers. In other situations Choosy will automatically select which browser. Exactly what happens is completely based on your settings. Your <a href="../settings/advanced.html">advanced behaviour rules</a> will be applied first, and then if none of them match, then your <a href="../settings/behaviour.html">standard behaviours</a> will be applied. </p> <p> If you're setting Choosy up for the first time, have a look at the <a href="../basic/configuration.html">configuration guide</a>. </p> </body> </html> diff --git a/ChoosyHelp.help/Contents/Resources/basic/installation.html b/ChoosyHelp.help/Contents/Resources/basic/installation.html index 5d1f253..87cdd03 100644 --- a/ChoosyHelp.help/Contents/Resources/basic/installation.html +++ b/ChoosyHelp.help/Contents/Resources/basic/installation.html @@ -1,49 +1,50 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Installation guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpInstallation"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: Installation guide</h1> <p>A step by step guide to installing Choosy.</p> <ol> <li> Download the latest version of Choosy from <a href="http://www.choosyosx.com/releases/latest">www.choosyosx.com</a>. </li> <li> The download is a ZIP file, depending on how your system is set up it may have unzipped itself automatically, if not just unzip it by double clicking on it in the Finder. It will contain a single file called Choosy.prefPane. </li> <li> Double click on the Choosy.prefPane file, it will open in System Preferences. </li> <li> Select whether you want to install Choosy for the current user or for all users. </li> <li> Set up the way you want Choosy to work. See the <a rel="next" href="../basic/configuration.html">configuration guide</a> for more information. </li> </ol> <p></p> </body> </html>
choosy-app/choosy-help
c6caa8d71898258eb62d97f874e30618cb40263c
Fix invalid markup.
diff --git a/ChoosyHelp.help/Contents/Resources/settings/advanced.html b/ChoosyHelp.help/Contents/Resources/settings/advanced.html index 751497f..fe22983 100644 --- a/ChoosyHelp.help/Contents/Resources/settings/advanced.html +++ b/ChoosyHelp.help/Contents/Resources/settings/advanced.html @@ -1,402 +1,402 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" width="780" height="729" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" width="522" height="26" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" width="522" height="26" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will have a text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" width="522" height="26" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this type of criterion to set up a rule that sends all links to <code>google.com</code> to <i>Firefox</i>. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" width="522" height="26" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). - <p> + </p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" width="522" height="26" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a web site</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to web sites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" width="522" height="26" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" width="522" height="26" /> <p> This type of criterion lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" width="522" height="26" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> <dt>URL shortening service</dt> <dd> <img src="../images/rule_editor_short_url.png" alt="A screenshot of a short URL criteron row in the rule editor" width="522" height="26" /> <p> This type of criteria allow you to define rules that are only triggered when Choosy opens a link to a URL shortening service, like bit.ly or tinyurl. </p> <p> This is useful when combined with the <a href="../settings/behaviour.html#short">short URL expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that you will be able to check the expanded URL in the prompt before you open the site in a browser. </p> <p> A list of supported URL shortening services, and instructions for adding your own are in the <a href="../settings/behaviour.html#short">short URL expansion section on the behaviour page</a>. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" width="539" height="229" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" width="533" height="113" /> </dd> <dt>Use all of these browsers&hellip;</dt> <dd> <p> Choosy will open all of the browsers you specify. The browsers will be opened in the order that you specify. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_all.png" alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" width="540" height="230" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules, drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html>
choosy-app/choosy-help
81f7996aafb5d6b30e09adf0f2d3d071885d1aef
.help bundle structure
diff --git a/basic/choosy.html b/ChoosyHelp.help/Contents/Resources/basic/choosy.html similarity index 100% rename from basic/choosy.html rename to ChoosyHelp.help/Contents/Resources/basic/choosy.html diff --git a/basic/configuration.html b/ChoosyHelp.help/Contents/Resources/basic/configuration.html similarity index 100% rename from basic/configuration.html rename to ChoosyHelp.help/Contents/Resources/basic/configuration.html diff --git a/basic/installation.html b/ChoosyHelp.help/Contents/Resources/basic/installation.html similarity index 100% rename from basic/installation.html rename to ChoosyHelp.help/Contents/Resources/basic/installation.html diff --git a/images/icon.png b/ChoosyHelp.help/Contents/Resources/images/icon.png similarity index 100% rename from images/icon.png rename to ChoosyHelp.help/Contents/Resources/images/icon.png diff --git a/images/prompt_circle.png b/ChoosyHelp.help/Contents/Resources/images/prompt_circle.png similarity index 100% rename from images/prompt_circle.png rename to ChoosyHelp.help/Contents/Resources/images/prompt_circle.png diff --git a/images/prompt_circle_no_text.png b/ChoosyHelp.help/Contents/Resources/images/prompt_circle_no_text.png similarity index 100% rename from images/prompt_circle_no_text.png rename to ChoosyHelp.help/Contents/Resources/images/prompt_circle_no_text.png diff --git a/images/prompt_row.png b/ChoosyHelp.help/Contents/Resources/images/prompt_row.png similarity index 100% rename from images/prompt_row.png rename to ChoosyHelp.help/Contents/Resources/images/prompt_row.png diff --git a/images/prompt_row_expanded_url.png b/ChoosyHelp.help/Contents/Resources/images/prompt_row_expanded_url.png similarity index 100% rename from images/prompt_row_expanded_url.png rename to ChoosyHelp.help/Contents/Resources/images/prompt_row_expanded_url.png diff --git a/images/prompt_row_no_text.png b/ChoosyHelp.help/Contents/Resources/images/prompt_row_no_text.png similarity index 100% rename from images/prompt_row_no_text.png rename to ChoosyHelp.help/Contents/Resources/images/prompt_row_no_text.png diff --git a/images/rule_editor_custom_api.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_custom_api.png similarity index 100% rename from images/rule_editor_custom_api.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_custom_api.png diff --git a/images/rule_editor_link_type.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_link_type.png similarity index 100% rename from images/rule_editor_link_type.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_link_type.png diff --git a/images/rule_editor_modifier_keys.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_modifier_keys.png similarity index 100% rename from images/rule_editor_modifier_keys.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_modifier_keys.png diff --git a/images/rule_editor_running_browsers.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_running_browsers.png similarity index 100% rename from images/rule_editor_running_browsers.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_running_browsers.png diff --git a/images/rule_editor_short_url.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_short_url.png similarity index 100% rename from images/rule_editor_short_url.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_short_url.png diff --git a/images/rule_editor_source_app.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_source_app.png similarity index 100% rename from images/rule_editor_source_app.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_source_app.png diff --git a/images/rule_editor_type.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_type.png similarity index 100% rename from images/rule_editor_type.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_type.png diff --git a/images/rule_editor_web_address.png b/ChoosyHelp.help/Contents/Resources/images/rule_editor_web_address.png similarity index 100% rename from images/rule_editor_web_address.png rename to ChoosyHelp.help/Contents/Resources/images/rule_editor_web_address.png diff --git a/images/settings_advanced_behaviour_all.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_all.png similarity index 100% rename from images/settings_advanced_behaviour_all.png rename to ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_all.png diff --git a/images/settings_advanced_behaviour_custom.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_custom.png similarity index 100% rename from images/settings_advanced_behaviour_custom.png rename to ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_custom.png diff --git a/images/settings_advanced_behaviour_specific.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_specific.png similarity index 100% rename from images/settings_advanced_behaviour_specific.png rename to ChoosyHelp.help/Contents/Resources/images/settings_advanced_behaviour_specific.png diff --git a/images/settings_advanced_edit.png b/ChoosyHelp.help/Contents/Resources/images/settings_advanced_edit.png similarity index 100% rename from images/settings_advanced_edit.png rename to ChoosyHelp.help/Contents/Resources/images/settings_advanced_edit.png diff --git a/images/settings_general_enable.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_enable.png similarity index 100% rename from images/settings_general_enable.png rename to ChoosyHelp.help/Contents/Resources/images/settings_general_enable.png diff --git a/images/settings_general_licence.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_licence.png similarity index 100% rename from images/settings_general_licence.png rename to ChoosyHelp.help/Contents/Resources/images/settings_general_licence.png diff --git a/images/settings_general_version.png b/ChoosyHelp.help/Contents/Resources/images/settings_general_version.png similarity index 100% rename from images/settings_general_version.png rename to ChoosyHelp.help/Contents/Resources/images/settings_general_version.png diff --git a/index.html b/ChoosyHelp.help/Contents/Resources/index.html similarity index 100% rename from index.html rename to ChoosyHelp.help/Contents/Resources/index.html diff --git a/misc/browsers.html b/ChoosyHelp.help/Contents/Resources/misc/browsers.html similarity index 100% rename from misc/browsers.html rename to ChoosyHelp.help/Contents/Resources/misc/browsers.html diff --git a/misc/uninstalling.html b/ChoosyHelp.help/Contents/Resources/misc/uninstalling.html similarity index 100% rename from misc/uninstalling.html rename to ChoosyHelp.help/Contents/Resources/misc/uninstalling.html diff --git a/settings/advanced.html b/ChoosyHelp.help/Contents/Resources/settings/advanced.html similarity index 100% rename from settings/advanced.html rename to ChoosyHelp.help/Contents/Resources/settings/advanced.html diff --git a/settings/advanced/customapi.html b/ChoosyHelp.help/Contents/Resources/settings/advanced/customapi.html similarity index 100% rename from settings/advanced/customapi.html rename to ChoosyHelp.help/Contents/Resources/settings/advanced/customapi.html diff --git a/settings/advanced/urls.html b/ChoosyHelp.help/Contents/Resources/settings/advanced/urls.html similarity index 100% rename from settings/advanced/urls.html rename to ChoosyHelp.help/Contents/Resources/settings/advanced/urls.html diff --git a/settings/appearance.html b/ChoosyHelp.help/Contents/Resources/settings/appearance.html similarity index 100% rename from settings/appearance.html rename to ChoosyHelp.help/Contents/Resources/settings/appearance.html diff --git a/settings/behaviour.html b/ChoosyHelp.help/Contents/Resources/settings/behaviour.html similarity index 100% rename from settings/behaviour.html rename to ChoosyHelp.help/Contents/Resources/settings/behaviour.html diff --git a/settings/browsers.html b/ChoosyHelp.help/Contents/Resources/settings/browsers.html similarity index 100% rename from settings/browsers.html rename to ChoosyHelp.help/Contents/Resources/settings/browsers.html diff --git a/settings/general.html b/ChoosyHelp.help/Contents/Resources/settings/general.html similarity index 100% rename from settings/general.html rename to ChoosyHelp.help/Contents/Resources/settings/general.html diff --git a/style/main.css b/ChoosyHelp.help/Contents/Resources/style/main.css similarity index 100% rename from style/main.css rename to ChoosyHelp.help/Contents/Resources/style/main.css diff --git a/ChoosyHelp.helpindex b/ChoosyHelp.helpindex deleted file mode 100644 index 483feea..0000000 Binary files a/ChoosyHelp.helpindex and /dev/null differ diff --git a/Makefile b/Makefile index 079e67c..17a739d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SOURCES = $(shell find . -type f -name '*.html') echo: echo $(SOURCES) -ChoosyHelp.helpindex: $(SOURCES) - hiutil -1 -vv --create --locale=en --file $@ . +ChoosyHelp.help/Contents/Resources/English.lproj/ChoosyHelp.helpindex: $(SOURCES) + hiutil -1 -vv --create --locale=en --file $@ ChoosyHelp.help
choosy-app/choosy-help
db678ef9d1af76f312ab8fe0da25f59603694cb5
Remove documentation of removed feature.
diff --git a/misc/uninstalling.html b/misc/uninstalling.html index 5daa83b..96521a0 100644 --- a/misc/uninstalling.html +++ b/misc/uninstalling.html @@ -1,33 +1,33 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Miscelaneous topics / </p> <h1>Choosy Help: Uninstalling Choosy</h1> <p>To remove Choosy from your system, follow these steps:</p> <ol> <li>Open Choosy in System Preferences</li> <li>Stop the helper application by clicking the &ldquo;Stop Helper&rdquo; button</li> - <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; and &ldquo;Enable Choosy for HTML files&rdquo; boxes (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> + <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; box (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> <li>Go back to the main System Preferences menu</li> <li>Control-click on the Choosy icon and select &ldquo;Remove Choosy Preference Pane&rdquo; from the menu</li> </ol> </body> </html> diff --git a/settings/general.html b/settings/general.html index ced7d5a..9e10a52 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,138 +1,130 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to web sites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> - <dt>Enable Choosy for HTML files</dt> - <dd> - This checkbox determines whether or not Choosy will be used when opening HTML files from the - Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that - specificly target files opened from the Finder if you want custom behaviour for this type of - file. - </dd> - <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to <a href="http://www.choosyosx.com/buy">purchase a Choosy license</a> you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy web site. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
2a8dadb0526fb993e162ca973a57f735b245a68c
Style improvements.
diff --git a/images/icon.png b/images/icon.png deleted file mode 100644 index 0f722c4..0000000 Binary files a/images/icon.png and /dev/null differ diff --git a/style/main.css b/style/main.css index 53950dc..78fd186 100644 --- a/style/main.css +++ b/style/main.css @@ -1,80 +1,76 @@ html, body { margin:0; padding:0; } body { font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif; font-size:small; line-height:1.4em; color:#444; - padding:1em 2em; + padding:2em 2em; } h1 { - background-color:#7F7F7F; - background-image:url('../images/icon.png'); - background-position:99% 50%; - background-repeat:no-repeat; - color:#fff; font-size:2em; - margin:0 -0.5em 1em; - padding:0.6em 60px 0.6em 0.5em; - -webkit-border-radius:0.8em; - -moz-border-radius:0.8em; + margin:0 0 1em; } h2 { margin-top:1.5em; } a { color:#2E85B4; text-decoration:none; } a:hover, a:focus, a:active { text-decoration:underline; } +ol, ul { + margin-bottom: 1em; +} + dl dt { font-style:italic; font-size:1.1em; } dl dd { margin-bottom:0.75em; } img { display:block; margin:1em 0; } table { border-collapse:collapse; margin:1em 0; } table th, table td { border:1px solid #ccc; padding:0.3em 0.5em; text-align:left; } table th { background-color:#eee; } p { margin:0 0 1em 0; } p.breadcrumbs { margin:0 0 0.5em; font-size:0.8em; -} \ No newline at end of file +}
choosy-app/choosy-help
37aec1e2ce59e7bbf13e29a7189d9faa090e95d0
Minor copy and markup improvements.
diff --git a/basic/choosy.html b/basic/choosy.html index c4f0782..063cce7 100644 --- a/basic/choosy.html +++ b/basic/choosy.html @@ -1,43 +1,44 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: What is Choosy?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: What is Choosy?</h1> <h2>A smarter default browser</h2> <p> When you click on a link outside of your web browser it opens in your default web browser. If you use more than one web browser on a regular basis having a single default web browser can be very restrictive. That's - where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser. + where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser for + that particular situation. </p> <h2>How does Choosy decide which browser to use?</h2> <p> In some situations Choosy will display a prompt and allow you to select from a list of browsers. In other situations Choosy will automatically select which browser. Exactly what happens is completely based on your settings. Your <a href="../settings/advanced.html">advanced behaviour rules</a> will be applied first, and - then if none of them matched your <a href="../settings/behaviour.html">standard behaviours</a> will be + then if none of them match, then your <a href="../settings/behaviour.html">standard behaviours</a> will be applied. </p> <p> If you're setting Choosy up for the first time, have a look at the <a href="../basic/configuration.html">configuration guide</a>. </p> </body> </html> diff --git a/basic/configuration.html b/basic/configuration.html index 6594b94..38959af 100644 --- a/basic/configuration.html +++ b/basic/configuration.html @@ -1,113 +1,114 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Configuration guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Getting started / </p> <h1>Choosy Help: Configuration guide</h1> <p>A step by step guide to setting up Choosy.</p> <ol> <li> <h2>Browsers</h2> <p> The first thing to set up is the browsers that you want Choosy to use. When you first install Choosy the browser list will be populated with all the browsers that OS X knows are installed on your system. - This might include some apps that aren't really browsers but are able to open some kinds of links and - might be missing some browsers, especially if you have more than one version of the same browser - installed. + This list won't be perfect: it might include some apps that aren't really browsers, but happen to be + able to open links; it might be missing some browsers, especially if you have more than one version of + the same browser installed. </p> <p> - The <strong>order of the browser list</strong> is important. When we configure the behaviour later any + The <strong>order of the browser list</strong> is important: they should be in order of preference, with + the browser you'd most often like to use at the top. When we configure the behaviour later any settings that refer to the &ldquo;favourite&rdquo; browser are talking about the browser at the top of the list. Similarly settings that talk about the &ldquo;best running browser&rdquo; are referring to the running browser that is highest up the list. </p> <p> To customise the browser list: </p> <ol> <li> Open Choosy in System Preferences. </li> <li> Click on the &ldquo;Browsers&rdquo; tab. </li> <li> Remove any browser you don't want Choosy to use by clicking on the browser in the list and clicking the minus button below the list. </li> <li> Add any missing browsers either using the plus button below the list, or by dragging the browsers into the list from the Finder. </li> <li> Change the order of the list so your favourite browser is first by dragging and dropping the browser in the list. </li> </ol> <p> There are more details on the settings in the browsers tab in the <a href="../settings/browsers.html">browser settings</a> section. </p> </li> <li> <h2>Basic behaviour</h2> <p> Next we should configure the basic behaviour. This is what Choosy will usually do when you click on a link. There are two settings to consider: What Choosy should do when <strong>no browsers are running</strong> and when <strong>one or more browsers are running</strong>. To customise the behaviour: </p> <ol> <li>Open Choosy in System Preferences.</li> <li>Click on the &ldquo;Behaviour&rdquo; tab.</li> <li>Select the behaviours that seem most appropriate (you can always change them later).</li> </ol> <p> There are more details about the individual settings on the behaviour tab in the <a href="../settings/behaviour.html">behaviour settings</a> section. </p> </li> <li> <h2>Next steps</h2> <ol> <li> <h3>Advanced behaviour rules</h3> <p> You might also want to tweak Choosy's behaviour and create exceptions to your basic behaviour rules that apply in specific circumstances. These could be based on the link you're opening, on the modifier keys you're holding when you click on a link or on a variety of other criteria. - There is a great deal of flexibility and many different ways that this section you can use. + There is a great deal of flexibility, and many different ways you can use advanced rules. For more information see the <a href="../settings/advanced.html">advanced behaviour settings</a> section. </p> </li> <li> <h3>Browser plugins</h3> <p> If you want to use Choosy's functionality from inside your browser there are a variety of browser plugins and bookmarklets that you can install. There is more information in the <a href="../misc/browsers.html">browser integration</a> section. </p> </li> </ol> </li> </ol> </body> </html> diff --git a/index.html b/index.html index ee91803..e9d60ae 100644 --- a/index.html +++ b/index.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Contents</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style/main.css" type="text/css" media="all" /> <meta name="AppleTitle" content="Choosy Help" /> <meta name="AppleIcon" content="ChoosyHelp/images/icon16.png" /> - </head> <body> <a name="ChoosyHelpContents"></a> <h1>Choosy Help</h1> <h2>Contents</h2> <ul> <li> <h3>Getting started</h3> - The basics: What Choosy can do and how to use it + <p>The basics: What Choosy can do and how to use it.</p> <ul> <li><a href="basic/choosy.html">What is Choosy?</a></li> <li><a href="basic/installation.html">Installation guide</a></li> <li><a href="basic/configuration.html">Configuration guide</a></li> </ul> </li> <li> <h3>Choosy settings</h3> - Detailed information on all the settings in Choosy's system preferences panel + <p>Detailed information on all the settings in Choosy's system preferences panel.</p> <ul> <li><a href="settings/general.html">General settings</a></li> <li><a href="settings/browsers.html">Browser settings</a></li> <li><a href="settings/behaviour.html">Behaviour settings</a></li> <li><a href="settings/appearance.html">Appearance settings</a></li> <li> <a href="settings/advanced.html">Advanced behaviour settings</a> <ul> <li><a href="settings/advanced/urls.html">Web address rules</a></li> <li><a href="settings/advanced/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> </ul> </li> </ul> </li> <li> <h3>Miscelaneous topics</h3> - Everything from <abbr title="Frequently Asked Questions">FAQs</abbr> to removal instructions + <p>Everything from <abbr title="Frequently Asked Questions">FAQs</abbr> to removal instructions.</p> <ul> <li><a href="misc/browsers.html">Browser integration</a></li> <li><a href="misc/uninstalling.html">Uninstalling Choosy</a></li> </ul> </li> <li> <h3>Online resources</h3> - More help and resources on the internet + <p>More help and resources on the internet.</p> <ul> <li><a href="http://feedback.choosyosx.com">Choosy feedback forum</a></li> - <li><a href="http://www.choosyosx.com">Choosy website</a></li> - <li class="vcard"><a class="url" href="http://georgebrock.com"><span class="fn">George Brocklehurst</span>'s website</a></li> + <li><a href="http://www.choosyosx.com">Choosy web site</a></li> + <li class="vcard"><a class="url" href="http://georgebrock.com"><span class="fn">George Brocklehurst</span>'s web site</a></li> </ul> </li> </ul> </body> </html> diff --git a/misc/browsers.html b/misc/browsers.html index 469bef8..c040731 100644 --- a/misc/browsers.html +++ b/misc/browsers.html @@ -1,51 +1,51 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser integration</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Miscelaneous topics / </p> <h1>Choosy Help: Browser integration</h1> <p>There are two main ways of using Choosy's functionality from within your browser and some other tools that can help in specific circumstances:</p> <ul> <li><a href="#plugins">Browser plugins</a></li> <li><a href="#bookmarklets">Bookmarklets</a></li> <li><a href="#tools">Other tools</a></li> </ul> <div id="plugins"> <h2>Browser plugins</h2> - <p>Browser plugins provide great integration with a browser. Choosy plugins usually add an option to the manu that appears when you right-click on a link allowing you to open the link in another browser using Choosy. Some plugins also allow you to trigger Choosy's browser prompt by holding down a modifier key an clicking on a link in your browser.</p> + <p>Browser plugins provide greater integration with a browser. Choosy plugins usually add an option to the menu that appears when you right-click on a link, allowing you to open that link in another browser using Choosy.</p> <p>The downside of plugins is that they are specific to an individual browser, so you will need to install a plugin for each browser that you regularly use.</p> - <p>There is a <a href="http://www.choosyosx.com/browsers#plugins">list of available plugins on the Choosy website</a>.</p> + <p>There is a <a href="http://www.choosyosx.com/browsers#plugins">list of available plugins on the Choosy web site</a>.</p> </div> <div id="bookmarklets"> <h2>Bookmarklets</h2> - <p>Bookmarklets are links that you can add to the bookmarks bar of a browser. Rather than linking a web page they run a small script. The Choosy bookmarklets allow you to open the page you are currently looking at in another browser using Choosy. They don't provide as much integration as bookmarklets, but they will work the same in almost any browser.</p> - <p>You can find the <a href="http://www.choosyosx.com/browsers#bookmarklets">bookmarklets on the Choosy website</a> and drag them into your browser's bookmarks bar from there.</p> + <p>Bookmarklets are links that you can add to the bookmarks bar of a browser. Rather than linking a web page they run a small script. The Choosy bookmarklets allow you to open the page you are currently looking at in another browser using Choosy. They don't provide as much integration as plugins, but they will work the same in almost any browser.</p> + <p>You can find the <a href="http://www.choosyosx.com/browsers#bookmarklets">bookmarklets on the Choosy web site</a> and drag them into your browser's bookmarks bar from there.</p> </div> <div id="tools"> <h2>Other tools</h2> <h3>ChoosyFluid</h3> <p>One common use of Choosy is to automatically send links to different <a href="http://fluidapp.com">Fluid</a> browsers. ChoosyFluid is a tool that automatically detects Fluid browsers on your system and creates <a href="../settings/advanced.html">advanced behaviour rules</a> to use them.</p> - <p>You can <a href="http://www.choosyosx.com/browsers#fluid">download ChoosyFluid from the Choosy website</a>.</p> + <p>You can <a href="http://www.choosyosx.com/browsers#fluid">download ChoosyFluid from the Choosy web site</a>.</p> </div> </body> </html> diff --git a/misc/uninstalling.html b/misc/uninstalling.html index 6635a25..5daa83b 100644 --- a/misc/uninstalling.html +++ b/misc/uninstalling.html @@ -1,33 +1,33 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Miscelaneous topics / </p> <h1>Choosy Help: Uninstalling Choosy</h1> - <p>To remove Choosy from your system follow these steps:</p> + <p>To remove Choosy from your system, follow these steps:</p> <ol> <li>Open Choosy in System Preferences</li> <li>Stop the helper application by clicking the &ldquo;Stop Helper&rdquo; button</li> <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; and &ldquo;Enable Choosy for HTML files&rdquo; boxes (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> <li>Go back to the main System Preferences menu</li> <li>Control-click on the Choosy icon and select &ldquo;Remove Choosy Preference Pane&rdquo; from the menu</li> </ol> </body> </html> diff --git a/settings/advanced.html b/settings/advanced.html index a26da8f..0f66120 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,393 +1,392 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types - will have several options, others will just have a simple text box where you can type in a - value. + will have several options, others will have a text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For - example you could use this criteria to set up a rule that sends all links to - google.com to Firefox. + example you could use this type of criterion to set up a rule that sends all links + to <code>google.com</code> to <i>Firefox</i>. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> - <li>a link to a website</li> + <li>a link to a web site</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or - to links to websites. For example you might want to set up a custom prompt for HTML + to links to web sites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> - This type of criteria lets you set up rules that are only triggered when you are + This type of criterion lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> <dt>URL shortening service</dt> <dd> <img src="../images/rule_editor_short_url.png" alt="A screenshot of a short URL criteron row in the rule editor" /> <p> - This type of criteria allows you to define rules that are only triggered when Choosy + This type of criteria allow you to define rules that are only triggered when Choosy opens a link to a URL shortening service, like bit.ly or tinyurl. </p> <p> This is useful when combined with the <a href="../settings/behaviour.html#short">short URL expansion</a> settings. You can tell Choosy to always prompt when opening short URLs so that you will be able to check the expanded URL in the prompt before you open the site in a browser. </p> <p> A list of supported URL shortening services, and instructions for adding your own are in the <a href="../settings/behaviour.html#short">short URL expansion section on the behaviour page</a>. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> <dt>Use all of these browsers&hellip;</dt> <dd> <p> Choosy will open all of the browsers you specify. The browsers will be opened in the order that you specify. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_all.png" alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> - To change the order of the rules just drag and drop each rule into a new position. + To change the order of the rules, drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 4b7e6b4..ec340c0 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,46 +1,46 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / <a href="../../settings/advanced.html">Advanced behaviour settings</a> / </p> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> <ol> <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> <li> - Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: + Change the type of the second row in the rule editor to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> <li>Enter the name of your custom API method into the text field on this row.</li> <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> </ol> - <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.</li> + <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated. </p> </div> <div id="use"> <h2>Using custom API methods</h2> - <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/http://www.google.com</code> (replacing <code>http://www.google.com</code> with whatever URL you wanted the custom API method to apply to).</p> - <p>For more information on calling API methods, including code examples for various languages, see the <a href="http://www.choosyosx.com/api">API documentation on the Choosy website</a>.</p> + <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/http://www.example.com</code> (replacing <code>http://www.example.com</code> with whatever URL you wanted the custom API method to apply to).</p> + <p>For more information on calling API methods, including code examples for various languages, see the <a href="http://www.choosyosx.com/api">API documentation on the Choosy web site</a>.</p> </div> </body> </html> diff --git a/settings/advanced/urls.html b/settings/advanced/urls.html index 40d7de0..288281c 100644 --- a/settings/advanced/urls.html +++ b/settings/advanced/urls.html @@ -1,113 +1,113 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / <a href="../../settings/advanced.html">Advanced behaviour settings</a> / </p> <h1>Choosy Help: Web address rules</h1> <p> You can create advanced behaviour rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (e.g. - <em>http://</em> or <em>https://</em>) + <code>http://</code> or <code>https://</code>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the - protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) + protocol at the start of the URL (e.g. <code>http://</code> or <code>https://</code>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains - facebook&rdquo; matching addresses would include <em>http://www.facebook.com/</em> and - <em>http://example.com/facebook</em> + <code>facebook</code>&rdquo; matching addresses would include <code>https://www.facebook.com/</code> and + <code>http://example.com/facebook</code> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at - the start of the URL (e.g. <em>http://</em> or <em>https://</em>). For example, if the rule was - &ldquo;begins with http://www.google.&rdquo; matching addresses would include - <em>http://www.google.com/</em>, <em>http://www.google.co.uk/</em> and - <em>http://www.google.com/search?q=choosy</em> + the start of the URL (e.g. <code>http://</code> or <code>https://</code>). For example, if the rule was + &ldquo;begins with <code>http://www.google.</code>&rdquo; matching addresses would include + <code>http://www.google.com/</code>, <code>http://www.google.co.uk/</code> and + <code>http://www.google.com/search?q=choosy</code> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends - with .pdf&rdquo; it would match any direct links to PDF files. + with <code>.pdf</code>&rdquo; it would match any direct links to PDF files. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> - The pattern <em>a?c</em> - would match <em>abc</em> - but not <em>ac</em> or <em>abbc</em> + The pattern <code>a?c</code> + would match <code>abc</code> + but not <code>ac</code> or <code>abbc</code> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> - The pattern <em>a*c</em> - would match <em>ac</em>, <em>abc</em> and <em>abbc</em> + The pattern <code>a*c</code> + would match <code>ac</code>, <code>abc</code> and <code>abbc</code> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are - not already familiar with regular expressions there are various websites with indepth tutorials, several of - which are links from the <a href="http://en.wikipedia.org/wiki/Regular_Expressions">Wikipedia article on + not already familiar with regular expressions there are various web sites with indepth tutorials, several of + which are linked from the <a href="http://en.wikipedia.org/wiki/Regular_Expressions">Wikipedia article on regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU - project website</a>. + project web site</a>. </dd> </dl> </body> </html> diff --git a/settings/behaviour.html b/settings/behaviour.html index 4cf3f51..722902c 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,186 +1,186 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBehaviour"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> <li><a href="#short">When an URL shortening service has been used</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> <div id="short"> <h2>When an URL shortening service has been used</h2> <p> This setting defines how URLs that have been shortened using a service like bit.ly or tinyURL will be displayed in the browser prompt. </p> <p> Because it is specific to how URLs are displayed this setting is only available if the <a href="../settings/appearance.html#text">&ldquo;Display the URL in the prompt&rdquo; setting</a> is enabled. </p> <dl> <dt>Never expand URLs</dt> <dd> Choosy will never try to expand URLs for you. </dd> <dt>Only expand known short URLs (bit.ly, tinyurl etc.)</dt> <dd> Choosy will only try to expand URLs for you if they are from a known URL shortening service. See below for more information about which services are supported. </dd> <dt>Try to expand all URLs</dt> <dd> Choosy will make a request to all URLs that it opens to see if they respond by redirecting to - another website. + another web site. </dd> </dl> <h3>Supported URL shortening services</h3> <ul> <li>tinyurl.com</li> <li>bit.ly</li> <li>post.ly</li> <li>is.gd</li> <li>j.mp</li> <li>tr.im</li> <li>goo.gl</li> <li>flic.kr</li> <li>4sq.com</li> <li>gowal.la</li> <li>gbrck.com</li> </ul> <h3>Adding more URL shortening services</h3> <p> You can add more URL shortening services to Choosy by creating a property list file that lists their domains. </p> <ol> <li> Copy and paste the following code into a new TextEdit file: <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt; &lt;plist version=&quot;1.0&quot;&gt; &lt;array&gt; &lt;string&gt;example.org&lt;/string&gt; &lt;/array&gt; &lt;/plist&gt;</code></pre> </li> <li>Replace <code>example.org</code> with the URL shortener that you want to use</li> <li> Add any other shorteners on subsequent lines, e.g.: <pre><code> &lt;string&gt;example.org&lt;/string&gt; &lt;string&gt;example.com&lt;/string&gt;</code></pre> </li> <li> - Save the file to <em>/Users/you/Library/Application Support/Choosy/short_urls.plist</em> - (replacing <em>you</em> with your own username) + Save the file to <code>/Users/<var>you</var>/Library/Application Support/Choosy/short_urls.plist</code> + (replacing <var>you</var> with your own username) </li> </ol> </div> </body> </html> diff --git a/settings/browsers.html b/settings/browsers.html index faa933a..ee11b7d 100644 --- a/settings/browsers.html +++ b/settings/browsers.html @@ -1,100 +1,100 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBrowsers"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Browsers tab. </p> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> - Drag and drop a .app file from Finder. + Drag and drop a <code>.app</code> file from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add - any browsers that the OS knows about or to browse and select a different file. + any browsers that OS X knows about, or to browse and select a <code>.app</code> file. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open - HTML files or web links. If you add an application that isn't obviously a browser it may + HTML files or web links. If you add an application that isn't a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> - To change the order of the browser list just drag and drop the browsers into a different + To change the order of the browser list, drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and - your least favourite at the bottom of the list. The order of the browsers in your browser + your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/settings/general.html b/settings/general.html index 75d8b21..ced7d5a 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,138 +1,138 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> - This checkbox determines whether or not Choosy will be used when clicking on links to websites. + This checkbox determines whether or not Choosy will be used when clicking on links to web sites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> - <dt>Stop helper / Start helper now</dt> + <dt>Stop helper / Start helper</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to <a href="http://www.choosyosx.com/buy">purchase a Choosy license</a> you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy - website. + web site. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
c89d137c558192fb12d8fc2f72b4895b0b69307d
Version agnostic custom URL shortener instructions
diff --git a/settings/behaviour.html b/settings/behaviour.html index 1486123..4cf3f51 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,173 +1,186 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBehaviour"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> <li><a href="#short">When an URL shortening service has been used</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> <div id="short"> <h2>When an URL shortening service has been used</h2> <p> This setting defines how URLs that have been shortened using a service like bit.ly or tinyURL will be displayed in the browser prompt. </p> <p> Because it is specific to how URLs are displayed this setting is only available if the <a href="../settings/appearance.html#text">&ldquo;Display the URL in the prompt&rdquo; setting</a> is enabled. </p> <dl> <dt>Never expand URLs</dt> <dd> Choosy will never try to expand URLs for you. </dd> <dt>Only expand known short URLs (bit.ly, tinyurl etc.)</dt> <dd> Choosy will only try to expand URLs for you if they are from a known URL shortening service. See below for more information about which services are supported. </dd> <dt>Try to expand all URLs</dt> <dd> Choosy will make a request to all URLs that it opens to see if they respond by redirecting to another website. </dd> </dl> <h3>Supported URL shortening services</h3> <ul> <li>tinyurl.com</li> <li>bit.ly</li> <li>post.ly</li> <li>is.gd</li> <li>j.mp</li> <li>tr.im</li> <li>goo.gl</li> <li>flic.kr</li> <li>4sq.com</li> <li>gowal.la</li> <li>gbrck.com</li> </ul> <h3>Adding more URL shortening services</h3> <p> You can add more URL shortening services to Choosy by creating a property list file that lists their domains. </p> <ol> - <li>Open <em>Property List Editor</em> in <em>/Applications/Utilities</em>. It will create a new file for you.</li> - <li>Select the only row in the table (the key column should say <em>Root</em>)</li> - <li>Change the type from <em>Dictionary</em> to <em>Array</em></li> - <li>Press the <em>Add Child</em> button in the toolbar</li> - <li>Enter the domain you want to add in the value column</li> - <li>To add more domains, select the <em>Root</em> row again and repeat steps 4 and 5</li> - <li>Save the file to <em>~/Library/Application Support/Choosy/short_urls.plist</em></li> + <li> + Copy and paste the following code into a new TextEdit file: + <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; +&lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt; +&lt;plist version=&quot;1.0&quot;&gt; +&lt;array&gt; + &lt;string&gt;example.org&lt;/string&gt; +&lt;/array&gt; +&lt;/plist&gt;</code></pre> + </li> + <li>Replace <code>example.org</code> with the URL shortener that you want to use</li> + <li> + Add any other shorteners on subsequent lines, e.g.: + <pre><code> &lt;string&gt;example.org&lt;/string&gt; + &lt;string&gt;example.com&lt;/string&gt;</code></pre> + </li> + <li> + Save the file to <em>/Users/you/Library/Application Support/Choosy/short_urls.plist</em> + (replacing <em>you</em> with your own username) + </li> </ol> </div> </body> </html>
choosy-app/choosy-help
ccf88da394083f908e2622f88948f0cec297e12f
Added a link to the "buy now" page.
diff --git a/settings/general.html b/settings/general.html index 0690915..75d8b21 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,137 +1,138 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to websites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper now</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. - If you decide to purchase a Choosy license you enter your license information in the following fields: + If you decide to <a href="http://www.choosyosx.com/buy">purchase a Choosy license</a> you enter your + license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy website. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
0cdb43cf8623d908990c1d11c7b5f0d1c0f4ab92
Added information on the new expanding URL functionality.
diff --git a/images/prompt_row_expanded_url.png b/images/prompt_row_expanded_url.png new file mode 100644 index 0000000..3855d62 Binary files /dev/null and b/images/prompt_row_expanded_url.png differ diff --git a/settings/appearance.html b/settings/appearance.html index a8de571..32f71c9 100644 --- a/settings/appearance.html +++ b/settings/appearance.html @@ -1,104 +1,108 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Appearance settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAppearance"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Appearance settings</h1> <p> This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Appearance tab. </p> <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> When Choosy prompts you to select a browser (enable this in the <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> - For example, the screenshots below show the two different prompt styles with all the text options - switched off: + If the &ldquo;display the URL in the prompt&rdquo; is switched on and the URL is too long to be displayed + in the prompt, moving the mouse over the URL will cause it to expand and show the complete text: + </p> + <img src="../images/prompt_row_expanded_url.png" alt="Screenshot of the Choosy browser prompt in row mode with a long URL" /> + <p> + The screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" /> </div> <div id="icons"> <h2>Icon size</h2> <p> The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon below the slider gives a full size preview of what the prompt icons will look like. </p> </div> </body> </html>
choosy-app/choosy-help
2e97b3cd1f035e501b3f9a87262a077407355d0a
Removed an un-opened trailing bracket.
diff --git a/settings/advanced/urls.html b/settings/advanced/urls.html index 2aba3bf..40d7de0 100644 --- a/settings/advanced/urls.html +++ b/settings/advanced/urls.html @@ -1,113 +1,113 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../../index.html">Choosy help</a> / Settings / <a href="../../settings/advanced.html">Advanced behaviour settings</a> / </p> <h1>Choosy Help: Web address rules</h1> <p> You can create advanced behaviour rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains facebook&rdquo; matching addresses would include <em>http://www.facebook.com/</em> and <em>http://example.com/facebook</em> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>). For example, if the rule was &ldquo;begins with http://www.google.&rdquo; matching addresses would include <em>http://www.google.com/</em>, <em>http://www.google.co.uk/</em> and <em>http://www.google.com/search?q=choosy</em> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends with .pdf&rdquo; it would match any direct links to PDF files. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> The pattern <em>a?c</em> would match <em>abc</em> but not <em>ac</em> or <em>abbc</em> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> The pattern <em>a*c</em> would match <em>ac</em>, <em>abc</em> and <em>abbc</em> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are not already familiar with regular expressions there are various websites with indepth tutorials, several of which are links from the <a href="http://en.wikipedia.org/wiki/Regular_Expressions">Wikipedia article on regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU - project website</a>). + project website</a>. </dd> </dl> </body> </html>
choosy-app/choosy-help
3f9bf6c274aa832b09050f37bb62688cca25304b
Added description of new "use all of these browsers" advanced behaviour.
diff --git a/images/settings_advanced_behaviour_all.png b/images/settings_advanced_behaviour_all.png new file mode 100644 index 0000000..d03a04d Binary files /dev/null and b/images/settings_advanced_behaviour_all.png differ diff --git a/settings/advanced.html b/settings/advanced.html index 9de8c05..f18aae7 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,359 +1,373 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> + + <dt>Use all of these browsers&hellip;</dt> + <dd> + <p> + Choosy will open all of the browsers you specify. The browsers will be opened in the order + that you specify. When you select this option an interface very similar to the + <a href="../settings/browsers.html">browsers list</a> will appear where you can set + up a custom browser list. + </p> + <img + src="../images/settings_advanced_behaviour_all.png" + alt="A screenshot of Choosy's &quot;use all of these browsers&quot; interface" + /> + </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html>
choosy-app/choosy-help
acc3078752bd9d3961f5b1fca265b7cfa9664020
Removed large screenshots of settings tab from help file (they seem rather redundant when the primary means of access the help pages in question will be via a help button on the tab they describe).
diff --git a/images/settings_advanced.png b/images/settings_advanced.png deleted file mode 100644 index e5e18a6..0000000 Binary files a/images/settings_advanced.png and /dev/null differ diff --git a/images/settings_appearance.png b/images/settings_appearance.png deleted file mode 100644 index 0b61311..0000000 Binary files a/images/settings_appearance.png and /dev/null differ diff --git a/images/settings_behaviour.png b/images/settings_behaviour.png deleted file mode 100644 index 0addaec..0000000 Binary files a/images/settings_behaviour.png and /dev/null differ diff --git a/images/settings_browsers.png b/images/settings_browsers.png deleted file mode 100644 index 6e5bdfd..0000000 Binary files a/images/settings_browsers.png and /dev/null differ diff --git a/images/settings_general.png b/images/settings_general.png deleted file mode 100644 index e96e560..0000000 Binary files a/images/settings_general.png and /dev/null differ diff --git a/settings/advanced.html b/settings/advanced.html index c92d682..9de8c05 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,361 +1,359 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> - - <img src="../images/settings_advanced.png" alt="A screenshot of Choosy's advanced settings tab" /> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> diff --git a/settings/appearance.html b/settings/appearance.html index bf6f161..a8de571 100644 --- a/settings/appearance.html +++ b/settings/appearance.html @@ -1,106 +1,104 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Appearance settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsAppearance"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Appearance settings</h1> <p> This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Appearance tab. </p> - <img src="../images/settings_appearance.png" alt="A screenshot of Choosy's appearance settings tab" /> - <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> When Choosy prompts you to select a browser (enable this in the <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> For example, the screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" /> </div> <div id="icons"> <h2>Icon size</h2> <p> The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon below the slider gives a full size preview of what the prompt icons will look like. </p> </div> </body> </html> diff --git a/settings/behaviour.html b/settings/behaviour.html index a2b2634..4c26f49 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,107 +1,105 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBehaviour"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> - <img src="../images/settings_behaviour.png" alt="A screenshot of Choosy's behaviour settings tab" /> - <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> </body> </html> diff --git a/settings/browsers.html b/settings/browsers.html index f4586cd..faa933a 100644 --- a/settings/browsers.html +++ b/settings/browsers.html @@ -1,102 +1,100 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsBrowsers"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Browsers tab. </p> - <img src="../images/settings_browsers.png" alt="A screenshot of Choosy's browser settings tab" /> - <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a .app file from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that the OS knows about or to browse and select a different file. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't obviously a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list just drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/settings/general.html b/settings/general.html index 0d941d9..0690915 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,139 +1,137 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> - <img src="../images/settings_general.png" alt="A screenshot of Choosy's general settings tab" /> - <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to websites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper now</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to purchase a Choosy license you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy website. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
0c29f08b0ad084488247c2dd82c1cbee529599f4
Added anchors to the top of each page to allow programatic direct access.
diff --git a/ChoosyHelp.helpindex b/ChoosyHelp.helpindex new file mode 100644 index 0000000..a2691bc Binary files /dev/null and b/ChoosyHelp.helpindex differ diff --git a/settings/advanced.html b/settings/advanced.html index 5642836..c92d682 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,360 +1,361 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpSettingsAdvanced"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <img src="../images/settings_advanced.png" alt="A screenshot of Choosy's advanced settings tab" /> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> diff --git a/settings/appearance.html b/settings/appearance.html index 1e56963..bf6f161 100644 --- a/settings/appearance.html +++ b/settings/appearance.html @@ -1,105 +1,106 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Appearance settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpSettingsAppearance"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Appearance settings</h1> <p> This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Appearance tab. </p> <img src="../images/settings_appearance.png" alt="A screenshot of Choosy's appearance settings tab" /> <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> When Choosy prompts you to select a browser (enable this in the <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> For example, the screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" /> </div> <div id="icons"> <h2>Icon size</h2> <p> The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon below the slider gives a full size preview of what the prompt icons will look like. </p> </div> </body> </html> diff --git a/settings/behaviour.html b/settings/behaviour.html index b558d02..a2b2634 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,106 +1,107 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpSettingsBehaviour"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> <img src="../images/settings_behaviour.png" alt="A screenshot of Choosy's behaviour settings tab" /> <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> </body> </html> diff --git a/settings/browsers.html b/settings/browsers.html index 86caf6b..f4586cd 100644 --- a/settings/browsers.html +++ b/settings/browsers.html @@ -1,101 +1,102 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpSettingsBrowsers"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Browsers tab. </p> <img src="../images/settings_browsers.png" alt="A screenshot of Choosy's browser settings tab" /> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a .app file from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that the OS knows about or to browse and select a different file. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't obviously a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list just drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/settings/general.html b/settings/general.html index 5a13840..0d941d9 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,138 +1,139 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> +<a name="ChoosyHelpSettingsGeneral"></a> <p class="breadcrumbs"> <strong>You are here:</strong> <a href="../index.html">Choosy help</a> / Settings / </p> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <img src="../images/settings_general.png" alt="A screenshot of Choosy's general settings tab" /> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to websites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper now</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to purchase a Choosy license you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy website. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
fb4ad5ee288a029bb43f9191fdba203d0e7d24ad
Added Apple metadata, including a small icon file.
diff --git a/images/icon16.png b/images/icon16.png new file mode 100644 index 0000000..a20b9ab Binary files /dev/null and b/images/icon16.png differ diff --git a/index.html b/index.html index fea009b..ee91803 100644 --- a/index.html +++ b/index.html @@ -1,64 +1,68 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Contents</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style/main.css" type="text/css" media="all" /> + + <meta name="AppleTitle" content="Choosy Help" /> + <meta name="AppleIcon" content="ChoosyHelp/images/icon16.png" /> + </head> <body> - +<a name="ChoosyHelpContents"></a> <h1>Choosy Help</h1> <h2>Contents</h2> <ul> <li> <h3>Getting started</h3> The basics: What Choosy can do and how to use it <ul> <li><a href="basic/choosy.html">What is Choosy?</a></li> <li><a href="basic/installation.html">Installation guide</a></li> <li><a href="basic/configuration.html">Configuration guide</a></li> </ul> </li> <li> <h3>Choosy settings</h3> Detailed information on all the settings in Choosy's system preferences panel <ul> <li><a href="settings/general.html">General settings</a></li> <li><a href="settings/browsers.html">Browser settings</a></li> <li><a href="settings/behaviour.html">Behaviour settings</a></li> <li><a href="settings/appearance.html">Appearance settings</a></li> <li> <a href="settings/advanced.html">Advanced behaviour settings</a> <ul> <li><a href="settings/advanced/urls.html">Web address rules</a></li> <li><a href="settings/advanced/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> </ul> </li> </ul> </li> <li> <h3>Miscelaneous topics</h3> Everything from <abbr title="Frequently Asked Questions">FAQs</abbr> to removal instructions <ul> <li><a href="misc/browsers.html">Browser integration</a></li> <li><a href="misc/uninstalling.html">Uninstalling Choosy</a></li> </ul> </li> <li> <h3>Online resources</h3> More help and resources on the internet <ul> <li><a href="http://feedback.choosyosx.com">Choosy feedback forum</a></li> <li><a href="http://www.choosyosx.com">Choosy website</a></li> <li class="vcard"><a class="url" href="http://georgebrock.com"><span class="fn">George Brocklehurst</span>'s website</a></li> </ul> </li> </ul> </body> </html>
choosy-app/choosy-help
4023e20f0c5d410ee27dcff04954975db9040617
Added styles for tables.
diff --git a/style/main.css b/style/main.css index 656b328..53950dc 100644 --- a/style/main.css +++ b/style/main.css @@ -1,64 +1,80 @@ html, body { margin:0; padding:0; } body { font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif; font-size:small; line-height:1.4em; color:#444; padding:1em 2em; } h1 { background-color:#7F7F7F; background-image:url('../images/icon.png'); background-position:99% 50%; background-repeat:no-repeat; color:#fff; font-size:2em; margin:0 -0.5em 1em; padding:0.6em 60px 0.6em 0.5em; -webkit-border-radius:0.8em; -moz-border-radius:0.8em; } h2 { margin-top:1.5em; } a { color:#2E85B4; text-decoration:none; } a:hover, a:focus, a:active { text-decoration:underline; } dl dt { font-style:italic; font-size:1.1em; } dl dd { margin-bottom:0.75em; } img { display:block; margin:1em 0; } +table { + border-collapse:collapse; + margin:1em 0; +} + +table th, +table td { + border:1px solid #ccc; + padding:0.3em 0.5em; + text-align:left; +} + +table th { + background-color:#eee; +} + p { margin:0 0 1em 0; } p.breadcrumbs { margin:0 0 0.5em; font-size:0.8em; } \ No newline at end of file
choosy-app/choosy-help
008a9fde05f850b76707d200954bee852e5b4dde
Added breadcrumb trails to all pages.
diff --git a/basic/choosy.html b/basic/choosy.html index fc019e2..c4f0782 100644 --- a/basic/choosy.html +++ b/basic/choosy.html @@ -1,37 +1,43 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: What is Choosy?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Getting started / + </p> + <h1>Choosy Help: What is Choosy?</h1> <h2>A smarter default browser</h2> <p> When you click on a link outside of your web browser it opens in your default web browser. If you use more than one web browser on a regular basis having a single default web browser can be very restrictive. That's where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser. </p> <h2>How does Choosy decide which browser to use?</h2> <p> In some situations Choosy will display a prompt and allow you to select from a list of browsers. In other situations Choosy will automatically select which browser. Exactly what happens is completely based on your settings. Your <a href="../settings/advanced.html">advanced behaviour rules</a> will be applied first, and then if none of them matched your <a href="../settings/behaviour.html">standard behaviours</a> will be applied. </p> <p> If you're setting Choosy up for the first time, have a look at the <a href="../basic/configuration.html">configuration guide</a>. </p> </body> </html> diff --git a/basic/configuration.html b/basic/configuration.html index 804ae00..6594b94 100644 --- a/basic/configuration.html +++ b/basic/configuration.html @@ -1,107 +1,113 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Configuration guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Getting started / + </p> + <h1>Choosy Help: Configuration guide</h1> <p>A step by step guide to setting up Choosy.</p> <ol> <li> <h2>Browsers</h2> <p> The first thing to set up is the browsers that you want Choosy to use. When you first install Choosy the browser list will be populated with all the browsers that OS X knows are installed on your system. This might include some apps that aren't really browsers but are able to open some kinds of links and might be missing some browsers, especially if you have more than one version of the same browser installed. </p> <p> The <strong>order of the browser list</strong> is important. When we configure the behaviour later any settings that refer to the &ldquo;favourite&rdquo; browser are talking about the browser at the top of the list. Similarly settings that talk about the &ldquo;best running browser&rdquo; are referring to the running browser that is highest up the list. </p> <p> To customise the browser list: </p> <ol> <li> Open Choosy in System Preferences. </li> <li> Click on the &ldquo;Browsers&rdquo; tab. </li> <li> Remove any browser you don't want Choosy to use by clicking on the browser in the list and clicking the minus button below the list. </li> <li> Add any missing browsers either using the plus button below the list, or by dragging the browsers into the list from the Finder. </li> <li> Change the order of the list so your favourite browser is first by dragging and dropping the browser in the list. </li> </ol> <p> There are more details on the settings in the browsers tab in the <a href="../settings/browsers.html">browser settings</a> section. </p> </li> <li> <h2>Basic behaviour</h2> <p> Next we should configure the basic behaviour. This is what Choosy will usually do when you click on a link. There are two settings to consider: What Choosy should do when <strong>no browsers are running</strong> and when <strong>one or more browsers are running</strong>. To customise the behaviour: </p> <ol> <li>Open Choosy in System Preferences.</li> <li>Click on the &ldquo;Behaviour&rdquo; tab.</li> <li>Select the behaviours that seem most appropriate (you can always change them later).</li> </ol> <p> There are more details about the individual settings on the behaviour tab in the <a href="../settings/behaviour.html">behaviour settings</a> section. </p> </li> <li> <h2>Next steps</h2> <ol> <li> <h3>Advanced behaviour rules</h3> <p> You might also want to tweak Choosy's behaviour and create exceptions to your basic behaviour rules that apply in specific circumstances. These could be based on the link you're opening, on the modifier keys you're holding when you click on a link or on a variety of other criteria. There is a great deal of flexibility and many different ways that this section you can use. For more information see the <a href="../settings/advanced.html">advanced behaviour settings</a> section. </p> </li> <li> <h3>Browser plugins</h3> <p> If you want to use Choosy's functionality from inside your browser there are a variety of browser plugins and bookmarklets that you can install. There is more information in the <a href="../misc/browsers.html">browser integration</a> section. </p> </li> </ol> </li> </ol> </body> </html> diff --git a/basic/installation.html b/basic/installation.html index 458c86d..5d1f253 100644 --- a/basic/installation.html +++ b/basic/installation.html @@ -1,43 +1,49 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Installation guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Getting started / + </p> + <h1>Choosy Help: Installation guide</h1> <p>A step by step guide to installing Choosy.</p> <ol> <li> Download the latest version of Choosy from <a href="http://www.choosyosx.com/releases/latest">www.choosyosx.com</a>. </li> <li> The download is a ZIP file, depending on how your system is set up it may have unzipped itself automatically, if not just unzip it by double clicking on it in the Finder. It will contain a single file called Choosy.prefPane. </li> <li> Double click on the Choosy.prefPane file, it will open in System Preferences. </li> <li> Select whether you want to install Choosy for the current user or for all users. </li> <li> Set up the way you want Choosy to work. See the <a rel="next" href="../basic/configuration.html">configuration guide</a> for more information. </li> </ol> <p></p> </body> </html> diff --git a/misc/uninstalling.html b/misc/uninstalling.html index 3c8cb3f..6635a25 100644 --- a/misc/uninstalling.html +++ b/misc/uninstalling.html @@ -1,27 +1,33 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Miscelaneous topics / + </p> + <h1>Choosy Help: Uninstalling Choosy</h1> <p>To remove Choosy from your system follow these steps:</p> <ol> <li>Open Choosy in System Preferences</li> <li>Stop the helper application by clicking the &ldquo;Stop Helper&rdquo; button</li> <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; and &ldquo;Enable Choosy for HTML files&rdquo; boxes (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> <li>Go back to the main System Preferences menu</li> <li>Control-click on the Choosy icon and select &ldquo;Remove Choosy Preference Pane&rdquo; from the menu</li> </ol> </body> </html> diff --git a/settings/advanced.html b/settings/advanced.html index e1c91a7..5642836 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,354 +1,360 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <img src="../images/settings_advanced.png" alt="A screenshot of Choosy's advanced settings tab" /> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 217495e..4b7e6b4 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,39 +1,46 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../../index.html">Choosy help</a> / + Settings / + <a href="../../settings/advanced.html">Advanced behaviour settings</a> / + </p> + <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> <ol> <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> <li> Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> <li>Enter the name of your custom API method into the text field on this row.</li> <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> </ol> <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.</li> </p> </div> <div id="use"> <h2>Using custom API methods</h2> <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/http://www.google.com</code> (replacing <code>http://www.google.com</code> with whatever URL you wanted the custom API method to apply to).</p> <p>For more information on calling API methods, including code examples for various languages, see the <a href="http://www.choosyosx.com/api">API documentation on the Choosy website</a>.</p> </div> </body> </html> diff --git a/settings/advanced/urls.html b/settings/advanced/urls.html index 32c9e9f..2aba3bf 100644 --- a/settings/advanced/urls.html +++ b/settings/advanced/urls.html @@ -1,106 +1,113 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../../index.html">Choosy help</a> / + Settings / + <a href="../../settings/advanced.html">Advanced behaviour settings</a> / + </p> + <h1>Choosy Help: Web address rules</h1> <p> You can create advanced behaviour rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains facebook&rdquo; matching addresses would include <em>http://www.facebook.com/</em> and <em>http://example.com/facebook</em> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>). For example, if the rule was &ldquo;begins with http://www.google.&rdquo; matching addresses would include <em>http://www.google.com/</em>, <em>http://www.google.co.uk/</em> and <em>http://www.google.com/search?q=choosy</em> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends with .pdf&rdquo; it would match any direct links to PDF files. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> The pattern <em>a?c</em> would match <em>abc</em> but not <em>ac</em> or <em>abbc</em> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> The pattern <em>a*c</em> would match <em>ac</em>, <em>abc</em> and <em>abbc</em> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are not already familiar with regular expressions there are various websites with indepth tutorials, several of which are links from the <a href="http://en.wikipedia.org/wiki/Regular_Expressions">Wikipedia article on regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU project website</a>). </dd> </dl> </body> </html> diff --git a/settings/appearance.html b/settings/appearance.html index 96412d8..1e56963 100644 --- a/settings/appearance.html +++ b/settings/appearance.html @@ -1,99 +1,105 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Appearance settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + <h1>Choosy Help: Appearance settings</h1> <p> This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Appearance tab. </p> <img src="../images/settings_appearance.png" alt="A screenshot of Choosy's appearance settings tab" /> <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> When Choosy prompts you to select a browser (enable this in the <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> For example, the screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" /> </div> <div id="icons"> <h2>Icon size</h2> <p> The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon below the slider gives a full size preview of what the prompt icons will look like. </p> </div> </body> </html> diff --git a/settings/behaviour.html b/settings/behaviour.html index 6c514e2..b558d02 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,100 +1,106 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> <img src="../images/settings_behaviour.png" alt="A screenshot of Choosy's behaviour settings tab" /> <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> </body> </html> diff --git a/settings/browsers.html b/settings/browsers.html index 3581a71..86caf6b 100644 --- a/settings/browsers.html +++ b/settings/browsers.html @@ -1,95 +1,101 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Browsers tab. </p> <img src="../images/settings_browsers.png" alt="A screenshot of Choosy's browser settings tab" /> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a .app file from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that the OS knows about or to browse and select a different file. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't obviously a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list just drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/settings/general.html b/settings/general.html index ebef918..5a13840 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,132 +1,138 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Settings / + </p> + <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <img src="../images/settings_general.png" alt="A screenshot of Choosy's general settings tab" /> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to websites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper now</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to purchase a Choosy license you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy website. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
c044bb47d68da2dc96d4efd12a497d244164c2ec
Added stylesheet to all pages.
diff --git a/basic/choosy.html b/basic/choosy.html index 5ee5596..fc019e2 100644 --- a/basic/choosy.html +++ b/basic/choosy.html @@ -1,36 +1,37 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: What is Choosy?</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: What is Choosy?</h1> <h2>A smarter default browser</h2> <p> When you click on a link outside of your web browser it opens in your default web browser. If you use more than one web browser on a regular basis having a single default web browser can be very restrictive. That's where Choosy comes in: Instead of having a single default browser Choosy opens links in the best browser. </p> <h2>How does Choosy decide which browser to use?</h2> <p> In some situations Choosy will display a prompt and allow you to select from a list of browsers. In other situations Choosy will automatically select which browser. Exactly what happens is completely based on your settings. Your <a href="../settings/advanced.html">advanced behaviour rules</a> will be applied first, and then if none of them matched your <a href="../settings/behaviour.html">standard behaviours</a> will be applied. </p> <p> If you're setting Choosy up for the first time, have a look at the <a href="../basic/configuration.html">configuration guide</a>. </p> </body> </html> diff --git a/basic/configuration.html b/basic/configuration.html index 4aad0dc..804ae00 100644 --- a/basic/configuration.html +++ b/basic/configuration.html @@ -1,106 +1,107 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Configuration guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Configuration guide</h1> <p>A step by step guide to setting up Choosy.</p> <ol> <li> <h2>Browsers</h2> <p> The first thing to set up is the browsers that you want Choosy to use. When you first install Choosy the browser list will be populated with all the browsers that OS X knows are installed on your system. This might include some apps that aren't really browsers but are able to open some kinds of links and might be missing some browsers, especially if you have more than one version of the same browser installed. </p> <p> The <strong>order of the browser list</strong> is important. When we configure the behaviour later any settings that refer to the &ldquo;favourite&rdquo; browser are talking about the browser at the top of the list. Similarly settings that talk about the &ldquo;best running browser&rdquo; are referring to the running browser that is highest up the list. </p> <p> To customise the browser list: </p> <ol> <li> Open Choosy in System Preferences. </li> <li> Click on the &ldquo;Browsers&rdquo; tab. </li> <li> Remove any browser you don't want Choosy to use by clicking on the browser in the list and clicking the minus button below the list. </li> <li> Add any missing browsers either using the plus button below the list, or by dragging the browsers into the list from the Finder. </li> <li> Change the order of the list so your favourite browser is first by dragging and dropping the browser in the list. </li> </ol> <p> There are more details on the settings in the browsers tab in the <a href="../settings/browsers.html">browser settings</a> section. </p> </li> <li> <h2>Basic behaviour</h2> <p> Next we should configure the basic behaviour. This is what Choosy will usually do when you click on a link. There are two settings to consider: What Choosy should do when <strong>no browsers are running</strong> and when <strong>one or more browsers are running</strong>. To customise the behaviour: </p> <ol> <li>Open Choosy in System Preferences.</li> <li>Click on the &ldquo;Behaviour&rdquo; tab.</li> <li>Select the behaviours that seem most appropriate (you can always change them later).</li> </ol> <p> There are more details about the individual settings on the behaviour tab in the <a href="../settings/behaviour.html">behaviour settings</a> section. </p> </li> <li> <h2>Next steps</h2> <ol> <li> <h3>Advanced behaviour rules</h3> <p> You might also want to tweak Choosy's behaviour and create exceptions to your basic behaviour rules that apply in specific circumstances. These could be based on the link you're opening, on the modifier keys you're holding when you click on a link or on a variety of other criteria. There is a great deal of flexibility and many different ways that this section you can use. For more information see the <a href="../settings/advanced.html">advanced behaviour settings</a> section. </p> </li> <li> <h3>Browser plugins</h3> <p> If you want to use Choosy's functionality from inside your browser there are a variety of browser plugins and bookmarklets that you can install. There is more information in the <a href="../misc/browsers.html">browser integration</a> section. </p> </li> </ol> </li> </ol> </body> </html> diff --git a/basic/installation.html b/basic/installation.html index fe5c589..458c86d 100644 --- a/basic/installation.html +++ b/basic/installation.html @@ -1,42 +1,43 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Installation guide</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Installation guide</h1> <p>A step by step guide to installing Choosy.</p> <ol> <li> Download the latest version of Choosy from <a href="http://www.choosyosx.com/releases/latest">www.choosyosx.com</a>. </li> <li> The download is a ZIP file, depending on how your system is set up it may have unzipped itself automatically, if not just unzip it by double clicking on it in the Finder. It will contain a single file called Choosy.prefPane. </li> <li> Double click on the Choosy.prefPane file, it will open in System Preferences. </li> <li> Select whether you want to install Choosy for the current user or for all users. </li> <li> Set up the way you want Choosy to work. See the <a rel="next" href="../basic/configuration.html">configuration guide</a> for more information. </li> </ol> <p></p> </body> </html> diff --git a/index.html b/index.html index ce8883a..fea009b 100644 --- a/index.html +++ b/index.html @@ -1,63 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Contents</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help</h1> <h2>Contents</h2> <ul> <li> <h3>Getting started</h3> The basics: What Choosy can do and how to use it <ul> <li><a href="basic/choosy.html">What is Choosy?</a></li> <li><a href="basic/installation.html">Installation guide</a></li> <li><a href="basic/configuration.html">Configuration guide</a></li> </ul> </li> <li> <h3>Choosy settings</h3> Detailed information on all the settings in Choosy's system preferences panel <ul> <li><a href="settings/general.html">General settings</a></li> <li><a href="settings/browsers.html">Browser settings</a></li> <li><a href="settings/behaviour.html">Behaviour settings</a></li> <li><a href="settings/appearance.html">Appearance settings</a></li> <li> <a href="settings/advanced.html">Advanced behaviour settings</a> <ul> <li><a href="settings/advanced/urls.html">Web address rules</a></li> <li><a href="settings/advanced/customapi.html">Custom <acronym title="Application Programming Interface">API</acronym> methods</a></li> </ul> </li> </ul> </li> <li> <h3>Miscelaneous topics</h3> Everything from <abbr title="Frequently Asked Questions">FAQs</abbr> to removal instructions <ul> <li><a href="misc/browsers.html">Browser integration</a></li> <li><a href="misc/uninstalling.html">Uninstalling Choosy</a></li> </ul> </li> <li> <h3>Online resources</h3> More help and resources on the internet <ul> <li><a href="http://feedback.choosyosx.com">Choosy feedback forum</a></li> <li><a href="http://www.choosyosx.com">Choosy website</a></li> <li class="vcard"><a class="url" href="http://georgebrock.com"><span class="fn">George Brocklehurst</span>'s website</a></li> </ul> </li> </ul> </body> </html> diff --git a/misc/browsers.html b/misc/browsers.html index ee7700f..469bef8 100644 --- a/misc/browsers.html +++ b/misc/browsers.html @@ -1,44 +1,51 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser integration</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> + <p class="breadcrumbs"> + <strong>You are here:</strong> + <a href="../index.html">Choosy help</a> / + Miscelaneous topics / + </p> + <h1>Choosy Help: Browser integration</h1> <p>There are two main ways of using Choosy's functionality from within your browser and some other tools that can help in specific circumstances:</p> <ul> <li><a href="#plugins">Browser plugins</a></li> <li><a href="#bookmarklets">Bookmarklets</a></li> <li><a href="#tools">Other tools</a></li> </ul> <div id="plugins"> <h2>Browser plugins</h2> <p>Browser plugins provide great integration with a browser. Choosy plugins usually add an option to the manu that appears when you right-click on a link allowing you to open the link in another browser using Choosy. Some plugins also allow you to trigger Choosy's browser prompt by holding down a modifier key an clicking on a link in your browser.</p> <p>The downside of plugins is that they are specific to an individual browser, so you will need to install a plugin for each browser that you regularly use.</p> <p>There is a <a href="http://www.choosyosx.com/browsers#plugins">list of available plugins on the Choosy website</a>.</p> </div> <div id="bookmarklets"> <h2>Bookmarklets</h2> <p>Bookmarklets are links that you can add to the bookmarks bar of a browser. Rather than linking a web page they run a small script. The Choosy bookmarklets allow you to open the page you are currently looking at in another browser using Choosy. They don't provide as much integration as bookmarklets, but they will work the same in almost any browser.</p> <p>You can find the <a href="http://www.choosyosx.com/browsers#bookmarklets">bookmarklets on the Choosy website</a> and drag them into your browser's bookmarks bar from there.</p> </div> <div id="tools"> <h2>Other tools</h2> <h3>ChoosyFluid</h3> <p>One common use of Choosy is to automatically send links to different <a href="http://fluidapp.com">Fluid</a> browsers. ChoosyFluid is a tool that automatically detects Fluid browsers on your system and creates <a href="../settings/advanced.html">advanced behaviour rules</a> to use them.</p> <p>You can <a href="http://www.choosyosx.com/browsers#fluid">download ChoosyFluid from the Choosy website</a>.</p> </div> </body> </html> diff --git a/misc/uninstalling.html b/misc/uninstalling.html index 87a58b2..3c8cb3f 100644 --- a/misc/uninstalling.html +++ b/misc/uninstalling.html @@ -1,26 +1,27 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Uninstalling Choosy</h1> <p>To remove Choosy from your system follow these steps:</p> <ol> <li>Open Choosy in System Preferences</li> <li>Stop the helper application by clicking the &ldquo;Stop Helper&rdquo; button</li> <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; and &ldquo;Enable Choosy for HTML files&rdquo; boxes (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> <li>Go back to the main System Preferences menu</li> <li>Control-click on the Choosy icon and select &ldquo;Remove Choosy Preference Pane&rdquo; from the menu</li> </ol> </body> </html> diff --git a/settings/advanced.html b/settings/advanced.html index de60dac..e1c91a7 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,353 +1,354 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <img src="../images/settings_advanced.png" alt="A screenshot of Choosy's advanced settings tab" /> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> If you were to create a rule that responded to a custom API method called &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html> diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 7e45768..217495e 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,38 +1,39 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> <ol> <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> <li> Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> <li>Enter the name of your custom API method into the text field on this row.</li> <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> </ol> <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.</li> </p> </div> <div id="use"> <h2>Using custom API methods</h2> <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/http://www.google.com</code> (replacing <code>http://www.google.com</code> with whatever URL you wanted the custom API method to apply to).</p> <p>For more information on calling API methods, including code examples for various languages, see the <a href="http://www.choosyosx.com/api">API documentation on the Choosy website</a>.</p> </div> </body> </html> diff --git a/settings/advanced/urls.html b/settings/advanced/urls.html index 98e825d..32c9e9f 100644 --- a/settings/advanced/urls.html +++ b/settings/advanced/urls.html @@ -1,105 +1,106 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Web address rules</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Web address rules</h1> <p> You can create advanced behaviour rules that are triggered by clicking on a link to a web address that matches certain criteria. </p> <p> The following types of web address matching are availble: </p> <dl> <dt>is</dt> <dd> Matches the whole URL exactly. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>is not</dt> <dd> Matches any URL that is not exactly the same as the URL defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>) </dd> <dt>contains</dt> <dd> Matches any URL that contains the string defined in the rule. For example, if the rule was &ldquo;contains facebook&rdquo; matching addresses would include <em>http://www.facebook.com/</em> and <em>http://example.com/facebook</em> </dd> <dt>begins with</dt> <dd> Matches any URL that begins with the string defined in the rule. Note that this includes the protocol at the start of the URL (e.g. <em>http://</em> or <em>https://</em>). For example, if the rule was &ldquo;begins with http://www.google.&rdquo; matching addresses would include <em>http://www.google.com/</em>, <em>http://www.google.co.uk/</em> and <em>http://www.google.com/search?q=choosy</em> </dd> <dt>ends with</dt> <dd> Matches any URL that begins with the string defined in the rule. For example, if the rule was &ldquo;ends with .pdf&rdquo; it would match any direct links to PDF files. </dd> <dt>is like</dt> <dd> This type of address matching allows you to define simple patterns using wildcard characters. <table> <thead> <tr> <th scope="col">Character</th> <th scope="col">Matches</th> <th scope="col">Example</th> </tr> </thead> <tbody> <tr> <td>?</td> <td>Any single character</td> <td> The pattern <em>a?c</em> would match <em>abc</em> but not <em>ac</em> or <em>abbc</em> </td> </tr> <tr> <td>*</td> <td>Zero or more characters</td> <td> The pattern <em>a*c</em> would match <em>ac</em>, <em>abc</em> and <em>abbc</em> </td> </tr> </tbody> </table> </dd> <dt>matches regular expression</dt> <dd> This type of address matching allows you to define complex patterns using regular expressions. If you are not already familiar with regular expressions there are various websites with indepth tutorials, several of which are links from the <a href="http://en.wikipedia.org/wiki/Regular_Expressions">Wikipedia article on regular expressions</a>. Choosy uses the ICU version of regular expressions, you can find documentation on the <a href="http://userguide.icu-project.org/strings/regexp" title="ICU Regular Expressions documentation">ICU project website</a>). </dd> </dl> </body> </html> diff --git a/settings/appearance.html b/settings/appearance.html index da9e041..96412d8 100644 --- a/settings/appearance.html +++ b/settings/appearance.html @@ -1,98 +1,99 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Appearance settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Appearance settings</h1> <p> This page describes the settings on Choosy's &ldquo;Appearance&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Appearance tab. </p> <img src="../images/settings_appearance.png" alt="A screenshot of Choosy's appearance settings tab" /> <p> When you click on a link Choosy can be configured to prompt you to select a browser. The settings on this tab allow you to control how those prompts will look: </p> <ol> <li><a href="#style">Prompt style</a></li> <li><a href="#text">Text in the prompt</a></li> <li><a href="#icons">Icon size</a></li> </ol> <div id="style"> <h2>Prompt style</h2> <p> When Choosy prompts you to select a browser (enable this in the <a href="../settings/behaviour.html">behaviour settings</a>) there are two different prompt styles available. </p> <p> In both prompt styles the opacity of the icon indicates whether or not the browser is running: If the icon is solid that indicates that the browser is running, if it is semi-transparent the browser is not running. </p> <dl> <dt>Display browser icons in a row</dt> <dd> <p> The row prompt displays the icons for the browsers in a row. The icons are displayed in the same order as your <a href="../settings/browsers.html">browsers list</a>. The first icon will appear directly under the mouse pointer, so selecting your favourite browser is just a single click without moving the mouse at all. The further down your browser list a browser is, the further you have to move the mouse to click on it. </p> <img src="../images/prompt_row.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> <dt>Display browser icons in a circle</dt> <dd> <p> The circle prompt appears with the centre of the circle directly under the mouse pointer. The main benefit of this style is that you have to move the mouse the same distance to get to each browser. The one exception to this is the browser at the top of your <a href="../settings/browsers.html">browser list</a>, the button for this browser extends into the centre of the circle so you can select this browser without moving the mouse. </p> <img src="../images/prompt_circle.png" alt="Screenshot of the Choosy browser prompt in row mode" /> </dd> </dl> </div> <div id="text"> <h2>Text in the prompt</h2> <p> There are two options for the amount of text information that can be displayed in the prompt: </p> <ul> <li>Display the URL in the prompt</li> <li>Display browser names in the prompt</li> </ul> <p> For example, the screenshots below show the two different prompt styles with all the text options switched off: </p> <img src="../images/prompt_row_no_text.png" alt="Screenshot of the Choosy browser prompt in row mode without text" /> <img src="../images/prompt_circle_no_text.png" alt="Screenshot of the Choosy browser prompt in circle mode without text" /> </div> <div id="icons"> <h2>Icon size</h2> <p> The icon size slider allows you to change the size of the icons in the prompts. The Choosy icon below the slider gives a full size preview of what the prompt icons will look like. </p> </div> </body> </html> diff --git a/settings/behaviour.html b/settings/behaviour.html index 054bd30..6c514e2 100644 --- a/settings/behaviour.html +++ b/settings/behaviour.html @@ -1,99 +1,100 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Behaviour&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Behaviour tab. </p> <img src="../images/settings_behaviour.png" alt="A screenshot of Choosy's behaviour settings tab" /> <p> The settings on this tab allow you to set how Choosy will behave in various situations: </p> <ol> <li><a href="#running">When one or more browsers are running</a></li> <li><a href="#normal">When no browsers are running</a></li> </ol> <div id="running"> <h2>When one or more browsers are running</h2> <p> This setting defines what will happen when you click on a link and one or more of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> is already running. If another browser that is not in your browser list is running the &ldquo;<a href="#normal">no browsers are running</a>&rdquo; setting will be used instead. </p> <dl> <dt>Use best running browser</dt> <dd> When you click on a link Choosy will pass the link on to the best running browser. &ldquo;Best&rdquo; here means the browser that is nearest to the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers (from your <a href="../settings/browsers.html">browser list</a>) that are running. If only one browser is running that browser will be used and no prompt will be displayed. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. The icons for running browsers will be solid, the icons for browsers that are not running will be semi-transparent. </dd> <dt>Use my favourite browser (even if it's not already running)</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a> regardless of whether or not it is currently running. </dd> </dl> </div> <div id="normal"> <h2>When no browsers are running</h2> <p> This setting defines what will happen when you click on a link and none of the browsers in your Choosy <a href="../settings/browsers.html">browser list</a> are running. </p> <dl> <dt>Use my favourite browser</dt> <dd> When you click on a link Choosy will use the browser at the top of your <a href="../settings/browsers.html">browser list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> When you click on a link Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browser list</a>. </dd> </dl> </div> </body> </html> diff --git a/settings/browsers.html b/settings/browsers.html index 7012e64..3581a71 100644 --- a/settings/browsers.html +++ b/settings/browsers.html @@ -1,94 +1,95 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: Browser settings</h1> <p> This page describes the settings on Choosy's &ldquo;Browsers&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Browsers tab. </p> <img src="../images/settings_browsers.png" alt="A screenshot of Choosy's browser settings tab" /> <p> The settings on this tab allow you to control Choosy's browser list: </p> <ol> <li><a href="#customise">Customise the list of browsers</a></li> <li><a href="#order">Reorder the list of browsers</a></li> </ol> <div id="customise"> <h2>Customise the list of browsers</h2> <h3>Add browsers</h3> <p> You can add browser to the browser list in two ways: </p> <ul> <li> Drag and drop a .app file from Finder. </li> <li> Use the plus button below the list. This will pop up a menu allowing you to easily add any browsers that the OS knows about or to browse and select a different file. </li> </ul> <p> You can add any application to the browser list, but not all applications are able to open HTML files or web links. If you add an application that isn't obviously a browser it may not function correctly. </p> <h3>Remove browsers</h3> <p> To remove a browser from the list: </p> <ol> <li>Click on the browser in the list.</li> <li>Click the minus button below the list.</li> </ol> </div> <div id="reorder"> <h2>Reorder the list of browsers</h2> <p> To change the order of the browser list just drag and drop the browsers into a different order. </p> <p> You should order your browser list with your favourite browser at the top of the list and your least favourite at the bottom of the list. The order of the browsers in your browser list effects Choosy's behaviour in various ways: </p> <ol> <li> <a href="../settings/behaviour.html">Behaviour settings</a> that refer to the &ldquo;best&rdquo; or &ldquo;favourite&rdquo; browser determine which browser is best or favourite by looking at which browsers are higher up the list. </li> <li> The row prompt uses the same order as the browser list. When you click on a link and it triggers the row prompt the browser at the top of the list will be directly under the mouse. The further down the list the browser is, the further you will have to move the mouse to select that browser. </li> <li> The circle prompt extends the button for the browser at the top of the browser list into the centre of the circle, directly under the mouse. </li> </ol> </div> </body> </html> diff --git a/settings/general.html b/settings/general.html index c96bdf7..ebef918 100644 --- a/settings/general.html +++ b/settings/general.html @@ -1,131 +1,132 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: General settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link rel="stylesheet" href="../style/main.css" type="text/css" media="all" /> </head> <body> <h1>Choosy Help: General settings</h1> <p> This page describes the settings on Choosy's &ldquo;General&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the General tab. </p> <img src="../images/settings_general.png" alt="A screenshot of Choosy's general settings tab" /> <p> The general settings are grouped into three sections: </p> <ol> <li><a href="#enable">Enable Choosy</a></li> <li><a href="#version">Version</a></li> <li><a href="#licence">Licence</a></li> </ol> <div id="enable"> <h2>Enable Choosy</h2> <p> This section contains settings that allow you to enable and disable various aspects of Choosy. </p> <img src="../images/settings_general_enable.png" alt="A screenshot of the 'Enable Choosy' section of the 'General' tab" /> <dl> <dt>Enable Choosy for links</dt> <dd> This checkbox determines whether or not Choosy will be used when clicking on links to websites. If you disable this option whichever browser is at the top of your Choosy browsers list (see <a href="../settings/browsers.html">browser settings</a>) will be set as your default browser. If you enable this option then Choosy will be used whenever the default browser would normally be used. </dd> <dt>Enable Choosy for HTML files</dt> <dd> This checkbox determines whether or not Choosy will be used when opening HTML files from the Finder. You can create <a href="../settings/advanced.html">advanced behaviour rules</a> that specificly target files opened from the Finder if you want custom behaviour for this type of file. </dd> <dt>Start Choosy helper at login</dt> <dd> The Choosy helper application is the app that runs whenever you click on a link and figures out what to do with the link (whether that's prompt you or pass it on to a browser). Having this app running in the background can speed things up a little bit when you click on a link. If you disable this option the helper application will be launched the first time that Choosy is used and will continue to run in the background after that. </dd> <dt>Stop helper / Start helper now</dt> <dd> Allows you to stop and start the helper application as and when you need to. </dd> <dt>Display Choosy icon in the menu bar</dt> <dd> Allows you to display a Choosy icon at the top right of your screen in the menu bar. This gives you access to a menu which allows you to quickly access new versions of Choosy, launch browsers and access Choosy's settings. Note that the menu bar icon will only be displayed while the Choosy helper application is running (so you will probably want to use this setting in conjunction with the &ldquo;start Choosy helper at login&rdquo; option). Also, the menu bar icon will always appear if there is an update available to notify you of the new version even if this option is disabled. </dd> </dl> </div> <div id="version"> <h2>Version</h2> <p> This section contains information about which version of Choosy you have installed and any updates that are available. </p> <img src="../images/settings_general_version.png" alt="A screenshot of the 'Version' section of the 'General' tab" /> <p> If an update is available you can see full details of the new version and install it by clicking on the &ldquo;Update details&rdquo; button. </p> </div> <div id="licence"> <h2>Licence</h2> <p> This section allows contains information about licensing. </p> <img src="../images/settings_general_licence.png" alt="A screenshot of the 'Licence' section of the 'General' tab" /> <p> If Choosy is not registered the number of days remaining in the trial period will be displayed here. If you decide to purchase a Choosy license you enter your license information in the following fields: </p> <dl> <dt>E-mail address</dt> <dd> This must be the e-mail address that you provided when purchasing your license from the Choosy website. </dd> <dt>Licence key</dt> <dd> This key will be emailed to you when you purchase a licence. </dd> </dl> </div> </body> </html>
choosy-app/choosy-help
7e82ac5cb6a01f74579b258f73749102894bc2d5
Improvements to stylesheet.
diff --git a/style/main.css b/style/main.css index 022736c..656b328 100644 --- a/style/main.css +++ b/style/main.css @@ -1,41 +1,64 @@ html, body { margin:0; padding:0; } body { font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif; font-size:small; + line-height:1.4em; color:#444; padding:1em 2em; } h1 { background-color:#7F7F7F; background-image:url('../images/icon.png'); background-position:99% 50%; background-repeat:no-repeat; color:#fff; font-size:2em; margin:0 -0.5em 1em; padding:0.6em 60px 0.6em 0.5em; -webkit-border-radius:0.8em; -moz-border-radius:0.8em; } +h2 { + margin-top:1.5em; +} + a { color:#2E85B4; text-decoration:none; } a:hover, a:focus, a:active { text-decoration:underline; } +dl dt { + font-style:italic; + font-size:1.1em; +} + +dl dd { + margin-bottom:0.75em; +} + +img { + display:block; + margin:1em 0; +} + +p { + margin:0 0 1em 0; +} + p.breadcrumbs { margin:0 0 0.5em; font-size:0.8em; } \ No newline at end of file
choosy-app/choosy-help
90933cd2cc1aa49daefccd2536bac753da7587ea
Wrote a basic stylesheet for the help pages.
diff --git a/images/icon.png b/images/icon.png new file mode 100644 index 0000000..0f722c4 Binary files /dev/null and b/images/icon.png differ diff --git a/style/main.css b/style/main.css new file mode 100644 index 0000000..022736c --- /dev/null +++ b/style/main.css @@ -0,0 +1,41 @@ +html, +body { + margin:0; + padding:0; +} + +body { + font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif; + font-size:small; + color:#444; + padding:1em 2em; +} + +h1 { + background-color:#7F7F7F; + background-image:url('../images/icon.png'); + background-position:99% 50%; + background-repeat:no-repeat; + color:#fff; + font-size:2em; + margin:0 -0.5em 1em; + padding:0.6em 60px 0.6em 0.5em; + -webkit-border-radius:0.8em; + -moz-border-radius:0.8em; +} + +a { + color:#2E85B4; + text-decoration:none; +} + +a:hover, +a:focus, +a:active { + text-decoration:underline; +} + +p.breadcrumbs { + margin:0 0 0.5em; + font-size:0.8em; +} \ No newline at end of file
choosy-app/choosy-help
6ef62fdf0a85e871a3661f4238456671fa760c22
Improved introduction and navigation structure.
diff --git a/misc/browsers.html b/misc/browsers.html index bf191d8..ee7700f 100644 --- a/misc/browsers.html +++ b/misc/browsers.html @@ -1,48 +1,44 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser integration</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Browser integration</h1> - <p>There are two main ways of using Choosy's functionality from within your browser:</p> + <p>There are two main ways of using Choosy's functionality from within your browser and some other tools that can help in specific circumstances:</p> <ul> <li><a href="#plugins">Browser plugins</a></li> <li><a href="#bookmarklets">Bookmarklets</a></li> - </ul> - - <p>There are also some other tools that can be useful when using Choosy with different browsers:</p> - <ul> <li><a href="#tools">Other tools</a></li> </ul> <div id="plugins"> <h2>Browser plugins</h2> <p>Browser plugins provide great integration with a browser. Choosy plugins usually add an option to the manu that appears when you right-click on a link allowing you to open the link in another browser using Choosy. Some plugins also allow you to trigger Choosy's browser prompt by holding down a modifier key an clicking on a link in your browser.</p> <p>The downside of plugins is that they are specific to an individual browser, so you will need to install a plugin for each browser that you regularly use.</p> <p>There is a <a href="http://www.choosyosx.com/browsers#plugins">list of available plugins on the Choosy website</a>.</p> </div> <div id="bookmarklets"> <h2>Bookmarklets</h2> <p>Bookmarklets are links that you can add to the bookmarks bar of a browser. Rather than linking a web page they run a small script. The Choosy bookmarklets allow you to open the page you are currently looking at in another browser using Choosy. They don't provide as much integration as bookmarklets, but they will work the same in almost any browser.</p> <p>You can find the <a href="http://www.choosyosx.com/browsers#bookmarklets">bookmarklets on the Choosy website</a> and drag them into your browser's bookmarks bar from there.</p> </div> <div id="tools"> <h2>Other tools</h2> <h3>ChoosyFluid</h3> <p>One common use of Choosy is to automatically send links to different <a href="http://fluidapp.com">Fluid</a> browsers. ChoosyFluid is a tool that automatically detects Fluid browsers on your system and creates <a href="../settings/advanced.html">advanced behaviour rules</a> to use them.</p> <p>You can <a href="http://www.choosyosx.com/browsers#fluid">download ChoosyFluid from the Choosy website</a>.</p> </div> </body> </html>
choosy-app/choosy-help
c36ca5f2bc40dd1a351cb11961ea313d9f6cbdc0
Wrote browser integration instructions (mostly links back to the Choosy website where the information can more easily be kept up to date).
diff --git a/misc/browsers.html b/misc/browsers.html index b2d63b7..bf191d8 100644 --- a/misc/browsers.html +++ b/misc/browsers.html @@ -1,18 +1,48 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Browser integration</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Browser integration</h1> - - TODO + + <p>There are two main ways of using Choosy's functionality from within your browser:</p> + <ul> + <li><a href="#plugins">Browser plugins</a></li> + <li><a href="#bookmarklets">Bookmarklets</a></li> + </ul> + + <p>There are also some other tools that can be useful when using Choosy with different browsers:</p> + <ul> + <li><a href="#tools">Other tools</a></li> + </ul> + + <div id="plugins"> + <h2>Browser plugins</h2> + <p>Browser plugins provide great integration with a browser. Choosy plugins usually add an option to the manu that appears when you right-click on a link allowing you to open the link in another browser using Choosy. Some plugins also allow you to trigger Choosy's browser prompt by holding down a modifier key an clicking on a link in your browser.</p> + <p>The downside of plugins is that they are specific to an individual browser, so you will need to install a plugin for each browser that you regularly use.</p> + <p>There is a <a href="http://www.choosyosx.com/browsers#plugins">list of available plugins on the Choosy website</a>.</p> + </div> + + <div id="bookmarklets"> + <h2>Bookmarklets</h2> + <p>Bookmarklets are links that you can add to the bookmarks bar of a browser. Rather than linking a web page they run a small script. The Choosy bookmarklets allow you to open the page you are currently looking at in another browser using Choosy. They don't provide as much integration as bookmarklets, but they will work the same in almost any browser.</p> + <p>You can find the <a href="http://www.choosyosx.com/browsers#bookmarklets">bookmarklets on the Choosy website</a> and drag them into your browser's bookmarks bar from there.</p> + </div> + + <div id="tools"> + <h2>Other tools</h2> + + <h3>ChoosyFluid</h3> + <p>One common use of Choosy is to automatically send links to different <a href="http://fluidapp.com">Fluid</a> browsers. ChoosyFluid is a tool that automatically detects Fluid browsers on your system and creates <a href="../settings/advanced.html">advanced behaviour rules</a> to use them.</p> + <p>You can <a href="http://www.choosyosx.com/browsers#fluid">download ChoosyFluid from the Choosy website</a>.</p> + </div> </body> </html>
choosy-app/choosy-help
2d656ea87fd8513993a19900422f802cc2975704
Added instructions for using custom API methods.
diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 9a15972..7e45768 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,32 +1,38 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> <ol> <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> <li> Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> <li>Enter the name of your custom API method into the text field on this row.</li> <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> </ol> <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.</li> </p> </div> + <div id="use"> + <h2>Using custom API methods</h2> + <p>You can call a custom API method in the same way as you would any other API method. For example, if you were to create an API method called <code>edit</code> you would call it by opening the URL <code>x-choosy://edit/http://www.google.com</code> (replacing <code>http://www.google.com</code> with whatever URL you wanted the custom API method to apply to).</p> + <p>For more information on calling API methods, including code examples for various languages, see the <a href="http://www.choosyosx.com/api">API documentation on the Choosy website</a>.</p> + </div> + </body> </html>
choosy-app/choosy-help
bdcbf6413050102d6df1d556adabab31565095af
Improvements to custom API method instructions.
diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 420993f..9a15972 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,29 +1,32 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> <div id="create"> <h2>Creating custom API methods</h2> <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> <ol> <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> <li> Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> + <li>Enter the name of your custom API method into the text field on this row.</li> <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> - <li>Specify any other criteria you want to apply. You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. (Advanced behaviour rules are applied in order, so if you do have multiple rules for the same method you should put the more specific rules before the more general ones.)</li> </ol> + + <p>You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. Advanced behaviour rules are applied in order, so if you do have multiple rules for the same custom API method you should put the more specific rules before the more general ones, otherwise the general rule will match and be applied before the more specific rules are evaluated.</li> + </p> </div> </body> </html>
choosy-app/choosy-help
92c66ef4cc739b419f5cdcb99aa2392825724708
Added instructions on creating advanced behaviour rules.
diff --git a/settings/advanced/customapi.html b/settings/advanced/customapi.html index 4f4a024..420993f 100644 --- a/settings/advanced/customapi.html +++ b/settings/advanced/customapi.html @@ -1,18 +1,29 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Custom API methods</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Custom <abbr title="Application Programming Interface">API</abbr> methods</h1> - - TODO + + <div id="create"> + <h2>Creating custom API methods</h2> + <p>To create a custom API method you need to create an <a href="../../settings/advanced.html">advanced behaviour rule</a> with an API method criterion:</p> + <ol> + <li>Create a new advanced behaviour rule by clicking on the plus button below the advanced behaviour rules list.</li> + <li> + Change the type of the second row in the rule editor from &ldquo;Web address&rdquo; to &ldquo;Custom API method&rdquo;. The row should look like this: + <img src="../../images/rule_editor_custom_api.png" alt="Screenshot of a custom API method row in the advanced behaviour rule editor" /></li> + <li>Specify the behaviour you want to associate with your custom API method in the same way you would for any other advanced behaviour rule (see the section on <a href="../../settings/advanced.html#edit-behaviour">behaviour of advanced rules</a> for more information)</li> + <li>Specify any other criteria you want to apply. You might want to create several rules for the same custom API method, each with different additional criteria, e.g. a method called <code>edit</code> might have one rule to define its default behaviour and another to define its behaviour when the shift key is held down. (Advanced behaviour rules are applied in order, so if you do have multiple rules for the same method you should put the more specific rules before the more general ones.)</li> + </ol> + </div> </body> </html>
choosy-app/choosy-help
b28a9922767e5c12d9a994636f32b28513ada004
Improved description of custom API methods.
diff --git a/settings/advanced.html b/settings/advanced.html index 98698cc..de60dac 100644 --- a/settings/advanced.html +++ b/settings/advanced.html @@ -1,353 +1,353 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Advanced behaviour settings</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Advanced behaviour settings</h1> <p> This page describes the settings on Choosy's &ldquo;Advanced&rdquo; tab. To find these settings open System Preferences, click on the Choosy icon and then click on the Advanced tab. </p> <img src="../images/settings_advanced.png" alt="A screenshot of Choosy's advanced settings tab" /> <p> Advanced behaviour rules allow you to set up specific behaviours that will be triggered in specific circumstances. </p> <ol> <li><a href="#edit">Adding and editing rules</a></li> <li><a href="#ordering">Ordering rules</a></li> <li><a href="#disabling">Disabling rules</a></li> </ol> <div id="edit"> <h2>Adding and editing rules</h2> <p> To add a rule, click on the plus button below the list of rules. </p> <p> To edit a rule, select the rule in the list and then click the &ldquo;Edit selected rule&rdquo; button on the right hand side below the list. </p> <p> When adding or editing rules this window will be displayed: </p> <img src="../images/settings_advanced_edit.png" alt="A screenshot of Choosy's editing interface for advanced behaviour rules" /> <p> This window contains three groups of options: </p> <ol> <li><a href="#edit-general">General rule settings</a></li> <li><a href="#edit-rule">When Choosy should use this rule</a></li> <li><a href="#edit-behaviour">What Choosy should do when it uses this rule</a></li> </ol> <div id="edit-general"> <h3>General rule settings</h3> <dl> <dt>Title</dt> <dd> <p> The title setting is located at the top of the rule editing window. It allows you to give the rule a name that will be displayed in the rules list. Choose something specific enough to distinguish this from other rules. </p> </dd> <dt>Enabled</dt> <dd> <p> The enabled checkbox is located at the bottom of the rule editting window. This allows you to disable rules without deleting them. If a rule is not enabled (i.e. if this box is not checked) then Choosy will ignore the rule. </p> </dd> </dl> </div> <div id="edit-rule"> <h3>When Choosy should use this rule</h3> <p> This section allows you to define the conditions that must be met in order for Choosy to use this rule. </p> <p> The first row of the rule editor lets you select what type of rule it is, and which of the rules criteria (<em>any</em>, <em>all</em> or <em>none</em>) must be met for the rule to be triggered:<br/> <img src="../images/rule_editor_type.png" alt="A screenshot of the first row of the rule editor" /> </p> <p> The subsequent rows of the rule editor show the different criteria that make up the rule. You can add new criteria by clicking on the plus button at the end of any row, and you can remove a criteron by clicking on the minus button at the end of its row:<br/> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a criteron row in the rule editor" /> </p> <p> The dropdown list at the beginning of the row lets you select what this criterion will match. The rest of the options in the row will depend on what type of criterion it is. Some types will have several options, others will just have a simple text box where you can type in a value. </p> <p> The following types of criteria are available: </p> <dl> <dt>Web address</dt> <dd> <img src="../images/rule_editor_web_address.png" alt="A screenshot of a web address criteron row in the rule editor" /> <p> This allows rules to be set up for certain web sites, or groups of web sites. For example you could use this criteria to set up a rule that sends all links to google.com to Firefox. </p> <p> Web address criteria are very flexible: You can match exact addresses, addresses that start with, end with or contain certain words or even addresses that match patterns and regular expressions. The <a href="../settings/advanced/urls.html">web address rules</a> section describes these options in more detail. </p> </dd> <dt>Source application</dt> <dd> <img src="../images/rule_editor_source_app.png" alt="A screenshot of a source application criteron row in the rule editor" /> <p> This allows rules to be created that will be triggered when you click on a link in a specific application. The browse button lets you pick an application from your Applications folder (or elsewhere on your Mac). <p> <p> By selecting &ldquo;<em>is not</em>&rdquo; in the second dropdown list, you can also create rules that target links from all source applications except for the application selected in this row. </p> </dd> <dt>Link type</dt> <dd> <img src="../images/rule_editor_link_type.png" alt="A screenshot of a link type criteron row in the rule editor" /> <p> Link type lets you select from the following options: </p> <ul> <li>a link to a website</li> <li>an HTML file on your computer</li> </ul> <p> This lets you set up rules that only apply either to HTML files on your computer, or to links to websites. For example you might want to set up a custom prompt for HTML files on your computer that includes editing tools that wouldn't be able to open normal web links. </p> </dd> <dt>Number of running browsers</dt> <dd> <img src="../images/rule_editor_running_browsers.png" alt="A screenshot of a running browsers criteron row in the rule editor" /> <p> This lets you set up rules that only trigger when a certain number of browsers are running, or when more than or less than a certain number of browsers are running. The second dropdown list lets you select from the following options: </p> <ul> <li>is</li> <li>is not</li> <li>is less than</li> <li>is greater than</li> </ul> <p> The third dropdown list lets you select a number from 0 to 10. </p> <p> When you click on a link the number of running browsers is calculated as the number of applications from your <a href="../settings/browsers.html">browsers list</a> that are currently running. </p> </dd> <dt>Modifier keys</dt> <dd> <img src="../images/rule_editor_modifier_keys.png" alt="A screenshot of a modifier keys criteron row in the rule editor" /> <p> This type of criteria lets you set up rules that are only triggered when you are holding down a modifier key or a combination of modifier keys when you click on the link. </p> <p> This is useful for behaviours that you only want to occur sometimes. For example you could set up your <a href="../settings/behaviour.html">behaviour settings</a> to never prompt you to select a browser, and then set up an advanced behaviour rule to prompt you to select from all browsers when you hold shift while clicking on a link. </p> <p> Modifier keys criteria can use combinations of the following keys: </p> <ul> <li>&#x21E7; Shift</li> <li>&#x2303; Control</li> <li>&#x2318; Command (sometimes called &ldquo;Apple&rdquo;)</li> <li>&#x2325; Option (sometimes called &ldquo;alt&rdquo;)</li> <li>&#x21E5; Tab</li> <li>&#x238B; Escape</li> </ul> </dd> <dt>Custom <acronym title="Application Programming Interface">API</acronym> method</dt> <dd> <img src="../images/rule_editor_custom_api.png" alt="A screenshot of a custom API method criteron row in the rule editor" /> <p> Custom API methods let you extend Choosy's API and add your own behaviours to it. </p> <p> - If you were to create a custom API method called &ldquo;my.rule&rdquo; you would - trigger it in the same way as any other API method, e.g. by loading the URL - <code>x-choosy://my.rule/http://www.google.com</code> + If you were to create a rule that responded to a custom API method called + &ldquo;my.rule&rdquo; you would trigger it in the same way as any other API + method, e.g. by loading the URL <code>x-choosy://my.rule/http://www.google.com</code> </p> <p> The <a href="../settings/advanced/customapi.html">custom API methods</a> page contains more information about creating and using your own custom API methods. </p> </dd> </dl> </div> <div id="edit-behaviour"> <h3>What Choosy should do when it uses this rule</h3> <p> At the bottom of the rule editing window are the rule's behaviour settings. This is where you tell Choosy what to do when all the rule's criteria match the link that is being clicked. </p> <p> The following behaviours are available: </p> <dl> <dt>Use the default behaviour</dt> <dd> Choosy will act in accordance with your <a href="../settings/behaviour.html">behaviour settings</a>, just as it would have done if no advanced behaviour rules had been triggered. </dd> <dt>Use my favourite browser</dt> <dd> Choosy will use the browser at the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Use the best running browser</dt> <dd> Choosy will use the running browser closest to the top of your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from all browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a>. </dd> <dt>Prompt to select from running browsers</dt> <dd> Choosy will prompt you to select from all the browsers in your <a href="../settings/browsers.html">browsers list</a> that are currently running. </dd> <dt>Prompt to select from these browsers&hellip;</dt> <dd> <p> Choosy will prompt you to select from a custom list of browsers that you set up only for this rule. When you select this option an interface very similar to the <a href="../settings/browsers.html">browsers list</a> will appear where you can set up a custom browser list. </p> <img src="../images/settings_advanced_behaviour_custom.png" alt="A screenshot of Choosy's &quot;prompt to select from these browsers&quot; interface" /> </dd> <dt>Always use this browser&hellip;</dt> <dd> <p> Choosy will always use the same browser. When you select this option an interface will appear that allows you to select the browser that Choosy should always use with this rule. </p> <img src="../images/settings_advanced_behaviour_specific.png" alt="A screenshot of Choosy's &quot;always use this browser&quot; interface" /> </dd> </dl> </div> </div> <div id="ordering"> <h2>Ordering rules</h2> <p> The order of your behaviour rules is important. When more than one rule matches the current situation Choosy will use the rule that is nearest to the top of the list. This means that a very general rule would take priority over a very specific rule when both rules match but the general rule is higher up the list. </p> <p> To change the order of the rules just drag and drop each rule into a new position. </p> </div> <div id="disabling"> <h2>Disabling rules</h2> <p> The checkboxes in the list of rules allow you to disable rules without removing them completely. If a rule's checkbox is not checked then Choosy will ignore that rule. </p> </div> </body> </html>
choosy-app/choosy-help
38977d25c79192d5c85364c18c419a56d9165c2f
Added instructions for uninstalling Choosy.
diff --git a/misc/uninstalling.html b/misc/uninstalling.html index 84276ac..87a58b2 100644 --- a/misc/uninstalling.html +++ b/misc/uninstalling.html @@ -1,18 +1,26 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Choosy Help: Uninstalling Choosy</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <h1>Choosy Help: Uninstalling Choosy</h1> - - TODO + + <p>To remove Choosy from your system follow these steps:</p> + + <ol> + <li>Open Choosy in System Preferences</li> + <li>Stop the helper application by clicking the &ldquo;Stop Helper&rdquo; button</li> + <li>Uncheck the &ldquo;Enable Choosy for links&rdquo; and &ldquo;Enable Choosy for HTML files&rdquo; boxes (this will disable Choosy and set the browser at the top of your <a href="../settings/browsers.html">browser list</a> to be the default browser, once you've removed Choosy you can always change the default browser as normal by using Safari's preferences)</li> + <li>Go back to the main System Preferences menu</li> + <li>Control-click on the Choosy icon and select &ldquo;Remove Choosy Preference Pane&rdquo; from the menu</li> + </ol> </body> </html>
geebee/homeauto
5eb4ff4068167bd0b1ac2b084d7e3a663f2c8f2d
added isArmed into JSON fixed line handling on zone ready/not-ready
diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index 2b983ea..3145b9b 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,424 +1,434 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt2.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" x="584" y="118" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="rotate(90 580.9848 118.72849)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="back_door_text" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="front_door_text" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="north_bedroom_text" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="soth_bedroom_text" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="bathroom_text" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="kitchen_text" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="den_text">Den</tspan></text> </g> <script type="text/ecmascript"> var svgNS = "http://www.w3.org/2000/svg"; document.getElementById('layer1').setAttribute("tansform", "scale(0.79)"); ajaxSensorStatus = setInterval("loadXMLDoc('/cgi-bin/displayJSON.cgi')", 5000); function createBadge(sensorId, sensorStatus) { var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); var radius = 13; switch (sensorStatus) { case "normal": fillColor="green"; break; case "alert": fillColor="red"; break; default: fillColor="black"; } //create a new circle element and set the attributes var circle = document.createElementNS(svgNS,"circle"); circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); circle.setAttributeNS(null,"cx",centerX); circle.setAttributeNS(null,"cy",centerY); circle.setAttributeNS(null,"r",radius); circle.setAttributeNS(null,"fill",fillColor); circle.setAttributeNS(null,"style","visibility:hidden;"); document.getElementById("layer1").appendChild(circle); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { alert("Get Firefox, Tool!"); window.location = "http://www.mozilla.com/firefox/"; } } function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { case "normal": document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; case "alert": document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) {// 4 = "loaded" alarm = eval("(" + xmlhttp.responseText + ")"); badgeStatus(alarm.zone.sensor0.name, alarm.zone.sensor0.status); badgeStatus(alarm.zone.sensor1.name, alarm.zone.sensor1.status); dl = document.getElementsByClassName(alarm.zone.name + "_line") - switch (alarm.zone.status) + switch (alarm.zone.isReady) { - case "normal": + case "true": for (var i = 0; i &lt; dl.length; i++) { - dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: green; stroke-width: 2px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: green; stroke-width: 3px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } break; - case "alert": + case "false": for (var i = 0; i &lt; dl.length; i++) { - dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: red; stroke-width: 3px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: black; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } break; default: for (var i = 0; i &lt; dl.length; i++) { dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: black; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } } + + switch (alarm.zone.isArmed) + { + case "true": + for (var i = 0; i &lt; dl.length; i++) + { + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: red; stroke-width: 3px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + } + break; + } } } </script> </svg> diff --git a/apache/htdocs/sensorStatus.json b/apache/htdocs/sensorStatus.json index b754554..05f0a66 100644 --- a/apache/htdocs/sensorStatus.json +++ b/apache/htdocs/sensorStatus.json @@ -1 +1 @@ -{"zone": {"sensor1": {"status": "normal", "hexid": "0xf", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "alert", "hexid": "0xc", "type": "X10Security", "id": 2, "name": "den_east_windows"}, "id": 1, "name": "den", "status": "alert"}} +{"zone": {"isReady": "false", "name": "den", "isArmed": "false", "sensor1": {"status": "alert", "hexid": "0xdc", "type": "X10Security", "id": 2, "name": "den_east_windows"}, "sensor0": {"status": "alert", "hexid": "0xa", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "id": 1}} \ No newline at end of file
geebee/homeauto
4f481601a7806884d1348341ee8fa1b6b01dc7d8
Minor forward compatibility fix hexid update to devices.db
diff --git a/xPL/devices.db b/xPL/devices.db index b05f3fe..d6fc9cf 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ diff --git a/xPL/xpl.py b/xPL/xpl.py index 74a2f0d..e4d8795 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,175 +1,178 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() # logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" # logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" # xplmsglog = open("xplmsglog.log", "a") # xplmsglog.write(logLineHeader) # xplmsglog.write(str(messageArray)) # xplmsglog.write(logLineFooter) # xplmsglog.close() xplMsg = xplMessage(messageArray) xplMsg.parseMessage() zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if xplMsg.type == "xpl-trig": if xplMsg.statusDict['command'] == 'alert': zDen.sensors[xplMsg.statusDict['sensorHexId']].setStatus(zDen.sensors[xplMsg.statusDict['sensorHexId']].id,'alert') self.xplToJSON('den') print "Sensor (Type:" + xplMsg.statusDict['sensorType'] + ", ID: " + xplMsg.statusDict['sensorHexId'] + ") is reporting status: ALERT" if xplMsg.statusDict['command'] == 'normal': zDen.sensors[xplMsg.statusDict['sensorHexId']].setStatus(zDen.sensors[xplMsg.statusDict['sensorHexId']].id,'normal') self.xplToJSON('den') print "Sensor (Type:" + xplMsg.statusDict['sensorType'] + ", ID: " + xplMsg.statusDict['sensorHexId'] + ") is reporting status: NORMAL" def xplToJSON (self, zoneName = None): if zoneName != None: i = 0 zone = Zone() zone.getZoneByName(zoneName) zone.getLinkedSensors() zone.isReady() jsonRequest = {'zone':{}} if zone.statusReady == True: jsonRequest['zone']['isReady'] = "true" elif zone.statusReady == False: jsonRequest['zone']['isReady'] = "false" else: jsonRequest['zone']['isReady'] = "NOSTATUS" + # Hardcoded isArmed - FALSE Status until I figure out arming + jsonRequest['zone']['isArmed'] = "false" + jsonRequest['zone']['id'] = zone.id jsonRequest['zone']['name'] = zone.name for sensor in zone.sensors: jsonRequest['zone']['sensor' + str(i)] = {} jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status i = i + 1 #http-post #print "PARAMS: " + str(jsonRequest) params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None statusDict = {} def __init__(self, messageArray = None): if messageArray != None: self.fullMessage = messageArray self.schema = self.fullMessage[4] if self.fullMessage[0] == 'xpl-trig': self.type = 'xpl-trig' elif self.fullMessage[0] == 'xpl-stat': self.type = 'xpl-stat' else: self.type = 'OTHER' else: print "You must pass the message array" return None def parseMessage(self): if self.type != None: if self.type == "xpl-trig": if self.schema == "x10.security": for msgLine in self.fullMessage: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.statusDict[kvArray[0]] = kvArray[2] deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.statusDict['device']) self.statusDict['sensorType'] = deviceId.group(1) self.statusDict['sensorHexId'] = deviceId.group(2) else: print "Unkown xpl-trig schema" return None elif self.type == "xpl-stat": print "xpl-stat Message, ignoring." else: print "Unknown Message Type" return None else: print "Your instance must have a message type" return None
geebee/homeauto
7f9a22e0c5ba88b737cf88697adf0f335f07007c
Implemented the xplMessage class completely
diff --git a/xPL/Zones.py b/xPL/Zones.py index 5120d46..9420e70 100644 --- a/xPL/Zones.py +++ b/xPL/Zones.py @@ -1,124 +1,124 @@ from Sensors import Sensor import sqlite3 class Zone: statusReady = False statusArmed = False sensors = {} id = None name = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getZoneById (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where id = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.name = returnRS['name'] = resultSet[0][1] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getZoneByName (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where name = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = resultSet[0][0] self.name = resultSet[0][2] return None # No Need To Return Anything, Even On Positive Outcume else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getLinkedSensors (self): if self.isConn == False: print "You need a DB connection in order to get..." return None c = self.conn.cursor() queryParams = (self.id,) query = "select s.hexid from zones z, sensors s, zones_sensors_linked zsl where zsl.zoneid= ? and zsl.sensorid = s.id and zsl.zoneid = z.id" c.execute(query, queryParams) resultSet = [] sensorHexIds = [] for row in c: resultSet.append(row) for sHexIds in resultSet: sensorHexIds.append(sHexIds[0]) for sHexId in sensorHexIds: s = Sensor() s.getSingleSensor('hexid', sHexId) self.sensors[sHexId] = s del s def isReady(self): for sensor in self.sensors: - status = sensor.getStatus(sensor.id) + status = self.sensors[sensor].getStatus(int(self.sensors[sensor].id)) if status == "alert": - print "Sensor: " + sensor.name + "Reported Alert Status." + print "Sensor: " + self.sensors[sensor].name + " Reported Alert Status." self.statusReady = False return False print "All Sensors Reported Normal Status" self.statusReady = True return True diff --git a/xPL/devices.db b/xPL/devices.db index 64ace5e..b05f3fe 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ diff --git a/xPL/xpl.py b/xPL/xpl.py index f80b71e..74a2f0d 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,154 +1,175 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 - messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() - - logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" - logLineFooter = "\nEND XPL MESSAGE\n\n" + + # logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" + # logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" - xplmsglog = open("xplmsglog.log", "a") - xplmsglog.write(logLineHeader) - xplmsglog.write(str(messageArray)) - xplmsglog.write(logLineFooter) - xplmsglog.close() - - xplMsg = xplMessage() - xplMsg.fullMessage = messageArray - xplMsg.schema = messageArray[4] - - if messageArray[0] == 'xpl-trig': - xplMsg.type = 'xpl-trig' - for msgLine in messageArray: - if msgLine.find('=') != -1: - kvArray = msgLine.partition('=') - self.messageDict[kvArray[0]] = kvArray[2] - - #----- TODO: Replace xPL message dictionary with xplMessage class -----# - # print self.messageDict - - deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) - sensorType = deviceId.group(1) - sensorHexId = deviceId.group(2) + # xplmsglog = open("xplmsglog.log", "a") + # xplmsglog.write(logLineHeader) + # xplmsglog.write(str(messageArray)) + # xplmsglog.write(logLineFooter) + # xplmsglog.close() + + xplMsg = xplMessage(messageArray) + xplMsg.parseMessage() + + zDen = Zone() + zDen.getZoneByName('den') + zDen.getLinkedSensors() - zDen = Zone() - zDen.getZoneByName('den') - zDen.getLinkedSensors() - - - if self.messageDict['command'] == 'alert': - zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') + if xplMsg.type == "xpl-trig": + if xplMsg.statusDict['command'] == 'alert': + zDen.sensors[xplMsg.statusDict['sensorHexId']].setStatus(zDen.sensors[xplMsg.statusDict['sensorHexId']].id,'alert') self.xplToJSON('den') - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: ALERT" - if self.messageDict['command'] == 'normal': - zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') - print "COMMAND: NORMAL" - print "STATUS: " + zDen.sensors[sensorHexId].status + print "Sensor (Type:" + xplMsg.statusDict['sensorType'] + ", ID: " + xplMsg.statusDict['sensorHexId'] + ") is reporting status: ALERT" + if xplMsg.statusDict['command'] == 'normal': + zDen.sensors[xplMsg.statusDict['sensorHexId']].setStatus(zDen.sensors[xplMsg.statusDict['sensorHexId']].id,'normal') self.xplToJSON('den') - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: NORMAL" - + print "Sensor (Type:" + xplMsg.statusDict['sensorType'] + ", ID: " + xplMsg.statusDict['sensorHexId'] + ") is reporting status: NORMAL" def xplToJSON (self, zoneName = None): if zoneName != None: i = 0 zone = Zone() zone.getZoneByName(zoneName) zone.getLinkedSensors() zone.isReady() jsonRequest = {'zone':{}} if zone.statusReady == True: - jsonRequest['zone']['status'] = "normal" + jsonRequest['zone']['isReady'] = "true" elif zone.statusReady == False: - jsonRequest['zone']['status'] = "alert" + jsonRequest['zone']['isReady'] = "false" else: - jsonRequest['zone']['status'] = "NOSTATUS" + jsonRequest['zone']['isReady'] = "NOSTATUS" jsonRequest['zone']['id'] = zone.id jsonRequest['zone']['name'] = zone.name for sensor in zone.sensors: jsonRequest['zone']['sensor' + str(i)] = {} jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status i = i + 1 #http-post #print "PARAMS: " + str(jsonRequest) params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None + statusDict = {} - def __init__(self): - pass + def __init__(self, messageArray = None): + if messageArray != None: + self.fullMessage = messageArray + self.schema = self.fullMessage[4] + + if self.fullMessage[0] == 'xpl-trig': + self.type = 'xpl-trig' + elif self.fullMessage[0] == 'xpl-stat': + self.type = 'xpl-stat' + else: + self.type = 'OTHER' + + else: + print "You must pass the message array" + return None + + def parseMessage(self): + if self.type != None: + if self.type == "xpl-trig": + if self.schema == "x10.security": + for msgLine in self.fullMessage: + if msgLine.find('=') != -1: + kvArray = msgLine.partition('=') + self.statusDict[kvArray[0]] = kvArray[2] + + deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.statusDict['device']) + self.statusDict['sensorType'] = deviceId.group(1) + self.statusDict['sensorHexId'] = deviceId.group(2) + + else: + print "Unkown xpl-trig schema" + return None + elif self.type == "xpl-stat": + print "xpl-stat Message, ignoring." + + else: + print "Unknown Message Type" + return None + else: + print "Your instance must have a message type" + return None
geebee/homeauto
62d0c2d25ad8f2e5215e6f46844f7cf53b2f2ee6
slight modularity update
diff --git a/apache/cgi-bin/acceptJSON.cgi b/apache/cgi-bin/acceptJSON.cgi index 473e400..97f4674 100644 --- a/apache/cgi-bin/acceptJSON.cgi +++ b/apache/cgi-bin/acceptJSON.cgi @@ -1,16 +1,17 @@ #!C:/Python26/python.exe import cgi,json -apacheRoot = "C:/Apache2/htdocs/" +apacheRoot = "C:/Documents And Settings/Michael/Desktop/homeauto/apache/htdocs" +# apacheRoot = "/home/mike/homeauto/apache/htdocs" form = cgi.FieldStorage() formFirst = form.getfirst('zone') ffDict = eval(formFirst) finalDict = {'zone':ffDict} jsonReply = json.dumps(finalDict) file_object = open(apacheRoot + "/sensorStatus.json","w") file_object.write(jsonReply) file_object.close()
geebee/homeauto
1ad5c1a33dba619e2992c7b0c11c4615715efbc1
bugfixes... now will work from other computers
diff --git a/apache/cgi-bin/acceptJSON.cgi b/apache/cgi-bin/acceptJSON.cgi index bfe9c2f..473e400 100644 --- a/apache/cgi-bin/acceptJSON.cgi +++ b/apache/cgi-bin/acceptJSON.cgi @@ -1,18 +1,16 @@ #!C:/Python26/python.exe import cgi,json apacheRoot = "C:/Apache2/htdocs/" + form = cgi.FieldStorage() formFirst = form.getfirst('zone') ffDict = eval(formFirst) finalDict = {'zone':ffDict} jsonReply = json.dumps(finalDict) -file_object = open(apacheRoot + "sensorStatus.json","w") +file_object = open(apacheRoot + "/sensorStatus.json","w") file_object.write(jsonReply) file_object.close() - -print "Content-Type: text/plain\n" -print "JSON Reply: " + jsonReply diff --git a/apache/cgi-bin/displayJSON.cgi b/apache/cgi-bin/displayJSON.cgi index b6c36fd..07f5f85 100644 --- a/apache/cgi-bin/displayJSON.cgi +++ b/apache/cgi-bin/displayJSON.cgi @@ -1,9 +1,11 @@ #!C:/Python26/python.exe -apacheRoot = "C:/Apache2/htdocs/" -file_object = open(apacheRoot + "sensorStatus.json","r") +import os, urllib2 + +host = os.environ.get("HTTP_HOST", "NOHOST") + +file_object = urllib2.urlopen("http://" + host + "/sensorStatus.json") jsonReply = file_object.read() -file_object.close() print "Content-Type: text/plain\n" print jsonReply
geebee/homeauto
ea0b73cf106ecea93ec0c47be3e6aaf072c79353
Made JSON reading/writing more flexible - Part 2
diff --git a/apache/cgi-bin/displayJSON.cgi b/apache/cgi-bin/displayJSON.cgi new file mode 100644 index 0000000..b6c36fd --- /dev/null +++ b/apache/cgi-bin/displayJSON.cgi @@ -0,0 +1,9 @@ +#!C:/Python26/python.exe + +apacheRoot = "C:/Apache2/htdocs/" +file_object = open(apacheRoot + "sensorStatus.json","r") +jsonReply = file_object.read() +file_object.close() + +print "Content-Type: text/plain\n" +print jsonReply
geebee/homeauto
9d9bad762b10bb64c450766985ff9ab59af0ff1a
Made JSON reading/writing more flexible
diff --git a/apache/cgi-bin/acceptJSON.cgi b/apache/cgi-bin/acceptJSON.cgi index 0587d5f..bfe9c2f 100644 --- a/apache/cgi-bin/acceptJSON.cgi +++ b/apache/cgi-bin/acceptJSON.cgi @@ -1,19 +1,18 @@ #!C:/Python26/python.exe import cgi,json +apacheRoot = "C:/Apache2/htdocs/" form = cgi.FieldStorage() formFirst = form.getfirst('zone') - -#*** UNSAFE STEP - NEVER TRUST USER INPUT! *** ffDict = eval(formFirst) finalDict = {'zone':ffDict} jsonReply = json.dumps(finalDict) -file_object = open("C:/Apache2/htdocs/sensorStatus.json","w") +file_object = open(apacheRoot + "sensorStatus.json","w") file_object.write(jsonReply) file_object.close() print "Content-Type: text/plain\n" print "JSON Reply: " + jsonReply diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index 95f6efa..2b983ea 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,424 +1,424 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt2.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" x="584" y="118" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="rotate(90 580.9848 118.72849)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="back_door_text" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="front_door_text" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="north_bedroom_text" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="soth_bedroom_text" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="bathroom_text" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="kitchen_text" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="den_text">Den</tspan></text> </g> <script type="text/ecmascript"> var svgNS = "http://www.w3.org/2000/svg"; document.getElementById('layer1').setAttribute("tansform", "scale(0.79)"); - ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); + ajaxSensorStatus = setInterval("loadXMLDoc('/cgi-bin/displayJSON.cgi')", 5000); function createBadge(sensorId, sensorStatus) { var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); var radius = 13; switch (sensorStatus) { case "normal": fillColor="green"; break; case "alert": fillColor="red"; break; default: fillColor="black"; } //create a new circle element and set the attributes var circle = document.createElementNS(svgNS,"circle"); circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); circle.setAttributeNS(null,"cx",centerX); circle.setAttributeNS(null,"cy",centerY); circle.setAttributeNS(null,"r",radius); circle.setAttributeNS(null,"fill",fillColor); circle.setAttributeNS(null,"style","visibility:hidden;"); document.getElementById("layer1").appendChild(circle); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { alert("Get Firefox, Tool!"); window.location = "http://www.mozilla.com/firefox/"; } } function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { case "normal": document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; case "alert": document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) {// 4 = "loaded" alarm = eval("(" + xmlhttp.responseText + ")"); badgeStatus(alarm.zone.sensor0.name, alarm.zone.sensor0.status); badgeStatus(alarm.zone.sensor1.name, alarm.zone.sensor1.status); dl = document.getElementsByClassName(alarm.zone.name + "_line") switch (alarm.zone.status) { case "normal": for (var i = 0; i &lt; dl.length; i++) { dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: green; stroke-width: 2px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } break; case "alert": for (var i = 0; i &lt; dl.length; i++) { dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: red; stroke-width: 3px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } break; default: for (var i = 0; i &lt; dl.length; i++) { dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: black; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); } } } } </script> </svg>
geebee/homeauto
7602173d8369a303642431579af395994a08106e
Remove superfluous debugging messages
diff --git a/xPL/xpl.py b/xPL/xpl.py index 649dfc8..f80b71e 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,155 +1,154 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') self.xplToJSON('den') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: ALERT" if self.messageDict['command'] == 'normal': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') print "COMMAND: NORMAL" print "STATUS: " + zDen.sensors[sensorHexId].status self.xplToJSON('den') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: NORMAL" def xplToJSON (self, zoneName = None): if zoneName != None: i = 0 zone = Zone() zone.getZoneByName(zoneName) zone.getLinkedSensors() zone.isReady() jsonRequest = {'zone':{}} if zone.statusReady == True: jsonRequest['zone']['status'] = "normal" elif zone.statusReady == False: jsonRequest['zone']['status'] = "alert" else: jsonRequest['zone']['status'] = "NOSTATUS" jsonRequest['zone']['id'] = zone.id jsonRequest['zone']['name'] = zone.name - print "Number of Sensors: " + str(len(zone.sensors)) - print "Zone.sensors = " + str(zone.sensors) + for sensor in zone.sensors: jsonRequest['zone']['sensor' + str(i)] = {} jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status i = i + 1 #http-post #print "PARAMS: " + str(jsonRequest) params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
3be435ec099cdcd3112ca3e4b7346c72015a577d
Fix setStatus problems Add ZoneReady Logic To JSON/SVG
diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index 420ca13..95f6efa 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,398 +1,424 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt2.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path + class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path + class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path + class="den_line" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" x="584" y="118" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="rotate(90 580.9848 118.72849)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" - id="tspan3279" + id="back_door_text" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" - id="tspan3283" + id="front_door_text" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" - id="tspan3287" + id="north_bedroom_text" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" - id="tspan3291" + id="soth_bedroom_text" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" - id="tspan3295" + id="bathroom_text" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" - id="tspan3299" + id="kitchen_text" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" - id="tspan3305">Den</tspan></text> + id="den_text">Den</tspan></text> </g> <script type="text/ecmascript"> var svgNS = "http://www.w3.org/2000/svg"; + document.getElementById('layer1').setAttribute("tansform", "scale(0.79)"); ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); function createBadge(sensorId, sensorStatus) { var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); var radius = 13; switch (sensorStatus) { case "normal": fillColor="green"; break; case "alert": fillColor="red"; break; default: fillColor="black"; } //create a new circle element and set the attributes var circle = document.createElementNS(svgNS,"circle"); circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); circle.setAttributeNS(null,"cx",centerX); circle.setAttributeNS(null,"cy",centerY); circle.setAttributeNS(null,"r",radius); circle.setAttributeNS(null,"fill",fillColor); circle.setAttributeNS(null,"style","visibility:hidden;"); document.getElementById("layer1").appendChild(circle); - document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { alert("Get Firefox, Tool!"); window.location = "http://www.mozilla.com/firefox/"; } } function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { case "normal": document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; case "alert": document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) {// 4 = "loaded" alarm = eval("(" + xmlhttp.responseText + ")"); badgeStatus(alarm.zone.sensor0.name, alarm.zone.sensor0.status); badgeStatus(alarm.zone.sensor1.name, alarm.zone.sensor1.status); + + dl = document.getElementsByClassName(alarm.zone.name + "_line") + + switch (alarm.zone.status) + { + case "normal": + for (var i = 0; i &lt; dl.length; i++) + { + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: green; stroke-width: 2px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + } + break; + case "alert": + for (var i = 0; i &lt; dl.length; i++) + { + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: red; stroke-width: 3px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + } + break; + default: + for (var i = 0; i &lt; dl.length; i++) + { + dl[i].setAttributeNS(null,"style", "fill: none; fill-rule: evenodd; stroke: black; stroke-width: 1px; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1;"); + } + } } } </script> </svg> diff --git a/apache/htdocs/sensorStatus.json b/apache/htdocs/sensorStatus.json index b636b5a..b754554 100644 --- a/apache/htdocs/sensorStatus.json +++ b/apache/htdocs/sensorStatus.json @@ -1 +1 @@ -{"zone": {"sensor1": {"status": "normal", "hexid": "0xc", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "alert", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_east_windows"}, "id": 1, "name": "den"}} +{"zone": {"sensor1": {"status": "normal", "hexid": "0xf", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "alert", "hexid": "0xc", "type": "X10Security", "id": 2, "name": "den_east_windows"}, "id": 1, "name": "den", "status": "alert"}} diff --git a/xPL/Sensors.py b/xPL/Sensors.py index a407a12..ed6a729 100644 --- a/xPL/Sensors.py +++ b/xPL/Sensors.py @@ -1,153 +1,153 @@ import sqlite3 class Sensor: status = None id = None hexid = None name = None type = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.hexid = returnRS['hexid'] = resultSet[0][1] self.name = returnRS['name'] = resultSet[0][2] self.type = returnRS['type'] = resultSet[0][3] self.status = returnRS['status'] = resultSet[0][4] return returnRS else: print "Query: " + query + ", Params: " + str(queryParams) print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None def getStatus(self, sensorId = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorId != None: c = self.conn.cursor() queryParams = (sensorId,) query = "select status from sensors where id = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 1: self.status = resultSet[0][0] return self.status else: print "Query: " + query + ", Params: " + str(queryParams) print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the ID" return None def setStatus(self, sensorId = None, sensorStatus = None): if self.isConn == False: print "You need a DB connection in order to get..." return False if sensorId != None and sensorStatus != None: c = self.conn.cursor() - queryParams = (sensorId, sensorStatus) + queryParams = (sensorStatus, sensorId) query = "update sensors set status = ? where id = ?" try: c.execute(query, queryParams) self.conn.commit() self.getStatus(sensorId) return True except: print "Update Failed..." return False else: print "You didn't pass the ID" return False diff --git a/xPL/devices.db b/xPL/devices.db index 415a8ac..64ace5e 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ diff --git a/xPL/xpl.py b/xPL/xpl.py index 89edd6f..649dfc8 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,144 +1,155 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') - print "COMMAND: ALERT" - print "STATUS: " + zDen.sensors[sensorHexId].status self.xplToJSON('den') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: ALERT" if self.messageDict['command'] == 'normal': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') print "COMMAND: NORMAL" print "STATUS: " + zDen.sensors[sensorHexId].status self.xplToJSON('den') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: NORMAL" def xplToJSON (self, zoneName = None): if zoneName != None: + i = 0 + zone = Zone() zone.getZoneByName(zoneName) zone.getLinkedSensors() + zone.isReady() jsonRequest = {'zone':{}} + + if zone.statusReady == True: + jsonRequest['zone']['status'] = "normal" + elif zone.statusReady == False: + jsonRequest['zone']['status'] = "alert" + else: + jsonRequest['zone']['status'] = "NOSTATUS" + jsonRequest['zone']['id'] = zone.id jsonRequest['zone']['name'] = zone.name + print "Number of Sensors: " + str(len(zone.sensors)) + print "Zone.sensors = " + str(zone.sensors) for sensor in zone.sensors: - for i in range(len(zone.sensors)): - jsonRequest['zone']['sensor' + str(i)] = {} - jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id - jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid - jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name - jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type - jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status + jsonRequest['zone']['sensor' + str(i)] = {} + jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id + jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid + jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name + jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type + jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status + i = i + 1 #http-post #print "PARAMS: " + str(jsonRequest) params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
791f36183b842605b20c9cd7782115b45623a991
Add sqlite3.exe
diff --git a/xPL/sqlite3.exe b/xPL/sqlite3.exe new file mode 100644 index 0000000..fdeac4e Binary files /dev/null and b/xPL/sqlite3.exe differ
geebee/homeauto
19f0b3e8e1863e83a7ae03d75f52023cf8e4d2e6
Sensors.py, xpl.py first attempt at fixing JSON received by JS updated sensorStatus.json to proper data for testing (passed) fixes to incorporate above to apt.svg
diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index b2d7aa2..420ca13 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,400 +1,398 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt2.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" x="584" y="118" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="rotate(90 580.9848 118.72849)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="tspan3279" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="tspan3283" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="tspan3287" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="tspan3291" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="tspan3295" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="tspan3299" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="tspan3305">Den</tspan></text> </g> - <script - type="text/ecmascript" - id="script55"> - var svgNS = &quot;http://www.w3.org/2000/svg&quot;; + <script type="text/ecmascript"> + var svgNS = "http://www.w3.org/2000/svg"; - ajaxSensorStatus = setInterval(&quot;loadXMLDoc('http://localhost/sensorStatus.json')&quot;, 5000); + ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); function createBadge(sensorId, sensorStatus) { - var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,&quot;x&quot;))); - var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,&quot;y&quot;))); + var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); + var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); var radius = 13; switch (sensorStatus) { - case &quot;normal&quot;: - fillColor=&quot;green&quot;; + case "normal": + fillColor="green"; break; - case &quot;alert&quot;: - fillColor=&quot;red&quot;; + case "alert": + fillColor="red"; break; default: - fillColor=&quot;black&quot;; + fillColor="black"; } //create a new circle element and set the attributes - var circle = document.createElementNS(svgNS,&quot;circle&quot;); - circle.setAttributeNS(null,&quot;id&quot;,sensorId + &quot;_&quot; + fillColor + &quot;_badge&quot;); - circle.setAttributeNS(null,&quot;cx&quot;,centerX); - circle.setAttributeNS(null,&quot;cy&quot;,centerY); - circle.setAttributeNS(null,&quot;r&quot;,radius); - circle.setAttributeNS(null,&quot;fill&quot;,fillColor); - circle.setAttributeNS(null,&quot;style&quot;,&quot;visibility:hidden;&quot;); + var circle = document.createElementNS(svgNS,"circle"); + circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); + circle.setAttributeNS(null,"cx",centerX); + circle.setAttributeNS(null,"cy",centerY); + circle.setAttributeNS(null,"r",radius); + circle.setAttributeNS(null,"fill",fillColor); + circle.setAttributeNS(null,"style","visibility:hidden;"); - document.getElementById(&quot;layer1&quot;).appendChild(circle); - document.getElementById('layer1').setAttribute(&quot;transform&quot;, &quot;scale(0.79)&quot;); + document.getElementById("layer1").appendChild(circle); + document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; - xmlhttp.open(&quot;GET&quot;,url,true); + xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { - alert(&quot;Get Firefox, Tool!&quot;); - window.location = &quot;http://www.mozilla.com/firefox/&quot;; + alert("Get Firefox, Tool!"); + window.location = "http://www.mozilla.com/firefox/"; } } function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { - case &quot;normal&quot;: + case "normal": document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; - case &quot;alert&quot;: + case "alert": document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: - alert(&quot;Sensor &quot; + sensorId + &quot; Should NOT Be Sending A Status Of: &quot; + sensorStatus); + alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) - {// 4 = &quot;loaded&quot; - alarm = eval(&quot;(&quot; + xmlhttp.responseText + &quot;)&quot;); + {// 4 = "loaded" + alarm = eval("(" + xmlhttp.responseText + ")"); badgeStatus(alarm.zone.sensor0.name, alarm.zone.sensor0.status); badgeStatus(alarm.zone.sensor1.name, alarm.zone.sensor1.status); } } </script> </svg> diff --git a/apache/htdocs/sensorStatus.json b/apache/htdocs/sensorStatus.json index 1d85d1e..b636b5a 100644 --- a/apache/htdocs/sensorStatus.json +++ b/apache/htdocs/sensorStatus.json @@ -1 +1 @@ -{"zone": {"sensor1": {"status": "normal", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "normal", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "id": 1, "name": "den"}} \ No newline at end of file +{"zone": {"sensor1": {"status": "normal", "hexid": "0xc", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "alert", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_east_windows"}, "id": 1, "name": "den"}} diff --git a/xPL/Sensors.py b/xPL/Sensors.py index 028ad8e..a407a12 100644 --- a/xPL/Sensors.py +++ b/xPL/Sensors.py @@ -1,152 +1,153 @@ import sqlite3 class Sensor: status = None id = None hexid = None name = None type = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.hexid = returnRS['hexid'] = resultSet[0][1] self.name = returnRS['name'] = resultSet[0][2] self.type = returnRS['type'] = resultSet[0][3] self.status = returnRS['status'] = resultSet[0][4] return returnRS else: print "Query: " + query + ", Params: " + str(queryParams) print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None def getStatus(self, sensorId = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorId != None: c = self.conn.cursor() queryParams = (sensorId,) query = "select status from sensors where id = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 1: self.status = resultSet[0][0] return self.status else: print "Query: " + query + ", Params: " + str(queryParams) print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the ID" return None def setStatus(self, sensorId = None, sensorStatus = None): if self.isConn == False: print "You need a DB connection in order to get..." return False if sensorId != None and sensorStatus != None: c = self.conn.cursor() queryParams = (sensorId, sensorStatus) query = "update sensors set status = ? where id = ?" try: c.execute(query, queryParams) self.conn.commit() + self.getStatus(sensorId) return True except: print "Update Failed..." return False else: print "You didn't pass the ID" return False diff --git a/xPL/devices.db b/xPL/devices.db index 023599d..415a8ac 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ diff --git a/xPL/xpl.py b/xPL/xpl.py index 98c860b..89edd6f 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,135 +1,144 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') - self.xplToJSON(zDen) - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: OPEN" + print "COMMAND: ALERT" + print "STATUS: " + zDen.sensors[sensorHexId].status + self.xplToJSON('den') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: ALERT" if self.messageDict['command'] == 'normal': zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') - self.xplToJSON(zDen) - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: CLOSED" + print "COMMAND: NORMAL" + print "STATUS: " + zDen.sensors[sensorHexId].status + self.xplToJSON('den') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: NORMAL" - def xplToJSON (self, zone = None): + def xplToJSON (self, zoneName = None): - if zone != None: + if zoneName != None: + zone = Zone() + zone.getZoneByName(zoneName) + zone.getLinkedSensors() + jsonRequest = {'zone':{}} jsonRequest['zone']['id'] = zone.id jsonRequest['zone']['name'] = zone.name for sensor in zone.sensors: for i in range(len(zone.sensors)): jsonRequest['zone']['sensor' + str(i)] = {} jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status #http-post + #print "PARAMS: " + str(jsonRequest) params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
4401ad1a3e47d6dbb80135e76a91c631b6199c2c
Fixed den_south_windows rectangle so x and y are real co-ordinates (they were transformed around by a matrix because it was a copied item in inkscape, and I turned it in the GUI) add sensorStatus.json for Reference
diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index a6acccd..b2d7aa2 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,400 +1,400 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" - sodipodi:docname="apt.svg" + sodipodi:docname="apt2.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" - y="-580.9848" - x="118.72849" + x="584" + y="118" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" - transform="matrix(-6.5451402e-3,0.9999786,-0.9999786,-6.5451402e-3,0,0)" /> + transform="rotate(90 580.9848 118.72849)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="tspan3279" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="tspan3283" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="tspan3287" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="tspan3291" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="tspan3295" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="tspan3299" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="tspan3305">Den</tspan></text> </g> - - <script type="text/ecmascript"> - var svgNS = "http://www.w3.org/2000/svg"; + <script + type="text/ecmascript" + id="script55"> + var svgNS = &quot;http://www.w3.org/2000/svg&quot;; - ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); + ajaxSensorStatus = setInterval(&quot;loadXMLDoc('http://localhost/sensorStatus.json')&quot;, 5000); function createBadge(sensorId, sensorStatus) { - var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); - var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); + var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,&quot;x&quot;))); + var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,&quot;y&quot;))); var radius = 13; switch (sensorStatus) { - case "normal": - fillColor="green"; + case &quot;normal&quot;: + fillColor=&quot;green&quot;; break; - case "alert": - fillColor="red"; + case &quot;alert&quot;: + fillColor=&quot;red&quot;; break; default: - fillColor="black"; + fillColor=&quot;black&quot;; } //create a new circle element and set the attributes - var circle = document.createElementNS(svgNS,"circle"); - circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); - circle.setAttributeNS(null,"cx",centerX); - circle.setAttributeNS(null,"cy",centerY); - circle.setAttributeNS(null,"r",radius); - circle.setAttributeNS(null,"fill",fillColor); - circle.setAttributeNS(null,"style","visibility:hidden;"); + var circle = document.createElementNS(svgNS,&quot;circle&quot;); + circle.setAttributeNS(null,&quot;id&quot;,sensorId + &quot;_&quot; + fillColor + &quot;_badge&quot;); + circle.setAttributeNS(null,&quot;cx&quot;,centerX); + circle.setAttributeNS(null,&quot;cy&quot;,centerY); + circle.setAttributeNS(null,&quot;r&quot;,radius); + circle.setAttributeNS(null,&quot;fill&quot;,fillColor); + circle.setAttributeNS(null,&quot;style&quot;,&quot;visibility:hidden;&quot;); - document.getElementById("layer1").appendChild(circle); - document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); + document.getElementById(&quot;layer1&quot;).appendChild(circle); + document.getElementById('layer1').setAttribute(&quot;transform&quot;, &quot;scale(0.79)&quot;); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; - xmlhttp.open("GET",url,true); + xmlhttp.open(&quot;GET&quot;,url,true); xmlhttp.send(null); } else { - alert("Get Firefox, Tool!"); - window.location = "http://www.mozilla.com/firefox/"; + alert(&quot;Get Firefox, Tool!&quot;); + window.location = &quot;http://www.mozilla.com/firefox/&quot;; } } function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { - case "normal": + case &quot;normal&quot;: document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; - case "alert": + case &quot;alert&quot;: document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: - alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); + alert(&quot;Sensor &quot; + sensorId + &quot; Should NOT Be Sending A Status Of: &quot; + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) - {// 4 = "loaded" - responseJSON = eval(xmlhttp.responseText); - alert(responseJSON); - //badgeStatus(sensor.id, sensor.status); + {// 4 = &quot;loaded&quot; + alarm = eval(&quot;(&quot; + xmlhttp.responseText + &quot;)&quot;); + badgeStatus(alarm.zone.sensor0.name, alarm.zone.sensor0.status); + badgeStatus(alarm.zone.sensor1.name, alarm.zone.sensor1.status); } } </script> - </svg> diff --git a/apache/htdocs/sensorStatus.json b/apache/htdocs/sensorStatus.json new file mode 100644 index 0000000..1d85d1e --- /dev/null +++ b/apache/htdocs/sensorStatus.json @@ -0,0 +1 @@ +{"zone": {"sensor1": {"status": "normal", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "sensor0": {"status": "normal", "hexid": "0xee", "type": "X10Security", "id": 1, "name": "den_south_windows"}, "id": 1, "name": "den"}} \ No newline at end of file
geebee/homeauto
b1a44a3c1ae85e1c6dcc5c3474cb77d6993fd00f
Continue implementing zones and attempting multiple sensor badging on the SVG
diff --git a/apache/cgi-bin/acceptJSON.cgi b/apache/cgi-bin/acceptJSON.cgi index 6c9475f..0587d5f 100644 --- a/apache/cgi-bin/acceptJSON.cgi +++ b/apache/cgi-bin/acceptJSON.cgi @@ -1,20 +1,19 @@ #!C:/Python26/python.exe import cgi,json -#print "Content-Type: text/x-json\n" -form = cgi.FieldStorage() +form = cgi.FieldStorage() +formFirst = form.getfirst('zone') -jsId = form['jsId'].value -sensorStatus = form['sensorStatus'].value +#*** UNSAFE STEP - NEVER TRUST USER INPUT! *** +ffDict = eval(formFirst) -jsonReply = {'sensor':{'jsId':jsId,'sensorStatus':sensorStatus}} -jsonReply = json.dumps(jsonReply) +finalDict = {'zone':ffDict} +jsonReply = json.dumps(finalDict) file_object = open("C:/Apache2/htdocs/sensorStatus.json","w") file_object.write(jsonReply) file_object.close() print "Content-Type: text/plain\n" -print "jsId Is: " + jsId + ", sensorStatus Is: " + sensorStatus - +print "JSON Reply: " + jsonReply diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index 5a94b7e..a6acccd 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,403 +1,400 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" - onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert')" + onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert'); createBadge('den_east_windows', 'alert'); createBadge('den_east_windows', 'normal')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" y="-580.9848" x="118.72849" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="matrix(-6.5451402e-3,0.9999786,-0.9999786,-6.5451402e-3,0,0)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="tspan3279" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="tspan3283" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="tspan3287" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="tspan3291" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="tspan3295" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="tspan3299" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="tspan3305">Den</tspan></text> </g> <script type="text/ecmascript"> var svgNS = "http://www.w3.org/2000/svg"; ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); function createBadge(sensorId, sensorStatus) { var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); var radius = 13; switch (sensorStatus) { case "normal": fillColor="green"; break; case "alert": fillColor="red"; break; default: fillColor="black"; } //create a new circle element and set the attributes var circle = document.createElementNS(svgNS,"circle"); - circle.setAttributeNS(null,"id",fillColor + "Badge"); + circle.setAttributeNS(null,"id",sensorId + "_" + fillColor + "_badge"); circle.setAttributeNS(null,"cx",centerX); circle.setAttributeNS(null,"cy",centerY); circle.setAttributeNS(null,"r",radius); circle.setAttributeNS(null,"fill",fillColor); circle.setAttributeNS(null,"style","visibility:hidden;"); document.getElementById("layer1").appendChild(circle); document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); } var xmlhttp; function loadXMLDoc(url) { xmlhttp=null; xmlhttp=new XMLHttpRequest(); if (xmlhttp!=null) { xmlhttp.onreadystatechange=state_Change; xmlhttp.open("GET",url,true); xmlhttp.send(null); } else { alert("Get Firefox, Tool!"); window.location = "http://www.mozilla.com/firefox/"; } } - function badgeStatus(sensorStatus) + function badgeStatus(sensorId, sensorStatus) { switch (sensorStatus) { case "normal": - document.getElementById('redBadge').style.visibility = 'hidden'; - document.getElementById('greenBadge').style.visibility = 'visible'; + document.getElementById(sensorId + '_red_badge').style.visibility = 'hidden'; + document.getElementById(sensorId + '_green_badge').style.visibility = 'visible'; break; case "alert": - document.getElementById('greenBadge').style.visibility = 'hidden'; - document.getElementById('redBadge').style.visibility = 'visible'; + document.getElementById(sensorId + '_green_badge').style.visibility = 'hidden'; + document.getElementById(sensorId + '_red_badge').style.visibility = 'visible'; break; default: - alert("Sensor Should NOT Be Sending A Status Of: " + sensorStatus); + alert("Sensor " + sensorId + " Should NOT Be Sending A Status Of: " + sensorStatus); } } function state_Change() { if (xmlhttp.readyState==4) {// 4 = "loaded" - responseJSON = eval("(" + xmlhttp.responseText + ")"); - - sensorId = responseJSON.sensor.jsId; - sensorStatus = responseJSON.sensor.sensorStatus; - - badgeStatus(sensorStatus); + responseJSON = eval(xmlhttp.responseText); + alert(responseJSON); + //badgeStatus(sensor.id, sensor.status); } } </script> </svg> diff --git a/xPL/Zones.py b/xPL/Zones.py index 4d7f205..5120d46 100644 --- a/xPL/Zones.py +++ b/xPL/Zones.py @@ -1,126 +1,124 @@ from Sensors import Sensor import sqlite3 class Zone: statusReady = False statusArmed = False sensors = {} id = None name = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getZoneById (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where id = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.name = returnRS['name'] = resultSet[0][1] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getZoneByName (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where name = ?" c.execute(query, queryParams) resultSet = [] - returnRS = {} for row in c: resultSet.append(row) - if len(resultSet) == 1: - self.id = returnRS['id'] = resultSet[0][0] - self.name = returnRS['name'] = resultSet[0][2] + self.id = resultSet[0][0] + self.name = resultSet[0][2] - return returnRS + return None # No Need To Return Anything, Even On Positive Outcume else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getLinkedSensors (self): if self.isConn == False: print "You need a DB connection in order to get..." return None c = self.conn.cursor() queryParams = (self.id,) query = "select s.hexid from zones z, sensors s, zones_sensors_linked zsl where zsl.zoneid= ? and zsl.sensorid = s.id and zsl.zoneid = z.id" c.execute(query, queryParams) resultSet = [] sensorHexIds = [] for row in c: resultSet.append(row) for sHexIds in resultSet: - sensorNames.append(sHexIds[0]) + sensorHexIds.append(sHexIds[0]) for sHexId in sensorHexIds: s = Sensor() s.getSingleSensor('hexid', sHexId) self.sensors[sHexId] = s del s def isReady(self): for sensor in self.sensors: status = sensor.getStatus(sensor.id) - if status = "alert": + if status == "alert": print "Sensor: " + sensor.name + "Reported Alert Status." self.statusReady = False return False print "All Sensors Reported Normal Status" self.statusReady = True return True diff --git a/xPL/devices.db b/xPL/devices.db index e8132ee..023599d 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ diff --git a/xPL/xpl.py b/xPL/xpl.py index 62a865c..98c860b 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,125 +1,135 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': - self.xplToJSON(zDen.sensors[sesnorHexId].name, 'alert') zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') + self.xplToJSON(zDen) print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: OPEN" if self.messageDict['command'] == 'normal': - self.xplToJSON(zDen.sensors[sensorHexId].name, 'normal') zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') + self.xplToJSON(zDen) print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: CLOSED" - def xplToJSON (self, jsId = None, sensorStatus = None): + def xplToJSON (self, zone = None): - if jsId != None and sensorStatus != None: - jsonRequest = {'sensor':{'jsId': jsId,'sensorStatus':sensorStatus}} + if zone != None: + jsonRequest = {'zone':{}} + jsonRequest['zone']['id'] = zone.id + jsonRequest['zone']['name'] = zone.name + for sensor in zone.sensors: + for i in range(len(zone.sensors)): + jsonRequest['zone']['sensor' + str(i)] = {} + jsonRequest['zone']['sensor' + str(i)]['id'] = zone.sensors[sensor].id + jsonRequest['zone']['sensor' + str(i)]['hexid'] = zone.sensors[sensor].hexid + jsonRequest['zone']['sensor' + str(i)]['name'] = zone.sensors[sensor].name + jsonRequest['zone']['sensor' + str(i)]['type'] = zone.sensors[sensor].type + jsonRequest['zone']['sensor' + str(i)]['status'] = zone.sensors[sensor].status #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: - print "You must pass the jsId and the sensorStatus variables" + print "You must pass the Zone object" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
08de1726657dcc7dc6c32de3daa1a2bad8947ac2
Added DB getters and setters to Sensor class, Updated Sensor class to handle the extra 'status' column Change xpl.py to use Sensor DB get/set methods Shrunk the JSON message back down to match the acceptJSON CGI script's input requirements (for now) Implemented Zone.isReady() function using the Sensor getters
diff --git a/xPL/Sensors.py b/xPL/Sensors.py index fb414c1..028ad8e 100644 --- a/xPL/Sensors.py +++ b/xPL/Sensors.py @@ -1,99 +1,152 @@ import sqlite3 class Sensor: - statusReady = False + status = None id = None hexid = None name = None type = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.hexid = returnRS['hexid'] = resultSet[0][1] self.name = returnRS['name'] = resultSet[0][2] self.type = returnRS['type'] = resultSet[0][3] + self.status = returnRS['status'] = resultSet[0][4] return returnRS else: print "Query: " + query + ", Params: " + str(queryParams) print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None + def getStatus(self, sensorId = None): + if self.isConn == False: + print "You need a DB connection in order to get..." + return None + + if sensorId != None: + c = self.conn.cursor() + queryParams = (sensorId,) + query = "select status from sensors where id = ?" + c.execute(query, queryParams) + + resultSet = [] + + for row in c: + resultSet.append(row) + + + if len(resultSet) == 1: + self.status = resultSet[0][0] + return self.status + else: + print "Query: " + query + ", Params: " + str(queryParams) + print "Result Set: " + str(resultSet) + print "Wrong number of records returned (0 or more than 1)" + + return None + + else: + print "You didn't pass the ID" + return None + + def setStatus(self, sensorId = None, sensorStatus = None): + if self.isConn == False: + print "You need a DB connection in order to get..." + return False + + if sensorId != None and sensorStatus != None: + c = self.conn.cursor() + queryParams = (sensorId, sensorStatus) + query = "update sensors set status = ? where id = ?" + + try: + c.execute(query, queryParams) + self.conn.commit() + return True + except: + print "Update Failed..." + return False + + else: + print "You didn't pass the ID" + return False diff --git a/xPL/Zones.py b/xPL/Zones.py index d07286e..4d7f205 100644 --- a/xPL/Zones.py +++ b/xPL/Zones.py @@ -1,118 +1,126 @@ from Sensors import Sensor import sqlite3 class Zone: statusReady = False statusArmed = False sensors = {} id = None name = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getZoneById (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where id = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.name = returnRS['name'] = resultSet[0][1] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getZoneByName (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where name = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.name = returnRS['name'] = resultSet[0][2] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getLinkedSensors (self): if self.isConn == False: print "You need a DB connection in order to get..." return None c = self.conn.cursor() queryParams = (self.id,) query = "select s.hexid from zones z, sensors s, zones_sensors_linked zsl where zsl.zoneid= ? and zsl.sensorid = s.id and zsl.zoneid = z.id" c.execute(query, queryParams) resultSet = [] sensorHexIds = [] for row in c: resultSet.append(row) for sHexIds in resultSet: sensorNames.append(sHexIds[0]) for sHexId in sensorHexIds: s = Sensor() s.getSingleSensor('hexid', sHexId) self.sensors[sHexId] = s del s def isReady(self): - pass + for sensor in self.sensors: + status = sensor.getStatus(sensor.id) + if status = "alert": + print "Sensor: " + sensor.name + "Reported Alert Status." + self.statusReady = False + return False + print "All Sensors Reported Normal Status" + self.statusReady = True + return True diff --git a/xPL/xpl.py b/xPL/xpl.py index 7598a36..62a865c 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,125 +1,125 @@ from socket import * from Sensors import Sensor from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) zDen = Zone() zDen.getZoneByName('den') zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': self.xplToJSON(zDen.sensors[sesnorHexId].name, 'alert') - zDen.sensors[sensorHexId].statusReady = False - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" + zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'alert') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: OPEN" if self.messageDict['command'] == 'normal': self.xplToJSON(zDen.sensors[sensorHexId].name, 'normal') - zDen.sensors[sensorHexId].statusReady = True - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" + zDen.sensors[sensorHexId].setStatus(zDen.sensors[sensorHexId].id,'normal') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting status: CLOSED" def xplToJSON (self, jsId = None, sensorStatus = None): if jsId != None and sensorStatus != None: - jsonRequest = {'zone':{'id': zDen.id,'name': zDen.name,'sensor'{'id': zDen.sensors[sensorHexId].id,'name': zDen.sensors[sensorHexId].name,'jsId': jsId,'sensorStatus':sensorStatus}}} + jsonRequest = {'sensor':{'jsId': jsId,'sensorStatus':sensorStatus}} #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the jsId and the sensorStatus variables" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
42f6ab059f59a08850e1d4c644f3a7f0428e0b25
add column status to table sensors defaulted status to normal
diff --git a/xPL/devices.db b/xPL/devices.db index 308ac54..e8132ee 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ
geebee/homeauto
8c77aa575ce52383225e40daf7f547f3aa3cac31
Add debug statements, cleanup in Sensors.py Fix bug in setting sensor names, define isReady function, switch sensors dictionary to reference by hex id, remove debugging statements from Zones.py Modify xpl.py from using Sensors to using Zones
diff --git a/xPL/Sensors.py b/xPL/Sensors.py index 35cf29a..fb414c1 100644 --- a/xPL/Sensors.py +++ b/xPL/Sensors.py @@ -1,97 +1,99 @@ import sqlite3 class Sensor: statusReady = False - statusArmed = False id = None hexid = None name = None type = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.hexid = returnRS['hexid'] = resultSet[0][1] self.name = returnRS['name'] = resultSet[0][2] self.type = returnRS['type'] = resultSet[0][3] return returnRS else: + print "Query: " + query + ", Params: " + str(queryParams) + print "Result Set: " + str(resultSet) print "Wrong number of records returned (0 or more than 1)" + return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None diff --git a/xPL/Zones.py b/xPL/Zones.py index e2e01c3..d07286e 100644 --- a/xPL/Zones.py +++ b/xPL/Zones.py @@ -1,119 +1,118 @@ from Sensors import Sensor import sqlite3 class Zone: statusReady = False statusArmed = False sensors = {} id = None name = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getZoneById (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where id = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] self.name = returnRS['name'] = resultSet[0][1] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getZoneByName (self, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from zones where name = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: self.id = returnRS['id'] = resultSet[0][0] - self.name = returnRS['name'] = resultSet[0][1] - + self.name = returnRS['name'] = resultSet[0][2] + return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the value" return None def getLinkedSensors (self): if self.isConn == False: print "You need a DB connection in order to get..." return None c = self.conn.cursor() queryParams = (self.id,) - query = "select sensorid from zones_sensors_linked where zoneid = ?" + query = "select s.hexid from zones z, sensors s, zones_sensors_linked zsl where zsl.zoneid= ? and zsl.sensorid = s.id and zsl.zoneid = z.id" c.execute(query, queryParams) resultSet = [] - sensorIds = [] + sensorHexIds = [] for row in c: resultSet.append(row) - print resultSet[0] - for sIds in resultSet: - sensorIds.append(sIds[0]) - print sensorIds + for sHexIds in resultSet: + sensorNames.append(sHexIds[0]) - for sId in sensorIds: + for sHexId in sensorHexIds: s = Sensor() - s.getSingleSensor('id', sId) - self.sensors[sId] = s + s.getSingleSensor('hexid', sHexId) + self.sensors[sHexId] = s del s - print self.sensors - + + def isReady(self): + pass diff --git a/xPL/xpl.py b/xPL/xpl.py index f7dc7e4..7598a36 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,123 +1,125 @@ from socket import * from Sensors import Sensor +from Zones import Zone import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() xplMsg = xplMessage() xplMsg.fullMessage = messageArray xplMsg.schema = messageArray[4] if messageArray[0] == 'xpl-trig': xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# # print self.messageDict deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) - sensor = Sensor() - ds10a = sensor.getSingleSensor('id',1) + zDen = Zone() + zDen.getZoneByName('den') + zDen.getLinkedSensors() if self.messageDict['command'] == 'alert': - self.xplToJSON(ds10a['name'], 'alert') - sensor.statusReady = False + self.xplToJSON(zDen.sensors[sesnorHexId].name, 'alert') + zDen.sensors[sensorHexId].statusReady = False print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" if self.messageDict['command'] == 'normal': - sensor.statusReady = True - self.xplToJSON(ds10a['name'], 'normal') + self.xplToJSON(zDen.sensors[sensorHexId].name, 'normal') + zDen.sensors[sensorHexId].statusReady = True print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" def xplToJSON (self, jsId = None, sensorStatus = None): if jsId != None and sensorStatus != None: - jsonRequest = {'jsId': jsId, 'sensorStatus': sensorStatus} - + jsonRequest = {'zone':{'id': zDen.id,'name': zDen.name,'sensor'{'id': zDen.sensors[sensorHexId].id,'name': zDen.sensors[sensorHexId].name,'jsId': jsId,'sensorStatus':sensorStatus}}} + #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the jsId and the sensorStatus variables" class xplMessage: fullMessage = None schema = None type = None def __init__(self): pass
geebee/homeauto
f9e0def852b31ccacaa6c2130c87c98803bef1cb
begin implementing xplMessage class
diff --git a/xPL/xpl.py b/xPL/xpl.py index 8930fba..f7dc7e4 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,116 +1,123 @@ from socket import * from Sensors import Sensor import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" logLineFooter = "\nEND XPL MESSAGE\n\n" try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" xplmsglog = open("xplmsglog.log", "a") xplmsglog.write(logLineHeader) xplmsglog.write(str(messageArray)) xplmsglog.write(logLineFooter) xplmsglog.close() + xplMsg = xplMessage() + xplMsg.fullMessage = messageArray + xplMsg.schema = messageArray[4] + if messageArray[0] == 'xpl-trig': + xplMsg.type = 'xpl-trig' for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] #----- TODO: Replace xPL message dictionary with xplMessage class -----# - ########################################################################### - # xplMessage.* instead of messageDict[*], makes handling much more agile # - # Will allow for handling of all of the different types of xPL messages # - # Will filter information returned based on qualifiers of the message # - # # - # print self.messageDict # - # ^^^^^ useful while working on the TODO item mentioned above # - ########################################################################### - + # print self.messageDict + deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) sensor = Sensor() ds10a = sensor.getSingleSensor('id',1) if self.messageDict['command'] == 'alert': self.xplToJSON(ds10a['name'], 'alert') sensor.statusReady = False print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" if self.messageDict['command'] == 'normal': sensor.statusReady = True self.xplToJSON(ds10a['name'], 'normal') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" def xplToJSON (self, jsId = None, sensorStatus = None): if jsId != None and sensorStatus != None: jsonRequest = {'jsId': jsId, 'sensorStatus': sensorStatus} #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the jsId and the sensorStatus variables" + + +class xplMessage: + fullMessage = None + schema = None + type = None + + def __init__(self): + pass
geebee/homeauto
b002f448e3009a170494482e9c8b4877ecd5772e
added full xPL message logging to xplHandler class added TODO note on upgrading xPL message handling
diff --git a/xPL/xpl.py b/xPL/xpl.py index 6e5d721..8930fba 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,96 +1,116 @@ from socket import * from Sensors import Sensor import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) - + while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() + + logLineHeader = "\nFULL XPL MESSAGE FOLOWING:\n" + logLineFooter = "\nEND XPL MESSAGE\n\n" + try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" + xplmsglog = open("xplmsglog.log", "a") + xplmsglog.write(logLineHeader) + xplmsglog.write(str(messageArray)) + xplmsglog.write(logLineFooter) + xplmsglog.close() + if messageArray[0] == 'xpl-trig': for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] + + #----- TODO: Replace xPL message dictionary with xplMessage class -----# + ########################################################################### + # xplMessage.* instead of messageDict[*], makes handling much more agile # + # Will allow for handling of all of the different types of xPL messages # + # Will filter information returned based on qualifiers of the message # + # # + # print self.messageDict # + # ^^^^^ useful while working on the TODO item mentioned above # + ########################################################################### deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) sensor = Sensor() ds10a = sensor.getSingleSensor('id',1) if self.messageDict['command'] == 'alert': self.xplToJSON(ds10a['name'], 'alert') sensor.statusReady = False print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" if self.messageDict['command'] == 'normal': sensor.statusReady = True self.xplToJSON(ds10a['name'], 'normal') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" def xplToJSON (self, jsId = None, sensorStatus = None): if jsId != None and sensorStatus != None: jsonRequest = {'jsId': jsId, 'sensorStatus': sensorStatus} #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the jsId and the sensorStatus variables"
geebee/homeauto
a7fe99e532eef211b5adbe31736593821e71e171
Added Second DS10-A to sensors table filled in Zones.py Zone class minor changes to Sensors.py Sensor class
diff --git a/xPL/Sensors.py b/xPL/Sensors.py index 16e7127..35cf29a 100644 --- a/xPL/Sensors.py +++ b/xPL/Sensors.py @@ -1,93 +1,97 @@ import sqlite3 class Sensor: statusReady = False statusArmed = False + id = None + hexid = None + name = None + type = None try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: - returnRS['id'] = resultSet[0][0] - returnRS['hexid'] = resultSet[0][1] - returnRS['name'] = resultSet[0][2] - returnRS['type'] = resultSet[0][3] + self.id = returnRS['id'] = resultSet[0][0] + self.hexid = returnRS['hexid'] = resultSet[0][1] + self.name = returnRS['name'] = resultSet[0][2] + self.type = returnRS['type'] = resultSet[0][3] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None diff --git a/xPL/Zones.py b/xPL/Zones.py index f4fdef0..e2e01c3 100644 --- a/xPL/Zones.py +++ b/xPL/Zones.py @@ -1,3 +1,119 @@ +from Sensors import Sensor +import sqlite3 + class Zone: + statusReady = False + statusArmed = False + sensors = {} + id = None + name = None + + try: + conn = sqlite3.connect('devices.db') + isConn = True + print "Connection to devices.db established" + except: + isConn = False + print "DB Connection Failed" + def __init__(self): pass + + def closeDBConn(self): + if self.isConn == True: + self.conn.close() + self.isConn = False + print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." + else: + print "Connection Doesn't Exist" + + def getZoneById (self, sqlValue = None): + if self.isConn == False: + print "You need a DB connection in order to get..." + return None + + if sqlValue != None: + c = self.conn.cursor() + queryParams = (sqlValue,) + query = "select * from zones where id = ?" + c.execute(query, queryParams) + + resultSet = [] + returnRS = {} + + for row in c: + resultSet.append(row) + + + if len(resultSet) == 1: + self.id = returnRS['id'] = resultSet[0][0] + self.name = returnRS['name'] = resultSet[0][1] + + return returnRS + else: + print "Wrong number of records returned (0 or more than 1)" + return None + + else: + print "You didn't pass the value" + return None + + def getZoneByName (self, sqlValue = None): + if self.isConn == False: + print "You need a DB connection in order to get..." + return None + + if sqlValue != None: + c = self.conn.cursor() + queryParams = (sqlValue,) + query = "select * from zones where name = ?" + c.execute(query, queryParams) + + resultSet = [] + returnRS = {} + + for row in c: + resultSet.append(row) + + + if len(resultSet) == 1: + self.id = returnRS['id'] = resultSet[0][0] + self.name = returnRS['name'] = resultSet[0][1] + + return returnRS + else: + print "Wrong number of records returned (0 or more than 1)" + return None + + else: + print "You didn't pass the value" + return None + + def getLinkedSensors (self): + if self.isConn == False: + print "You need a DB connection in order to get..." + return None + + c = self.conn.cursor() + queryParams = (self.id,) + query = "select sensorid from zones_sensors_linked where zoneid = ?" + c.execute(query, queryParams) + + resultSet = [] + sensorIds = [] + + for row in c: + resultSet.append(row) + print resultSet[0] + + for sIds in resultSet: + sensorIds.append(sIds[0]) + print sensorIds + + for sId in sensorIds: + s = Sensor() + s.getSingleSensor('id', sId) + self.sensors[sId] = s + del s + print self.sensors + diff --git a/xPL/devices.db b/xPL/devices.db index 2326e7a..308ac54 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ
geebee/homeauto
0f3ea4dfc6926165d5e3edc269dcc40bdc7b9636
Rename SensorLookup.py to Sensors.py Change import in xpl.py from "from SensorLookup..." to "from Sensors..." Added Alarms.py and Alarm shell class Added Zones.py and Zone shell class
diff --git a/xPL/Alarms.py b/xPL/Alarms.py new file mode 100644 index 0000000..32bf7b4 --- /dev/null +++ b/xPL/Alarms.py @@ -0,0 +1,3 @@ +class Alarm: + def __init__(self): + pass diff --git a/xPL/SensorLookup.py b/xPL/Sensors.py similarity index 95% rename from xPL/SensorLookup.py rename to xPL/Sensors.py index f3ddda7..16e7127 100644 --- a/xPL/SensorLookup.py +++ b/xPL/Sensors.py @@ -1,90 +1,93 @@ import sqlite3 class Sensor: + statusReady = False + statusArmed = False + try: conn = sqlite3.connect('devices.db') isConn = True print "Connection to devices.db established" except: isConn = False print "DB Connection Failed" def __init__(self): pass def closeDBConn(self): if self.isConn == True: self.conn.close() self.isConn = False print "Connection object closed, no DB operations will work unless you sqlite3.connect(db) again." else: print "Connection Doesn't Exist" def getSingleSensor (self, sqlColumn = None, sqlValue = None): if self.isConn == False: print "You need a DB connection in order to get..." return None if sqlColumn == 'type': print "Use getSensorsOfType(type) function to get all " + sqlValue + " devices" return None if sqlColumn != None and sqlValue != None: c = self.conn.cursor() queryParams = (sqlValue,) query = "select * from sensors where " + sqlColumn + " = ?" c.execute(query, queryParams) resultSet = [] returnRS = {} for row in c: resultSet.append(row) if len(resultSet) == 1: returnRS['id'] = resultSet[0][0] returnRS['hexid'] = resultSet[0][1] returnRS['name'] = resultSet[0][2] returnRS['type'] = resultSet[0][3] return returnRS else: print "Wrong number of records returned (0 or more than 1)" return None else: print "You didn't pass the column and/or value" return None def getSensorsOfType(self, sensorType): if self.isConn == False: print "You need a DB connection in order to get..." return None if sensorType != None: c = self.conn.cursor() queryParams = (sensorType,) if sensorType == "all" or sensorType == "ALL": query = "select * from sensors" c.execute(query) else: query = "select * from sensors where type = ?" c.execute(query, queryParams) resultSet = [] for row in c: resultSet.append(row) if len(resultSet) == 0: print "0 records returned" return None else: print str(len(resultSet)) + " record(s) returned" return resultSet else: print "You didn't pass the column and/or value" return None diff --git a/xPL/Zones.py b/xPL/Zones.py new file mode 100644 index 0000000..f4fdef0 --- /dev/null +++ b/xPL/Zones.py @@ -0,0 +1,3 @@ +class Zone: + def __init__(self): + pass diff --git a/xPL/xpl.py b/xPL/xpl.py index 1813fb2..6e5d721 100644 --- a/xPL/xpl.py +++ b/xPL/xpl.py @@ -1,94 +1,96 @@ from socket import * -from SensorLookup import Sensor +from Sensors import Sensor import re,select,sys import json import urllib class xplHandler: message_buffer = 1500 messageDict = {} jsonRequest = {} xpl_port = 50002 computername = gethostname() xpl_ip = gethostbyname(gethostname()) xpl_instance = "monitor." + computername UDPSock = socket(AF_INET,SOCK_DGRAM) addr = ("0.0.0.0",xpl_port) def __init__(self): try : self.UDPSock.bind(self.addr) except : self.xpl_port = 50000 self.addr = (self.xpl_ip, self.xpl_port) try : self.UDPSock.bind(self.addr) except : self.xpl_port += 1 print "xPL Monitor bound to port: " + str(self.xpl_port) def validInstance (self, computername): newComputerName = re.sub('(-|\.|!|;)', '', computername) newComputerName = newComputerName[:16] return newComputerName def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): hbSock = socket(AF_INET,SOCK_DGRAM) hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" hbSock.sendto(msg,("255.255.255.255",3865)) def startListener (self, UDPSock = None): self.computername = self.validInstance(self.computername) while UDPSock : readable, writeable, errored = select.select([UDPSock],[],[],60) if len(readable) == 1 : data,addr = UDPSock.recvfrom(self.message_buffer) messageArray = data.splitlines() try: for msgLine in messageArray: if msgLine == '{': messageArray.remove(msgLine) elif msgLine == '}': messageArray.remove(msgLine) except: print "No Curly Braces To Remove" if messageArray[0] == 'xpl-trig': for msgLine in messageArray: if msgLine.find('=') != -1: kvArray = msgLine.partition('=') self.messageDict[kvArray[0]] = kvArray[2] deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) sensorType = deviceId.group(1) sensorHexId = deviceId.group(2) sensor = Sensor() ds10a = sensor.getSingleSensor('id',1) if self.messageDict['command'] == 'alert': self.xplToJSON(ds10a['name'], 'alert') + sensor.statusReady = False print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" if self.messageDict['command'] == 'normal': + sensor.statusReady = True self.xplToJSON(ds10a['name'], 'normal') print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" def xplToJSON (self, jsId = None, sensorStatus = None): if jsId != None and sensorStatus != None: jsonRequest = {'jsId': jsId, 'sensorStatus': sensorStatus} #http-post params = urllib.urlencode(jsonRequest) request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) else: print "You must pass the jsId and the sensorStatus variables"
geebee/homeauto
51df69f5a9826138af3c8d195e59bbb3b2e44bde
added alarms, zones, alarms_zones_linked, zones_sensors_linked tables added 'den' zone to zones added (1,1) to zones_sensors_linked
diff --git a/xPL/devices.db b/xPL/devices.db index fb1df2f..2326e7a 100644 Binary files a/xPL/devices.db and b/xPL/devices.db differ
geebee/homeauto
10610c291e3496f4aa4f0cc9da93f899e351635f
abstract the xPL code to xpl.py xplHandler class refactor xplpython.py to use the xplHandler class
diff --git a/xPL/xpl.py b/xPL/xpl.py new file mode 100644 index 0000000..1813fb2 --- /dev/null +++ b/xPL/xpl.py @@ -0,0 +1,94 @@ +from socket import * +from SensorLookup import Sensor +import re,select,sys +import json +import urllib + +class xplHandler: + message_buffer = 1500 + messageDict = {} + jsonRequest = {} + xpl_port = 50002 + computername = gethostname() + xpl_ip = gethostbyname(gethostname()) + xpl_instance = "monitor." + computername + UDPSock = socket(AF_INET,SOCK_DGRAM) + addr = ("0.0.0.0",xpl_port) + + def __init__(self): + + try : + self.UDPSock.bind(self.addr) + except : + self.xpl_port = 50000 + self.addr = (self.xpl_ip, self.xpl_port) + + try : + self.UDPSock.bind(self.addr) + except : + self.xpl_port += 1 + + print "xPL Monitor bound to port: " + str(self.xpl_port) + + def validInstance (self, computername): + newComputerName = re.sub('(-|\.|!|;)', '', computername) + newComputerName = newComputerName[:16] + return newComputerName + + def sendXplMessage (self, msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): + hbSock = socket(AF_INET,SOCK_DGRAM) + hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) + msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" + hbSock.sendto(msg,("255.255.255.255",3865)) + + def startListener (self, UDPSock = None): + + self.computername = self.validInstance(self.computername) + + while UDPSock : + readable, writeable, errored = select.select([UDPSock],[],[],60) + + if len(readable) == 1 : + data,addr = UDPSock.recvfrom(self.message_buffer) + messageArray = data.splitlines() + try: + for msgLine in messageArray: + if msgLine == '{': + messageArray.remove(msgLine) + elif msgLine == '}': + messageArray.remove(msgLine) + except: + print "No Curly Braces To Remove" + + if messageArray[0] == 'xpl-trig': + for msgLine in messageArray: + if msgLine.find('=') != -1: + kvArray = msgLine.partition('=') + self.messageDict[kvArray[0]] = kvArray[2] + + deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', self.messageDict['device']) + sensorType = deviceId.group(1) + sensorHexId = deviceId.group(2) + + sensor = Sensor() + ds10a = sensor.getSingleSensor('id',1) + + + if self.messageDict['command'] == 'alert': + self.xplToJSON(ds10a['name'], 'alert') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" + if self.messageDict['command'] == 'normal': + self.xplToJSON(ds10a['name'], 'normal') + print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" + + + def xplToJSON (self, jsId = None, sensorStatus = None): + + if jsId != None and sensorStatus != None: + jsonRequest = {'jsId': jsId, 'sensorStatus': sensorStatus} + + #http-post + params = urllib.urlencode(jsonRequest) + request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", params) + else: + print "You must pass the jsId and the sensorStatus variables" diff --git a/xPL/xplpython.py b/xPL/xplpython.py index a68c33f..762ad51 100644 --- a/xPL/xplpython.py +++ b/xPL/xplpython.py @@ -1,82 +1,10 @@ -from socket import * -from SensorLookup import Sensor -import re,select,sys -import json -import urllib +from xpl import xplHandler -message_buffer = 1500 -messageDict = {} -jsonRequest = {} -xpl_port = 50002 -computername = gethostname() -xpl_ip = gethostbyname(gethostname()) -xpl_instance = "monitor." + computername -UDPSock = socket(AF_INET,SOCK_DGRAM) -addr = ("0.0.0.0",xpl_port) +xpl = xplHandler() -def validInstance (computername): - newComputerName = re.sub('(-|\.|!|;)', '', computername) - newComputerName = newComputerName[:16] - return newComputerName - -def sendxplmsg (msgType='xpl-stat', source='mikesha.monitor', target='*', appName='hbeat.app', interval=5, port=50002): - hbSock = socket(AF_INET,SOCK_DGRAM) - hbSock.setsockopt(SOL_SOCKET,SO_BROADCAST,1) - msg = msgType + "\n{\nhop=1\nsource=" + source + "\ntarget=" + target + "\n}\n" + appName + "\n{\ninterval=" + str(interval) + "\nport=" + str(port) + "\n}\n" - hbSock.sendto(msg,("255.255.255.255",3865)) - -computername = validInstance(computername) - -try : - UDPSock.bind(addr) -except : - xpl_port = 50000 - addr = (xpl_ip,xpl_port) - - try : - UDPSock.bind(addr) - except : - xpl_port += 1 - -print "xPL Monitor bound to port: " + str(xpl_port) - -sendxplmsg(port=xpl_port) - -while UDPSock : - readable, writeable, errored = select.select([UDPSock],[],[],60) - - if len(readable) == 1 : - data,addr = UDPSock.recvfrom(message_buffer) - messageArray = data.splitlines() - try: - for msgLine in messageArray: - if msgLine == '{': - messageArray.remove(msgLine) - elif msgLine == '}': - messageArray.remove(msgLine) - except: - print "No Curly Braces To Remove" - - if messageArray[0] == 'xpl-trig': - for msgLine in messageArray: - if msgLine.find('=') != -1: - kvArray = msgLine.partition('=') - messageDict[kvArray[0]] = kvArray[2] - - deviceId = re.match('([a-z|A-Z]+.*[0-9]+.*).([0-9]+[a-z]+)', messageDict['device']) - sensorType = deviceId.group(1) - sensorHexId = deviceId.group(2) - - sensor = Sensor() - ds10a = sensor.getSingleSensor('id',1) - - - if messageDict['command'] == 'alert': - jsonRequest = {'jsId': ds10a['name'], 'sensorStatus': 'alert'} - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: OPEN" - if messageDict['command'] == 'normal': - jsonRequest = {'jsId': ds10a['name'], 'sensorStatus': 'normal'} - print "Sensor (Type:" + sensorType + ", ID: " + sensorHexId + ") is reporting its status as: CLOSED" - - # send http-post - request = urllib.urlopen("http://localhost/cgi-bin/acceptJSON.cgi", urllib.urlencode(jsonRequest)) +xpl.sendXplMessage(port=xpl.xpl_port) +listener = xpl.startListener(xpl.UDPSock) +while listener: + pass +else: + print "Could Not Find Listener"
geebee/homeauto
6e0581e3f92ea68e77b5b2f27f14f8bd24845170
Remove main.js back into apt.svg (couldn't make it work) Update README accordingly
diff --git a/README b/README index 97b5553..a2aa24a 100644 --- a/README +++ b/README @@ -1,39 +1,39 @@ Michael Goldberger - March 2009 v 0.1 Python, Perl, JavaScript, and SVG Home Automation Control & Display Setup HOW TO SET-UP THE FILES: ========================= Inside the "apache" folder there is... An SVG document, "htdocs/apt.svg". This file contains the floorplan diagram. - A JavaScript file, "htdocs/main.js". - This file contains the JavaScript functions for creating the badges, the AJAX request functions, and some other goodies. + This file also contains the JavaScript functions for creating the badges, the AJAX request functions, and some other goodies. + A Python CGI file, "cgi-bin/acceptJSON.cgi". This file accepts input from the Python hardware abstraction and outputs (in JSON format) the sensor ID and status to the SVG document. The "htdocs/*" files should go inside the apache DocumentRoot folder (currently hardcoded to "C:\Apache2\htdocs" in the "xPL/xplpython.py" file) The "cgi-bin/*" files should go inside an Apache ScriptAlias tag (usually one level above htdocs, and the folder is called cgi-bin). In order to allow the SVG document to receive update notices from the hardware sensors, the USB->COM port driver has to be installed. NB: see the setups folder for more info HOW TO RUN IT: =============== Once the files are all setup as described above, start the Perl xPL hub which bridges all of the xPL network segments and receives xPL messages. xPL/xplhub.pl And, start the Python xPL/JSON Bridge. xPL/xplpython.py At this point, the Perl stdout device should be showing the Python script's connection, and the Python stdout device should be showing the status messages of the sensors for which it is receiving data. If you navigate to http://<host>/apt.svg and manually activate the sensor, within 5 seconds (changable in main.js), the Status badge for the javascript ID assigned to the device with a correspoinding hex ID, it will change to GREEN, for when the sensor is ready to be armed, and RED when it is in ALERT status (also meaning that the zone to which this sensor belongs cannot be armed) diff --git a/apache/htdocs/apt.svg b/apache/htdocs/apt.svg index bbb97ac..5a94b7e 100644 --- a/apache/htdocs/apt.svg +++ b/apache/htdocs/apt.svg @@ -1,315 +1,403 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" onload="createBadge('den_south_windows', 'normal'); createBadge('den_south_windows', 'alert')" sodipodi:version="0.32" inkscape:version="0.46" sodipodi:docname="apt.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:export-xdpi="90" inkscape:export-ydpi="90"> <defs id="defs4"> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective67" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="3.0713" inkscape:cy="640" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-global="true" inkscape:window-width="1680" inkscape:window-height="1001" inkscape:window-x="0" inkscape:window-y="22"> <inkscape:grid type="xygrid" id="grid2385" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1042.3622 L 290,992.36218 L 380,992.36218 L 380,1042.3622 L 290,1042.3622 z" id="front_door" inkscape:label="Front Door" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 290,1002.3622 L 230,1002.3622" id="path2391" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.92582011px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 379.92857,1002.3622 L 439.92857,1002.3622" id="path2393" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.95742708px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,1002.4039 L 230,892.40385" id="path2395" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,1002.3622 L 440,812.36218" id="path2397" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,812.36218 L 470,812.36218" id="path2401" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,742.36218 L 470,742.36218" id="path2403" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.96844751px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,742.39106 L 440,592.32857" id="path2405" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94868332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,522.31218 L 440,432.31218" id="path2407" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,602.36218 L 230,822.36218" id="path2411" /> <path inkscape:label="Back Door" id="back_door" d="M 320,132.36218 L 320,82.362166 L 410,82.362166 L 410,132.36218 L 320,132.36218 z" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00024998px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,532.35921 L 230,432.30921" id="path3215" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,432.36218 L 60,432.36218 L 60,122.36218 L 320,122.36218" id="path3217" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,122.36218 L 680,122.36218" id="path3219" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 680,122.36218 L 680,432.36218 L 440,432.36218" id="path3221" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="den_east_windows" width="29.834251" height="80.223137" x="59.832874" y="202.30617" inkscape:label="Den - East Windows" /> <rect inkscape:label="Den - South Windows" y="-580.9848" x="118.72849" height="80.223137" width="29.834251" id="den_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.665749;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.331498,0.665749,0.3328745,0.665749;stroke-dashoffset:0" transform="matrix(-6.5451402e-3,0.9999786,-0.9999786,-6.5451402e-3,0,0)" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,482.36218 L 680,482.36218 L 680,622.36218 C 680,622.36218 440,622.36218 440,622.36218" id="bathroom" inkscape:label="Bathroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 440,632.36218 L 680,632.36218 L 680,992.36218 L 440,992.36218" id="kitchen" inkscape:label="Kitchen" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,962.36218 L 50,962.36218 L 50,732.36218 L 230,732.36218" id="north_bedroom" inkscape:label="North Bedroom" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230,672.36218 L 50,672.36218 L 50,462.36218 L 50,452.36218 L 230,452.36218 L 230,452.36218" id="south_bedroom" inkscape:label="South Bedroom" /> <rect inkscape:label="South Bedroom Windows" y="492.36218" x="50" height="80.223137" width="29.834251" id="south_bedroom_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="north_bedroom_windows" width="29.834251" height="80.223137" x="50" y="842.13904" inkscape:label="North Bedroom Windows" /> <rect inkscape:label="Kitchen - South Windows" y="662.36218" x="650.16577" height="80.223137" width="29.834251" id="kitchen_south_windows" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <rect style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" id="kitchen_north_windows" width="29.834251" height="80.223137" x="650.16577" y="842.36218" inkscape:label="Kitchen - North Windows" /> <rect inkscape:label="Den - East Windows" y="512.13904" x="650.16577" height="80.223137" width="29.834251" id="rect3259" style="fill:none;fill-opacity:0.76785714999999999;stroke:#000000;stroke-width:0.66574901;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1.33149803,0.66574901,0.33287451,0.66574901;stroke-dashoffset:0" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,822.36218 L 260,822.36218" id="path3261" /> <path id="path3267" d="M 200,892.36218 L 260,892.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 200,602.36218 L 260,602.36218" id="path3269" /> <path id="path3271" d="M 200,532.36218 L 260,532.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <path style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 410,522.36218 L 470,522.36218" id="path3273" /> <path id="path3275" d="M 410,592.36218 L 470,592.36218" style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="402.9361" y="92.023323" id="text3277" transform="scale(0.8189884,1.2210185)"><tspan sodipodi:role="line" id="tspan3279" x="402.9361" y="92.023323">Back Door</tspan></text> <text transform="scale(0.8189884,1.2210185)" id="text3281" y="837.3028" x="366.30554" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="837.3028" x="366.30554" id="tspan3283" sodipodi:role="line">Front Door</tspan></text> <text xml:space="preserve" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="-1116.2377" y="148.25552" id="text3285" transform="matrix(-8.0502581e-3,-0.8189488,1.2209595,-1.2002018e-2,0,0)"><tspan sodipodi:role="line" id="tspan3287" x="-1116.2377" y="148.25552">North Bedroom</tspan></text> <text transform="matrix(-4.295411e-3,-0.8189771,1.2210017,-6.4039691e-3,0,0)" id="text3289" y="152.93236" x="-761.12207" style="font-size:18.12547874px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="152.93236" x="-761.12207" id="tspan3291" sodipodi:role="line">South Bedroom</tspan></text> <text xml:space="preserve" style="font-size:19.11533165px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" x="602.89313" y="-417.19034" id="text3293" transform="matrix(-1.4224842e-3,0.8637129,-1.1577882,-2.3587189e-3,0,0)"><tspan sodipodi:role="line" id="tspan3295" x="602.89313" y="-417.19034">Bathroom</tspan></text> <text transform="matrix(4.9164247e-3,0.9010032,-1.1098256,8.8717541e-3,0,0)" id="text3297" y="-428.7836" x="839.01984" style="font-size:19.94102669px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve" inkscape:transform-center-x="80.06936" inkscape:transform-center-y="111.8916"><tspan y="-428.7836" x="839.01984" id="tspan3299" sodipodi:role="line">Kitchen</tspan></text> <text transform="scale(0.7781854,1.2850408)" id="text3301" y="241.04301" x="408.22031" style="font-size:57.86774826px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" xml:space="preserve"><tspan y="241.04301" x="408.22031" sodipodi:role="line" id="tspan3305">Den</tspan></text> </g> - <script type="text/ecmascript" src="main.js"/> + + <script type="text/ecmascript"> + var svgNS = "http://www.w3.org/2000/svg"; + + ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); + + function createBadge(sensorId, sensorStatus) + { + + var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); + var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); + var radius = 13; + + switch (sensorStatus) + { + case "normal": + fillColor="green"; + break; + case "alert": + fillColor="red"; + break; + default: + fillColor="black"; + } + + //create a new circle element and set the attributes + var circle = document.createElementNS(svgNS,"circle"); + circle.setAttributeNS(null,"id",fillColor + "Badge"); + circle.setAttributeNS(null,"cx",centerX); + circle.setAttributeNS(null,"cy",centerY); + circle.setAttributeNS(null,"r",radius); + circle.setAttributeNS(null,"fill",fillColor); + circle.setAttributeNS(null,"style","visibility:hidden;"); + + document.getElementById("layer1").appendChild(circle); + document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); + } + + var xmlhttp; + + function loadXMLDoc(url) + { + xmlhttp=null; + xmlhttp=new XMLHttpRequest(); + + if (xmlhttp!=null) + { + xmlhttp.onreadystatechange=state_Change; + xmlhttp.open("GET",url,true); + xmlhttp.send(null); + } + else + { + alert("Get Firefox, Tool!"); + window.location = "http://www.mozilla.com/firefox/"; + } + } + + function badgeStatus(sensorStatus) + { + switch (sensorStatus) + { + case "normal": + document.getElementById('redBadge').style.visibility = 'hidden'; + document.getElementById('greenBadge').style.visibility = 'visible'; + break; + case "alert": + document.getElementById('greenBadge').style.visibility = 'hidden'; + document.getElementById('redBadge').style.visibility = 'visible'; + break; + default: + alert("Sensor Should NOT Be Sending A Status Of: " + sensorStatus); + } + } + + function state_Change() + { + if (xmlhttp.readyState==4) + {// 4 = "loaded" + responseJSON = eval("(" + xmlhttp.responseText + ")"); + + sensorId = responseJSON.sensor.jsId; + sensorStatus = responseJSON.sensor.sensorStatus; + + badgeStatus(sensorStatus); + } + } +</script> + </svg> diff --git a/apache/htdocs/main.js b/apache/htdocs/main.js deleted file mode 100644 index fd23527..0000000 --- a/apache/htdocs/main.js +++ /dev/null @@ -1,87 +0,0 @@ -var svgNS = "http://www.w3.org/2000/svg"; - -ajaxSensorStatus = setInterval("loadXMLDoc('http://localhost/sensorStatus.json')", 5000); - -function createBadge(sensorId, sensorStatus) -{ - - var centerX = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"y"))); - var centerY = Math.abs(parseInt(document.getElementById(sensorId).getAttributeNS(null,"x"))); - var radius = 13; - - switch (sensorStatus) - { - case "normal": - fillColor="green"; - break; - case "alert": - fillColor="red"; - break; - default: - fillColor="black"; - } - - //create a new circle element and set the attributes - var circle = document.createElementNS(svgNS,"circle"); - circle.setAttributeNS(null,"id",fillColor + "Badge"); - circle.setAttributeNS(null,"cx",centerX); - circle.setAttributeNS(null,"cy",centerY); - circle.setAttributeNS(null,"r",radius); - circle.setAttributeNS(null,"fill",fillColor); - circle.setAttributeNS(null,"style","visibility:hidden;"); - - document.getElementById("layer1").appendChild(circle); - document.getElementById('layer1').setAttribute("transform", "scale(0.79)"); -} - -var xmlhttp; - -function loadXMLDoc(url) -{ - xmlhttp=null; - xmlhttp=new XMLHttpRequest(); - - if (xmlhttp!=null) - { - xmlhttp.onreadystatechange=state_Change; - xmlhttp.open("GET",url,true); - xmlhttp.send(null); - } - else - { - alert("Get Firefox, Tool!"); - window.location = "http://www.mozilla.com/firefox/"; - } -} - -function badgeStatus(sensorStatus) -{ - switch (sensorStatus) - { - case "normal": - document.getElementById('redBadge').style.visibility = 'hidden'; - document.getElementById('greenBadge').style.visibility = 'visible'; - break; - case "alert": - document.getElementById('greenBadge').style.visibility = 'hidden'; - document.getElementById('redBadge').style.visibility = 'visible'; - break; - default: - alert("Sensor Should NOT Be Sending A Status Of: " + sensorStatus); - } -} - - - -function state_Change() -{ - if (xmlhttp.readyState==4) - {// 4 = "loaded" - responseJSON = eval("(" + xmlhttp.responseText + ")"); - - sensorId = responseJSON.sensor.jsId; - sensorStatus = responseJSON.sensor.sensorStatus; - - badgeStatus(sensorStatus); - } -}