Skip to content
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: 47 additions & 0 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20911,6 +20911,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
po_number:
type: string
title: Purchase order number
Expand Down Expand Up @@ -22507,6 +22509,19 @@ components:
format: float
title: Tax In Cents
description: The tax converted to the currency.
rate:
type: string
title: Rate
description: The conversion rate to the currency.
source:
type: string
title: Source
description: The source of the conversion rate.
date:
type: string
title: Date
format: date
description: The date of the conversion rate.
ShippingAddressCreate:
type: object
properties:
Expand Down Expand Up @@ -23125,6 +23140,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -23976,6 +23993,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -24107,6 +24126,8 @@ components:
description: The new set of ramp intervals for the subscription.
items:
"$ref": "#/components/schemas/SubscriptionRampInterval"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
bulk:
type: boolean
description: Optional field to be used only when needing to bypass the 60
Expand Down Expand Up @@ -24195,6 +24216,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy:
"$ref": "#/components/schemas/CreditApplicationPolicy"
gateway_code:
type: string
title: Gateway Code
Expand Down Expand Up @@ -25033,6 +25056,8 @@ components:
default: 0
net_terms_type:
"$ref": "#/components/schemas/NetTermsTypeEnum"
credit_application_policy_override:
"$ref": "#/components/schemas/CreditApplicationPolicy"
terms_and_conditions:
type: string
title: Terms and conditions
Expand Down Expand Up @@ -27038,6 +27063,28 @@ components:
enum:
- automatic
- manual
CreditApplicationPolicy:
type: object
title: Credit Application Policy
description: |
Controls whether credit invoices are automatically applied to new invoices.
The `mode` field determines the application behavior.
properties:
mode:
"$ref": "#/components/schemas/CreditApplicationModeEnum"
required:
- mode
CreditApplicationModeEnum:
type: string
title: Credit Application Mode
description: |
Determines which credit invoices are applied to invoices:
- `all`: All available credit invoices are applied (default)
- `none`: No credit invoices are applied automatically
enum:
- all
- none
default: all
InvoiceRefundTypeEnum:
type: string
enum:
Expand Down
28 changes: 28 additions & 0 deletions recurly/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,12 @@ class ReferenceOnlyCurrencyConversion(Resource):
----------
currency : str
3-letter ISO 4217 currency code.
date : str
The date of the conversion rate.
rate : str
The conversion rate to the currency.
source : str
The source of the conversion rate.
subtotal_in_cents : float
The subtotal converted to the currency.
tax_in_cents : float
Expand All @@ -1762,6 +1768,9 @@ class ReferenceOnlyCurrencyConversion(Resource):

schema = {
"currency": str,
"date": str,
"rate": str,
"source": str,
"subtotal_in_cents": float,
"tax_in_cents": float,
}
Expand Down Expand Up @@ -2118,6 +2127,9 @@ class Subscription(Resource):
Returns subscription level coupon redemptions that are tied to this subscription.
created_at : datetime
Created at
credit_application_policy : CreditApplicationPolicy
Controls whether credit invoices are automatically applied to new invoices.
The `mode` field determines the application behavior.
currency : str
3-letter ISO 4217 currency code.
current_period_ends_at : datetime
Expand Down Expand Up @@ -2233,6 +2245,7 @@ class Subscription(Resource):
"converted_at": datetime,
"coupon_redemptions": ["CouponRedemptionMini"],
"created_at": datetime,
"credit_application_policy": "CreditApplicationPolicy",
"currency": str,
"current_period_ends_at": datetime,
"current_period_started_at": datetime,
Expand Down Expand Up @@ -2670,6 +2683,21 @@ class SubscriptionRampIntervalResponse(Resource):
}


class CreditApplicationPolicy(Resource):
"""
Attributes
----------
mode : str
Determines which credit invoices are applied to invoices:
- `all`: All available credit invoices are applied (default)
- `none`: No credit invoices are applied automatically
"""

schema = {
"mode": str,
}


class UniqueCouponCodeParams(Resource):
"""
Attributes
Expand Down
Loading