-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated API from documentation release
- Loading branch information
1 parent
9c2f053
commit 175b7fc
Showing
20 changed files
with
274 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
api-specs/api/types/cart-discount/CartDiscountPatternTarget.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#%RAML 1.0 DataType | ||
(package): 'CartDiscount' | ||
type: CartDiscountTarget | ||
displayName: CartDiscountPatternTarget | ||
discriminatorValue: pattern | ||
description: | | ||
Pattern targets can be used to model Buy and Get discounts. | ||
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?: | ||
type: array | ||
items: PatternComponent | ||
description: | | ||
Units of a (Custom) Line Item 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. | ||
To further limit the discount application, set the `maxOccurrence`. | ||
If empty or not set, the Discount will apply indefinitely. | ||
targetPattern: | ||
type: array | ||
items: PatternComponent | ||
description: | | ||
Units of (Custom) Line Items 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. | ||
maxOccurrence?: | ||
type: integer | ||
description: | | ||
Maximum number of times the Discount can apply on a Cart. | ||
If empty or not set, the Discount will apply indefinitely. | ||
selectionMode: | ||
type: SelectionMode | ||
description: | | ||
Determines which of the matching units of (Custom) Line Items are discounted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
api-specs/api/types/cart-discount/CountOnCustomLineItemUnits.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#%RAML 1.0 DataType | ||
(package): CartDiscount | ||
type: PatternComponent | ||
(beta): true | ||
displayName: CountOnCustomLineItemUnits | ||
discriminatorValue: CountOnCustomLineItemUnits | ||
properties: | ||
predicate: | ||
type: string | ||
description: | | ||
Valid [CustomLineItem predicate](/../api/projects/predicates#customlineitem-field-identifiers) that determines the units participating in the Discount. | ||
minCount?: | ||
type: integer | ||
description: | | ||
Minimum number of units of a Custom Line Item that match the predicate. | ||
minimum: 0 | ||
default: 1 | ||
maxCount?: | ||
type: integer | ||
description: | | ||
Maximum number of units of a Custom Line Item that match the predicate. | ||
There might be more units matching the predicate, but they will not be participating to the resulting set. | ||
The value must be greater than or equal to `minCount`. | ||
If not provided, the component will match all units that satisfy the predicate. | ||
minimum: 1 | ||
excludeCount?: | ||
type: integer | ||
description: | | ||
Number of units of a Custom Line Item to exclude on every application of the Discount. | ||
Set only when configuring the `targetPattern`. | ||
The units matched first (satisfying the pattern component) will be excluded from the resulting set. | ||
The `minCount`and `maxCount` are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. | ||
For example, if 5 jeans are required but only 3 should be discounted, the `excludeCount` value must be 2. | ||
default: 0 |
37 changes: 37 additions & 0 deletions
37
api-specs/api/types/cart-discount/CountOnLineItemUnits.raml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#%RAML 1.0 DataType | ||
(package): CartDiscount | ||
type: PatternComponent | ||
(beta): true | ||
displayName: CountOnLineItemUnits | ||
discriminatorValue: CountOnLineItemUnits | ||
properties: | ||
predicate: | ||
type: string | ||
description: | | ||
Valid [LineItem predicate](/../api/projects/predicates#lineitem-field-identifiers) that determines the units participating in the Discount. | ||
minCount?: | ||
type: integer | ||
description: | | ||
Minimum number of units of a Line Item that match the predicate. | ||
minimum: 0 | ||
default: 1 | ||
maxCount?: | ||
type: integer | ||
description: | | ||
Maximum number of units of a Line Item that match the predicate. | ||
There might be more units matching the predicate, but they will not be participating to the resulting set. | ||
The value must be greater than or equal to `minCount`. | ||
If not provided, the component will match all units that satisfy the predicate. | ||
minimum: 1 | ||
excludeCount?: | ||
type: integer | ||
description: | | ||
Number of units of a Line Item to exclude on every application of the Discount. | ||
Set only when configuring the `targetPattern`. | ||
The units matched first (satisfying the pattern component) will be excluded from the resulting set. | ||
The `minCount`and `maxCount` are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. | ||
For example, if 5 jeans are required but only 3 should be discounted, the `excludeCount` value must be 2. | ||
default: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#%RAML 1.0 DataType | ||
(package): CartDiscount | ||
type: object | ||
(beta): true | ||
displayName: PatternComponent | ||
discriminator: type | ||
description: | | ||
The pattern component it used to define a set of units based on some criteria. The criteria depends on the type of component used. | ||
properties: | ||
type: | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.