From af4959fd7d850a0b6be0dd80552bc2291e2bb0a4 Mon Sep 17 00:00:00 2001 From: Recurly Integrations Date: Wed, 15 Apr 2026 16:33:36 +0000 Subject: [PATCH] Generated Latest Changes for v2021-02-25 --- lib/recurly/client.php | 31 +++++ ...unique_coupon_code_generation_response.php | 68 +++++++++ openapi/api.yaml | 129 +++++++++++++++++- 3 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 lib/recurly/resources/unique_coupon_code_generation_response.php diff --git a/lib/recurly/client.php b/lib/recurly/client.php index 45d89469..28855bf7 100644 --- a/lib/recurly/client.php +++ b/lib/recurly/client.php @@ -171,6 +171,21 @@ public function deactivateAccount(string $account_id, array $options = []): \Rec return $this->makeRequest('DELETE', $path, [], $options); } + /** + * Redact an account (GDPR Right to Erasure) + * + * @param string $account_id Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\Account Account has been accepted for redaction and will be processed asynchronously. + * @link https://developers.recurly.com/api/v2021-02-25#operation/redact_account + */ + public function redactAccount(string $account_id, array $options = []): \Recurly\Resources\Account + { + $path = $this->interpolatePath("/accounts/{account_id}/redact", ['account_id' => $account_id]); + return $this->makeRequest('PUT', $path, [], $options); + } + /** * Fetch an account's acquisition data * @@ -1296,6 +1311,22 @@ public function generateUniqueCouponCodes(string $coupon_id, array $body, array return $this->makeRequest('POST', $path, $body, $options); } + /** + * Generate unique coupon codes synchronously + * + * @param string $coupon_id Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`. + * @param array $body The body of the request. + * @param array $options Associative array of optional parameters + * + * @return \Recurly\Resources\UniqueCouponCodeGenerationResponse The newly generated unique coupon codes. + * @link https://developers.recurly.com/api/v2021-02-25#operation/generate_unique_coupon_codes_sync + */ + public function generateUniqueCouponCodesSync(string $coupon_id, array $body, array $options = []): \Recurly\Resources\UniqueCouponCodeGenerationResponse + { + $path = $this->interpolatePath("/coupons/{coupon_id}/generate_sync", ['coupon_id' => $coupon_id]); + return $this->makeRequest('POST', $path, $body, $options); + } + /** * Restore an inactive coupon * diff --git a/lib/recurly/resources/unique_coupon_code_generation_response.php b/lib/recurly/resources/unique_coupon_code_generation_response.php new file mode 100644 index 00000000..9ccfbaad --- /dev/null +++ b/lib/recurly/resources/unique_coupon_code_generation_response.php @@ -0,0 +1,68 @@ + '\Recurly\Resources\UniqueCouponCode', + ]; + + + /** + * Getter method for the object attribute. + * Object type + * + * @return ?string + */ + public function getObject(): ?string + { + return $this->_object; + } + + /** + * Setter method for the object attribute. + * + * @param string $object + * + * @return void + */ + public function setObject(string $object): void + { + $this->_object = $object; + } + + /** + * Getter method for the unique_coupon_codes attribute. + * An array containing the newly generated unique coupon codes. + * + * @return array + */ + public function getUniqueCouponCodes(): array + { + return $this->_unique_coupon_codes ?? [] ; + } + + /** + * Setter method for the unique_coupon_codes attribute. + * + * @param array $unique_coupon_codes + * + * @return void + */ + public function setUniqueCouponCodes(array $unique_coupon_codes): void + { + $this->_unique_coupon_codes = $unique_coupon_codes; + } +} \ No newline at end of file diff --git a/openapi/api.yaml b/openapi/api.yaml index dc43a640..d03de760 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