Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,15 @@ paths:
and cancels any active subscriptions (canceled subscriptions will remain active
until the end of the current billing cycle before expiring). We recommend
closing accounts only when all business is concluded with a customer.
parameters:
- in: query
name: redact
schema:
type: boolean
description: Permanently removes all personally identifiable information (PII)
from this account after it has been deactivated, to fulfill a data subject's
right to erasure under GDPR and similar privacy regulations (e.g. CCPA).
Cannot be undone.
responses:
'200':
description: An account.
Expand Down Expand Up @@ -1404,6 +1413,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"
Expand Down Expand Up @@ -25251,7 +25299,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
Expand Down
23 changes: 21 additions & 2 deletions src/main/java/com/recurly/v3/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,34 @@ public Account updateAccount(String accountId, AccountUpdate body) {
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/deactivate_account">deactivate_account api documentation</a>
* @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 queryParams The {@link QueryParams} for this endpoint.
* @return An account.
*/
public Account deactivateAccount(String accountId) {
public Account deactivateAccount(String accountId, QueryParams queryParams) {
final String url = "/accounts/{account_id}";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("account_id", accountId);
if (queryParams == null) queryParams = new QueryParams();
final HashMap<String, Object> paramsMap = queryParams.getParams();
final String path = this.interpolatePath(url, urlParams);
Type returnType = Account.class;
return this.makeRequest("DELETE", path, returnType);
return this.makeRequest("DELETE", path, paramsMap, returnType);
}

/**
* Redact an account (GDPR Right to Erasure)
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/redact_account">redact_account api documentation</a>
* @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<String, String> urlParams = new HashMap<String, String>();
urlParams.put("account_id", accountId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = Account.class;
return this.makeRequest("PUT", path, returnType);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/recurly/v3/QueryParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public void setPastDue(final Constants.True pastDue) {
this.add("past_due", pastDue);
}

public void setRedact(final Boolean redact) {
this.add("redact", redact);
}

public void setType(final Constants.FilterInvoiceType type) {
this.add("type", type);
}
Expand Down
Loading