chore(types,utils): fixes to TSDocs for HTTP types and payment provider (#12102)
This commit is contained in:
@@ -170,6 +170,11 @@ export interface BaseProductVariant {
|
||||
manage_inventory: boolean | null
|
||||
/**
|
||||
* 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
|
||||
/**
|
||||
|
||||
@@ -486,6 +486,11 @@ export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
||||
* ): Promise<UpdatePaymentOutput> {
|
||||
* const { amount, currency_code, context } = input
|
||||
* 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
|
||||
* const response = await this.client.update(
|
||||
|
||||
Reference in New Issue
Block a user