chore(docs): Generated API Reference (#4706)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
github-actions[bot]
2023-08-07 16:54:48 +03:00
committed by GitHub
co-authored by olivermrbl Shahed Nasser
parent efdea04963
commit 658339767b
1138 changed files with 11740 additions and 7043 deletions
+36 -26
View File
@@ -1,12 +1,10 @@
title: Swap
description: >-
Swaps can be created when a Customer wishes to exchange Products that they
have purchased to different Products. Swaps consist of a Return of previously
purchased Products and a Fulfillment of new Products, the amount paid for the
Products being returned will be used towards payment for the new Products. In
the case where the amount paid for the the Products being returned exceed the
amount to be paid for the new Products, a Refund will be issued for the
difference.
A swap can be created when a Customer wishes to exchange Products that they
have purchased with different Products. It consists of a Return of previously
purchased Products and a Fulfillment of new Products. It also includes
information on any additional payment or refund required based on the
difference between the exchanged products.
type: object
required:
- allow_backorder
@@ -58,45 +56,50 @@ properties:
- requires_action
example: not_paid
order_id:
description: The ID of the Order where the Line Items to be returned where purchased.
description: The ID of the order that the swap belongs to.
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
description: The details of the order that the swap belongs to.
x-expandable: order
nullable: true
type: object
additional_items:
description: >-
The new Line Items to ship to the Customer. Available if the relation
`additional_items` is expanded.
The details of the new products to send to the customer, represented as
line items.
type: array
x-expandable: additional_items
items:
$ref: ./LineItem.yaml
return_order:
description: >-
A return order object. The Return that is issued for the return part of
the Swap. Available if the relation `return_order` is expanded.
The details of the return that belongs to the swap, which holds the
details on the items being returned.
x-expandable: return_order
nullable: true
type: object
fulfillments:
description: >-
The Fulfillments used to send the new Line Items. Available if the
relation `fulfillments` is expanded.
The details of the fulfillments that are used to send the new items to the
customer.
x-expandable: fulfillments
type: array
items:
type: object
payment:
description: >-
The Payment authorized when the Swap requires an additional amount to be
charged from the Customer. Available if the relation `payment` is
expanded.
The details of the additional payment authorized by the customer when
`difference_due` is positive.
x-expandable: payment
nullable: true
type: object
difference_due:
description: >-
The difference that is paid or refunded as a result of the Swap. May be
negative when the amount paid for the returned items exceed the total of
the new Products.
The difference amount between the orders original total and the new total
imposed by the swap. If its value is negative, a refund must be issues to
the customer. If it's positive, additional payment must be authorized by
the customer. Otherwise, no payment processing is required.
nullable: true
type: integer
example: 0
@@ -108,23 +111,26 @@ properties:
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
shipping_address:
description: Available if the relation `shipping_address` is expanded.
description: The details of the shipping address that the new items should be sent to.
x-expandable: shipping_address
nullable: true
$ref: ./Address.yaml
shipping_methods:
description: >-
The Shipping Methods used to fulfill the additional items purchased.
Available if the relation `shipping_methods` is expanded.
The details of the shipping methods used to fulfill the additional items
purchased.
type: array
x-expandable: shipping_methods
items:
$ref: ./ShippingMethod.yaml
cart_id:
description: The id of the Cart that the Customer will use to confirm the Swap.
description: The ID of the cart that the customer uses to complete the swap.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
description: The details of the cart that the customer uses to complete the swap.
x-expandable: cart
nullable: true
type: object
confirmed_at:
@@ -174,3 +180,7 @@ properties:
type: object
example:
car: white
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute