-
Notifications
You must be signed in to change notification settings - Fork 52
feat(Promotions): PROMO-1240 Added field maximum_allowed_discount_amount #1110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
bc-anshumishra
wants to merge
1
commit into
main
Choose a base branch
from
PROMO-1240-feat
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -1089,13 +1089,17 @@ components: | |
percentage_amount: | ||
type: string | ||
description: The amount of discount (percentage off) to apply. | ||
maximum_allowed_discount_amount: | ||
$ref: '#/components/schemas/MaximumAllowedDiscountAmount' | ||
description: '**Percentage Discount**' | ||
FixedDiscount: | ||
title: Fixed Discount | ||
type: object | ||
properties: | ||
fixed_amount: | ||
$ref: '#/components/schemas/Money' | ||
maximum_allowed_discount_amount: | ||
$ref: '#/components/schemas/MaximumAllowedDiscountAmount' | ||
donald-nguyen-bc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
description: '**Fixed Discount**' | ||
Money: | ||
title: Money | ||
|
@@ -1105,6 +1109,14 @@ components: | |
**Money** | ||
Represents a monetary value in the store’s default currency. | ||
example: '12.95' | ||
MaximumAllowedDiscountAmount: | ||
pattern: '[0-9]+(\.[0-9]+)?' | ||
type: string | ||
description: The maximum monetary value that can be applied as a discount. The application of this maximum depends on the discount type`:` | ||
Discount on shipping`:` Maximum discount total applies to ALL shipping destinations combined. Maximum total is divide evenly amongst all shipping destinations. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably can make this PR based on Jasper's PR for shipping discount: #1100 so we can show the proof for shipping discount as well ? |
||
Discount on products`:` Maximum discount total applies to ALL products combined. Maximum total is divided based on existing weighting logic amongst all products. | ||
Discount on order subtotal`:` Maximum discount total applies to entire order total. | ||
example: '10.50' | ||
OptionalCursorCollectionMeta: | ||
title: Collection Meta | ||
type: object | ||
|
@@ -1901,8 +1913,8 @@ components: | |
data: | ||
- id: 1 | ||
redemption_type: AUTOMATIC | ||
name: Buy Product X Get Free Shipping | ||
display_name: WOW!!! FREE SHIPPING for Product X | ||
name: Buy Product worth X Get Y% off upto Z | ||
display_name: Shop for X and get Y% off upto Z | ||
created_from: api | ||
channels: | ||
- id: 1 | ||
|
@@ -1923,7 +1935,7 @@ components: | |
- action: | ||
cart_value: | ||
discount: | ||
fixed_amount: '12.95' | ||
percentage_amount: '10' | ||
apply_once: true | ||
stop: true | ||
condition: | ||
|
@@ -1933,7 +1945,7 @@ components: | |
- 1 | ||
- 2 | ||
- 3 | ||
minimum_spend: '12.95' | ||
minimum_spend: '100.00' | ||
minimum_quantity: 1 | ||
current_uses: 2 | ||
max_uses: 10 | ||
|
@@ -1944,7 +1956,7 @@ components: | |
can_be_used_with_other_promotions: false | ||
currency_code: USD | ||
notifications: | ||
- content: Congratulations! Youʼve received a free %ACTION.FREE_PRODUCT% | ||
- content: Get 10% off on orders over $100 containing Brand A, B or C products. | ||
type: UPSELL | ||
locations: | ||
- HOME_PAGE | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.