-
Notifications
You must be signed in to change notification settings - Fork 16
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
Added support for get promotion tier endpoint #205
Added support for get promotion tier endpoint #205
Conversation
This reverts commit 8e06921.
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.
Requested changes:
- invalid JSDoc
- incorrect parameter name
- PR is missing CHANGESET file - please read: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/CONTRIBUTING.md#about-changesets-for-contributors
- Please add this new method to examples in: https://github.com/voucherifyio/voucherify-js-sdk/tree/main/packages/sdk#promotions
packages/sdk/src/PromotionTiers.ts
Outdated
@@ -21,6 +21,12 @@ export class PromotionTiers { | |||
/** | |||
* @see https://docs.voucherify.io/reference/add-promotion-tier-to-campaign | |||
*/ | |||
public get(promotionId: string) { |
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.
Parameter name is misleading.
This endpoint is returning tier based on tierId - https://docs.voucherify.io/reference/get-promotion-tier
Please change parameter name to tierId
packages/sdk/src/PromotionTiers.ts
Outdated
return this.client.get<T.PromotionTierGetResponse>(`/promotions/tiers/${encode(promotionId)}`) | ||
} | ||
/** | ||
* @see https://docs.voucherify.io/reference/get-promotion-tier |
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.
This JSdoc is placed above wrong method.
This shuld be above get
method
@p-zielinski thank you for your contribution. Pull request that triggered release: #211 |
as the title says.
added support for https://docs.voucherify.io/reference/get-promotion-tier