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

Added support for get promotion tier endpoint #205

Merged
merged 5 commits into from
May 12, 2023
Merged

Added support for get promotion tier endpoint #205

merged 5 commits into from
May 12, 2023

Conversation

p-zielinski
Copy link
Contributor

as the title says.
added support for https://docs.voucherify.io/reference/get-promotion-tier

Copy link
Contributor

@darekg11 darekg11 left a comment

Choose a reason for hiding this comment

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

Requested changes:

@@ -21,6 +21,12 @@ export class PromotionTiers {
/**
* @see https://docs.voucherify.io/reference/add-promotion-tier-to-campaign
*/
public get(promotionId: string) {
Copy link
Contributor

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

return this.client.get<T.PromotionTierGetResponse>(`/promotions/tiers/${encode(promotionId)}`)
}
/**
* @see https://docs.voucherify.io/reference/get-promotion-tier
Copy link
Contributor

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 p-zielinski requested a review from darekg11 May 11, 2023 15:14
@darekg11 darekg11 merged commit 312d4a8 into voucherifyio:main May 12, 2023
@github-actions github-actions bot mentioned this pull request May 12, 2023
@darekg11
Copy link
Contributor

@p-zielinski thank you for your contribution.
Your changes has been merged and released as part of 2.2.3 version of the SDK.

Pull request that triggered release: #211

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

2 participants