From a063dedcd21e566113d39364ee7a1317188fa89e Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Tue, 3 Feb 2026 22:49:06 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 181 +++++++++++++++++- src/main/java/com/recurly/v3/Client.java | 72 +++++++ src/main/java/com/recurly/v3/Constants.java | 44 +++++ .../v3/requests/CreditApplicationPolicy.java | 27 +++ .../recurly/v3/requests/InvoiceCreate.java | 9 +- .../recurly/v3/requests/PurchaseCreate.java | 10 +- .../v3/requests/SubscriptionCreate.java | 9 +- .../v3/requests/SubscriptionPurchase.java | 9 +- .../v3/requests/SubscriptionUpdate.java | 9 +- .../v3/resources/CouponRedemption.java | 22 +++ .../v3/resources/CreditApplicationPolicy.java | 27 +++ .../v3/resources/InvoiceCollection.java | 18 ++ .../recurly/v3/resources/Subscription.java | 9 +- 13 files changed, 427 insertions(+), 19 deletions(-) diff --git a/openapi/api.yaml b/openapi/api.yaml index bcc620f0..5e94bcf3 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -3312,6 +3312,70 @@ paths: {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\n\nfmt.Printf(\"Removed Coupon Redemption: %v\", couponRedemption.Id)" + "/accounts/{account_id}/coupon_redemptions/{coupon_redemption_id}": + get: + tags: + - coupon_redemption + operationId: get_coupon_redemption + summary: Show the coupon redemption + parameters: + - "$ref": "#/components/parameters/account_id" + - "$ref": "#/components/parameters/coupon_redemption_id" + responses: + '200': + description: A coupon redemption. + content: + application/json: + schema: + "$ref": "#/components/schemas/CouponRedemption" + '404': + description: Incorrect site, account ID, or coupon redemption ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + delete: + tags: + - coupon_redemption + operationId: remove_coupon_redemption_by_id + summary: Delete the coupon redemption + description: Deactivate the coupon redemption on an account. + parameters: + - "$ref": "#/components/parameters/account_id" + - "$ref": "#/components/parameters/coupon_redemption_id" + responses: + '200': + description: Coupon redemption deleted. + content: + application/json: + schema: + "$ref": "#/components/schemas/CouponRedemption" + '404': + description: Incorrect site, account ID, or coupon redemption ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: The coupon redemption is already expired or inactive. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/accounts/{account_id}/credit_payments": get: tags: @@ -14749,6 +14813,70 @@ paths: e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, redemption := range subCouponRedemptions.Data() {\n\t\tfmt.Printf(\"Subscription Coupon Redemption %3d: %s\\n\",\n\t\t\ti,\n\t\t\tredemption.Id,\n\t\t)\n\t}\n}" + "/subscriptions/{subscription_id}/coupon_redemptions/{coupon_redemption_id}": + get: + tags: + - coupon_redemption + operationId: get_subscription_coupon_redemption + summary: Show the coupon redemption for a subscription + parameters: + - "$ref": "#/components/parameters/subscription_id" + - "$ref": "#/components/parameters/coupon_redemption_id" + responses: + '200': + description: The coupon redemption on a subscription. + content: + application/json: + schema: + "$ref": "#/components/schemas/CouponRedemption" + '404': + description: Incorrect site, subscription ID, or coupon redemption ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] + delete: + tags: + - coupon_redemption + operationId: remove_subscription_coupon_redemption + summary: Delete the coupon redemption from a subscription + description: Deactivate the coupon redemption on a subscription. + parameters: + - "$ref": "#/components/parameters/subscription_id" + - "$ref": "#/components/parameters/coupon_redemption_id" + responses: + '200': + description: Coupon redemption deleted. + content: + application/json: + schema: + "$ref": "#/components/schemas/CouponRedemption" + '404': + description: Incorrect site, subscription ID, or coupon redemption ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: The coupon redemption is already expired or inactive. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/subscriptions/{subscription_id}/add_ons/{add_on_id}/usage": get: tags: @@ -17051,6 +17179,14 @@ components: required: true schema: type: string + coupon_redemption_id: + name: coupon_redemption_id + in: path + description: Coupon Redemption ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. + For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + required: true + schema: + type: string credit_payment_id: name: credit_payment_id in: path @@ -19754,6 +19890,13 @@ components: title: Object type description: Will always be `coupon`. readOnly: true + uuid: + type: string + title: Recurly UUID + description: The UUID is useful for matching data with the CSV exports and + building URLs into Recurly's UI. + maxLength: 32 + readOnly: true account: type: object title: Account @@ -20974,6 +21117,13 @@ components: title: Credit invoices items: "$ref": "#/components/schemas/Invoice" + verification_transactions: + type: array + title: Verification transactions + description: Verification transactions (used for free trial payment method + validation) + items: + "$ref": "#/components/schemas/Transaction" InvoiceUpdate: type: object properties: @@ -27104,10 +27254,20 @@ components: title: Credit Application Policy description: | Controls whether credit invoices are automatically applied to new invoices. - The `mode` field determines the application behavior. + The `mode` field determines the application behavior. When mode is `all`, + the optional `allowed_origins` array can restrict which credit invoice origins + are applied. properties: mode: "$ref": "#/components/schemas/CreditApplicationModeEnum" + allowed_origins: + type: array + description: | + Optional array of credit invoice origin types to allow when mode is `all`. + If not specified when mode is `all`, credits from all origins are applied. + Only valid when mode is `all`. + items: + "$ref": "#/components/schemas/CreditApplicationAllowedOriginTypeEnum" required: - mode CreditApplicationModeEnum: @@ -27121,6 +27281,25 @@ components: - all - none default: all + CreditApplicationAllowedOriginTypeEnum: + type: string + title: Credit Application Allowed Origin Type + description: The origin type of a credit invoice that can be allowed in a credit + application policy + enum: + - line_item_refund + - open_amount_refund + - immediate_change + - termination + - credit + - write_off + - refund + - external_refund + - carryforward_credit + - usage_correction + - prepayment + - gift_card + - carryforward_gift_credit InvoiceRefundTypeEnum: type: string enum: diff --git a/src/main/java/com/recurly/v3/Client.java b/src/main/java/com/recurly/v3/Client.java index 9f276673..c0494352 100644 --- a/src/main/java/com/recurly/v3/Client.java +++ b/src/main/java/com/recurly/v3/Client.java @@ -530,6 +530,42 @@ public CouponRedemption removeCouponRedemption(String accountId) { return this.makeRequest("DELETE", path, returnType); } + /** + * Show the coupon redemption + * + * @see get_coupon_redemption api documentation + * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param couponRedemptionId Coupon Redemption ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @return A coupon redemption. + */ + public CouponRedemption getCouponRedemption(String accountId, String couponRedemptionId) { + final String url = "/accounts/{account_id}/coupon_redemptions/{coupon_redemption_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("account_id", accountId); + urlParams.put("coupon_redemption_id", couponRedemptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = CouponRedemption.class; + return this.makeRequest("GET", path, returnType); + } + + /** + * Delete the coupon redemption + * + * @see remove_coupon_redemption_by_id api documentation + * @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param couponRedemptionId Coupon Redemption ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @return Coupon redemption deleted. + */ + public CouponRedemption removeCouponRedemptionById(String accountId, String couponRedemptionId) { + final String url = "/accounts/{account_id}/coupon_redemptions/{coupon_redemption_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("account_id", accountId); + urlParams.put("coupon_redemption_id", couponRedemptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = CouponRedemption.class; + return this.makeRequest("DELETE", path, returnType); + } + /** * List an account's credit payments * @@ -2694,6 +2730,42 @@ public Pager listSubscriptionCouponRedemptions(String subscrip return new Pager<>(path, paramsMap, this, parameterizedType); } + /** + * Show the coupon redemption for a subscription + * + * @see get_subscription_coupon_redemption api documentation + * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @param couponRedemptionId Coupon Redemption ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @return The coupon redemption on a subscription. + */ + public CouponRedemption getSubscriptionCouponRedemption(String subscriptionId, String couponRedemptionId) { + final String url = "/subscriptions/{subscription_id}/coupon_redemptions/{coupon_redemption_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("subscription_id", subscriptionId); + urlParams.put("coupon_redemption_id", couponRedemptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = CouponRedemption.class; + return this.makeRequest("GET", path, returnType); + } + + /** + * Delete the coupon redemption from a subscription + * + * @see remove_subscription_coupon_redemption api documentation + * @param subscriptionId Subscription ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @param couponRedemptionId Coupon Redemption ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`. + * @return Coupon redemption deleted. + */ + public CouponRedemption removeSubscriptionCouponRedemption(String subscriptionId, String couponRedemptionId) { + final String url = "/subscriptions/{subscription_id}/coupon_redemptions/{coupon_redemption_id}"; + final HashMap urlParams = new HashMap(); + urlParams.put("subscription_id", subscriptionId); + urlParams.put("coupon_redemption_id", couponRedemptionId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = CouponRedemption.class; + return this.makeRequest("DELETE", path, returnType); + } + /** * List a subscription add-on's usage records * diff --git a/src/main/java/com/recurly/v3/Constants.java b/src/main/java/com/recurly/v3/Constants.java index a844f8e4..4aef3f39 100644 --- a/src/main/java/com/recurly/v3/Constants.java +++ b/src/main/java/com/recurly/v3/Constants.java @@ -887,6 +887,50 @@ public enum CreditApplicationMode { }; + public enum CreditApplicationAllowedOriginType { + UNDEFINED, + + @SerializedName("line_item_refund") + LINE_ITEM_REFUND, + + @SerializedName("open_amount_refund") + OPEN_AMOUNT_REFUND, + + @SerializedName("immediate_change") + IMMEDIATE_CHANGE, + + @SerializedName("termination") + TERMINATION, + + @SerializedName("credit") + CREDIT, + + @SerializedName("write_off") + WRITE_OFF, + + @SerializedName("refund") + REFUND, + + @SerializedName("external_refund") + EXTERNAL_REFUND, + + @SerializedName("carryforward_credit") + CARRYFORWARD_CREDIT, + + @SerializedName("usage_correction") + USAGE_CORRECTION, + + @SerializedName("prepayment") + PREPAYMENT, + + @SerializedName("gift_card") + GIFT_CARD, + + @SerializedName("carryforward_gift_credit") + CARRYFORWARD_GIFT_CREDIT, + + }; + 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 index 6976f3fc..31196524 100644 --- a/src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java +++ b/src/main/java/com/recurly/v3/requests/CreditApplicationPolicy.java @@ -10,9 +10,18 @@ import com.recurly.v3.Constants; import com.recurly.v3.Request; import com.recurly.v3.resources.*; +import java.util.List; public class CreditApplicationPolicy extends Request { + /** + * Optional array of credit invoice origin types to allow when mode is `all`. If not specified + * when mode is `all`, credits from all origins are applied. Only valid when mode is `all`. + */ + @SerializedName("allowed_origins") + @Expose + private List allowedOrigins; + /** * Determines which credit invoices are applied to invoices: - `all`: All available credit * invoices are applied (default) - `none`: No credit invoices are applied automatically @@ -21,6 +30,24 @@ public class CreditApplicationPolicy extends Request { @Expose private Constants.CreditApplicationMode mode; + /** + * Optional array of credit invoice origin types to allow when mode is `all`. If not specified + * when mode is `all`, credits from all origins are applied. Only valid when mode is `all`. + */ + public List getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + * @param allowedOrigins Optional array of credit invoice origin types to allow when mode is + * `all`. If not specified when mode is `all`, credits from all origins are applied. Only + * valid when mode is `all`. + */ + public void setAllowedOrigins( + final List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + } + /** * Determines which credit invoices are applied to invoices: - `all`: All available credit * invoices are applied (default) - `none`: No credit invoices are applied automatically diff --git a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java index ec713111..690f2b4e 100644 --- a/src/main/java/com/recurly/v3/requests/InvoiceCreate.java +++ b/src/main/java/com/recurly/v3/requests/InvoiceCreate.java @@ -54,7 +54,8 @@ public class InvoiceCreate extends Request { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy") @Expose @@ -219,7 +220,8 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicy() { return this.creditApplicationPolicy; @@ -227,7 +229,8 @@ public CreditApplicationPolicy getCreditApplicationPolicy() { /** * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to - * new invoices. The `mode` field determines the application behavior. + * new invoices. The `mode` field determines the application behavior. When mode is `all`, the + * optional `allowed_origins` array can restrict which credit invoice origins are applied. */ public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { this.creditApplicationPolicy = creditApplicationPolicy; diff --git a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java index 73efeaef..dff0959a 100644 --- a/src/main/java/com/recurly/v3/requests/PurchaseCreate.java +++ b/src/main/java/com/recurly/v3/requests/PurchaseCreate.java @@ -66,7 +66,8 @@ public class PurchaseCreate extends Request { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy_override") @Expose @@ -292,7 +293,8 @@ public void setCouponCodes(final List couponCodes) { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicyOverride() { return this.creditApplicationPolicyOverride; @@ -300,7 +302,9 @@ public CreditApplicationPolicy getCreditApplicationPolicyOverride() { /** * @param creditApplicationPolicyOverride Controls whether credit invoices are automatically - * applied to new invoices. The `mode` field determines the application behavior. + * applied to new invoices. The `mode` field determines the application behavior. When mode is + * `all`, the optional `allowed_origins` array can restrict which credit invoice origins are + * applied. */ public void setCreditApplicationPolicyOverride( final CreditApplicationPolicy creditApplicationPolicyOverride) { diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java index 7fd5e0ab..814dfc22 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionCreate.java @@ -82,7 +82,8 @@ public class SubscriptionCreate extends Request { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy") @Expose @@ -438,7 +439,8 @@ public void setCouponCodes(final List couponCodes) { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicy() { return this.creditApplicationPolicy; @@ -446,7 +448,8 @@ public CreditApplicationPolicy getCreditApplicationPolicy() { /** * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to - * new invoices. The `mode` field determines the application behavior. + * new invoices. The `mode` field determines the application behavior. When mode is `all`, the + * optional `allowed_origins` array can restrict which credit invoice origins are applied. */ public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { this.creditApplicationPolicy = creditApplicationPolicy; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java index b9c6525b..f835afb0 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionPurchase.java @@ -36,7 +36,8 @@ public class SubscriptionPurchase extends Request { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy") @Expose @@ -197,7 +198,8 @@ public void setBulk(final Boolean bulk) { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicy() { return this.creditApplicationPolicy; @@ -205,7 +207,8 @@ public CreditApplicationPolicy getCreditApplicationPolicy() { /** * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to - * new invoices. The `mode` field determines the application behavior. + * new invoices. The `mode` field determines the application behavior. When mode is `all`, the + * optional `allowed_origins` array can restrict which credit invoice origins are applied. */ public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { this.creditApplicationPolicy = creditApplicationPolicy; diff --git a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java index 7100cbba..b1bd0e06 100644 --- a/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java +++ b/src/main/java/com/recurly/v3/requests/SubscriptionUpdate.java @@ -37,7 +37,8 @@ public class SubscriptionUpdate extends Request { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy") @Expose @@ -200,7 +201,8 @@ public void setCollectionMethod(final Constants.CollectionMethod collectionMetho /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicy() { return this.creditApplicationPolicy; @@ -208,7 +210,8 @@ public CreditApplicationPolicy getCreditApplicationPolicy() { /** * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to - * new invoices. The `mode` field determines the application behavior. + * new invoices. The `mode` field determines the application behavior. When mode is `all`, the + * optional `allowed_origins` array can restrict which credit invoice origins are applied. */ public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { this.creditApplicationPolicy = creditApplicationPolicy; diff --git a/src/main/java/com/recurly/v3/resources/CouponRedemption.java b/src/main/java/com/recurly/v3/resources/CouponRedemption.java index 8c069377..5fcba8d9 100644 --- a/src/main/java/com/recurly/v3/resources/CouponRedemption.java +++ b/src/main/java/com/recurly/v3/resources/CouponRedemption.java @@ -70,6 +70,13 @@ public class CouponRedemption extends Resource { @Expose private DateTime updatedAt; + /** + * The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. + */ + @SerializedName("uuid") + @Expose + private String uuid; + /** The Account on which the coupon was applied. */ public AccountMini getAccount() { return this.account; @@ -185,4 +192,19 @@ public DateTime getUpdatedAt() { public void setUpdatedAt(final DateTime updatedAt) { this.updatedAt = updatedAt; } + + /** + * The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI. + */ + public String getUuid() { + return this.uuid; + } + + /** + * @param uuid The UUID is useful for matching data with the CSV exports and building URLs into + * Recurly's UI. + */ + public void setUuid(final String uuid) { + this.uuid = uuid; + } } diff --git a/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java b/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java index 4134eaee..af47cb67 100644 --- a/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java +++ b/src/main/java/com/recurly/v3/resources/CreditApplicationPolicy.java @@ -9,9 +9,18 @@ import com.google.gson.annotations.SerializedName; import com.recurly.v3.Constants; import com.recurly.v3.Resource; +import java.util.List; public class CreditApplicationPolicy extends Resource { + /** + * Optional array of credit invoice origin types to allow when mode is `all`. If not specified + * when mode is `all`, credits from all origins are applied. Only valid when mode is `all`. + */ + @SerializedName("allowed_origins") + @Expose + private List allowedOrigins; + /** * Determines which credit invoices are applied to invoices: - `all`: All available credit * invoices are applied (default) - `none`: No credit invoices are applied automatically @@ -20,6 +29,24 @@ public class CreditApplicationPolicy extends Resource { @Expose private Constants.CreditApplicationMode mode; + /** + * Optional array of credit invoice origin types to allow when mode is `all`. If not specified + * when mode is `all`, credits from all origins are applied. Only valid when mode is `all`. + */ + public List getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + * @param allowedOrigins Optional array of credit invoice origin types to allow when mode is + * `all`. If not specified when mode is `all`, credits from all origins are applied. Only + * valid when mode is `all`. + */ + public void setAllowedOrigins( + final List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + } + /** * Determines which credit invoices are applied to invoices: - `all`: All available credit * invoices are applied (default) - `none`: No credit invoices are applied automatically diff --git a/src/main/java/com/recurly/v3/resources/InvoiceCollection.java b/src/main/java/com/recurly/v3/resources/InvoiceCollection.java index c0baf872..fe939536 100644 --- a/src/main/java/com/recurly/v3/resources/InvoiceCollection.java +++ b/src/main/java/com/recurly/v3/resources/InvoiceCollection.java @@ -26,6 +26,11 @@ public class InvoiceCollection extends Resource { @Expose private String object; + /** Verification transactions (used for free trial payment method validation) */ + @SerializedName("verification_transactions") + @Expose + private List verificationTransactions; + public Invoice getChargeInvoice() { return this.chargeInvoice; } @@ -54,4 +59,17 @@ public String getObject() { public void setObject(final String object) { this.object = object; } + + /** Verification transactions (used for free trial payment method validation) */ + public List getVerificationTransactions() { + return this.verificationTransactions; + } + + /** + * @param verificationTransactions Verification transactions (used for free trial payment method + * validation) + */ + public void setVerificationTransactions(final List verificationTransactions) { + this.verificationTransactions = verificationTransactions; + } } diff --git a/src/main/java/com/recurly/v3/resources/Subscription.java b/src/main/java/com/recurly/v3/resources/Subscription.java index 1b9235be..41b30edd 100644 --- a/src/main/java/com/recurly/v3/resources/Subscription.java +++ b/src/main/java/com/recurly/v3/resources/Subscription.java @@ -103,7 +103,8 @@ public class Subscription extends Resource { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ @SerializedName("credit_application_policy") @Expose @@ -539,7 +540,8 @@ public void setCreatedAt(final DateTime createdAt) { /** * Controls whether credit invoices are automatically applied to new invoices. The `mode` field - * determines the application behavior. + * determines the application behavior. When mode is `all`, the optional `allowed_origins` array + * can restrict which credit invoice origins are applied. */ public CreditApplicationPolicy getCreditApplicationPolicy() { return this.creditApplicationPolicy; @@ -547,7 +549,8 @@ public CreditApplicationPolicy getCreditApplicationPolicy() { /** * @param creditApplicationPolicy Controls whether credit invoices are automatically applied to - * new invoices. The `mode` field determines the application behavior. + * new invoices. The `mode` field determines the application behavior. When mode is `all`, the + * optional `allowed_origins` array can restrict which credit invoice origins are applied. */ public void setCreditApplicationPolicy(final CreditApplicationPolicy creditApplicationPolicy) { this.creditApplicationPolicy = creditApplicationPolicy;