-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add StorefrontPostSubscriptionReactivation (#1830)
* Add StorefrontPostSubscriptionReactivation * Update openapi/openapi.yaml Co-authored-by: Adam Altman <[email protected]> * Update openapi/openapi.yaml Co-authored-by: Adam Altman <[email protected]> * Add request body * Fix file name * Update resource and request body * Add subscriptionId example * Add orderId to properties --------- Co-authored-by: Adam Altman <[email protected]>
- Loading branch information
1 parent
9a9248c
commit 51aee11
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
openapi/components/requestBodies/storefront/PostSubscriptionReactivation.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
type: object | ||
description: Reactivate customer subscription. | ||
required: | ||
- orderId | ||
properties: | ||
orderId: | ||
type: string | ||
description: ID of the order associated with the reactivation quote. | ||
example: ord_01HRF27SATGE4Z6PBJE6PD8328 | ||
items: | ||
type: array | ||
description: Details of items in the subscription. | ||
minItems: 1 | ||
items: | ||
type: object | ||
required: | ||
- planId | ||
properties: | ||
planId: | ||
type: string | ||
description: ID of the plan. | ||
maxLength: 50 | ||
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X | ||
quantity: | ||
description: Number of units of the product on the given plan. | ||
type: integer | ||
minimum: 0 | ||
preview: | ||
description: |- | ||
Specifies if the quote must be previewed before it is created. | ||
Subscriptions cannot be reactivated in the preview. | ||
type: boolean | ||
default: false | ||
example: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
post: | ||
x-badge: Experimental | ||
x-products: | ||
- Storefront | ||
tags: | ||
- Storefront orders | ||
summary: Reactivate a subscription | ||
operationId: StorefrontPostSubscriptionReactivation | ||
x-sdk-operation-name: reactivation | ||
security: | ||
- CustomerJWT: [] | ||
description: |- | ||
Creates a quote for requested reactivation. | ||
This operation applies the requested reactivation to the subscription when the quote invoice is paid. | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/requestBodies/storefront/PostSubscriptionReactivation.yaml | ||
description: Change items request. | ||
responses: | ||
'201': | ||
description: Quote for requested reactivation is created and issued. | ||
headers: | ||
Location: | ||
$ref: ../../components/headers/Location.yaml | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../components/schemas/StorefrontQuoteReactivateOrder.yaml | ||
'401': | ||
$ref: ../../components/responses/Unauthorized.yaml | ||
'403': | ||
$ref: ../../components/responses/Forbidden.yaml | ||
'404': | ||
$ref: ../../components/responses/NotFound.yaml | ||
'422': | ||
$ref: ../../components/responses/ValidationError.yaml |