chore(types,utils): fixes to TSDocs for HTTP types and payment provider (#12102)
This commit is contained in:
1 parent
1377eaadcd
commit
2be03d0d39
2 files changed
+10
No files matched your search
@@ -170,6 +170,11 @@ export interface BaseProductVariant {
|
|||||||
manage_inventory: boolean | null
|
manage_inventory: boolean | null
|
||||||
/**
|
/**
|
||||||
* The variant's inventory quantity if `manage_inventory` is enabled.
|
* The variant's inventory quantity if `manage_inventory` is enabled.
|
||||||
|
* This field is only retrieved in the [Get Product](https://docs.medusajs.com/api/store#products_getproductsid)
|
||||||
|
* and [List Products](https://docs.medusajs.com/api/store#products_getproducts) API routes if you
|
||||||
|
* pass `+variants.inventory_quantity` in the `fields` query parameter.
|
||||||
|
*
|
||||||
|
* Learn more in the [Retrieve Product Variant's Inventory](https://docs.medusajs.com/resources/storefront-development/products/inventory) storefront guide.
|
||||||
*/
|
*/
|
||||||
inventory_quantity?: number
|
inventory_quantity?: number
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -487,6 +487,11 @@ export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
|||||||
* const { amount, currency_code, context } = input
|
* const { amount, currency_code, context } = input
|
||||||
* const externalId = input.data?.id
|
* const externalId = input.data?.id
|
||||||
*
|
*
|
||||||
|
* // Validate context.customer
|
||||||
|
* if (!context || !context.customer) {
|
||||||
|
* throw new Error("Context must include a valid customer.");
|
||||||
|
* }
|
||||||
|
*
|
||||||
* // assuming you have a client that updates the payment
|
* // assuming you have a client that updates the payment
|
||||||
* const response = await this.client.update(
|
* const response = await this.client.update(
|
||||||
* externalId,
|
* externalId,
|
||||||
|
|||||||
Reference in new issue
Block a user