Implemented the GET /marketplace/orders/{order_id}/messages endpoint for the Open API specification document in the library target.
This commit is contained in:
@@ -1940,6 +1940,8 @@ paths:
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/NotAccessable'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'422':
|
||||
$ref: '#/components/responses/Unprocessable'
|
||||
'500':
|
||||
@@ -2062,6 +2064,10 @@ paths:
|
||||
required:
|
||||
- listings
|
||||
- pagination
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/NotAccessable'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalError'
|
||||
/marketplace/orders/{order_id}:
|
||||
@@ -2098,6 +2104,62 @@ paths:
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/NotAccessable'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalError'
|
||||
/marketplace/orders/{order_id}/messages:
|
||||
get:
|
||||
tags:
|
||||
- Marketplace
|
||||
summary: Get a list of messages related to an order.
|
||||
description: |
|
||||
Returns a list orders for a seller in a marketplace.
|
||||
|
||||
This endpoints accepts pagination and authentication as a seller.
|
||||
operationId: getOrderMessages
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/OrderId'
|
||||
security:
|
||||
- ConsumerKeySecret: []
|
||||
- UserToken: []
|
||||
- OAuth: []
|
||||
responses:
|
||||
'200':
|
||||
description: Successfully retrieved a list of messages related to an order.
|
||||
headers:
|
||||
Link:
|
||||
$ref: '#/components/headers/Link'
|
||||
X-Discogs-RateLimit:
|
||||
$ref: '#/components/headers/RateLimit'
|
||||
X-Discogs-RateLimit-Used:
|
||||
$ref: '#/components/headers/RateLimitUsed'
|
||||
X-Discogs-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/RateLimitRemaining'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
description: A type that contains a list of messages for a related order in a marketplace.
|
||||
type: object
|
||||
properties:
|
||||
pagination:
|
||||
$ref: '#/components/schemas/Pagination'
|
||||
messages:
|
||||
description: A list of messages for an order in a marketplace.
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderMessage'
|
||||
required:
|
||||
- messages
|
||||
- pagination
|
||||
'401':
|
||||
$ref: '#/components/responses/Unauthorized'
|
||||
'403':
|
||||
$ref: '#/components/responses/NotAccessable'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'422':
|
||||
$ref: '#/components/responses/Unprocessable'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalError'
|
||||
components:
|
||||
@@ -3407,6 +3469,83 @@ components:
|
||||
type: integer
|
||||
Order:
|
||||
description: A type that represents an order.
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OrderId'
|
||||
- type: object
|
||||
properties:
|
||||
messages_url:
|
||||
description: A URI resource for the messages of an order.
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
uri:
|
||||
description: A URI representation of an order.
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
buyer:
|
||||
description: A buyer of an order.
|
||||
$ref: '#/components/schemas/UserIdentity'
|
||||
seller:
|
||||
description: A seller of an order.
|
||||
$ref: '#/components/schemas/UserIdentity'
|
||||
created:
|
||||
description: A date and time in which an order was created.
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
description: A status of an order.
|
||||
$ref: '#/components/schemas/OrderStatus'
|
||||
next_status:
|
||||
description: A list of upcoming statuses of an order.
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderStatus'
|
||||
last_activity:
|
||||
description: A date and time for the last update of an order.
|
||||
type: string
|
||||
format: date-time
|
||||
items:
|
||||
description: A list of items of an order.
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderItem'
|
||||
fee:
|
||||
description: A fee amount of an order.
|
||||
$ref: '#/components/schemas/Price'
|
||||
shipping:
|
||||
description: A shipping amount of an order.
|
||||
$ref: '#/components/schemas/Shipping'
|
||||
total:
|
||||
description: A total amount of an order.
|
||||
$ref: '#/components/schemas/Price'
|
||||
shipping_address:
|
||||
description: A container for all the shipping details of a buyer of an order.
|
||||
type: string
|
||||
additional_instructions:
|
||||
description: A container for any extra information about shipping of an order.
|
||||
type: string
|
||||
archived:
|
||||
description: A flag that indicates whether an order was archived or not.
|
||||
type: boolean
|
||||
required:
|
||||
- additional_instructions
|
||||
- archived
|
||||
- buyer
|
||||
- created
|
||||
- fee
|
||||
- items
|
||||
- last_activity
|
||||
- messages_url
|
||||
- next_status
|
||||
- seller
|
||||
- shipping
|
||||
- shipping_address
|
||||
- status
|
||||
- total
|
||||
- uri
|
||||
OrderId:
|
||||
description: A type that references an order.
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
@@ -3418,79 +3557,9 @@ components:
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
messages_url:
|
||||
description: A URI resource for the messages of an order.
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
uri:
|
||||
description: A URI representation of an order.
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
buyer:
|
||||
description: A buyer of an order.
|
||||
$ref: '#/components/schemas/UserIdentity'
|
||||
seller:
|
||||
description: A seller of an order.
|
||||
$ref: '#/components/schemas/UserIdentity'
|
||||
created:
|
||||
description: A date and time in which an order was created.
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
description: A status of an order.
|
||||
$ref: '#/components/schemas/OrderStatus'
|
||||
next_status:
|
||||
description: A list of upcoming statuses of an order.
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderStatus'
|
||||
last_activity:
|
||||
description: A date and time for the last update of an order.
|
||||
type: string
|
||||
format: date-time
|
||||
items:
|
||||
description: A list of items of an order.
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/OrderItem'
|
||||
fee:
|
||||
description: A fee amount of an order.
|
||||
$ref: '#/components/schemas/Price'
|
||||
shipping:
|
||||
description: A shipping amount of an order.
|
||||
$ref: '#/components/schemas/Shipping'
|
||||
total:
|
||||
description: A total amount of an order.
|
||||
$ref: '#/components/schemas/Price'
|
||||
shipping_address:
|
||||
description: A container for all the shipping details of a buyer of an order.
|
||||
type: string
|
||||
additional_instructions:
|
||||
description: A container for any extra information about shipping of an order.
|
||||
type: string
|
||||
archived:
|
||||
description: A flag that indicates whether an order was archived or not.
|
||||
type: boolean
|
||||
required:
|
||||
- additional_instructions
|
||||
- archived
|
||||
- buyer
|
||||
- created
|
||||
- fee
|
||||
- id
|
||||
- items
|
||||
- last_activity
|
||||
- messages_url
|
||||
- next_status
|
||||
- resource_url
|
||||
- seller
|
||||
- shipping
|
||||
- shipping_address
|
||||
- status
|
||||
- total
|
||||
- uri
|
||||
OrderItem:
|
||||
description: A type that represents an item of an order.
|
||||
type: object
|
||||
@@ -3510,6 +3579,94 @@ components:
|
||||
- id
|
||||
- price
|
||||
- release
|
||||
OrderMessage:
|
||||
description: A type that represents a message of an order.
|
||||
type: object
|
||||
properties:
|
||||
timestamp:
|
||||
description: A timestamp of a message for an order.
|
||||
type: string
|
||||
format: date-time
|
||||
type:
|
||||
description: A type of message for an order.
|
||||
type: string
|
||||
enum:
|
||||
- message
|
||||
- refund_received
|
||||
- refund_sent
|
||||
- shipping
|
||||
- status
|
||||
subject:
|
||||
description: A subject of a message for an order.
|
||||
type: string
|
||||
message:
|
||||
description: A body of a message for an order.
|
||||
type: string
|
||||
order:
|
||||
description: A reference to an order.
|
||||
$ref: '#/components/schemas/OrderId'
|
||||
status_id:
|
||||
description: An identifier for a status of an order, if any.
|
||||
type: integer
|
||||
minimum: 0
|
||||
original:
|
||||
description: TDB, if any.
|
||||
type: integer
|
||||
minimum: 0
|
||||
new:
|
||||
description: TDB, if any.
|
||||
type: integer
|
||||
minimum: 0
|
||||
actor:
|
||||
description: An actor that sent a message for an order, if any.
|
||||
$ref: '#/components/schemas/OrderMessageSender'
|
||||
from:
|
||||
description: A user that a message for an order, if any.
|
||||
$ref: '#/components/schemas/OrderMessageSender'
|
||||
refund:
|
||||
description: A requested refund for an order, if any.
|
||||
type: object
|
||||
properties:
|
||||
amount:
|
||||
description: An amount for a requested refund of an order.
|
||||
type: integer
|
||||
minimum: 0
|
||||
order:
|
||||
description: A reference to an order for which a refund has been requested.
|
||||
$ref: '#/components/schemas/OrderId'
|
||||
required:
|
||||
- amount
|
||||
- order
|
||||
required:
|
||||
- message
|
||||
- order
|
||||
- subject
|
||||
- timestamp
|
||||
- type
|
||||
OrderMessageSender:
|
||||
description: A type that represents a message sender for an order.
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
description: An identifier of a message sender for an order, if any.
|
||||
type: integer
|
||||
minimum: 0
|
||||
readOnly: true
|
||||
resource_url:
|
||||
description: A URI resource of a message sender for an order.
|
||||
type: string
|
||||
format: uri
|
||||
readOnly: true
|
||||
username:
|
||||
description: A username of a message sender for an order.
|
||||
type: string
|
||||
avatar_url:
|
||||
description: A URI avatar of a message sender for an order, if any.
|
||||
type: string
|
||||
format: uri
|
||||
required:
|
||||
- resource_url
|
||||
- username
|
||||
OrderStatus:
|
||||
description: A type that represents a status of an order.
|
||||
type: string
|
||||
@@ -3521,7 +3678,7 @@ components:
|
||||
- Payment Pending
|
||||
- Payment Received
|
||||
- In Progress
|
||||
- Shippied
|
||||
- Shipped
|
||||
- Merged
|
||||
- Order Changed
|
||||
- Refund Sent
|
||||
|
||||
Reference in New Issue
Block a user