---
displayed_sidebar: jsClientSidebar
slug: /references/js-client/SwapsResource
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# SwapsResource

This class is used to send requests to [Store Swap API Routes](https://docs.medusajs.com/api/store#swaps). All its method
are available in the JS Client under the `medusa.swaps` property.

A swap is created by a customer or an admin to exchange an item with a new one.
Creating a swap implicitely includes creating a return for the item being exchanged.

Related Guide: [How to create a swap in a storefront](https://docs.medusajs.com/modules/orders/storefront/create-swap)

## Methods

### create

Create a Swap for an Order. This will also create a return and associate it with the swap. If a return shipping option is specified, the return will automatically be fulfilled.
To complete the swap, you must use the [CartsResource.complete](js_client.CartsResource.mdx#complete) method passing it the ID of the swap's cart.

An idempotency key will be generated if none is provided in the header `Idempotency-Key` and added to
the response. If an error occurs during swap creation or the request is interrupted for any reason, the swap creation can be retried by passing the idempotency
key in the `Idempotency-Key` header.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.swaps.create({
  order_id,
  return_items: [
    {
      item_id,
      quantity: 1
    }
  ],
  additional_items: [
    {
      variant_id,
      quantity: 1
    }
  ]
})
.then(({ swap }) => {
  console.log(swap.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "payload",
    "type": "[StorePostSwapsReq](../../medusa/classes/medusa.StorePostSwapsReq.mdx)",
    "description": "The data of the swap to be created.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": [
      {
        "name": "additional_items",
        "type": "[AdditionalItem](../../medusa/classes/medusa.AdditionalItem-2.mdx)[]",
        "description": "The items to exchange the returned items with.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "quantity",
            "type": "`number`",
            "description": "The quantity of the variant.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "variant_id",
            "type": "`string`",
            "description": "The ID of the Product Variant.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "order_id",
        "type": "`string`",
        "description": "The ID of the Order to create the Swap for.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": []
      },
      {
        "name": "return_items",
        "type": "[Item](../../medusa/classes/medusa.Item-7.mdx)[]",
        "description": "The items to include in the Return.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "item_id",
            "type": "`string`",
            "description": "The ID of the order's line item to return.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "note",
            "type": "`string`",
            "description": "The note to add to the item being swapped.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "quantity",
            "type": "`number`",
            "description": "The quantity to return.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "reason_id",
            "type": "`string`",
            "description": "The ID of the reason of this return. Return reasons can be retrieved from the List Return Reasons API Route.",
            "optional": true,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      },
      {
        "name": "return_shipping_option",
        "type": "`string`",
        "description": "The ID of the Shipping Option to create the Shipping Method from.",
        "optional": true,
        "defaultValue": "",
        "expandable": false,
        "children": []
      }
    ]
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreSwapsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the swap's details.",
    "expandable": false,
    "children": [
      {
        "name": "swap",
        "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
        "description": "Swap details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "additional_items",
            "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
            "description": "The details of the new products to send to the customer, represented as line items.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "adjustments",
                "type": "[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]",
                "description": "The details of the item's adjustments, which are available when a discount is applied on the item.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "allow_discounts",
                "type": "`boolean`",
                "description": "Flag to indicate if the Line Item should be included when doing discount calculations.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`string`",
                "description": "The ID of the claim that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "description",
                "type": "`null` \\| `string`",
                "description": "A more detailed description of the contents of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`null` \\| `number`",
                "description": "The total of discount of the line item rounded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfilled_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been fulfilled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`null` \\| `number`",
                "description": "The total of the gift card of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "has_shipping",
                "type": "`null` \\| `boolean`",
                "description": "Flag to indicate if the Line Item has fulfillment associated with it.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The line item's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Indicates if the line item unit\\_price include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "is_giftcard",
                "type": "`boolean`",
                "description": "Flag to indicate if the Line Item is a Gift Card.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_return",
                "type": "`boolean`",
                "description": "Is the item being returned",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_edit",
                "type": "`null` \\| [OrderEdit](../../entities/classes/entities.OrderEdit.mdx)",
                "description": "The details of the order edit.",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_edit_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order edit that the item may belong to.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_item_id",
                "type": "`null` \\| `string`",
                "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.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_tax_total",
                "type": "`null` \\| `number`",
                "description": "The original tax total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_total",
                "type": "`null` \\| `number`",
                "description": "The original total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "product_id",
                "type": "`null` \\| `string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "quantity",
                "type": "`number`",
                "description": "The quantity of the content in the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`null` \\| `number`",
                "description": "The total of discount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable",
                "type": "`null` \\| `number`",
                "description": "The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returned_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipped_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been shipped.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "should_merge",
                "type": "`boolean`",
                "description": "Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`null` \\| `number`",
                "description": "The subtotal of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_lines",
                "type": "[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]",
                "description": "The details of the item's tax lines.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "thumbnail",
                "type": "`null` \\| `string`",
                "description": "A URL string to a small image of the contents of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "title",
                "type": "`string`",
                "description": "The title of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`null` \\| `number`",
                "description": "The total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "unit_price",
                "type": "`number`",
                "description": "The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "variant",
                "type": "[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)",
                "description": "The details of the product variant that this item was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "variant_id",
                "type": "`null` \\| `string`",
                "description": "The id of the Product Variant contained in the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "allow_backorder",
            "type": "`boolean`",
            "description": "If true, swaps can be completed with items out of stock",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date with timezone at which the Swap was canceled.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "cart",
            "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
            "description": "The details of the cart that the customer uses to complete the swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The billing address's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "completed_at",
                "type": "`Date`",
                "description": "The date with timezone at which the cart was completed.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "context",
                "type": "`Record<string, unknown>`",
                "description": "The context of the cart which can include info like IP or user agent.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer the cart belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The customer's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "An array of details of all discounts applied to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the cart",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "An array of details of all gift cards applied to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The cart's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a cart in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of items with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The line items added to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"cart\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"cart\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)",
                "description": "The details of the payment associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "payment_authorized_at",
                "type": "`Date`",
                "description": "The date with timezone at which the payment was authorized.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_id",
                "type": "`string`",
                "description": "The payment's ID if available",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_session",
                "type": "`null` \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)",
                "description": "The details of the selected payment session in the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "payment_sessions",
                "type": "[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)[]",
                "description": "The details of all payment sessions created on the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order associated with this cart is returned.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The region's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The sales channel ID the cart is associated with.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "`null` \\| [Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The shipping address's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods added to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of shipping with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the cart",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the cart",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "type",
                "type": "[CartType](../../entities/enums/entities.CartType.mdx)",
                "description": "The cart's type.",
                "optional": false,
                "defaultValue": "default",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "cart_id",
            "type": "`string`",
            "description": "The ID of the cart that the customer uses to complete the swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date with timezone at which the Swap was confirmed by the Customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "difference_due",
            "type": "`number`",
            "description": "The difference amount between the order’s 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.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "fulfillment_status",
            "type": "[SwapFulfillmentStatus](../../entities/enums/entities.SwapFulfillmentStatus.mdx)",
            "description": "The status of the Fulfillment of the Swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The swap's fulfillments are canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FULFILLED",
                "type": "`\"fulfilled\"`",
                "description": "The swap's items are fulfilled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_FULFILLED",
                "type": "`\"not_fulfilled\"`",
                "description": "The swap's items aren't fulfilled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_SHIPPED",
                "type": "`\"partially_shipped\"`",
                "description": "Some of the swap's items are shipped.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REQUIRES_ACTION",
                "type": "`\"requires_action\"`",
                "description": "The swap's fulfillments require an action.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "SHIPPED",
                "type": "`\"shipped\"`",
                "description": "The swap's items are shipped.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "fulfillments",
            "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
            "description": "The details of the fulfillments that are used to send the new items to the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Fulfillment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`string`",
                "description": "The ID of the Claim that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "This contains all the data necessary for the Fulfillment provider to handle the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The fulfillment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of the fulfillment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[FulfillmentItem](../../entities/classes/entities.FulfillmentItem.mdx)[]",
                "description": "The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "location_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the stock location the fulfillment will be shipped from",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be sent.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the Order that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider",
                "type": "[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)",
                "description": "The details of the fulfillment provider responsible for handling the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The ID of the Fulfillment Provider responsible for handling the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipped_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Fulfillment was shipped.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the Swap that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tracking_links",
                "type": "[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)[]",
                "description": "The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tracking_numbers",
                "type": "`string`[]",
                "description": "The tracking numbers that can be used to track the status of the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The swap's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "idempotency_key",
            "type": "`string`",
            "description": "Randomly generated key used to continue the completion of the swap in case of failure.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "no_notification",
            "type": "`boolean`",
            "description": "If set to true, no notification will be sent related to this swap",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "order",
            "type": "[Order](../../entities/classes/entities.Order.mdx)",
            "description": "The details of the order that the swap belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "order_id",
            "type": "`string`",
            "description": "The ID of the order that the swap belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "payment",
            "type": "[Payment](../../entities/classes/entities.Payment.mdx)",
            "description": "The details of the additional payment authorized by the customer when `difference\\_due` is positive.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "amount_refunded",
                "type": "`number`",
                "description": "The amount of the original Payment amount that has been refunded back to the Customer.",
                "optional": false,
                "defaultValue": "0",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "captured_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was captured.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character ISO currency code of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a payment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The id of the Payment Provider that is responsible for the Payment",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "payment_status",
            "type": "[SwapPaymentStatus](../../entities/enums/entities.SwapPaymentStatus.mdx)",
            "description": "The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "AWAITING",
                "type": "`\"awaiting\"`",
                "description": "The swap is additional awaiting payment.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The swap's additional payment is canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CAPTURED",
                "type": "`\"captured\"`",
                "description": "The swap's additional payment is captured.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "The swap's additional payment is confirmed.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "DIFFERENCE_REFUNDED",
                "type": "`\"difference_refunded\"`",
                "description": "The negative difference amount between the returned item(s) and the new one(s) has been refuneded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_PAID",
                "type": "`\"not_paid\"`",
                "description": "The swap's additional payment isn't paid.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_REFUNDED",
                "type": "`\"partially_refunded\"`",
                "description": "Some of the negative difference amount between the returned item(s) and the new one(s) has been refuneded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REFUNDED",
                "type": "`\"refunded\"`",
                "description": "The amount in the associated order has been refunded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REQUIRES_ACTION",
                "type": "`\"requires_action\"`",
                "description": "The swap's payment requires an action.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "return_order",
            "type": "[Return](../../entities/classes/entities.Return.mdx)",
            "description": "The details of the return that belongs to the swap, which holds the details on the items being returned.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the claim that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The return's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`null` \\| `string`",
                "description": "Randomly generated key used to continue the completion of the return in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)[]",
                "description": "The details of the items that the customer is returning.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "location_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the stock location the return will be added back.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`null` \\| `Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`null` \\| `boolean`",
                "description": "When set to true, no notification will be sent related to this return.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the return was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order that the return was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "received_at",
                "type": "`Date`",
                "description": "The date with timezone at which the return was received.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refund_amount",
                "type": "`number`",
                "description": "The amount that should be refunded as a result of the return.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_data",
                "type": "`Record<string, unknown>`",
                "description": "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_method",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)",
                "description": "The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "status",
                "type": "[ReturnStatus](../../entities/enums/entities.ReturnStatus.mdx)",
                "description": "Status of the Return.",
                "optional": false,
                "defaultValue": "requested",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the swap that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "shipping_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the shipping address that the new items should be sent to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "shipping_address_id",
            "type": "`string`",
            "description": "The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_methods",
            "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
            "description": "The details of the shipping methods used to fulfill the additional items purchased.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the claim that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The shipping method's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the shipping method price include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price",
                "type": "`number`",
                "description": "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "return_id",
                "type": "`string`",
                "description": "The ID of the return that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "return_order",
                "type": "[Return](../../entities/classes/entities.Return.mdx)",
                "description": "The details of the return that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_option",
                "type": "[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)",
                "description": "The details of the shipping option the method was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_option_id",
                "type": "`string`",
                "description": "The ID of the Shipping Option that the Shipping Method is built from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_lines",
                "type": "[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]",
                "description": "The details of the tax lines applied on the shipping method.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`number`",
                "description": "The total of tax",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />

___

### retrieveByCartId

Retrieve a Swap's details by the ID of its cart.

#### Example

```ts
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.swaps.retrieveByCartId(cartId)
.then(({ swap }) => {
  console.log(swap.id);
})
```

#### Parameters

<ParameterTypes parameters={[
  {
    "name": "cart_id",
    "type": "`string`",
    "description": "The cart's ID.",
    "optional": false,
    "defaultValue": "",
    "expandable": false,
    "children": []
  },
  {
    "name": "customHeaders",
    "type": "`Record<string, any>`",
    "description": "Custom headers to attach to the request.",
    "optional": false,
    "defaultValue": "{}",
    "expandable": false,
    "children": []
  }
]} expandUrl="https://docs.medusajs.com/js-client/overview#expanding-fields"/>

#### Returns

<ParameterTypes parameters={[
  {
    "name": "ResponsePromise",
    "type": "ResponsePromise&#60;StoreSwapsRes&#62;",
    "optional": false,
    "defaultValue": "",
    "description": "Resolves to the swap's details.",
    "expandable": false,
    "children": [
      {
        "name": "swap",
        "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
        "description": "Swap details.",
        "optional": false,
        "defaultValue": "",
        "expandable": false,
        "children": [
          {
            "name": "additional_items",
            "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
            "description": "The details of the new products to send to the customer, represented as line items.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "adjustments",
                "type": "[LineItemAdjustment](../../entities/classes/entities.LineItemAdjustment.mdx)[]",
                "description": "The details of the item's adjustments, which are available when a discount is applied on the item.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "allow_discounts",
                "type": "`boolean`",
                "description": "Flag to indicate if the Line Item should be included when doing discount calculations.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`string`",
                "description": "The ID of the claim that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "description",
                "type": "`null` \\| `string`",
                "description": "A more detailed description of the contents of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`null` \\| `number`",
                "description": "The total of discount of the line item rounded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfilled_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been fulfilled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`null` \\| `number`",
                "description": "The total of the gift card of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "has_shipping",
                "type": "`null` \\| `boolean`",
                "description": "Flag to indicate if the Line Item has fulfillment associated with it.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The line item's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Indicates if the line item unit\\_price include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "is_giftcard",
                "type": "`boolean`",
                "description": "Flag to indicate if the Line Item is a Gift Card.",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "is_return",
                "type": "`boolean`",
                "description": "Is the item being returned",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_edit",
                "type": "`null` \\| [OrderEdit](../../entities/classes/entities.OrderEdit.mdx)",
                "description": "The details of the order edit.",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_edit_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order edit that the item may belong to.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order that the line item may belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_item_id",
                "type": "`null` \\| `string`",
                "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.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_tax_total",
                "type": "`null` \\| `number`",
                "description": "The original tax total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "original_total",
                "type": "`null` \\| `number`",
                "description": "The original total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "product_id",
                "type": "`null` \\| `string`",
                "description": "",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "quantity",
                "type": "`number`",
                "description": "The quantity of the content in the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`null` \\| `number`",
                "description": "The total of discount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable",
                "type": "`null` \\| `number`",
                "description": "The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returned_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipped_quantity",
                "type": "`null` \\| `number`",
                "description": "The quantity of the Line Item that has been shipped.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "should_merge",
                "type": "`boolean`",
                "description": "Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.",
                "optional": false,
                "defaultValue": "true",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`null` \\| `number`",
                "description": "The subtotal of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that the line item may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_lines",
                "type": "[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)[]",
                "description": "The details of the item's tax lines.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "thumbnail",
                "type": "`null` \\| `string`",
                "description": "A URL string to a small image of the contents of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "title",
                "type": "`string`",
                "description": "The title of the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`null` \\| `number`",
                "description": "The total amount of the line item",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "unit_price",
                "type": "`number`",
                "description": "The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "variant",
                "type": "[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)",
                "description": "The details of the product variant that this item was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "variant_id",
                "type": "`null` \\| `string`",
                "description": "The id of the Product Variant contained in the Line Item.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "allow_backorder",
            "type": "`boolean`",
            "description": "If true, swaps can be completed with items out of stock",
            "optional": false,
            "defaultValue": "false",
            "expandable": false,
            "children": []
          },
          {
            "name": "canceled_at",
            "type": "`Date`",
            "description": "The date with timezone at which the Swap was canceled.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "cart",
            "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
            "description": "The details of the cart that the customer uses to complete the swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The billing address's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "completed_at",
                "type": "`Date`",
                "description": "The date with timezone at which the cart was completed.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "context",
                "type": "`Record<string, unknown>`",
                "description": "The context of the cart which can include info like IP or user agent.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer the cart belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The customer's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "An array of details of all discounts applied to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the cart",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "An array of details of all gift cards applied to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The cart's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a cart in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of items with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The line items added to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"cart\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"cart\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)",
                "description": "The details of the payment associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "payment_authorized_at",
                "type": "`Date`",
                "description": "The date with timezone at which the payment was authorized.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_id",
                "type": "`string`",
                "description": "The payment's ID if available",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_session",
                "type": "`null` \\| [PaymentSession](../../entities/classes/entities.PaymentSession.mdx)",
                "description": "The details of the selected payment session in the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "payment_sessions",
                "type": "[PaymentSession](../../entities/classes/entities.PaymentSession.mdx)[]",
                "description": "The details of all payment sessions created on the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order associated with this cart is returned.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The region's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The sales channel ID the cart is associated with.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "`null` \\| [Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The shipping address's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods added to the cart.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of shipping with taxes",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the cart",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the cart",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "type",
                "type": "[CartType](../../entities/enums/entities.CartType.mdx)",
                "description": "The cart's type.",
                "optional": false,
                "defaultValue": "default",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "cart_id",
            "type": "`string`",
            "description": "The ID of the cart that the customer uses to complete the swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "confirmed_at",
            "type": "`Date`",
            "description": "The date with timezone at which the Swap was confirmed by the Customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "created_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was created.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "deleted_at",
            "type": "`null` \\| `Date`",
            "description": "The date with timezone at which the resource was deleted.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "difference_due",
            "type": "`number`",
            "description": "The difference amount between the order’s 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.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "fulfillment_status",
            "type": "[SwapFulfillmentStatus](../../entities/enums/entities.SwapFulfillmentStatus.mdx)",
            "description": "The status of the Fulfillment of the Swap.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The swap's fulfillments are canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "FULFILLED",
                "type": "`\"fulfilled\"`",
                "description": "The swap's items are fulfilled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_FULFILLED",
                "type": "`\"not_fulfilled\"`",
                "description": "The swap's items aren't fulfilled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_SHIPPED",
                "type": "`\"partially_shipped\"`",
                "description": "Some of the swap's items are shipped.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REQUIRES_ACTION",
                "type": "`\"requires_action\"`",
                "description": "The swap's fulfillments require an action.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "SHIPPED",
                "type": "`\"shipped\"`",
                "description": "The swap's items are shipped.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "fulfillments",
            "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
            "description": "The details of the fulfillments that are used to send the new items to the customer.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Fulfillment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`string`",
                "description": "The ID of the Claim that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "This contains all the data necessary for the Fulfillment provider to handle the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The fulfillment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of the fulfillment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[FulfillmentItem](../../entities/classes/entities.FulfillmentItem.mdx)[]",
                "description": "The Fulfillment Items in the Fulfillment. These hold information about how many of each Line Item has been fulfilled.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "location_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the stock location the fulfillment will be shipped from",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be sent.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the Order that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider",
                "type": "[FulfillmentProvider](../../entities/classes/entities.FulfillmentProvider.mdx)",
                "description": "The details of the fulfillment provider responsible for handling the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The ID of the Fulfillment Provider responsible for handling the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipped_at",
                "type": "`Date`",
                "description": "The date with timezone at which the Fulfillment was shipped.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the fulfillment may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the Swap that the Fulfillment belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tracking_links",
                "type": "[TrackingLink](../../entities/classes/entities.TrackingLink.mdx)[]",
                "description": "The Tracking Links that can be used to track the status of the Fulfillment. These will usually be provided by the Fulfillment Provider.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tracking_numbers",
                "type": "`string`[]",
                "description": "The tracking numbers that can be used to track the status of the fulfillment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "id",
            "type": "`string`",
            "description": "The swap's ID",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "idempotency_key",
            "type": "`string`",
            "description": "Randomly generated key used to continue the completion of the swap in case of failure.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "metadata",
            "type": "`Record<string, unknown>`",
            "description": "An optional key-value map with additional details",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "no_notification",
            "type": "`boolean`",
            "description": "If set to true, no notification will be sent related to this swap",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "order",
            "type": "[Order](../../entities/classes/entities.Order.mdx)",
            "description": "The details of the order that the swap belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "billing_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the billing address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "billing_address_id",
                "type": "`string`",
                "description": "The ID of the billing address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`Date`",
                "description": "The date the order was canceled on.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claims",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)[]",
                "description": "The details of the claims created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character currency code that is used in the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "[Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "The details of the customer associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`string`",
                "description": "The ID of the customer associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discount_total",
                "type": "`number`",
                "description": "The total of discount rounded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "discounts",
                "type": "[Discount](../../entities/classes/entities.Discount.mdx)[]",
                "description": "The details of the discounts applied on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "display_id",
                "type": "`number`",
                "description": "The order's display ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "draft_order",
                "type": "[DraftOrder](../../entities/classes/entities.DraftOrder.mdx)",
                "description": "The details of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "draft_order_id",
                "type": "`string`",
                "description": "The ID of the draft order this order was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "edits",
                "type": "[OrderEdit](../../entities/classes/entities.OrderEdit.mdx)[]",
                "description": "The details of the order edits done on the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "email",
                "type": "`string`",
                "description": "The email associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "external_id",
                "type": "`null` \\| `string`",
                "description": "The ID of an external order.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillment_status",
                "type": "[FulfillmentStatus](../../entities/enums/entities.FulfillmentStatus.mdx)",
                "description": "The order's fulfillment status",
                "optional": false,
                "defaultValue": "not_fulfilled",
                "expandable": false,
                "children": []
              },
              {
                "name": "fulfillments",
                "type": "[Fulfillment](../../entities/classes/entities.Fulfillment.mdx)[]",
                "description": "The details of the fulfillments created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_card_tax_total",
                "type": "`number`",
                "description": "The total of gift cards with taxes",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_total",
                "type": "`number`",
                "description": "The total of gift cards",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "gift_card_transactions",
                "type": "[GiftCardTransaction](../../entities/classes/entities.GiftCardTransaction.mdx)[]",
                "description": "The gift card transactions made in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "gift_cards",
                "type": "[GiftCard](../../entities/classes/entities.GiftCard.mdx)[]",
                "description": "The details of the gift card used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The order's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the processing of the order in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "item_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on items",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that belong to the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`boolean`",
                "description": "Flag for describing whether or not notifications related to this should be send.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "object",
                "type": "`\"order\"`",
                "description": "",
                "optional": false,
                "defaultValue": "\"order\"",
                "expandable": false,
                "children": []
              },
              {
                "name": "paid_total",
                "type": "`number`",
                "description": "The total amount paid",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "payment_status",
                "type": "[PaymentStatus](../../entities/enums/entities.PaymentStatus.mdx)",
                "description": "The order's payment status",
                "optional": false,
                "defaultValue": "not_paid",
                "expandable": false,
                "children": []
              },
              {
                "name": "payments",
                "type": "[Payment](../../entities/classes/entities.Payment.mdx)[]",
                "description": "The details of the payments used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "raw_discount_total",
                "type": "`number`",
                "description": "The total of discount",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refundable_amount",
                "type": "`number`",
                "description": "The amount that can be refunded",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunded_total",
                "type": "`number`",
                "description": "The total amount refunded if the order is returned.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refunds",
                "type": "[Refund](../../entities/classes/entities.Refund.mdx)[]",
                "description": "The details of the refunds created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region",
                "type": "[Region](../../entities/classes/entities.Region.mdx)",
                "description": "The details of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "region_id",
                "type": "`string`",
                "description": "The ID of the region this order was created in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "returnable_items",
                "type": "[LineItem](../../entities/classes/entities.LineItem.mdx)[]",
                "description": "The details of the line items that are returnable as part of the order, swaps, or claims",
                "optional": true,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "returns",
                "type": "[Return](../../entities/classes/entities.Return.mdx)[]",
                "description": "The details of the returns created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel",
                "type": "[SalesChannel](../../entities/classes/entities.SalesChannel.mdx)",
                "description": "The details of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "sales_channel_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the sales channel this order belongs to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_address",
                "type": "[Address](../../entities/classes/entities.Address.mdx)",
                "description": "The details of the shipping address associated with the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_address_id",
                "type": "`string`",
                "description": "The ID of the shipping address associated with the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_methods",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
                "description": "The details of the shipping methods used in the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_tax_total",
                "type": "`null` \\| `number`",
                "description": "The tax total applied on shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_total",
                "type": "`number`",
                "description": "The total of shipping",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "status",
                "type": "[OrderStatus](../../entities/enums/entities.OrderStatus.mdx)",
                "description": "The order's status",
                "optional": false,
                "defaultValue": "pending",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swaps",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)[]",
                "description": "The details of the swaps created for the order.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_rate",
                "type": "`null` \\| `number`",
                "description": "The order's tax rate",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`null` \\| `number`",
                "description": "The total of tax",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the order",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "order_id",
            "type": "`string`",
            "description": "The ID of the order that the swap belongs to.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "payment",
            "type": "[Payment](../../entities/classes/entities.Payment.mdx)",
            "description": "The details of the additional payment authorized by the customer when `difference\\_due` is positive.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "amount",
                "type": "`number`",
                "description": "The amount that the Payment has been authorized for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "amount_refunded",
                "type": "`number`",
                "description": "The amount of the original Payment amount that has been refunded back to the Customer.",
                "optional": false,
                "defaultValue": "0",
                "expandable": false,
                "children": []
              },
              {
                "name": "canceled_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was canceled.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "captured_at",
                "type": "`string` \\| `Date`",
                "description": "The date with timezone at which the Payment was captured.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "currency",
                "type": "[Currency](../../entities/classes/entities.Currency.mdx)",
                "description": "The details of the currency of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "currency_code",
                "type": "`string`",
                "description": "The 3 character ISO currency code of the payment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The payment's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`string`",
                "description": "Randomly generated key used to continue the completion of a payment in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the payment session was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "provider_id",
                "type": "`string`",
                "description": "The id of the Payment Provider that is responsible for the Payment",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that this payment was potentially created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "payment_status",
            "type": "[SwapPaymentStatus](../../entities/enums/entities.SwapPaymentStatus.mdx)",
            "description": "The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": [
              {
                "name": "AWAITING",
                "type": "`\"awaiting\"`",
                "description": "The swap is additional awaiting payment.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CANCELED",
                "type": "`\"canceled\"`",
                "description": "The swap's additional payment is canceled.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CAPTURED",
                "type": "`\"captured\"`",
                "description": "The swap's additional payment is captured.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "CONFIRMED",
                "type": "`\"confirmed\"`",
                "description": "The swap's additional payment is confirmed.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "DIFFERENCE_REFUNDED",
                "type": "`\"difference_refunded\"`",
                "description": "The negative difference amount between the returned item(s) and the new one(s) has been refuneded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "NOT_PAID",
                "type": "`\"not_paid\"`",
                "description": "The swap's additional payment isn't paid.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "PARTIALLY_REFUNDED",
                "type": "`\"partially_refunded\"`",
                "description": "Some of the negative difference amount between the returned item(s) and the new one(s) has been refuneded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REFUNDED",
                "type": "`\"refunded\"`",
                "description": "The amount in the associated order has been refunded.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "REQUIRES_ACTION",
                "type": "`\"requires_action\"`",
                "description": "The swap's payment requires an action.",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "return_order",
            "type": "[Return](../../entities/classes/entities.Return.mdx)",
            "description": "The details of the return that belongs to the swap, which holds the details on the items being returned.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the claim that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The return's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "idempotency_key",
                "type": "`null` \\| `string`",
                "description": "Randomly generated key used to continue the completion of the return in case of failure.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "items",
                "type": "[ReturnItem](../../entities/classes/entities.ReturnItem.mdx)[]",
                "description": "The details of the items that the customer is returning.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "location_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the stock location the return will be added back.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`null` \\| `Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "no_notification",
                "type": "`null` \\| `boolean`",
                "description": "When set to true, no notification will be sent related to this return.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the return was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the order that the return was created for.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "received_at",
                "type": "`Date`",
                "description": "The date with timezone at which the return was received.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "refund_amount",
                "type": "`number`",
                "description": "The amount that should be refunded as a result of the return.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_data",
                "type": "`Record<string, unknown>`",
                "description": "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "shipping_method",
                "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)",
                "description": "The details of the Shipping Method that will be used to send the Return back. Can be null if the Customer will handle the return shipment themselves.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "status",
                "type": "[ReturnStatus](../../entities/enums/entities.ReturnStatus.mdx)",
                "description": "Status of the Return.",
                "optional": false,
                "defaultValue": "requested",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the swap that the return may belong to.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "shipping_address",
            "type": "[Address](../../entities/classes/entities.Address.mdx)",
            "description": "The details of the shipping address that the new items should be sent to.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "address_1",
                "type": "`null` \\| `string`",
                "description": "Address line 1",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "address_2",
                "type": "`null` \\| `string`",
                "description": "Address line 2",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "city",
                "type": "`null` \\| `string`",
                "description": "City",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "company",
                "type": "`null` \\| `string`",
                "description": "Company name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "country",
                "type": "`null` \\| [Country](../../entities/classes/entities.Country.mdx)",
                "description": "A country object.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "country_code",
                "type": "`null` \\| `string`",
                "description": "The 2 character ISO code of the country in lower case",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "created_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was created.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer",
                "type": "`null` \\| [Customer](../../entities/classes/entities.Customer.mdx)",
                "description": "Available if the relation `customer` is expanded.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "customer_id",
                "type": "`null` \\| `string`",
                "description": "ID of the customer this address belongs to",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "deleted_at",
                "type": "`null` \\| `Date`",
                "description": "The date with timezone at which the resource was deleted.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "first_name",
                "type": "`null` \\| `string`",
                "description": "First name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "ID of the address",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "last_name",
                "type": "`null` \\| `string`",
                "description": "Last name",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "metadata",
                "type": "`Record<string, unknown>`",
                "description": "An optional key-value map with additional details",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "phone",
                "type": "`null` \\| `string`",
                "description": "Phone Number",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "postal_code",
                "type": "`null` \\| `string`",
                "description": "Postal Code",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "province",
                "type": "`null` \\| `string`",
                "description": "Province",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "updated_at",
                "type": "`Date`",
                "description": "The date with timezone at which the resource was updated.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "shipping_address_id",
            "type": "`string`",
            "description": "The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          },
          {
            "name": "shipping_methods",
            "type": "[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)[]",
            "description": "The details of the shipping methods used to fulfill the additional items purchased.",
            "optional": false,
            "defaultValue": "",
            "expandable": true,
            "children": [
              {
                "name": "cart",
                "type": "[Cart](../../entities/classes/entities.Cart.mdx)",
                "description": "The details of the cart that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "cart_id",
                "type": "`string`",
                "description": "The ID of the cart that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "claim_order",
                "type": "[ClaimOrder](../../entities/classes/entities.ClaimOrder.mdx)",
                "description": "The details of the claim that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "claim_order_id",
                "type": "`null` \\| `string`",
                "description": "The ID of the claim that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "data",
                "type": "`Record<string, unknown>`",
                "description": "Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "id",
                "type": "`string`",
                "description": "The shipping method's ID",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "includes_tax",
                "type": "`boolean`",
                "description": "Whether the shipping method price include tax",
                "optional": false,
                "defaultValue": "false",
                "expandable": false,
                "featureFlag": "tax_inclusive_pricing",
                "children": []
              },
              {
                "name": "order",
                "type": "[Order](../../entities/classes/entities.Order.mdx)",
                "description": "The details of the order that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "order_id",
                "type": "`string`",
                "description": "The ID of the order that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "price",
                "type": "`number`",
                "description": "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "return_id",
                "type": "`string`",
                "description": "The ID of the return that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "return_order",
                "type": "[Return](../../entities/classes/entities.Return.mdx)",
                "description": "The details of the return that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_option",
                "type": "[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)",
                "description": "The details of the shipping option the method was created from.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "shipping_option_id",
                "type": "`string`",
                "description": "The ID of the Shipping Option that the Shipping Method is built from.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "subtotal",
                "type": "`number`",
                "description": "The subtotal of the shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "swap",
                "type": "[Swap](../../entities/classes/entities.Swap.mdx)",
                "description": "The details of the swap that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "swap_id",
                "type": "`string`",
                "description": "The ID of the swap that the shipping method is used in.",
                "optional": false,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "tax_lines",
                "type": "[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]",
                "description": "The details of the tax lines applied on the shipping method.",
                "optional": false,
                "defaultValue": "",
                "expandable": true,
                "children": []
              },
              {
                "name": "tax_total",
                "type": "`number`",
                "description": "The total of tax",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              },
              {
                "name": "total",
                "type": "`number`",
                "description": "The total amount of the shipping",
                "optional": true,
                "defaultValue": "",
                "expandable": false,
                "children": []
              }
            ]
          },
          {
            "name": "updated_at",
            "type": "`Date`",
            "description": "The date with timezone at which the resource was updated.",
            "optional": false,
            "defaultValue": "",
            "expandable": false,
            "children": []
          }
        ]
      }
    ]
  }
]} />
