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
+37 -24
View File
@@ -1,9 +1,9 @@
title: Line Item
description: >-
Line Items represent purchasable units that can be added to a Cart for
checkout. When Line Items are purchased they will get copied to the resulting
order and can eventually be referenced in Fulfillments and Returns. Line Items
may also be created when processing Swaps and Claims.
Line Items are created when a product is added to a Cart. When Line Items are
purchased they will get copied to the resulting order, swap, or claim, and can
eventually be referenced in Fulfillments and Returns. Line items may also be
used for order edits.
type: object
required:
- allow_discounts
@@ -36,67 +36,76 @@ properties:
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
cart_id:
description: The ID of the Cart that the Line Item belongs to.
description: The ID of the cart that the line item may belongs to.
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 line item may belongs to.
x-expandable: cart
nullable: true
type: object
order_id:
description: The ID of the Order that the Line Item belongs to.
description: The ID of the order that the line item may belongs to.
nullable: true
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 line item may belongs to.
x-expandable: order
nullable: true
type: object
swap_id:
description: The id of the Swap that the Line Item belongs to.
description: The ID of the swap that the line item may belong to.
nullable: true
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
description: The details of the swap that the line item may belong to.
x-expandable: swap
nullable: true
type: object
claim_order_id:
description: The id of the Claim that the Line Item belongs to.
description: The ID of the claim that the line item may belong to.
nullable: true
type: string
example: null
claim_order:
description: A claim order object. Available if the relation `claim_order` is expanded.
description: The details of the claim that the line item may belong to.
x-expandable: claim_order
nullable: true
type: object
tax_lines:
description: Available if the relation `tax_lines` is expanded.
description: The details of the item's tax lines.
x-expandable: tax_lines
type: array
items:
$ref: ./LineItemTaxLine.yaml
adjustments:
description: Available if the relation `adjustments` is expanded.
description: >-
The details of the item's adjustments, which are available when a discount
is applied on the item.
x-expandable: adjustments
type: array
items:
$ref: ./LineItemAdjustment.yaml
original_item_id:
description: The id of the original line item
description: >-
The ID of the original line item. This is useful if the line item belongs
to a resource that references an order, such as a return or an order edit.
nullable: true
type: string
order_edit_id:
description: The ID of the order edit to which a cloned item belongs
description: The ID of the order edit that the item may belong to.
nullable: true
type: string
order_edit:
description: The order edit joined. Available if the relation `order_edit` is expanded.
description: The details of the order edit.
x-expandable: order_edit
nullable: true
type: object
title:
description: >-
The title of the Line Item, this should be easily identifiable by the
Customer.
description: The title of the Line Item.
type: string
example: Medusa Coffee Mug
description:
@@ -148,9 +157,8 @@ properties:
type: string
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
variant:
description: >-
A product variant object. The Product Variant contained in the Line Item.
Available if the relation `variant` is expanded.
description: The details of the product variant that this item was created from.
x-expandable: variant
nullable: true
$ref: ./ProductVariant.yaml
quantity:
@@ -211,7 +219,8 @@ properties:
type: integer
example: 0
includes_tax:
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
description: Indicates if the line item unit_price include tax
x-featureFlag: tax_inclusive_pricing
type: boolean
default: false
created_at:
@@ -228,3 +237,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