docs: improve commerce modules [3/n] (#9510)

Improve and add docs for Order and Payment modules

[3/n]

Closes DOCS-966
Closes #9485
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-10-14 07:20:35 +00:00
1 parent 74b286b701
commit 11120a8b7e
30 files changed
+662 -314

No files matched your search

@@ -14,7 +14,7 @@ The items purchased in the order are represented by the [OrderItem data model](/
### Item’s Product Details
The details of the purchased products are represented by the [LineItem data model](/references/order/models/LineItem). Not only does a line item hold the details of the product, but also details related to its price, adjustments due to promotions, and taxes.
The details of the purchased products are represented by the [LineItem data model](/references/order/models/OrderLineItem). Not only does a line item hold the details of the product, but also details related to its price, adjustments due to promotions, and taxes.
---
@@ -22,15 +22,15 @@ The details of the purchased products are represented by the [LineItem data mode
An order has one or more shipping methods used to handle item shipment.
Each shipping method is represented by the [ShippingMethod data model](/references/order/models/ShippingMethod) that holds its details. The shipping method is linked to the order through the [OrderShippingMethod data model](/references/order/models/OrderShippingMethod).
Each shipping method is represented by the [OrderShippingMethod data model](/references/order/models/OrderShippingMethod) that holds its details. The shipping method is linked to the order through the [OrderShipping data model](/references/order/models/OrderShipping).
![A diagram showcasing the relation between an order and its items.](https://res.cloudinary.com/dza7lstvk/image/upload/v1719570409/Medusa%20Resources/order-shipping-method_tkggvd.jpg)
### data Property
When fulfilling the order, you may use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
When fulfilling the order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
The `ShippingMethod` data model has a `data` property. It’s an object used to store custom data relevant later for fulfillment.
The `OrderShippingMethod` data model has a `data` property. It’s an object used to store custom data relevant later for fulfillment.
The Medusa application passes the `data` property to the Fulfillment Module when fulfilling items.
@@ -44,7 +44,7 @@ The order’s total amounts (including tax total, total after an item is returne
## Order Payments
Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the [Transaction data model](/references/order/models/Transaction).
Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the [OrderTransaction data model](/references/order/models/OrderTransaction).
An order can have multiple transactions. The sum of these transactions must be equal to the order summary’s total. Otherwise, there’s an outstanding amount.