Skip to content

Commit 4a74868

Browse files
author
Recurly Integrations
authored
Generated Latest Changes for v2021-02-25
1 parent 5fd1e7e commit 4a74868

2 files changed

Lines changed: 90 additions & 1 deletion

File tree

openapi/api.yaml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,15 @@ paths:
12971297
and cancels any active subscriptions (canceled subscriptions will remain active
12981298
until the end of the current billing cycle before expiring). We recommend
12991299
closing accounts only when all business is concluded with a customer.
1300+
parameters:
1301+
- in: query
1302+
name: redact
1303+
schema:
1304+
type: boolean
1305+
description: Permanently removes all personally identifiable information (PII)
1306+
from this account after it has been deactivated, to fulfill a data subject's
1307+
right to erasure under GDPR and similar privacy regulations (e.g. CCPA).
1308+
Cannot be undone.
13001309
responses:
13011310
'200':
13021311
description: An account.
@@ -1404,6 +1413,45 @@ paths:
14041413
not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected
14051414
Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Deactivated
14061415
Account: %s\", account.Id)"
1416+
"/accounts/{account_id}/redact":
1417+
parameters:
1418+
- "$ref": "#/components/parameters/account_id"
1419+
put:
1420+
tags:
1421+
- account
1422+
operationId: redact_account
1423+
summary: Redact an account (GDPR Right to Erasure)
1424+
description: Permanently and irreversibly removes all personally identifiable
1425+
information (PII) from an account to fulfill a data subject's right to erasure
1426+
under GDPR and similar privacy regulations (e.g. CCPA). This includes billing
1427+
information, shipping addresses, and transaction details such as names, email
1428+
addresses, and payment card data. The underlying account and transaction records
1429+
are retained for financial and audit purposes, but all personal data fields
1430+
are cleared. The account must have no active subscriptions, uninvoiced charges,
1431+
or partially paid invoices before it can be redacted. Redaction is processed
1432+
asynchronously and cannot be undone.
1433+
responses:
1434+
'200':
1435+
description: Account has been accepted for redaction and will be processed
1436+
asynchronously.
1437+
content:
1438+
application/json:
1439+
schema:
1440+
"$ref": "#/components/schemas/Account"
1441+
'422':
1442+
description: Account cannot be redacted. Common reasons include active subscriptions,
1443+
uninvoiced charges, or partially paid invoices.
1444+
content:
1445+
application/json:
1446+
schema:
1447+
"$ref": "#/components/schemas/Error"
1448+
default:
1449+
description: Unexpected error.
1450+
content:
1451+
application/json:
1452+
schema:
1453+
"$ref": "#/components/schemas/Error"
1454+
x-code-samples: []
14071455
"/accounts/{account_id}/acquisition":
14081456
parameters:
14091457
- "$ref": "#/components/parameters/account_id"
@@ -25251,7 +25299,20 @@ components:
2525125299
transactions where fraud checks have already been performed on the
2525225300
initial transaction. Note that not all gateways support this feature.
2525325301
For Stripe, this skips Radar fraud rules; for Adyen, this skips
25254-
Risk checks.
25302+
skip_recurly_fraud:
25303+
type: boolean
25304+
title: Skip Recurly Fraud
25305+
description: When set to `true`, skips Recurly's fraud detection checks
25306+
for this transaction, including Kount and IP-based fraud screening.
25307+
Does not affect gateway-level fraud checks. Use `skip_all_fraud`
25308+
to skip all fraud checks.
25309+
skip_all_fraud:
25310+
type: boolean
25311+
title: Skip All Fraud
25312+
description: When set to `true`, skips all fraud checks for this transaction,
25313+
including both gateway-level fraud checks and Recurly's fraud detection
25314+
services. This is useful for trusted transactions where fraud screening
25315+
is not required.
2525525316
customer_notes:
2525625317
type: string
2525725318
title: Customer notes

recurly/client.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ def deactivate_account(self, account_id, **options):
224224
225225
headers : dict
226226
Extra HTTP headers to send with the request.
227+
params : dict
228+
Query Parameters.
229+
params.redact : bool
230+
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.
227231
228232
Returns
229233
-------
@@ -234,6 +238,30 @@ def deactivate_account(self, account_id, **options):
234238
path = self._interpolate_path("/accounts/%s", account_id)
235239
return self._make_request("DELETE", path, None, **options)
236240

241+
def redact_account(self, account_id, **options):
242+
"""Redact an account (GDPR Right to Erasure)
243+
244+
Parameters
245+
----------
246+
247+
account_id : str
248+
Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
249+
250+
Keyword Arguments
251+
-----------------
252+
253+
headers : dict
254+
Extra HTTP headers to send with the request.
255+
256+
Returns
257+
-------
258+
259+
Account
260+
Account has been accepted for redaction and will be processed asynchronously.
261+
"""
262+
path = self._interpolate_path("/accounts/%s/redact", account_id)
263+
return self._make_request("PUT", path, None, **options)
264+
237265
def get_account_acquisition(self, account_id, **options):
238266
"""Fetch an account's acquisition data
239267

0 commit comments

Comments
 (0)