Skip to content

Commit eee9743

Browse files
authored
Merge pull request #9 from EnsembleLab/master
Changed Rewards to Wallets
2 parents f931776 + 4f5128d commit eee9743

File tree

1 file changed

+80
-7
lines changed

1 file changed

+80
-7
lines changed

apiary.apib

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ Note: Do html redirect to the password reset successful page and kill the active
320320
"addressBook": [{
321321
"phonenumber": "+2348077788899",
322322
"email": "[email protected]",
323+
"validated": false,
323324
"address": {
324325
"line1": "address line 1",
325326
"line2": "address line 2",
@@ -336,6 +337,7 @@ Note: Do html redirect to the password reset successful page and kill the active
336337
"addressBook": [{
337338
"phonenumber": "+2348077788899",
338339
"email": "[email protected]",
340+
"validated": false,
339341
"address": {
340342
"line1": "address line 1",
341343
"line2": "address line 2",
@@ -407,7 +409,8 @@ Note: Do html redirect to the password reset successful page and kill the active
407409
"lastname": "Doe",
408410
"addressBook": [{
409411
"phonenumber": "+2348077788899",
410-
"email": "[email protected]"
412+
"email": "[email protected]",
413+
"validated": false
411414
}]
412415
}
413416
}
@@ -2213,7 +2216,7 @@ Note: Do html redirect to the password reset successful page and kill the active
22132216
}
22142217

22152218
### Refund Booking [POST /bookings/:booking_id/refund]
2216-
Refunds should go to the customers rewards balance, so he can use it for another booking
2219+
Refunds should go to the customers wallet's balance, so he can use it for another booking
22172220

22182221
+ Headers
22192222
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3852,9 +3855,10 @@ Remember to requery the transaction to confirm the true state from the processor
38523855

38533856
+ Response 401 (text/html)
38543857

3855-
## Rewards [/rewards]
3858+
## Wallets [/wallets]
38563859

3857-
### Get Reward Balance [GET /rewards/balance]
3860+
### Get Wallet Balance [GET /wallets/balance]
3861+
If user_id is not provided, get current users wallet balance
38583862

38593863
+ Headers
38603864
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3911,14 +3915,83 @@ Remember to requery the transaction to confirm the true state from the processor
39113915
"data": {}
39123916
}
39133917

3914-
### Get User Rewards [GET /rewards/me]
3918+
### Get Current User's Wallet Statement [GET /wallets/me]
3919+
3920+
+ Headers
3921+
Authorization: dd3343ae567c8f8a0b9e8f
3922+
3923+
+ Parameters
3924+
+ skip (Number) - Number of records to skip
3925+
+ limit (Number) - Number of records to return
3926+
3927+
+ Response 200 (application/json)
3928+
3929+
{
3930+
"status": "success",
3931+
"data": [{
3932+
"id": "2d3343ae567c8f8a0b9e8f",
3933+
"balance": 2000,
3934+
"description": "Reward for writing this description",
3935+
"user_id": "2d3343ae567c8f8a0b9e8f"
3936+
},{
3937+
"id": "2d3343ae567c8f8a0b9e8f",
3938+
"balance": 2000,
3939+
"description": "Reward for writing this description",
3940+
"user_id": "2d3343ae567c8f8a0b9e8f"
3941+
}],
3942+
"total": 200,
3943+
"limit": 10,
3944+
"skip": 20
3945+
}
3946+
3947+
+ Response 400 (application/json)
3948+
3949+
{
3950+
"status": "error",
3951+
"message": "bad request", // May come with a more detailed message sometimes
3952+
"data": {}
3953+
}
3954+
3955+
+ Response 503 (application/json)
3956+
3957+
{
3958+
"status": "error",
3959+
"message": "forbidden", // May come with a more detailed message sometimes
3960+
"data": {}
3961+
}
3962+
3963+
+ Response 404 (application/json)
3964+
3965+
{
3966+
"status": "error",
3967+
"message": "not found"
3968+
}
3969+
3970+
+ Response 500 (application/json)
3971+
3972+
{
3973+
"status": "error",
3974+
"message": "server error", // May come with a more detailed message sometimes
3975+
"data": {}
3976+
}
3977+
3978+
+ Response 401 (application/json)
3979+
3980+
{
3981+
"status": "error",
3982+
"message": "unauthorized", // May come with a more detailed message sometimes
3983+
"data": {}
3984+
}
3985+
3986+
### Get User's Wallet Statement [GET /wallets/user/:user_id]
39153987

39163988
+ Headers
39173989
Authorization: dd3343ae567c8f8a0b9e8f
39183990

39193991
+ Parameters
39203992
+ skip (Number) - Number of records to skip
39213993
+ limit (Number) - Number of records to return
3994+
+ user_id (String) - Id of the user we want to get a statement for
39223995

39233996
+ Response 200 (application/json)
39243997

@@ -3979,7 +4052,7 @@ Remember to requery the transaction to confirm the true state from the processor
39794052
"data": {}
39804053
}
39814054

3982-
### Credit User Rewards [POST /rewards/credit]
4055+
### Credit User's Wallet [POST /wallets/credit]
39834056

39844057
+ Headers
39854058
Authorization: dd3343ae567c8f8a0b9e8f
@@ -4043,7 +4116,7 @@ Remember to requery the transaction to confirm the true state from the processor
40434116
"data": {}
40444117
}
40454118

4046-
### Debit User Rewards [POST /rewards/debit]
4119+
### Debit User's Wallet [POST /wallets/debit]
40474120

40484121
+ Headers
40494122
Authorization: dd3343ae567c8f8a0b9e8f

0 commit comments

Comments
 (0)