-
Notifications
You must be signed in to change notification settings - Fork 215
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
feat(orders): ORDERS-5715 add OrderFee interface, add fees field to Order interface #2066
Conversation
packages/core/src/order/order.ts
Outdated
@@ -34,6 +34,15 @@ export default interface Order { | |||
taxes: Tax[]; | |||
taxTotal: number; | |||
channelId: number; | |||
fees?: OrderFee[]; |
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.
Is this supposed to an optional?
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.
I marked it as optional because fees are only included by default when coming from api/storefront/orders/
if PROJECT-5577.support_order_level_fee
is on.
I suppose that the field itself should always be in the payload (even if it's just an empty array), so it should be fine to have as mandatory.
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.
I think that makes sense to mark it mandatory.
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.
Marked as mandatory now.
@matt-evangelidis For commit validation the scope needs to be |
09a9b65
to
68c2cc2
Compare
68c2cc2
to
5377051
Compare
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.
Nicely done, looks good. Can you please check if checkout js build works fine with this change before merging.
@animesh1987 I don't have write access to this repo. Are you alright to merge? |
What?
This PR adds an
OrderFee
interface and afees
field to theOrder
interface inorder.ts
.Why?
This adds some interfaces for fees specific to the Orders domain to provide separation between Checkout and Orders, as each domain's definitions of fees are likely to drift further apart over time.
Testing / Proof
N/A
@bigcommerce/team-checkout @bigcommerce/team-orders