Skip to content

Commit

Permalink
Add quantityFilled and its update (#1754)
Browse files Browse the repository at this point in the history
* Add usedQuantity and its update

* Fix method

* Fix peth

* Rename

* Add badge

* Add badge

* Rename "change" to "update"

* Apply suggestions from code review

Co-authored-by: Adam Altman <adam@rebilly.com>

* Fix

* Apply suggestions from code review

Co-authored-by: Chris  <85164331+noon-dawg@users.noreply.github.com>

* Rename to quantityFilled

* Change to PATCH

---------

Co-authored-by: Adam Altman <adam@rebilly.com>
Co-authored-by: Chris <85164331+noon-dawg@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 30, 2024
1 parent 5d96ba1 commit 057414a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions openapi/components/requestBodies/SubscriptionItemUpdate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: object
required:
- quantityFilled
properties:
quantityFilled:
x-badge: Experimental
description: Filled quantity of the subscription item (experimental property).
type: integer
3 changes: 3 additions & 0 deletions openapi/components/schemas/OrderItem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ properties:
quantity:
description: Number of product units in the specified plan.
type: integer
quantityFilled:
description: Number of filled product units.
type: integer
plan:
description: Details of the plan.
anyOf:
Expand Down
2 changes: 2 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,8 @@ paths:
$ref: './paths/subscriptions@{id}@void.yaml'
'/subscriptions/{id}/change-items':
$ref: './paths/subscriptions@{id}@change-items.yaml'
'/subscriptions/{id}/items/{itemId}':
$ref: './paths/subscriptions@{id}@items@{itemId}.yaml'
'/subscriptions/{id}/interim-invoice':
$ref: './paths/subscriptions@{id}@interim-invoice.yaml'
/subscription-pauses:
Expand Down
41 changes: 41 additions & 0 deletions openapi/paths/subscriptions@{id}@items@{itemId}.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
- $ref: ../components/parameters/resourceId.yaml
- name: itemId
in: path
description: ID of subscription item.
required: true
schema:
type: string
patch:
x-badge: Experimental
x-products:
- Core
tags:
- Orders
summary: Update a subscription order item
operationId: PatchSubscriptionItem
x-sdk-operation-name: updateItem
description: Updates a subscription order item. This is an experimental endpoint, can be changed or removed in the future.
requestBody:
content:
application/json:
schema:
$ref: ../components/requestBodies/SubscriptionItemUpdate.yaml
description: Update item request.
required: true
responses:
'201':
description: Order item updated.
headers:
Location:
$ref: ../components/headers/Location.yaml
content:
application/json:
schema:
$ref: ../components/schemas/OrderItem.yaml
'401':
$ref: ../components/responses/Unauthorized.yaml
'403':
$ref: ../components/responses/Forbidden.yaml
'422':
$ref: ../components/responses/ValidationError.yaml

0 comments on commit 057414a

Please sign in to comment.