openapi/api.yaml in recurly-4.15.0 vs openapi/api.yaml in recurly-4.17.0
- old
+ new
@@ -16263,10 +16263,12 @@
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"
@@ -16441,29 +16443,32 @@
* 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 with an `ending_quantity`
- of 999999999 which is the default if not provided.
+ 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 ending_amount value.
+ if not, it must be absent. There must be one tier without an `ending_amount` value
+ which represents the final tier.
required:
- code
- name
AddOnUpdate:
type: object
@@ -16588,20 +16593,21 @@
"$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
- that represents the final tier.
+ 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.
+ if not, it must be absent. There must be one tier without an `ending_amount` value
+ which represents the final tier.
BillingInfo:
type: object
properties:
id:
type: string
@@ -19360,15 +19366,15 @@
type: object
properties:
ending_quantity:
type: integer
title: Ending quantity
- description: Ending quantity for the tier. This represents a unit amount
- for unit-priced add ons.
minimum: 1
maximum: 999999999
- default: 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
@@ -19397,18 +19403,23 @@
properties:
ending_amount:
type: number
format: float
title: Ending amount
- minimum: 0.1
- maximum: 9999999999999
+ minimum: 0.01
+ maximum: 9999999999999.99
+ default:
description: Ending amount for the tier. Allows up to 2 decimal places.
- The last tier ending_amount is null.
+ Must be left empty if it is the final tier.
usage_percentage:
type: string
title: Usage Percentage
- description: Decimal 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: |
@@ -20050,10 +20061,17 @@
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
SubscriptionAddOn:
type: object
title: Subscription Add-on
description: This links an Add-on to a specific Subscription.
properties:
@@ -20089,30 +20107,34 @@
revenue_schedule_type:
title: Revenue schedule type
"$ref": "#/components/schemas/RevenueScheduleTypeEnum"
tier_type:
"$ref": "#/components/schemas/TierTypeEnum"
+ 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
- removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and
- add_on.usage_type is percentage use percentage_tiers instead.
+ 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
+ add_on.usage_type is percentage.
+ There must be one tier without an `ending_amount` value which represents the final tier.
usage_percentage:
type: number
format: float
title: Usage Percentage
description: The percentage taken of the monetary amount of usage tracked.
@@ -20174,27 +20196,29 @@
"$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 ending_quantity value.
+ There must be one tier without an `ending_quantity` value which represents the final tier.
See our [Guide](https://developers.recurly.com/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.
+ 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.
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://developers.recurly.com/guides/usage-based-billing-guide.html)
for an overview of how to configure usage add-ons.
@@ -20253,12 +20277,22 @@
"$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 with an `ending_quantity` of 999999999 which is the
- default if not provided.
+ 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.
usage_percentage:
type: number
format: float
title: Usage Percentage
description: The percentage taken of the monetary amount of usage tracked.
@@ -20274,10 +20308,12 @@
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
@@ -20305,17 +20341,20 @@
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. A value between
- 0.0 and 100.0.
+ This can be up to 4 decimal places represented as a string.
SubscriptionCancel:
type: object
properties:
timeframe:
title: Timeframe
@@ -22148,10 +22187,29 @@
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
@@ -22630,9 +22688,10 @@
- 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