openapi/api.yaml in recurly-4.0.1 vs openapi/api.yaml in recurly-4.1.0

- old
+ new

@@ -2031,11 +2031,11 @@ operationId: update_billing_info summary: Set an account's billing information description: | If you're using Recurly.js to securely submit data from webforms without sending it through your server, you can associate the billing information with an account by passing in the `token_id`. The only other - field permitted with `token_id` is `primary_payment_method`. + fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`. For credit card payments you'll need the following required fields: - first_name - last_name @@ -2348,11 +2348,11 @@ operationId: create_billing_info summary: Set an account's billing information when the wallet feature is enabled description: | If you're using Recurly.js to securely submit data from webforms without sending it through your server, you can associate the billing information with an account by passing in the `token_id`. The only other - field permitted with `token_id` is `primary_payment_method`. + fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`. For credit card payments you'll need the following required fields: - first_name - last_name @@ -2432,11 +2432,11 @@ operationId: update_a_billing_info summary: Update an account's billing information description: | If you're using Recurly.js to securely submit data from webforms without sending it through your server, you can associate the billing information with an account by passing in the `token_id`. The only other - field permitted with `token_id` is `primary_payment_method`. + fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`. For credit card payments you'll need the following required fields: - first_name - last_name @@ -15733,12 +15733,12 @@ 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. Must be omitted - otherwise. `usage_percentage` does not support tiers. + 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` @@ -15840,11 +15840,11 @@ 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` + the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided. required: - code - name AddOnUpdate: @@ -15873,12 +15873,12 @@ 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. Must be omitted - otherwise. `usage_percentage` does not support tiers. + 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` @@ -15969,11 +15969,11 @@ 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` + the desired `currencies`, or alternatively, `usage_percentage` for usage percentage type usage add ons. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided. BillingInfo: type: object properties: id: @@ -16035,10 +16035,15 @@ 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` indicator. 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` indicator is used to designate + a billing info as a backup on the account that will be tried if the billing + info marked `primary_payment_method` fails. created_at: type: string format: date-time description: When the billing information was created. readOnly: true @@ -16149,15 +16154,13 @@ type: string description: Tax identifier is required if adding a billing info that is a consumer card in Brazil. This would be the customer's CPF, CPF is a Brazilian tax identifier for all tax paying residents. tax_identifier_type: - type: string - enum: - "$ref": "#/components/schemas/TaxIdentifierTypeEnum" description: this field and a value of 'cpf' are required if adding a billing info that is an elo or hipercard type in Brazil. + "$ref": "#/components/schemas/TaxIdentifierTypeEnum" primary_payment_method: type: boolean title: Primary Payment Method description: The `primary_payment_method` indicator is used to designate the primary billing info on the account. The first billing info created @@ -16165,10 +16168,19 @@ 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` indicator. 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` indicator is used to designate + a billing info as a backup on the account that will be tried if the billing + info marked `primary_payment_method` fails. 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. Coupon: type: object properties: id: type: string @@ -18624,21 +18636,26 @@ 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, but for percentage type usage add ons, represents + the site default currency in its minimum divisible unit. minimum: 1 maximum: 999999999 default: 999999999 + usage_percentage: + type: string + title: Usage Percentage + description: Decimal usage percentage. currencies: type: array title: Tier pricing items: "$ref": "#/components/schemas/TierPricing" minItems: 1 - required: - - currencies Settings: type: object properties: billing_address_requirement: description: | @@ -19858,12 +19875,12 @@ unit_amount: type: number format: float title: Custom subscription pricing description: Override the unit amount of the subscription plan by setting - this value in cents. If not provided, the subscription will inherit the - price from the subscription plan for the provided currency. + this value. If not provided, the subscription will inherit the price from + the subscription plan for the provided currency. minimum: 0 maximum: 1000000 quantity: type: integer title: Quantity @@ -20183,9 +20200,13 @@ "$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: