Skip to content

Commit

Permalink
Add usage settings for ChangeQuote (#1840)
Browse files Browse the repository at this point in the history
* Add usage settings for ChangeQuote

* Remove future tense

* Add usage settings to storefront change quote

* Fix default value

* Apply suggestion, adjust usageSettings format
  • Loading branch information
lexerom authored Mar 27, 2024
1 parent 184d4ce commit 19b4b5f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions openapi/components/schemas/QuoteChangeOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,35 @@ properties:
description: |-
Specifies if the quotation invoice must include interim items only.
If this value is set to `false`, all upcoming items are included.
usageSettings:
type: array
default: []
description: Usage settings for items with metered billing.
items:
type: object
properties:
planId:
type: string
description: ID of the plan from which usages are transferred.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
policy:
type: string
enum:
- reset
- transfer
description: Policy for removed items that have a metered billing plan.
x-enumDescriptions:
reset: Delete existing usages.
transfer: Transfer usages from removed plans to existing plans that are in the same subscription, using the `transferTo` field.
transferTo:
type:
- 'string'
- 'null'
default: null
description: |-
ID of the plan to which usages are transferred.
If an item with a specified plan does not exist, or does not have a metered billing plan, this transfer is ignored.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0Y
invoicePreview:
type: object
description: Preview of the quote invoice.
Expand Down
29 changes: 29 additions & 0 deletions openapi/components/schemas/StorefrontQuoteChangeOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,35 @@ properties:
description: |-
Specifies if the quotation invoice must include interim items only.
If this value is set to `false`, all upcoming items are included.
usageSettings:
type: array
default: []
description: Usage settings for items with metered billing.
items:
type: object
properties:
planId:
type: string
description: ID of the plan from which usages are transferred.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0X
policy:
type: string
enum:
- reset
- transfer
description: Policy for removed items that have a metered billing plan.
x-enumDescriptions:
reset: Delete existing usages.
transfer: Transfer usages from removed plans to existing plans that are in the same subscription, using the `transferTo` field.
transferTo:
type:
- 'string'
- 'null'
default: null
description: |-
ID of the plan to which usages are transferred.
If an item with a specified plan does not exist, or does not have a metered billing plan, this transfer is ignored.
example: plan_0YV7DENSVGDBW9S71XZNNYYQ0Y
invoicePreview:
type: object
description: Preview of the quote invoice.
Expand Down

0 comments on commit 19b4b5f

Please sign in to comment.