-
Notifications
You must be signed in to change notification settings - Fork 13
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
Pz/types 010 - loyalties members #238
Conversation
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.
Adjust type names to a new guideline
packages/sdk/README.md
Outdated
@@ -1064,6 +1072,12 @@ client.loyalties.createMember(campaignId, member) | |||
client.loyalties.getMember(campaignId, memberId) | |||
``` | |||
|
|||
#### [Get Loyalty Program Member Without CampaignId](https://docs.voucherify.io/reference/get-member-1) |
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.
Few issues here:
- The header and method name suggest that we do not need a campaign ID, but you expect it in params and link to documentation where the campaign ID is required.
- I do not like naming. I understand that we have two similar endpoints, one that expects just member ID and the second one that needs campaign ID in addition. In documentation, both are described as
Get Member
. I guess (but we can confirm it) that the one that needs a campaign ID is a legacy one. We should give a name that will be intuitive for a developer who does not know about the context (legacy method). So, maybegetMemberById
?
packages/sdk/README.md
Outdated
#### [Add Or Remove Loyalty Card Balance](https://docs.voucherify.io/reference/add-remove-loyalty-card-balance-1) | ||
|
||
```javascript | ||
client.loyalties.addOrRemoveLoyaltyCardBalance(memberId, balance, campaignId) |
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.
Naming: addOrRemoveLoyaltyCardBalance
-> addOrRemoveCardBalance
?
'@voucherify/sdk': minor
Add support for few endpoints of Loyalties API.
GET /loyalties/members/{memberId}
,GET /loyalties/members/{memberId}/activities
,GET /loyalties/members/{memberId}/rewards
,POST /loyalties/{campaignId}/members/{memberId}/transfers
,GET /loyalties/{campaignId}/members/{memberId}/points-expiration
,GET /loyalties/members/{memberId}/transactions
,GET /loyalties/{campaignId}/members/{memberId}/transactions
,POST /loyalties/members/{memberId}/transactions/export
andPOST /loyalties/{campaignId}/members/{memberId}/transactions/export
(examples of usage available in readme.md)LoyaltiesTransferPointsResponseBody
,LoyaltiesTransferPointsRequestBody
,LoyaltiesListMemberRewardsRequestQuery
,LoyaltiesListMemberRewardsResponseBody
,LoyaltiesGetPointsExpirationRequestQuery
,LoyaltiesGetPointsExpirationResponseBody
,LoyaltiesListCardTransactionsRequestQuery
,LoyaltiesListCardTransactionsResponseBody
,LoyaltiesExportCardTransactionsRequestBody
,LoyaltiesExportCardTransactionsResponseBody
,LoyaltiesAddOrRemoveCardBalanceRequestBody
,LoyaltiesAddOrRemoveCardBalanceResponseBody
,LoyaltyCardTransaction
,SimpleLoyaltyVoucher
,LoyaltiesTransferPoints
,LoyaltyCardTransactionsFields
,LoyaltyCardTransactionsType
,Reward
,RewardTypeCampaign
,RewardTypeCoin
,RewardTypeMaterial
,RewardType
,RewardAssignment