From 07e245e18c616899273e488e76d218a738056355 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Fri, 21 Nov 2025 17:49:02 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 47 +++++++++++++++++++ src/main/java/com/recurly/v3/Constants.java | 11 +++++ .../v3/requests/CreditApplicationPolicy.java | 40 ++++++++++++++++ .../recurly/v3/requests/InvoiceCreate.java | 24 ++++++++++ .../recurly/v3/requests/PurchaseCreate.java | 25 ++++++++++ .../v3/requests/SubscriptionCreate.java | 24 ++++++++++ .../v3/requests/SubscriptionPurchase.java | 24 ++++++++++ .../v3/requests/SubscriptionUpdate.java | 24 ++++++++++ .../v3/resources/CreditApplicationPolicy.java | 39 +++++++++++++++ .../ReferenceOnlyCurrencyConversion.java | 45 ++++++++++++++++++ .../recurly/v3/resources/Subscription.java | 24 ++++++++++ 11 files changed, 327 insertions(+) create mode 100644 src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java create mode 100644 src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java 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/src/main/java/com/recurly/v3/Constants.java b/src/main/java/com/recurly/v3/Constants.java index d54df186..f364f974 100644 --- a/src/main/java/com/recurly/v3/Constants.java +++ b/src/main/java/com/recurly/v3/Constants.java @@ -862,6 +862,17 @@ public enum CollectionMethod { }; + public enum CreditApplicationMode { + UNDEFINED, + + @SerializedName("all") + ALL, + + @SerializedName("none") + NONE, + + }; + public enum InvoiceRefundType { UNDEFINED, diff --git a/src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java b/src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java new file mode 100644 index 00000000..6976f3fc --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java @@ -0,0 +1,40 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.requests; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Constants; +import com.recurly.v3.Request; +import com.recurly.v3.resources.*; + +public class CreditApplicationPolicy extends Request { + + /** + * Determines which credit invoices are applied to invoices: - `all`: All available credit + * invoices are applied (default) - `none`: No credit invoices are applied automatically + */ + @SerializedName("mode") + @Expose + private Constants.CreditApplicationMode mode; + + /** + * Determines which credit invoices are applied to invoices: - `all`: All available credit + * invoices are applied (default) - `none`: No credit invoices are applied automatically + */ + public Constants.CreditApplicationMode getMode() { + return this.mode; + } + + /** + * @param mode Determines which credit invoices are applied to invoices: - `all`: All available + * credit invoices are applied (default) - `none`: No credit invoices are applied + * automatically + */ + public void setMode(final Constants.CreditApplicationMode mode) { + this.mode = mode; + } +} diff --git a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java index c77844cc..02bc2fe1 100644 --- a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java +++ b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java @@ -52,6 +52,14 @@ public class InvoiceCreate extends Request { @Expose private Constants.CollectionMethod collectionMethod; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy") + @Expose + private CreditApplicationPolicy creditApplicationPolicy; + /** * This will default to the Customer Notes text specified on the Invoice Settings for credit * invoices. Specify customer notes to add or override Customer Notes on credit invoices. @@ -204,6 +212,22 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho this.collectionMethod = collectionMethod; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicy() { + return this.creditApplicationPolicy; + } + + /** + * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to + * new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { + this.creditApplicationPolicy = creditApplicationPolicy; + } + /** * This will default to the Customer Notes text specified on the Invoice Settings for credit * invoices. Specify customer notes to add or override Customer Notes on credit invoices. diff --git a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java index 72e1f0ef..b732cc84 100644 --- a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java +++ b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java @@ -64,6 +64,14 @@ public class PurchaseCreate extends Request { @Expose private List couponCodes; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy_override") + @Expose + private CreditApplicationPolicy creditApplicationPolicyOverride; + /** Notes to be put on the credit invoice resulting from credits in the purchase, if any. */ @SerializedName("credit_customer_notes") @Expose @@ -277,6 +285,23 @@ public void setCouponCodes(final List couponCodes) { this.couponCodes = couponCodes; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicyOverride() { + return this.creditApplicationPolicyOverride; + } + + /** + * @param creditApplicationPolicyOverride Controls whether credit invoices are automatically + * applied to new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicyOverride( + final CreditApplicationPolicy creditApplicationPolicyOverride) { + this.creditApplicationPolicyOverride = creditApplicationPolicyOverride; + } + /** Notes to be put on the credit invoice resulting from credits in the purchase, if any. */ public String getCreditCustomerNotes() { return this.creditCustomerNotes; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java index a8d362ec..7fd5e0ab 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java @@ -80,6 +80,14 @@ public class SubscriptionCreate extends Request { @Expose private List couponCodes; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy") + @Expose + private CreditApplicationPolicy creditApplicationPolicy; + /** * If there are pending credits on the account that will be invoiced during the subscription * creation, these will be used as the Customer Notes on the credit invoice. @@ -428,6 +436,22 @@ public void setCouponCodes(final List couponCodes) { this.couponCodes = couponCodes; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicy() { + return this.creditApplicationPolicy; + } + + /** + * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to + * new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { + this.creditApplicationPolicy = creditApplicationPolicy; + } + /** * If there are pending credits on the account that will be invoiced during the subscription * creation, these will be used as the Customer Notes on the credit invoice. diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java index 5b04e52d..b9c6525b 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java @@ -34,6 +34,14 @@ public class SubscriptionPurchase extends Request { @Expose private Boolean bulk; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy") + @Expose + private CreditApplicationPolicy creditApplicationPolicy; + /** * The custom fields will only be altered when they are included in a request. Sending an empty * array will not remove any existing values. To remove a field send the name with a null or empty @@ -187,6 +195,22 @@ public void setBulk(final Boolean bulk) { this.bulk = bulk; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicy() { + return this.creditApplicationPolicy; + } + + /** + * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to + * new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { + this.creditApplicationPolicy = creditApplicationPolicy; + } + /** * The custom fields will only be altered when they are included in a request. Sending an empty * array will not remove any existing values. To remove a field send the name with a null or empty diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java index 24eb5733..7100cbba 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java @@ -35,6 +35,14 @@ public class SubscriptionUpdate extends Request { @Expose private Constants.CollectionMethod collectionMethod; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy") + @Expose + private CreditApplicationPolicy creditApplicationPolicy; + /** * The custom fields will only be altered when they are included in a request. Sending an empty * array will not remove any existing values. To remove a field send the name with a null or empty @@ -190,6 +198,22 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho this.collectionMethod = collectionMethod; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicy() { + return this.creditApplicationPolicy; + } + + /** + * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to + * new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { + this.creditApplicationPolicy = creditApplicationPolicy; + } + /** * The custom fields will only be altered when they are included in a request. Sending an empty * array will not remove any existing values. To remove a field send the name with a null or empty diff --git a/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java b/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java new file mode 100644 index 00000000..4134eaee --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java @@ -0,0 +1,39 @@ +/** + * This file is automatically created by Recurly's OpenAPI generation process and thus any edits you + * make by hand will be lost. If you wish to make a change to this file, please create a Github + * issue explaining the changes you need and we will usher them to the appropriate places. + */ +package com.recurly.v3.resources; + +import com.google.gson.annotations.Expose; +import com.google.gson.annotations.SerializedName; +import com.recurly.v3.Constants; +import com.recurly.v3.Resource; + +public class CreditApplicationPolicy extends Resource { + + /** + * Determines which credit invoices are applied to invoices: - `all`: All available credit + * invoices are applied (default) - `none`: No credit invoices are applied automatically + */ + @SerializedName("mode") + @Expose + private Constants.CreditApplicationMode mode; + + /** + * Determines which credit invoices are applied to invoices: - `all`: All available credit + * invoices are applied (default) - `none`: No credit invoices are applied automatically + */ + public Constants.CreditApplicationMode getMode() { + return this.mode; + } + + /** + * @param mode Determines which credit invoices are applied to invoices: - `all`: All available + * credit invoices are applied (default) - `none`: No credit invoices are applied + * automatically + */ + public void setMode(final Constants.CreditApplicationMode mode) { + this.mode = mode; + } +} diff --git a/src/main/java/com/recurly/v3/resources/ReferenceOnlyCurrencyConversion.java b/src/main/java/com/recurly/v3/resources/ReferenceOnlyCurrencyConversion.java index 63d292fb..ad1e33ad 100644 --- a/src/main/java/com/recurly/v3/resources/ReferenceOnlyCurrencyConversion.java +++ b/src/main/java/com/recurly/v3/resources/ReferenceOnlyCurrencyConversion.java @@ -17,6 +17,21 @@ public class ReferenceOnlyCurrencyConversion extends Resource { @Expose private String currency; + /** The date of the conversion rate. */ + @SerializedName("date") + @Expose + private String date; + + /** The conversion rate to the currency. */ + @SerializedName("rate") + @Expose + private String rate; + + /** The source of the conversion rate. */ + @SerializedName("source") + @Expose + private String source; + /** The subtotal converted to the currency. */ @SerializedName("subtotal_in_cents") @Expose @@ -37,6 +52,36 @@ public void setCurrency(final String currency) { this.currency = currency; } + /** The date of the conversion rate. */ + public String getDate() { + return this.date; + } + + /** @param date The date of the conversion rate. */ + public void setDate(final String date) { + this.date = date; + } + + /** The conversion rate to the currency. */ + public String getRate() { + return this.rate; + } + + /** @param rate The conversion rate to the currency. */ + public void setRate(final String rate) { + this.rate = rate; + } + + /** The source of the conversion rate. */ + public String getSource() { + return this.source; + } + + /** @param source The source of the conversion rate. */ + public void setSource(final String source) { + this.source = source; + } + /** The subtotal converted to the currency. */ public BigDecimal getSubtotalInCents() { return this.subtotalInCents; diff --git a/src/main/java/com/recurly/v3/resources/Subscription.java b/src/main/java/com/recurly/v3/resources/Subscription.java index 210b8173..1b9235be 100644 --- a/src/main/java/com/recurly/v3/resources/Subscription.java +++ b/src/main/java/com/recurly/v3/resources/Subscription.java @@ -101,6 +101,14 @@ public class Subscription extends Resource { @Expose private DateTime createdAt; + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + @SerializedName("credit_application_policy") + @Expose + private CreditApplicationPolicy creditApplicationPolicy; + /** 3-letter ISO 4217 currency code. */ @SerializedName("currency") @Expose @@ -529,6 +537,22 @@ public void setCreatedAt(final DateTime createdAt) { this.createdAt = createdAt; } + /** + * Controls whether credit invoices are automatically applied to new invoices. The `mode` field + * determines the application behavior. + */ + public CreditApplicationPolicy getCreditApplicationPolicy() { + return this.creditApplicationPolicy; + } + + /** + * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to + * new invoices. The `mode` field determines the application behavior. + */ + public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { + this.creditApplicationPolicy = creditApplicationPolicy; + } + /** 3-letter ISO 4217 currency code. */ public String getCurrency() { return this.currency;