Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 13, 2025
1 parent ed2b07d commit 591d5ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions api-specs/api/types/cart-discount/CartDiscountPatternTarget.raml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ description: |
Unlike [CartDiscountLineItemsTarget](#cartdiscountlineitemstarget) and [CartDiscountCustomLineItemsTarget](#cartdiscountcustomlineitemstarget), it does not apply to a (Custom) Line Item as a whole, but to individual units of a (Custom) Line Item. The discounts can apply multiple times on the same cart, but each unit can be discounted only once.
properties:
triggerPattern?:
triggerPattern:
type: array
items: PatternComponent
description: |
Units of a (Custom) Line Item that trigger a discount application.
Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.
Based on the availability of matching units, the `triggerPattern` can match multiple times, effecting the number of times the discount will be applied.
Based on the availability of matching units, the `triggerPattern` can match multiple times, limiting the number of maximum times the discount will be applied.
To further limit the discount application, set the `maxOccurrence`.
If empty or not set, the Discount will apply indefinitely.
If empty, the Discount will apply indefinitely.
targetPattern:
type: array
items: PatternComponent
description: |
Units of (Custom) Line Items on which the Discount is applied.
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
Based on the availability of matching units and the limits from the `triggerPattern` or `maxOccurence`, the `targetPattern` can match multiple times.
This array cannot be empty.
maxOccurrence?:
type: integer
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ properties:
type: string
enum:
- pattern
triggerPattern?:
triggerPattern:
type: array
items: PatternComponent
description: |
Units of a (Custom) Line Item that triggered the discount application.
Defines the set of units of (Custom) Line Items in a Cart that triggered the discount application.
targetPattern:
type: array
items: PatternComponent
description: |
Units of (Custom) Line Items on which the Discount is applied.
Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.
maxOccurrence?:
type: integer
description: |
Expand Down

0 comments on commit 591d5ea

Please sign in to comment.