-
Notifications
You must be signed in to change notification settings - Fork 40
PROMO-1050 Add shipping discount action #358
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-luke
wants to merge
5
commits into
main
Choose a base branch
from
promo-1050-new-shipping-action
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
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c66a71d
PROMO-1050 Add shipping discount action
bc-luke fd39e6d
PROMO-1050 Add as_total field to shipping discount action
bc-luke 5236071
PROMO-1050 Remove as_total field from shipping discount action
bc-luke a47c1ba
PROMO-1050 Restrict count of shipping method IDs to 250
bc-luke d15febb
PROMO-1050 Add ShippingDiscountAction as valid action
bc-luke 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 |
---|---|---|
|
@@ -34,7 +34,7 @@ paths: | |
get: | ||
tags: | ||
- Promotions (Bulk) | ||
summary: Get All Promotions | ||
summary: Get All Promotions | ||
description: |- | ||
Returns a list of *promotions*. | ||
|
||
|
@@ -120,7 +120,7 @@ paths: | |
get: | ||
tags: | ||
- Promotions (Single) | ||
summary: Get Promotion | ||
summary: Get Promotion | ||
description: |- | ||
Returns a single *promotion*. | ||
|
||
|
@@ -170,7 +170,7 @@ paths: | |
delete: | ||
tags: | ||
- Promotions (Single) | ||
summary: Delete Promotion | ||
summary: Delete Promotion | ||
description: |- | ||
Deletes a promotion. | ||
|
||
|
@@ -189,7 +189,7 @@ paths: | |
get: | ||
tags: | ||
- Coupon Codes (Bulk) | ||
summary: Get Coupon Codes | ||
summary: Get Coupon Codes | ||
description: |- | ||
Get codes for a particular promotion. | ||
|
||
|
@@ -204,7 +204,7 @@ paths: | |
post: | ||
tags: | ||
- Coupon Codes (Single) | ||
summary: Create A Coupon Code | ||
summary: Create A Coupon Code | ||
description: |- | ||
Create a new code for the promotion. | ||
|
||
|
@@ -242,7 +242,7 @@ paths: | |
delete: | ||
tags: | ||
- Coupon Codes (Bulk) | ||
summary: Delete Multiple Coupon Codes | ||
summary: Delete Multiple Coupon Codes | ||
description: |- | ||
Deletes multiple coupon codes relating to the given promotion. Currently, batches are limited to 50 coupon codes. | ||
|
||
|
@@ -819,6 +819,35 @@ components: | |
minimum: 1 | ||
required: | ||
- zone_ids | ||
ShippingDiscountAction: | ||
title: Shipping Discount Action | ||
type: object | ||
description: |- | ||
**Shipping Discount Action** | ||
Discounts shipping, optionally restricted to specific shipping methods. | ||
properties: | ||
shipping_discount: | ||
type: object | ||
properties: | ||
discount: | ||
$ref: '#/components/schemas/Discount' | ||
method_ids: | ||
description: '' | ||
oneOf: | ||
- type: string | ||
enum: | ||
- '*' | ||
description: All configured shipping methods. | ||
- type: array | ||
uniqueItems: true | ||
description: List of shipping method IDs to which the shipping discount can apply. | ||
items: | ||
type: integer | ||
minimum: 1 | ||
maximum: 250 | ||
required: | ||
- method_ids | ||
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.
|
||
- discount | ||
Discount: | ||
title: Discount | ||
description: '**Discount**' | ||
|
@@ -928,9 +957,9 @@ components: | |
type: array | ||
description: Specifies where the notification message will be displayed. | ||
example: | ||
- HOME_PAGE | ||
- PRODUCT_PAGE | ||
- CART_PAGE | ||
- HOME_PAGE | ||
- PRODUCT_PAGE | ||
- CART_PAGE | ||
- CHECKOUT_PAGE | ||
items: | ||
type: string | ||
|
@@ -946,6 +975,7 @@ components: | |
- $ref: '#/components/schemas/GiftItemAction' | ||
- $ref: '#/components/schemas/FixedPriceSetAction' | ||
- $ref: '#/components/schemas/ShippingAction' | ||
- $ref: '#/components/schemas/ShippingDiscountAction' | ||
ProductOptionsItemMatcher: | ||
title: Product Options Item Matcher | ||
type: object | ||
|
@@ -1338,7 +1368,7 @@ components: | |
success: 0 | ||
failed: 0 | ||
422 - Error Deleting: | ||
example: | ||
example: | ||
errors: | ||
- status: 422 | ||
title: Errors occurred in bulk delete action. | ||
|
Oops, something went wrong.
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.
Do we want to enforce some sort of sanity check maximum? Just so we don't inevitably have merchants finding creative ways to abuse this and potentially listing hundreds of shipping methods? We can always increase the limit if discover a legit use case
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.
Absolutely!