Files
medusa-store/www/utils/generated/oas-output/schemas/BaseApplicationMethod.ts
Shahed Nasser 97b72f4662 oas: [15/n] improve oas schemas (#9216)
Improve OAS schemas [15/n]

Note: validation error will be fixed once #9218 is merged
2024-09-26 13:03:41 +00:00

68 lines
2.6 KiB
TypeScript

/**
* @schema BaseApplicationMethod
* type: object
* description: The application method's details.
* x-schemaName: BaseApplicationMethod
* required:
* - id
* properties:
* id:
* type: string
* title: id
* description: The application method's ID.
* type:
* type: string
* description: How the associated promotion is applied. `fixed` means a fixed amount is discounted; `percentage` means a percentage of the original amount is discounted.
* enum:
* - fixed
* - percentage
* target_type:
* type: string
* description: Which item does the promotion apply to. `items` mean the promotion applies to the cart's items; `shipping_methods` means the promotion applies to the cart's shipping methods; `order` means the promotion applies on the entire order.
* enum:
* - items
* - shipping_methods
* - order
* allocation:
* type: string
* description: How is the promotion amount discounted. `each` means the discounted amount is applied on each applicable item; `across` means the discounted amount is split accross the applicable items.
* enum:
* - each
* - across
* value:
* type: number
* title: value
* description: The amount to be discounted.
* currency_code:
* type: string
* title: currency_code
* description: The application method's currency code.
* example: usd
* max_quantity:
* type: number
* title: max_quantity
* description: The max quantity allowed in the cart for the associated promotion to be applied.
* buy_rules_min_quantity:
* type: number
* title: buy_rules_min_quantity
* description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`.
* apply_to_quantity:
* type: number
* title: apply_to_quantity
* description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `1`.
* promotion:
* $ref: "#/components/schemas/BasePromotion"
* target_rules:
* type: array
* description: The application method's target rules. These rules indicate which items / shipping methods the promotion applies to.
* items:
* $ref: "#/components/schemas/BasePromotionRule"
* buy_rules:
* type: array
* description: The application method's buy rules. These rules indicate which items are part of the "Buy X" rule.
* items:
* $ref: "#/components/schemas/BasePromotionRule"
*
*/