Skip to content

Commit cb1fa56

Browse files
author
Recurly Integrations
authored
Generated Latest Changes for v2021-02-25
1 parent 1331f57 commit cb1fa56

4 files changed

Lines changed: 243 additions & 1 deletion

File tree

openapi/api.yaml

Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,45 @@ paths:
14041404
not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
14051405
Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Deactivated
14061406
Account: %s\", account.Id)"
1407+
"/accounts/{account_id}/redact":
1408+
parameters:
1409+
- "$ref": "#/components/parameters/account_id"
1410+
put:
1411+
tags:
1412+
- account
1413+
operationId: redact_account
1414+
summary: Redact an account (GDPR Right to Erasure)
1415+
description: Permanently and irreversibly removes all personally identifiable
1416+
information (PII) from an account to fulfill a data subject's right to erasure
1417+
under GDPR and similar privacy regulations (e.g. CCPA). This includes billing
1418+
information, shipping addresses, and transaction details such as names, email
1419+
addresses, and payment card data. The underlying account and transaction records
1420+
are retained for financial and audit purposes, but all personal data fields
1421+
are cleared. The account must have no active subscriptions, uninvoiced charges,
1422+
or partially paid invoices before it can be redacted. Redaction is processed
1423+
asynchronously and cannot be undone.
1424+
responses:
1425+
'200':
1426+
description: Account has been accepted for redaction and will be processed
1427+
asynchronously.
1428+
content:
1429+
application/json:
1430+
schema:
1431+
"$ref": "#/components/schemas/Account"
1432+
'422':
1433+
description: Account cannot be redacted. Common reasons include active subscriptions,
1434+
uninvoiced charges, or partially paid invoices.
1435+
content:
1436+
application/json:
1437+
schema:
1438+
"$ref": "#/components/schemas/Error"
1439+
default:
1440+
description: Unexpected error.
1441+
content:
1442+
application/json:
1443+
schema:
1444+
"$ref": "#/components/schemas/Error"
1445+
x-code-samples: []
14071446
"/accounts/{account_id}/acquisition":
14081447
parameters:
14091448
- "$ref": "#/components/parameters/account_id"
@@ -6505,6 +6544,55 @@ paths:
65056544
schema:
65066545
"$ref": "#/components/schemas/Error"
65076546
x-code-samples: []
6547+
"/coupons/{coupon_id}/generate_sync":
6548+
post:
6549+
tags:
6550+
- unique_coupon_code
6551+
operationId: generate_unique_coupon_codes_sync
6552+
summary: Generate unique coupon codes synchronously
6553+
description: Generates up to 200 unique coupon codes for a bulk coupon and returns
6554+
them directly in the response. For larger batches, use the asynchronous generate
6555+
endpoint instead.
6556+
parameters:
6557+
- "$ref": "#/components/parameters/coupon_id"
6558+
requestBody:
6559+
content:
6560+
application/json:
6561+
schema:
6562+
"$ref": "#/components/schemas/CouponBulkCreateSync"
6563+
required: true
6564+
responses:
6565+
'200':
6566+
description: The newly generated unique coupon codes.
6567+
content:
6568+
application/json:
6569+
schema:
6570+
"$ref": "#/components/schemas/UniqueCouponCodeGenerationResponse"
6571+
'400':
6572+
description: Invalid or unpermitted parameter.
6573+
content:
6574+
application/json:
6575+
schema:
6576+
"$ref": "#/components/schemas/Error"
6577+
'404':
6578+
description: Incorrect site or coupon ID.
6579+
content:
6580+
application/json:
6581+
schema:
6582+
"$ref": "#/components/schemas/Error"
6583+
'422':
6584+
description: Unprocessable entity.
6585+
content:
6586+
application/json:
6587+
schema:
6588+
"$ref": "#/components/schemas/Error"
6589+
default:
6590+
description: Unexpected error.
6591+
content:
6592+
application/json:
6593+
schema:
6594+
"$ref": "#/components/schemas/Error"
6595+
x-code-samples: []
65086596
"/coupons/{coupon_id}/restore":
65096597
put:
65106598
tags:
@@ -19841,6 +19929,18 @@ components:
1984119929
description: The quantity of unique coupon codes to generate. A bulk coupon
1984219930
can have up to 100,000 unique codes (or your site's configured limit).
1984319931
minimum: 1
19932+
CouponBulkCreateSync:
19933+
type: object
19934+
properties:
19935+
number_of_unique_codes:
19936+
type: integer
19937+
title: Number of unique codes
19938+
description: The quantity of unique coupon codes to generate. A bulk coupon
19939+
can have up to 100,000 unique codes (or your site's configured limit).
19940+
minimum: 1
19941+
maximum: 200
19942+
required:
19943+
- number_of_unique_codes
1984419944
CouponMini:
1984519945
type: object
1984619946
properties:
@@ -25251,7 +25351,20 @@ components:
2525125351
transactions where fraud checks have already been performed on the
2525225352
initial transaction. Note that not all gateways support this feature.
2525325353
For Stripe, this skips Radar fraud rules; for Adyen, this skips
25254-
Risk checks.
25354+
skip_recurly_fraud:
25355+
type: boolean
25356+
title: Skip Recurly Fraud
25357+
description: When set to `true`, skips Recurly's fraud detection checks
25358+
for this transaction, including Kount and IP-based fraud screening.
25359+
Does not affect gateway-level fraud checks. Use `skip_all_fraud`
25360+
to skip all fraud checks.
25361+
skip_all_fraud:
25362+
type: boolean
25363+
title: Skip All Fraud
25364+
description: When set to `true`, skips all fraud checks for this transaction,
25365+
including both gateway-level fraud checks and Recurly's fraud detection
25366+
services. This is useful for trusted transactions where fraud screening
25367+
is not required.
2525525368
customer_notes:
2525625369
type: string
2525725370
title: Customer notes
@@ -25839,6 +25952,20 @@ components:
2583925952
type: string
2584025953
format: date-time
2584125954
description: When the external product was updated in Recurly.
25955+
UniqueCouponCodeGenerationResponse:
25956+
type: object
25957+
properties:
25958+
object:
25959+
type: string
25960+
title: Object type
25961+
readOnly: true
25962+
unique_coupon_codes:
25963+
type: array
25964+
title: Unique coupon codes
25965+
description: An array containing the newly generated unique coupon codes.
25966+
maxItems: 200
25967+
items:
25968+
"$ref": "#/components/schemas/UniqueCouponCode"
2584225969
ExternalSubscription:
2584325970
type: object
2584425971
description: Subscription from an external resource such as Apple App Store

src/main/java/com/recurly/v3/Client.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ public Account deactivateAccount(String accountId) {
141141
return this.makeRequest("DELETE", path, returnType);
142142
}
143143

144+
/**
145+
* Redact an account (GDPR Right to Erasure)
146+
*
147+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/redact_account">redact_account api documentation</a>
148+
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
149+
* @return Account has been accepted for redaction and will be processed asynchronously.
150+
*/
151+
public Account redactAccount(String accountId) {
152+
final String url = "/accounts/{account_id}/redact";
153+
final HashMap<String, String> urlParams = new HashMap<String, String>();
154+
urlParams.put("account_id", accountId);
155+
final String path = this.interpolatePath(url, urlParams);
156+
Type returnType = Account.class;
157+
return this.makeRequest("PUT", path, returnType);
158+
}
159+
144160
/**
145161
* Fetch an account's acquisition data
146162
*
@@ -1114,6 +1130,23 @@ public UniqueCouponCodeParams generateUniqueCouponCodes(String couponId, CouponB
11141130
return this.makeRequest("POST", path, body, returnType);
11151131
}
11161132

1133+
/**
1134+
* Generate unique coupon codes synchronously
1135+
*
1136+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes_sync">generate_unique_coupon_codes_sync api documentation</a>
1137+
* @param couponId Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.
1138+
* @param body The body of the request.
1139+
* @return The newly generated unique coupon codes.
1140+
*/
1141+
public UniqueCouponCodeGenerationResponse generateUniqueCouponCodesSync(String couponId, CouponBulkCreateSync body) {
1142+
final String url = "/coupons/{coupon_id}/generate_sync";
1143+
final HashMap<String, String> urlParams = new HashMap<String, String>();
1144+
urlParams.put("coupon_id", couponId);
1145+
final String path = this.interpolatePath(url, urlParams);
1146+
Type returnType = UniqueCouponCodeGenerationResponse.class;
1147+
return this.makeRequest("POST", path, body, returnType);
1148+
}
1149+
11171150
/**
11181151
* Restore an inactive coupon
11191152
*
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.requests;
7+
8+
import com.google.gson.annotations.Expose;
9+
import com.google.gson.annotations.SerializedName;
10+
import com.recurly.v3.Request;
11+
import com.recurly.v3.resources.*;
12+
13+
public class CouponBulkCreateSync extends Request {
14+
15+
/**
16+
* The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique
17+
* codes (or your site's configured limit).
18+
*/
19+
@SerializedName("number_of_unique_codes")
20+
@Expose
21+
private Integer numberOfUniqueCodes;
22+
23+
/**
24+
* The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique
25+
* codes (or your site's configured limit).
26+
*/
27+
public Integer getNumberOfUniqueCodes() {
28+
return this.numberOfUniqueCodes;
29+
}
30+
31+
/**
32+
* @param numberOfUniqueCodes The quantity of unique coupon codes to generate. A bulk coupon can
33+
* have up to 100,000 unique codes (or your site's configured limit).
34+
*/
35+
public void setNumberOfUniqueCodes(final Integer numberOfUniqueCodes) {
36+
this.numberOfUniqueCodes = numberOfUniqueCodes;
37+
}
38+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* This file is automatically created by Recurly's OpenAPI generation process and thus any edits you
3+
* make by hand will be lost. If you wish to make a change to this file, please create a Github
4+
* issue explaining the changes you need and we will usher them to the appropriate places.
5+
*/
6+
package com.recurly.v3.resources;
7+
8+
import com.google.gson.annotations.Expose;
9+
import com.google.gson.annotations.SerializedName;
10+
import com.recurly.v3.Resource;
11+
import java.util.List;
12+
13+
public class UniqueCouponCodeGenerationResponse extends Resource {
14+
15+
/** Object type */
16+
@SerializedName("object")
17+
@Expose
18+
private String object;
19+
20+
/** An array containing the newly generated unique coupon codes. */
21+
@SerializedName("unique_coupon_codes")
22+
@Expose
23+
private List<UniqueCouponCode> uniqueCouponCodes;
24+
25+
/** Object type */
26+
public String getObject() {
27+
return this.object;
28+
}
29+
30+
/** @param object Object type */
31+
public void setObject(final String object) {
32+
this.object = object;
33+
}
34+
35+
/** An array containing the newly generated unique coupon codes. */
36+
public List<UniqueCouponCode> getUniqueCouponCodes() {
37+
return this.uniqueCouponCodes;
38+
}
39+
40+
/** @param uniqueCouponCodes An array containing the newly generated unique coupon codes. */
41+
public void setUniqueCouponCodes(final List<UniqueCouponCode> uniqueCouponCodes) {
42+
this.uniqueCouponCodes = uniqueCouponCodes;
43+
}
44+
}

0 commit comments

Comments
 (0)