chore(docs): Generated JS Client Reference (#5421)
* chore(docs): Generated JS Client Reference (automated) * fix js client reference * fix links --------- Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com> Co-authored-by: Shahed nasser <shahednasser@gmail.com>
This commit is contained in:
co-authored by
olivermrbl
Shahed nasser
parent
83f46b9b32
commit
9dcd62c731
@@ -0,0 +1,676 @@
|
||||
---
|
||||
displayed_sidebar: jsClientSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CartsResource
|
||||
|
||||
[carts](../../modules/carts.mdx).CartsResource
|
||||
|
||||
## Properties
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "lineItems",
|
||||
"type": "[`LineItemsResource`](../../line_items/classes/line_items.LineItemsResource.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Methods
|
||||
|
||||
### addShippingMethod
|
||||
|
||||
▸ **addShippingMethod**(`cart_id`, `payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Adds a shipping method to cart
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "Id of cart",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`StorePostCartsCartShippingMethodReq`](../../internal/classes/admin_discounts.internal.internal.StorePostCartsCartShippingMethodReq.mdx)",
|
||||
"description": "Contains id of shipping option and optional data",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### complete
|
||||
|
||||
▸ **complete**(`cart_id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCompleteCartRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecompletecartres)\>
|
||||
|
||||
Completes a cart.
|
||||
Payment authorization is attempted and if more work is required, we simply return the cart for further updates.
|
||||
If payment is authorized and order is not yet created, we make sure to do so.
|
||||
The completion of a cart can be performed idempotently with a provided header Idempotency-Key.
|
||||
If not provided, we will generate one for the request.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCompleteCartRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecompletecartres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCompleteCartRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecompletecartres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCompleteCartRes",
|
||||
"type": "{ `data`: [`Cart`](../../internal/classes/admin_collections.internal.Cart.mdx) ; `type`: ``\"cart\"`` } \\| { `data`: [`Order`](../../internal/classes/admin_collections.internal.Order.mdx) ; `type`: ``\"order\"`` } \\| { `data`: [`Swap`](../../internal/classes/admin_collections.internal.Swap.mdx) ; `type`: ``\"swap\"`` }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### create
|
||||
|
||||
▸ **create**(`payload?`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Creates a cart
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`StorePostCartReq`](../../internal/classes/admin_discounts.internal.internal.StorePostCartReq.mdx)",
|
||||
"description": "is optional and can contain a region_id and items. The cart will contain the payload, if provided. Otherwise it will be empty",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### createPaymentSessions
|
||||
|
||||
▸ **createPaymentSessions**(`cart_id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Creates payment sessions.
|
||||
Initializes the payment sessions that can be used to pay for the items of the cart.
|
||||
This is usually called when a customer proceeds to checkout.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### deleteDiscount
|
||||
|
||||
▸ **deleteDiscount**(`cart_id`, `code`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Removes a discount from cart.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "code",
|
||||
"type": "`string`",
|
||||
"description": "discount code to remove",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### deletePaymentSession
|
||||
|
||||
▸ **deletePaymentSession**(`cart_id`, `provider_id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Removes a payment session from a cart.
|
||||
Can be useful in case a payment has failed
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "provider_id",
|
||||
"type": "`string`",
|
||||
"description": "the provider id of the session e.g. \"stripe\"",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### refreshPaymentSession
|
||||
|
||||
▸ **refreshPaymentSession**(`cart_id`, `provider_id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Refreshes a payment session.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "provider_id",
|
||||
"type": "`string`",
|
||||
"description": "the provider id of the session e.g. \"stripe\"",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### retrieve
|
||||
|
||||
▸ **retrieve**(`cart_id`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Retrieves a cart
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### setPaymentSession
|
||||
|
||||
▸ **setPaymentSession**(`cart_id`, `payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Refreshes a payment session.
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`StorePostCartsCartPaymentSessionReq`](../../internal/classes/admin_discounts.internal.internal.StorePostCartsCartPaymentSessionReq.mdx)",
|
||||
"description": "the provider id of the session e.g. \"stripe\"",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### update
|
||||
|
||||
▸ **update**(`cart_id`, `payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Updates a cart
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`StorePostCartsCartReq`](../../internal/classes/admin_discounts.internal.internal.StorePostCartsCartReq.mdx)",
|
||||
"description": "is required and can contain region_id, email, billing and shipping address",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
___
|
||||
|
||||
### updatePaymentSession
|
||||
|
||||
▸ **updatePaymentSession**(`cart_id`, `provider_id`, `payload`, `customHeaders?`): [`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
Updates the payment method
|
||||
|
||||
#### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "cart_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "provider_id",
|
||||
"type": "`string`",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "[`StorePostCartsCartPaymentSessionUpdateReq`](../../internal/classes/admin_discounts.internal.internal.StorePostCartsCartPaymentSessionUpdateReq.mdx)",
|
||||
"description": "is required",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "customHeaders",
|
||||
"type": "Record<`string`, `any`\\>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "`{}`",
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\>
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ResponsePromise",
|
||||
"type": "[`ResponsePromise`](../../swaps/modules/swaps.internal.mdx#responsepromise)<[`StoreCartsRes`](../../internal/modules/admin_discounts.internal.internal.mdx#storecartsres)\\>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"children": [
|
||||
{
|
||||
"name": "StoreCartsRes",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
Reference in New Issue
Block a user