Skip to content

Commit ca6fbbf

Browse files
nanobashnoon-dawgjustneroWeetbixadamaltman
authored
Refactor subscriptions related files (#1734)
* Rename Subscription.yaml to SubscriptionOrOneTimeSale.yaml * Rename OneTimeOrder.yaml to OneTimeSale.yaml * Rename StorefrontOneTimeOrder.yaml to StorefrontOneTimeSale.yaml * Rename SubscriptionOrder.yaml to Subscription.yaml * Rename StorefrontSubscriptionOrder.yaml to StorefrontSubscription.yaml * Add Orders API related files * Apply suggestions from code review Co-authored-by: Chris <[email protected]> * Introduce LegacySubscription && LegacyOneTimeSale yaml files LegacySubscription.yaml && LegacyOneTimeSale.yaml files contain billing related properties. Subscription.yaml && OneTimeSale.yaml files contain non billing related properties. * Rename discriminator property to orderType * Update openapi/components/schemas/SubscriptionOrOneTimeSale.yaml Co-authored-by: Arif Kurkchi <[email protected]> * Rename Subscription.yaml to BaseSubscription.yaml * Introduce BaseSubscription.yaml for orderType/type properties BaseSubscription.yaml base file without orderType/type props Subscription.yaml extends BaseSubscription.yaml and adds type prop LegacySubscription.yaml extends BaseSubscription.yaml and adds orderType prop * Update orderExpand.yaml * Update orderExpand.yaml * Update Order.yaml * Move initialInvoiceId && recentInvoiceId to LegacySubscription.yaml * Remove duplicated properties from BaseSubscription.yaml * Add OneTimeSale type to Order * Remove not needed required properties * Move invoiceTimeShift to Order level * Introduce BaseOneTimeSale.yaml * Fix after resolving PR conflicts * Remove BaseSubscription.yaml && BaseOneTimeSale.yaml files * Add missing delinquencyPeriod property * Add revision to Order * Add createdTime && updatedTime properties * Reorder order properties * Update descriptions * Add required properties * Reorder Order recentInvoiceId property * Update openapi/components/schemas/LegacyOneTimeSale.yaml Co-authored-by: Chris <[email protected]> * Reorder poNumber property * Add missing delinquencyPeriod property * Reorder poNumber property * Replace invoiceTimeShift by invoiceIssueTimeShift property * Add invoiceIssueTimeShift and invoiceDueTimeShift properties * Update descriptions * Update descriptions * Update billingStatus description * Add SelfLink to Order * Apply suggestions from code review Co-authored-by: Chris <[email protected]> * Apply suggestions from code review Co-authored-by: Chris <[email protected]> * Apply suggestions from code review Co-authored-by: Chris <[email protected]> * Remove spaces * Fix indentations * Move startTime and activationTime to Order level * Update startTime description * Update startTime and activationTime as non nullable fields * Rename billingStatus property to status * Update status type * Remove _links and _embedded from Subscription and OneTimeSale * Update delinquencyPeriod description * Revert "Update status type" This reverts commit fd572c8. * Add delinquencyPeriod field to Order * Add richBillingPortalId field to Order * Update order items description * Update order items description * Update invoiceIssueTimeShift description * Rename activationTime field to processTime * Rename startTime field to scheduledProcessTime * Add orderId to storefront invoice * Revert "Rename activationTime field to processTime" This reverts commit eea5a0a. * Revert "Rename startTime field to scheduledProcessTime" This reverts commit 30d1364. * Update example of delinquencyPeriod field * Update openapi/components/schemas/Order.yaml Co-authored-by: Adam Altman <[email protected]> * Update richBillingPortalId type * Update description of the id * Remove items from {Subscription|OneTimeSale}.yaml files * Rename OrderItem.yaml to LegacySubscriprionOrOneTimeSaleItem.yaml * Fix the file name * Add plan object to Subscription and OneTimeSale * Remove orderExpand.yaml * Rename inner plan field to planDetails * Remove plan.id field and deprecated true from planId * Add isTrialConverted field * Update isTrialConverted field description in Subscription.yaml * Revert "Update isTrialConverted field description in Subscription.yaml" This reverts commit 0880ea2. * Rename plan fields * Move plan fields to upper level * Revert "Remove orderExpand.yaml" This reverts commit cd4e362. * Remove orderExpand for GetOrderCollection * Move trial fields to upper level * Add quantityFilled to Subscription * Rename field to billingPortalId * Rename initialInvoice field to activationInvoice * Add billingPortalId to LegacySubscription.yaml * Update billingPortalId example * Rename field to isTrialEnabled * Update required fields for Subscription and OneTimeSale * Remove orderId from Invoice and StorefrontInvoice yaml files * Restore space * Remove Order related changes * Rollback text updates * Rename UpcomingInvoiceItem to LegacyUpcomingInvoiceItem * Rename UpcomingInvoice to LegacyUpcomingInvoice * Rename LegacyUpcomingInvoice to StorefrontLegacyUpcomingInvoice * Rename LegacySubscriptionOrOneTimeSaleItem to SubscriptionOrOneTimeSaleItem * Rename LegacyUpcomingInvoiceItem.yaml to UpcomingInvoiceItem.yaml * Rename StorefrontLegacyUpcomingInvoice to StorefrontUpcomingInvoice * Rename LegacyUpcomingInvoice.yaml to UpcomingInvoice.yaml * Rename LegacySubscription.yaml to Subscription.yaml * Rename LegacyOneTimeSale.yaml to OneTimeSale.yaml * Rename SubscriptionOrderPlan.yaml to SubscriptionPlan.yaml --------- Co-authored-by: Chris <[email protected]> Co-authored-by: Arif Kurkchi <[email protected]> Co-authored-by: Weetbix <[email protected]> Co-authored-by: Adam Altman <[email protected]>
1 parent b023314 commit ca6fbbf

9 files changed

+7
-7
lines changed

openapi/components/schemas/FlexiblePlan.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ allOf:
1414
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
1515
- anyOf:
1616
- $ref: ./OneTimeSalePlan.yaml
17-
- $ref: ./SubscriptionOrderPlan.yaml
17+
- $ref: ./SubscriptionPlan.yaml
1818
- $ref: ./TrialOnlyPlan.yaml

openapi/components/schemas/OneTimeSale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ properties:
8585
type: array
8686
minItems: 1
8787
items:
88-
$ref: ./OrderItem.yaml
88+
$ref: ./SubscriptionOrOneTimeSaleItem.yaml
8989
deliveryAddress:
9090
description: Delivery address of the order.
9191
oneOf:

openapi/components/schemas/Plan.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ allOf:
99
readOnly: true
1010
- anyOf:
1111
- $ref: ./OneTimeSalePlan.yaml
12-
- $ref: ./SubscriptionOrderPlan.yaml
12+
- $ref: ./SubscriptionPlan.yaml
1313
- $ref: ./TrialOnlyPlan.yaml
1414

openapi/components/schemas/StorefrontOneTimeSale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ properties:
6161
type: array
6262
minItems: 1
6363
items:
64-
$ref: ./OrderItem.yaml
64+
$ref: ./SubscriptionOrOneTimeSaleItem.yaml
6565
deliveryAddress:
6666
description: Delivery address of the order.
6767
oneOf:

openapi/components/schemas/StorefrontSubscription.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ properties:
6969
type: array
7070
minItems: 1
7171
items:
72-
$ref: ./OrderItem.yaml
72+
$ref: ./SubscriptionOrOneTimeSaleItem.yaml
7373
deliveryAddress:
7474
description: Delivery address of the order.
7575
oneOf:

openapi/components/schemas/Subscription.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ properties:
305305
type: array
306306
minItems: 1
307307
items:
308-
$ref: ./OrderItem.yaml
308+
$ref: ./SubscriptionOrOneTimeSaleItem.yaml
309309
deliveryAddress:
310310
description: Delivery address of the order.
311311
oneOf:

openapi/paths/subscriptions@{id}@items@{itemId}.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ patch:
3232
content:
3333
application/json:
3434
schema:
35-
$ref: ../components/schemas/OrderItem.yaml
35+
$ref: ../components/schemas/SubscriptionOrOneTimeSaleItem.yaml
3636
'401':
3737
$ref: ../components/responses/Unauthorized.yaml
3838
'403':

0 commit comments

Comments
 (0)