Skip to content

Commit

Permalink
Rename orderId to subscriptionId in quotes (#1856)
Browse files Browse the repository at this point in the history
* Rename orderId to subscriptionId in quotes

* Rename sale with purchase

* Fix required fields

* Fix trial conversion quote

* Fix trial only quotes
  • Loading branch information
lexerom authored Apr 8, 2024
1 parent 6959625 commit b89fbc9
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion openapi/components/schemas/Quote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ discriminator:
create: ./QuoteCreateOrder.yaml
change: ./QuoteChangeOrder.yaml
reactivate: ./QuoteReactivateOrder.yaml
trial-conversion: ./QuoteTrialConversionOrder.yaml
trial-only-conversion: ./QuoteTrialConversionOrder.yaml
oneOf:
- $ref: ./QuoteCreateOrder.yaml
- $ref: ./QuoteChangeOrder.yaml
Expand Down
6 changes: 3 additions & 3 deletions openapi/components/schemas/QuoteChangeOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ required:
- customerId
- items
- action
- orderId
- subscriptionId
properties:
id:
readOnly: true
Expand Down Expand Up @@ -59,8 +59,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription.
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
Expand Down
6 changes: 3 additions & 3 deletions openapi/components/schemas/QuoteCreateOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ properties:
description: |-
Action of the quote.
When a quote is accepted, a new order is created.
The `orderId` value is filled with a new generated value from the order.
The `subscriptionId` value is filled with a new generated value from the order.
type: string
enum:
- create
Expand Down Expand Up @@ -59,8 +59,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription or one-time purchase.
readOnly: true
type:
- 'string'
Expand Down
6 changes: 3 additions & 3 deletions openapi/components/schemas/QuoteReactivateOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ required:
- customerId
- items
- action
- orderId
- subscriptionId
properties:
id:
readOnly: true
Expand Down Expand Up @@ -59,8 +59,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription.
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
Expand Down
14 changes: 7 additions & 7 deletions openapi/components/schemas/QuoteTrialConversionOrder.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
type: object
title: QuoteChangeOrder
title: QuoteTrialConversionOrder
required:
- websiteId
- customerId
- items
- action
- orderId
- subscriptionId
properties:
id:
readOnly: true
Expand All @@ -24,12 +24,12 @@ properties:
- one-time-order
action:
description: |-
Action of the quote for change order items.
When a quote is accepted, quote items are applied to the related order.
Action of the quote for an ended trial-only subscription.
When a quote is accepted, the related order is activated.
type: string
enum:
- change
example: change
- trial-only-conversion
example: trial-only-conversion
acceptanceConditions:
type: array
writeOnly: true
Expand Down Expand Up @@ -59,7 +59,7 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
subscriptionId:
description: ID of the related order.
type: string
maxLength: 50
Expand Down
4 changes: 2 additions & 2 deletions openapi/components/schemas/StorefrontQuoteChangeOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription.
readOnly: true
type: string
maxLength: 50
Expand Down
6 changes: 3 additions & 3 deletions openapi/components/schemas/StorefrontQuoteCreateOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ properties:
description: |-
Action of the quote.
When a quote is accepted, a new order is created.
The `orderId` value is filled with a new generated value from the order.
The `subscriptionId` value is filled with a new generated value from the order.
type: string
enum:
- create
Expand Down Expand Up @@ -53,8 +53,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription or one-time purchase.
readOnly: true
type:
- 'string'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription.
readOnly: true
type: string
maxLength: 50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ properties:
- one-time-order
action:
description: |-
Action of the quote.
When a quote is accepted, a new order is created.
The `orderId` value is filled with a new generated value from the order.
Action of the quote for an ended trial-only subscription.
When a quote is accepted, the related order is activated.
type: string
enum:
- create
example: create
- trial-only-conversion
example: trial-only-conversion
acceptanceConditions:
type: array
writeOnly: true
Expand Down Expand Up @@ -53,12 +52,10 @@ properties:
- organization
isFulfilled:
type: boolean
orderId:
description: ID of the related order.
subscriptionId:
description: ID of the related subscription.
readOnly: true
type:
- 'string'
- 'null'
type: string
maxLength: 50
example: ord_0YV7DES3WPC5J8JD8QTVNZBZNZ
invoiceId:
Expand Down

0 comments on commit b89fbc9

Please sign in to comment.