Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Latest Changes for v2021-02-25 (Account Preferred Time Zone) #289

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ export declare class Account {
* Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
*/
preferredLocale?: string | null;
/**
* 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.
*/
preferredTimeZone?: string | null;
/**
* 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.
*/
Expand Down Expand Up @@ -1142,7 +1146,7 @@ export declare class Invoice {
*/
subscriptionIds?: string[] | null;
/**
* On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from.
* 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.
*/
previousInvoiceId?: string | null;
/**
Expand Down Expand Up @@ -2029,7 +2033,7 @@ export declare class SubscriptionAddOn {
*/
tiers?: SubscriptionAddOnTier[] | null;
/**
* 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.
* 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.
*/
percentageTiers?: SubscriptionAddOnPercentageTier[] | null;
/**
Expand Down Expand Up @@ -2822,7 +2826,7 @@ export declare class AddOn {
*/
tiers?: Tier[] | null;
/**
* Percentage Tiers
* This feature is currently in development and requires approval and enablement, please contact support.
*/
percentageTiers?: PercentageTiersByCurrency[] | null;
/**
Expand Down Expand Up @@ -2987,7 +2991,7 @@ export declare class Usage {
*/
tiers?: SubscriptionAddOnTier[] | null;
/**
* The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []
* 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.
*/
percentageTiers?: SubscriptionAddOnPercentageTier[] | null;
/**
Expand Down Expand Up @@ -3314,6 +3318,10 @@ export interface AccountCreate {
* 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.
*/
preferredLocale?: string | null;
/**
* 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)
*/
preferredTimeZone?: string | null;
/**
* 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.
*/
Expand Down Expand Up @@ -3607,6 +3615,10 @@ export interface AccountUpdate {
* 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.
*/
preferredLocale?: string | null;
/**
* 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)
*/
preferredTimeZone?: string | null;
/**
* 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.
*/
Expand Down Expand Up @@ -4572,7 +4584,7 @@ export interface AddOnCreate {
*/
tiers?: Tier[] | null;
/**
* 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.
* 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.
*/
percentageTiers?: PercentageTiersByCurrency[] | null;

Expand Down Expand Up @@ -4820,7 +4832,7 @@ export interface AddOnUpdate {
*/
tiers?: Tier[] | null;
/**
* `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.
* `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.
*/
percentageTiers?: PercentageTiersByCurrency[] | null;

Expand Down Expand Up @@ -5022,7 +5034,7 @@ export interface SubscriptionAddOnCreate {
*/
tiers?: SubscriptionAddOnTier[] | null;
/**
* 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.
* 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.
*/
percentageTiers?: SubscriptionAddOnPercentageTier[] | null;
/**
Expand Down Expand Up @@ -5293,7 +5305,7 @@ export interface SubscriptionAddOnUpdate {
*/
tiers?: SubscriptionAddOnTier[] | null;
/**
* 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.
* 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.
*/
percentageTiers?: SubscriptionAddOnPercentageTier[] | null;
/**
Expand Down Expand Up @@ -5423,6 +5435,10 @@ export interface AccountPurchase {
* 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.
*/
preferredLocale?: string | null;
/**
* 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)
*/
preferredTimeZone?: string | null;
/**
* 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.
*/
Expand Down Expand Up @@ -7666,6 +7682,21 @@ endpoint to obtain only the newly generated `UniqueCouponCodes`.
*
* API docs: https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance
*
* @example
* try {
* const invoice = await client.applyCreditBalance(invoiceId)
* console.log('Applied credit balance to invoice: ', invoice)
* } 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)
* }
* }
*
* @param {string} invoiceId - Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @return {Promise<Invoice>} The updated invoice.
Expand Down
15 changes: 15 additions & 0 deletions lib/recurly/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,21 @@ endpoint to obtain only the newly generated `UniqueCouponCodes`.
*
* API docs: {@link https://developers.recurly.com/api/v2021-02-25#operation/apply_credit_balance}
*
* @example
* try {
* const invoice = await client.applyCreditBalance(invoiceId)
* console.log('Applied credit balance to invoice: ', invoice)
* } 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)
* }
* }
*
* @param {string} invoiceId - Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`.
* @return {Promise<Invoice>} The updated invoice.
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Resource = require('../Resource')
* @prop {string} object - Object type
* @prop {string} parentAccountId - The UUID of the parent account associated with this account.
* @prop {string} preferredLocale - Used to determine the language and locale of emails sent on behalf of the merchant to the customer.
* @prop {string} preferredTimeZone - 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.
* @prop {Array.<ShippingAddress>} shippingAddresses - The shipping addresses on the account.
* @prop {string} state - Accounts can be either active or inactive.
* @prop {boolean} taxExempt - The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account.
Expand Down Expand Up @@ -74,6 +75,7 @@ class Account extends Resource {
object: String,
parentAccountId: String,
preferredLocale: String,
preferredTimeZone: String,
shippingAddresses: ['ShippingAddress'],
state: String,
taxExempt: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/resources/AddOn.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Resource = require('../Resource')
* @prop {string} name - Describes your add-on and will appear in subscribers' invoices.
* @prop {string} object - Object type
* @prop {boolean} optional - 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.
* @prop {Array.<PercentageTiersByCurrency>} percentageTiers - Percentage Tiers
* @prop {Array.<PercentageTiersByCurrency>} percentageTiers - This feature is currently in development and requires approval and enablement, please contact support.
* @prop {string} planId - Plan ID
* @prop {string} revenueScheduleType - 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.
* @prop {string} state - Add-ons can be either active or inactive.
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/resources/Invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Resource = require('../Resource')
* @prop {string} origin - The event that created the invoice.
* @prop {number} paid - The total amount of successful payments transaction on this invoice.
* @prop {string} poNumber - For manual invoicing, this identifies the PO number associated with the subscription.
* @prop {string} previousInvoiceId - On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from.
* @prop {string} previousInvoiceId - 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.
* @prop {number} refundableAmount - The refundable amount on a charge invoice. It will be null for all other invoices.
* @prop {ShippingAddress} shippingAddress
* @prop {string} state - Invoice state
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/resources/SubscriptionAddOn.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Resource = require('../Resource')
* @prop {Date} expiredAt - Expired at
* @prop {string} id - Subscription Add-on ID
* @prop {string} object - Object type
* @prop {Array.<SubscriptionAddOnPercentageTier>} percentageTiers - 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.
* @prop {Array.<SubscriptionAddOnPercentageTier>} percentageTiers - 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.
* @prop {number} quantity - Add-on quantity
* @prop {string} revenueScheduleType - Revenue schedule type
* @prop {string} subscriptionId - Subscription ID
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/resources/Usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Resource = require('../Resource')
* @prop {string} measuredUnitId - The ID of the measured unit associated with the add-on the usage record is for.
* @prop {string} merchantTag - 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.
* @prop {string} object - Object type
* @prop {Array.<SubscriptionAddOnPercentageTier>} percentageTiers - The percentage tiers of the subscription based on the usage_timestamp. If tier_type = flat, percentage_tiers = []
* @prop {Array.<SubscriptionAddOnPercentageTier>} percentageTiers - 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.
* @prop {Date} recordingTimestamp - When the usage was recorded in your system.
* @prop {string} tierType - 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.
* @prop {Array.<SubscriptionAddOnTier>} tiers - The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = []
Expand Down
Loading