From cb1fa5661e0fd6593b53dde1cf31e6454b425d80 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Wed, 15 Apr 2026 16:33:44 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- openapi/api.yaml | 129 +++++++++++++++++- src/main/java/com/recurly/v3/Client.java | 33 +++++ .../v3/requests/CouponBulkCreateSync.java | 38 ++++++ .../UniqueCouponCodeGenerationResponse.java | 44 ++++++ 4 files changed, 243 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/recurly/v3/requests/CouponBulkCreateSync.java create mode 100644 src/main/java/com/recurly/v3/resources/UniqueCouponCodeGenerationResponse.java diff --git a/openapi/api.yaml b/openapi/api.yaml index dc43a64..d03de76 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -1404,6 +1404,45 @@ paths: not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Deactivated Account: %s\", account.Id)" + "/accounts/{account_id}/redact": + parameters: + - "$ref": "#/components/parameters/account_id" + put: + tags: + - account + operationId: redact_account + summary: Redact an account (GDPR Right to Erasure) + description: Permanently and irreversibly removes all personally identifiable + information (PII) from an account to fulfill a data subject's right to erasure + under GDPR and similar privacy regulations (e.g. CCPA). This includes billing + information, shipping addresses, and transaction details such as names, email + addresses, and payment card data. The underlying account and transaction records + are retained for financial and audit purposes, but all personal data fields + are cleared. The account must have no active subscriptions, uninvoiced charges, + or partially paid invoices before it can be redacted. Redaction is processed + asynchronously and cannot be undone. + responses: + '200': + description: Account has been accepted for redaction and will be processed + asynchronously. + content: + application/json: + schema: + "$ref": "#/components/schemas/Account" + '422': + description: Account cannot be redacted. Common reasons include active subscriptions, + uninvoiced charges, or partially paid invoices. + 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}/acquisition": parameters: - "$ref": "#/components/parameters/account_id" @@ -6505,6 +6544,55 @@ paths: schema: "$ref": "#/components/schemas/Error" x-code-samples: [] + "/coupons/{coupon_id}/generate_sync": + post: + tags: + - unique_coupon_code + operationId: generate_unique_coupon_codes_sync + summary: Generate unique coupon codes synchronously + description: Generates up to 200 unique coupon codes for a bulk coupon and returns + them directly in the response. For larger batches, use the asynchronous generate + endpoint instead. + parameters: + - "$ref": "#/components/parameters/coupon_id" + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/CouponBulkCreateSync" + required: true + responses: + '200': + description: The newly generated unique coupon codes. + content: + application/json: + schema: + "$ref": "#/components/schemas/UniqueCouponCodeGenerationResponse" + '400': + description: Invalid or unpermitted parameter. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '404': + description: Incorrect site or coupon ID. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + '422': + description: Unprocessable entity. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + default: + description: Unexpected error. + content: + application/json: + schema: + "$ref": "#/components/schemas/Error" + x-code-samples: [] "/coupons/{coupon_id}/restore": put: tags: @@ -19841,6 +19929,18 @@ components: description: The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique codes (or your site's configured limit). minimum: 1 + CouponBulkCreateSync: + type: object + properties: + number_of_unique_codes: + type: integer + title: Number of unique codes + description: The quantity of unique coupon codes to generate. A bulk coupon + can have up to 100,000 unique codes (or your site's configured limit). + minimum: 1 + maximum: 200 + required: + - number_of_unique_codes CouponMini: type: object properties: @@ -25251,7 +25351,20 @@ components: transactions where fraud checks have already been performed on the initial transaction. Note that not all gateways support this feature. For Stripe, this skips Radar fraud rules; for Adyen, this skips - Risk checks. + skip_recurly_fraud: + type: boolean + title: Skip Recurly Fraud + description: When set to `true`, skips Recurly's fraud detection checks + for this transaction, including Kount and IP-based fraud screening. + Does not affect gateway-level fraud checks. Use `skip_all_fraud` + to skip all fraud checks. + skip_all_fraud: + type: boolean + title: Skip All Fraud + description: When set to `true`, skips all fraud checks for this transaction, + including both gateway-level fraud checks and Recurly's fraud detection + services. This is useful for trusted transactions where fraud screening + is not required. customer_notes: type: string title: Customer notes @@ -25839,6 +25952,20 @@ components: type: string format: date-time description: When the external product was updated in Recurly. + UniqueCouponCodeGenerationResponse: + type: object + properties: + object: + type: string + title: Object type + readOnly: true + unique_coupon_codes: + type: array + title: Unique coupon codes + description: An array containing the newly generated unique coupon codes. + maxItems: 200 + items: + "$ref": "#/components/schemas/UniqueCouponCode" ExternalSubscription: type: object description: Subscription from an external resource such as Apple App Store diff --git a/src/main/java/com/recurly/v3/Client.java b/src/main/java/com/recurly/v3/Client.java index c049435..4860c5e 100644 --- a/src/main/java/com/recurly/v3/Client.java +++ b/src/main/java/com/recurly/v3/Client.java @@ -141,6 +141,22 @@ public Account deactivateAccount(String accountId) { return this.makeRequest("DELETE", path, returnType); } + /** + * Redact an account (GDPR Right to Erasure) + * + * @see redact_account 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`. + * @return Account has been accepted for redaction and will be processed asynchronously. + */ + public Account redactAccount(String accountId) { + final String url = "/accounts/{account_id}/redact"; + final HashMap urlParams = new HashMap(); + urlParams.put("account_id", accountId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = Account.class; + return this.makeRequest("PUT", path, returnType); + } + /** * Fetch an account's acquisition data * @@ -1114,6 +1130,23 @@ public UniqueCouponCodeParams generateUniqueCouponCodes(String couponId, CouponB return this.makeRequest("POST", path, body, returnType); } + /** + * Generate unique coupon codes synchronously + * + * @see generate_unique_coupon_codes_sync api documentation + * @param couponId Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. + * @param body The body of the request. + * @return The newly generated unique coupon codes. + */ + public UniqueCouponCodeGenerationResponse generateUniqueCouponCodesSync(String couponId, CouponBulkCreateSync body) { + final String url = "/coupons/{coupon_id}/generate_sync"; + final HashMap urlParams = new HashMap(); + urlParams.put("coupon_id", couponId); + final String path = this.interpolatePath(url, urlParams); + Type returnType = UniqueCouponCodeGenerationResponse.class; + return this.makeRequest("POST", path, body, returnType); + } + /** * Restore an inactive coupon * diff --git a/src/main/java/com/recurly/v3/requests/CouponBulkCreateSync.java b/src/main/java/com/recurly/v3/requests/CouponBulkCreateSync.java new file mode 100644 index 0000000..18712c8 --- /dev/null +++ b/src/main/java/com/recurly/v3/requests/CouponBulkCreateSync.java @@ -0,0 +1,38 @@ +/** + * 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.Request; +import com.recurly.v3.resources.*; + +public class CouponBulkCreateSync extends Request { + + /** + * The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique + * codes (or your site's configured limit). + */ + @SerializedName("number_of_unique_codes") + @Expose + private Integer numberOfUniqueCodes; + + /** + * The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique + * codes (or your site's configured limit). + */ + public Integer getNumberOfUniqueCodes() { + return this.numberOfUniqueCodes; + } + + /** + * @param numberOfUniqueCodes The quantity of unique coupon codes to generate. A bulk coupon can + * have up to 100,000 unique codes (or your site's configured limit). + */ + public void setNumberOfUniqueCodes(final Integer numberOfUniqueCodes) { + this.numberOfUniqueCodes = numberOfUniqueCodes; + } +} diff --git a/src/main/java/com/recurly/v3/resources/UniqueCouponCodeGenerationResponse.java b/src/main/java/com/recurly/v3/resources/UniqueCouponCodeGenerationResponse.java new file mode 100644 index 0000000..7cac565 --- /dev/null +++ b/src/main/java/com/recurly/v3/resources/UniqueCouponCodeGenerationResponse.java @@ -0,0 +1,44 @@ +/** + * 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.Resource; +import java.util.List; + +public class UniqueCouponCodeGenerationResponse extends Resource { + + /** Object type */ + @SerializedName("object") + @Expose + private String object; + + /** An array containing the newly generated unique coupon codes. */ + @SerializedName("unique_coupon_codes") + @Expose + private List uniqueCouponCodes; + + /** Object type */ + public String getObject() { + return this.object; + } + + /** @param object Object type */ + public void setObject(final String object) { + this.object = object; + } + + /** An array containing the newly generated unique coupon codes. */ + public List getUniqueCouponCodes() { + return this.uniqueCouponCodes; + } + + /** @param uniqueCouponCodes An array containing the newly generated unique coupon codes. */ + public void setUniqueCouponCodes(final List uniqueCouponCodes) { + this.uniqueCouponCodes = uniqueCouponCodes; + } +}