openapi/api.yaml in recurly-3.4.1 vs openapi/api.yaml in recurly-3.5.0
- old
+ new
@@ -3996,10 +3996,15 @@
$account_subscriptions = $client->listAccountSubscriptions($account_id, $params);
foreach($account_subscriptions as $sub) {
echo 'Account subscription: ' . $sub->getUuid() . PHP_EOL;
}
+ - lang: Python
+ source: |
+ subscriptions = client.list_account_subscriptions(account.id, limit=200).items()
+ for subscription in subscriptions:
+ print(subscription.uuid)
"/sites/{site_id}/accounts/{account_id}/transactions":
get:
tags:
- account
- transaction
@@ -4580,10 +4585,39 @@
} 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);
}
+ delete:
+ tags:
+ - coupon
+ operationId: deactivate_coupon
+ summary: Expire a coupon
+ parameters:
+ - "$ref": "#/components/parameters/site_id"
+ - "$ref": "#/components/parameters/coupon_id"
+ description: Mark an existing Coupon as expired
+ responses:
+ '200':
+ description: The expired Coupon
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/Coupon"
+ '404':
+ description: Incorrect site or coupon ID.
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/Error"
+ default:
+ description: Unexpected error.
+ content:
+ application/json:
+ schema:
+ "$ref": "#/components/schemas/Error"
+ x-code-samples: []
"/sites/{site_id}/coupons/{coupon_id}/generate":
post:
tags:
- coupon
- unique_coupon_code
@@ -12166,10 +12200,25 @@
"$ref": "#/components/schemas/AddOnPricing"
minItems: 1
item:
"$ref": "#/components/schemas/ItemMini"
readOnly: true
+ tier_type:
+ type: string
+ title: Tier type
+ description: The type of tiering used by the Add-on.
+ default: flat
+ enum:
+ - flat
+ - tiered
+ - stairstep
+ - volume
+ tiers:
+ type: array
+ title: Tiers
+ items:
+ "$ref": "#/components/schemas/Tier"
external_sku:
type: string
title: External SKU
description: Optional, stock keeping unit to link the item to other inventory
systems.
@@ -12261,10 +12310,18 @@
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.
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
@@ -12277,14 +12334,33 @@
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
+ 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.
+ tier_type:
+ type: string
+ title: Tier type
+ description: The type of tiering used by the Add-on.
+ default: flat
+ enum:
+ - flat
+ - tiered
+ - stairstep
+ - volume
+ tiers:
+ type: array
+ title: Tiers
+ items:
+ "$ref": "#/components/schemas/Tier"
+ description: At least one tier is required if `tier_type` is not 'flat'.
required:
- code
- name
- currencies
AddOnUpdate:
@@ -12347,16 +12423,35 @@
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.
+ tiers:
+ type: array
+ title: Tiers
+ items:
+ "$ref": "#/components/schemas/Tier"
+ description: |
+ If tiers are provided in the request, all existing tiers on the Add-on will be
+ removed and replaced by the tiers in the request.
BillingInfo:
type: object
properties:
id:
type: string
@@ -12517,15 +12612,33 @@
description: A token generated by Recurly.js after completing a 3-D Secure
device fingerprinting or authentication challenge.
maxLength: 22
iban:
type: string
- maxLengh: 34
+ 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
+ routing information. (SEPA only)
+ name_on_account:
+ type: string
+ maxLength: 255
+ description: The name associated with the bank account.
+ account_number:
+ type: string
+ maxLength: 255
+ description: The bank account number. (ACH only)
+ routing_number:
+ type: string
+ maxLength: 15
+ description: The bank's rounting number. (ACH only)
+ account_type:
+ type: string
+ enum:
+ - checking
+ - savings
+ description: The bank account type. (ACH only)
Coupon:
type: object
properties:
id:
type: string
@@ -14883,10 +14996,27 @@
minimum: 0
maximum: 100000
required:
- currency
- unit_amount
+ Tier:
+ type: object
+ properties:
+ ending_quantity:
+ type: integer
+ title: Ending quantity
+ minimum: 1
+ maximum: 999999999
+ default: 999999999
+ currencies:
+ type: array
+ title: Tier pricing
+ items:
+ "$ref": "#/components/schemas/Pricing"
+ minItems: 1
+ required:
+ - currencies
Settings:
type: object
properties:
billing_address_requirement:
type: string
@@ -15484,10 +15614,27 @@
unit_amount:
type: number
format: float
title: Add-on unit price
description: This is priced in the subscription's currency.
+ tier_type:
+ type: string
+ title: Tier type
+ description: The type of tiering used by the Add-on.
+ default: flat
+ enum:
+ - flat
+ - tiered
+ - stairstep
+ - volume
+ tiers:
+ type: array
+ title: Tiers
+ items:
+ "$ref": "#/components/schemas/SubscriptionAddOnTier"
+ minItems: 1
+ description: Empty unless `tier_type` is `tiered`, `volume`, or `stairstep`.
created_at:
type: string
format: date-time
title: Created at
updated_at:
@@ -15512,12 +15659,22 @@
default: 1
unit_amount:
type: number
format: float
title: Unit amount
- description: Optionally, override the add-on's default unit amount.
+ description: |
+ * 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` must be absent.
minimum: 0
+ 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.
revenue_schedule_type:
type: string
title: Revenue schedule type
enum:
- never
@@ -15546,18 +15703,40 @@
type: number
format: float
title: Unit amount
description: Optionally, override the add-on's default unit amount.
minimum: 0
+ 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.
revenue_schedule_type:
type: string
title: Revenue schedule type
enum:
- never
- evenly
- at_range_end
- at_range_start
+ SubscriptionAddOnTier:
+ type: object
+ properties:
+ ending_quantity:
+ type: integer
+ title: Ending quantity
+ minimum: 1
+ maximum: 999999999
+ default: 999999999
+ unit_amount:
+ type: number
+ format: float
+ title: Unit amount
+ minimum: 0
SubscriptionCancel:
type: object
properties:
timeframe:
type: string
@@ -16672,9 +16851,10 @@
- JCB
- Laser
- Maestro
- MasterCard
- Test Card
+ - Union Pay
- Unknown
- Visa
first_six:
type: string
description: Credit card number's first six digits.