Skip to content
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

[patch] Add support for endpoint for listing customer's redeemables #268

Merged

Conversation

darekg11
Copy link
Contributor

Change type

Patch

Changes:

packages/sdk/src/types/Customers.ts Show resolved Hide resolved
packages/sdk/src/types/Customers.ts Show resolved Hide resolved
camapign_id?: string
category_id?: string
type: 'GIFT_VOUCHER' | 'DISCOUNT_VOUCHER' | 'LOYALTY_CARD'
discount?: DiscountAmount | DiscountPercent | DiscountUnit | DiscountFixed
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we do not cover "Unit Multiple" discount type in SDK. To make it a little more complex, in docs, we have two different types, "Unit" and "Unit Multiple" which have exclusively "units" attribute:

image

image

In the Voucherify domain, there is one DTO for both cases that has the "units" key. In SDK, I don't see the "units" key in the "DiscountUnit" type nor "DiscountUnitMultiple" defined.

packages/sdk/src/types/Customers.ts Show resolved Hide resolved
packages/sdk/src/types/Customers.ts Show resolved Hide resolved
packages/sdk/src/types/Customers.ts Outdated Show resolved Hide resolved
packages/sdk/src/types/Customers.ts Show resolved Hide resolved
Marcin Slezak added 2 commits April 19, 2024 16:42
- types names following CONTRIBUTING.md
- add missing voucher.gift.effect
- adding missing voucher.loyalty_card.next_expiration_date and voucher.loyalty_card.next_expiration_points
- adding missing voucher.redemption.redeemed_points
- voucher.active as optional field
@marcin-slezak marcin-slezak merged commit 3d23881 into voucherifyio:main Apr 24, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants