chore: generate API reference (#2410)

This commit is contained in:
Shahed Nasser
2022-10-11 10:30:45 +03:00
committed by GitHub
parent 9aeda1b52d
commit 14d4b9d95c
49 changed files with 5045 additions and 1930 deletions

View File

@@ -0,0 +1,40 @@
post:
operationId: PostOrderEdits
summary: Create an OrderEdit
description: Creates an OrderEdit.
x-authenticated: true
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,140 @@
delete:
operationId: DeleteOrderEditsOrderEdit
summary: Delete an Order Edit
description: Deletes an Order Edit
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit to delete.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}/deleteundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}/deleteundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
id:
type: string
description: The ID of the deleted Order Edit.
object:
type: string
description: The type of the object that was deleted.
format: order_edit
deleted:
type: boolean
description: Whether or not the Order Edit was deleted.
default: true
'400':
$ref: ../components/responses/400_error.yaml
get:
operationId: GetOrderEditsOrderEdit
summary: Retrieve an OrderEdit
description: Retrieves a OrderEdit.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the OrderEdit.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}/getundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}/getundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
post:
operationId: PostOrderEditsOrderEdit
summary: Updates an OrderEdit
description: Updates a OrderEdit.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the OrderEdit.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,43 @@
post:
operationId: PostOrderEditsOrderEditCancel
summary: Cancel an OrderEdit
description: Cancels an OrderEdit.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the OrderEdit.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}_cancel/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_cancel/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,54 @@
delete:
operationId: DeleteOrderEditsOrderEditItemChange
summary: Delete an Order Edit Item Change
description: Deletes an Order Edit Item Change
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit to delete.
schema:
type: string
- in: path
name: change_id
required: true
description: The ID of the Order Edit Item Change to delete.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: >-
../code_samples/JavaScript/order-edits_{id}_changes_{change_id}/deleteundefined
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/order-edits_{id}_changes_{change_id}/deleteundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
id:
type: string
description: The ID of the deleted Order Edit Item Change.
object:
type: string
description: The type of the object that was deleted.
format: item_change
deleted:
type: boolean
description: Whether or not the Order Edit Item Change was deleted.
default: true
'400':
$ref: ../components/responses/400_error.yaml

View File

@@ -0,0 +1,43 @@
post:
operationId: PostOrderEditsOrderEditConfirm
summary: Confirms an OrderEdit
description: Confirms an OrderEdit.
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the order edit.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}_confirm/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_confirm/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,47 @@
post:
operationId: PostOrderEditsEditLineItems
summary: Add an line item to an order (edit)
description: Create an OrderEdit LineItem.
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit.
schema:
type: string
x-authenticated: true
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}_items/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_items/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,108 @@
delete:
operationId: DeleteOrderEditsOrderEditLineItemsLineItem
summary: Delete line items from an order edit and create change item
description: Delete line items from an order edit and create change item
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit to delete from.
schema:
type: string
- in: path
name: item_id
required: true
description: The ID of the order edit item to delete from order.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: >-
../code_samples/JavaScript/order-edits_{id}_items_{item_id}/deleteundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_items_{item_id}/deleteundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
post:
operationId: PostOrderEditsEditLineItemsLineItem
summary: Create or update the order edit change holding the line item changes
description: Create or update the order edit change holding the line item changes
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit to update.
schema:
type: string
- in: path
name: item_id
required: true
description: The ID of the order edit item to update.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: >-
../code_samples/JavaScript/order-edits_{id}_items_{item_id}/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_items_{item_id}/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml

View File

@@ -0,0 +1,43 @@
post:
operationId: PostOrderEditsOrderEditRequest
summary: Request order edit confirmation
description: Request customer confirmation of an Order Edit
x-authenticated: true
parameters:
- in: path
name: id
required: true
description: The ID of the Order Edit to request confirmation from.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/order-edits_{id}_request/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/order-edits_{id}_request/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- OrderEdit
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'500':
$ref: ../components/responses/500_error.yaml