From cd828559bd540c2f06731982e18af06372ab34b3 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Fri, 21 Nov 2025 17:48:48 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 47 ++++++++++++++++++++++++++++++++++++++++++++ recurly/resources.py | 28 ++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) diff --git a/openapi/api.yaml b/openapi/api.yaml index b0cca2cd..1ef07267 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/recurly/resources.py b/recurly/resources.py index ea333e6d..7cf986e4 100644 --- a/recurly/resources.py +++ b/recurly/resources.py @@ -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 @@ -1762,6 +1768,9 @@ class ReferenceOnlyCurrencyConversion(Resource): schema = { "currency": str, + "date": str, + "rate": str, + "source": str, "subtotal_in_cents": float, "tax_in_cents": float, } @@ -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 @@ -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, @@ -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