Skip to content

Commit

Permalink
Merge pull request #573 from recurly/v3-v2021-02-25-1659540355
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25
  • Loading branch information
csampson authored Aug 3, 2022
2 parents d648086 + ccbd01d commit cf04a62
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 2 deletions.
127 changes: 126 additions & 1 deletion openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17535,7 +17535,7 @@ components:
title: Field value
description: Any values that resemble a credit card number or security code
(CVV/CVC) will be rejected.
maxLength: 100
maxLength: 255
required:
- name
- value
Expand Down Expand Up @@ -18959,6 +18959,14 @@ components:
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"
revenue_schedule_type:
title: Revenue schedule type
"$ref": "#/components/schemas/RevenueScheduleTypeEnum"
Expand Down Expand Up @@ -19121,6 +19129,14 @@ components:
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"
revenue_schedule_type:
title: Revenue schedule type
"$ref": "#/components/schemas/RevenueScheduleTypeEnum"
Expand Down Expand Up @@ -19242,6 +19258,7 @@ components:
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:
Expand All @@ -19250,6 +19267,19 @@ components:
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 first billing cycle of a ramp.
default: 1
currencies:
type: array
description: Represents the price for the ramp interval.
items:
"$ref": "#/components/schemas/PlanRampPricing"
PlanUpdate:
type: object
properties:
Expand Down Expand Up @@ -19316,6 +19346,11 @@ components:
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"
revenue_schedule_type:
title: Revenue schedule type
"$ref": "#/components/schemas/RevenueScheduleTypeEnum"
Expand Down Expand Up @@ -19362,6 +19397,7 @@ components:
currencies:
type: array
title: Pricing
description: Optional when the pricing model is 'ramp'.
items:
"$ref": "#/components/schemas/PlanPricing"
minItems: 1
Expand Down Expand Up @@ -19441,6 +19477,24 @@ components:
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:
Expand Down Expand Up @@ -20044,6 +20098,13 @@ components:
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
Expand Down Expand Up @@ -20546,6 +20607,13 @@ components:
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
Expand Down Expand Up @@ -20671,6 +20739,12 @@ components:
"$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:
"$ref": "#/components/schemas/SubscriptionRampInterval"
SubscriptionChangeShippingCreate:
type: object
title: Shipping details that will be changed on a subscription
Expand Down Expand Up @@ -20825,6 +20899,12 @@ components:
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"
Expand Down Expand Up @@ -20964,6 +21044,12 @@ components:
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:
Expand Down Expand Up @@ -21145,6 +21231,30 @@ components:
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 how many billing cycles are included in a ramp interval.
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 how many billing cycles are included in a ramp interval.
remaining_billing_cycles:
type: integer
description: Represents how many billing cycles are left in a ramp interval.
unit_amount:
type: integer
description: Represents the price for the ramp interval.
TaxInfo:
type: object
title: Tax info
Expand Down Expand Up @@ -21998,6 +22108,10 @@ components:
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:
Expand Down Expand Up @@ -22327,6 +22441,16 @@ components:
- 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:
Expand Down Expand Up @@ -22594,6 +22718,7 @@ components:
- paypal_billing_agreement
- roku
- sepadirectdebit
- venmo
- wire_transfer
- braintree_v_zero
CardTypeEnum:
Expand Down
70 changes: 69 additions & 1 deletion recurly/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ class PaymentMethod(Resource):
The bank account's routing number. Only present for ACH payment methods.
routing_number_bank : str
The bank name of this routing number.
username : str
Username of the associated payment method. Currently only associated with Venmo.
"""

schema = {
Expand All @@ -372,6 +374,7 @@ class PaymentMethod(Resource):
"object": str,
"routing_number": str,
"routing_number_bank": str,
"username": str,
}


Expand Down Expand Up @@ -1615,6 +1618,8 @@ class Subscription(Resource):
For manual invoicing, this identifies the PO number associated with the subscription.
quantity : int
Subscription quantity
ramp_intervals : :obj:`list` of :obj:`SubscriptionRampIntervalResponse`
The ramp intervals representing the pricing schedule for the subscription.
remaining_billing_cycles : int
The remaining billing cycles in the current term.
remaining_pause_cycles : int
Expand Down Expand Up @@ -1684,6 +1689,7 @@ class Subscription(Resource):
"plan": "PlanMini",
"po_number": str,
"quantity": int,
"ramp_intervals": ["SubscriptionRampIntervalResponse"],
"remaining_billing_cycles": int,
"remaining_pause_cycles": int,
"renewal_billing_cycles": int,
Expand Down Expand Up @@ -1837,6 +1843,8 @@ class SubscriptionChange(Resource):
Just the important parts.
quantity : int
Subscription quantity
ramp_intervals : :obj:`list` of :obj:`SubscriptionRampIntervalResponse`
The ramp intervals representing the pricing schedule for the subscription.
revenue_schedule_type : str
Revenue schedule type
shipping : SubscriptionShipping
Expand Down Expand Up @@ -1864,6 +1872,7 @@ class SubscriptionChange(Resource):
"object": str,
"plan": "PlanMini",
"quantity": int,
"ramp_intervals": ["SubscriptionRampIntervalResponse"],
"revenue_schedule_type": str,
"shipping": "SubscriptionShipping",
"subscription_id": str,
Expand Down Expand Up @@ -2043,6 +2052,25 @@ class SubscriptionChangeBillingInfo(Resource):
}


class SubscriptionRampIntervalResponse(Resource):
"""
Attributes
----------
remaining_billing_cycles : int
Represents how many billing cycles are left in a ramp interval.
starting_billing_cycle : int
Represents how many billing cycles are included in a ramp interval.
unit_amount : int
Represents the price for the ramp interval.
"""

schema = {
"remaining_billing_cycles": int,
"starting_billing_cycle": int,
"unit_amount": int,
}


class UniqueCouponCodeParams(Resource):
"""
Attributes
Expand Down Expand Up @@ -2321,6 +2349,12 @@ class Plan(Resource):
This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.
object : str
Object type
pricing_model : str
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.
ramp_intervals : :obj:`list` of :obj:`PlanRampInterval`
Ramp Intervals
revenue_schedule_type : str
Revenue schedule type
setup_fee_accounting_code : str
Expand Down Expand Up @@ -2363,6 +2397,8 @@ class Plan(Resource):
"interval_unit": str,
"name": str,
"object": str,
"pricing_model": str,
"ramp_intervals": ["PlanRampInterval"],
"revenue_schedule_type": str,
"setup_fee_accounting_code": str,
"setup_fee_revenue_schedule_type": str,
Expand All @@ -2377,6 +2413,38 @@ class Plan(Resource):
}


class PlanRampInterval(Resource):
"""
Attributes
----------
currencies : :obj:`list` of :obj:`PlanRampPricing`
Represents the price for the ramp interval.
starting_billing_cycle : int
Represents the first billing cycle of a ramp.
"""

schema = {
"currencies": ["PlanRampPricing"],
"starting_billing_cycle": int,
}


class PlanRampPricing(Resource):
"""
Attributes
----------
currency : str
3-letter ISO 4217 currency code.
unit_amount : float
Represents the price for the Ramp Interval.
"""

schema = {
"currency": str,
"unit_amount": float,
}


class PlanPricing(Resource):
"""
Attributes
Expand All @@ -2388,7 +2456,7 @@ class PlanPricing(Resource):
tax_inclusive : bool
This field is deprecated. Please do not use it.
unit_amount : float
Unit price
This field should not be sent when the pricing model is 'ramp'.
"""

schema = {
Expand Down

0 comments on commit cf04a62

Please sign in to comment.