Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

[RFC] Discount getters #407

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[RFC] Discount getters #407

wants to merge 2 commits into from

Conversation

andrzejewsky
Copy link
Collaborator

  • I'm confirming that if i made any changes to public APIs or exposed any public APIs they are doccumented.

getDiscountedTotals: () => AgnosticTotals;
getDiscountName: () => string;
getDiscountValue: () => number;
getDiscountType: () => string; // fixed or percentage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not necessary

getDiscountId: () => string;
getDiscountedTotals: () => AgnosticTotals;
getDiscountName: () => string;
getDiscountValue: () => number;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should return string eg "-15%" "-20 złotych"

Also I'm thinking about separated getters, which has even more sense as you can have multiple discounts applied to the cart.

```ts
export interface DiscountGetters {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be different between platforms

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants