@@ -2213,7 +2213,7 @@ Note: Do html redirect to the password reset successful page and kill the active
2213
2213
}
2214
2214
2215
2215
### Refund Booking [POST /bookings/:booking_id/refund]
2216
- Refunds should go to the customers rewards balance, so he can use it for another booking
2216
+ Refunds should go to the customers wallet's balance, so he can use it for another booking
2217
2217
2218
2218
+ Headers
2219
2219
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3852,9 +3852,10 @@ Remember to requery the transaction to confirm the true state from the processor
3852
3852
3853
3853
+ Response 401 (text/html)
3854
3854
3855
- ## Rewards [/rewards ]
3855
+ ## Wallets [/wallets ]
3856
3856
3857
- ### Get Reward Balance [GET /rewards/balance]
3857
+ ### Get Wallet Balance [GET /wallets/balance]
3858
+ If user_id is not provided, get current users wallet balance
3858
3859
3859
3860
+ Headers
3860
3861
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3911,7 +3912,7 @@ Remember to requery the transaction to confirm the true state from the processor
3911
3912
" data" : {}
3912
3913
}
3913
3914
3914
- ### Get User Rewards [GET /rewards /me]
3915
+ ### Get Current User's Wallet Statement [GET /wallets /me]
3915
3916
3916
3917
+ Headers
3917
3918
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3971,6 +3972,75 @@ Remember to requery the transaction to confirm the true state from the processor
3971
3972
" data" : {}
3972
3973
}
3973
3974
3975
+ + Response 401 (application/json)
3976
+
3977
+ {
3978
+ " status" : " error" ,
3979
+ " message" : " unauthorized" , // May come with a more detailed message sometimes
3980
+ " data" : {}
3981
+ }
3982
+
3983
+ ### Get User's Wallet Statement [GET /wallets/user/:user_id]
3984
+
3985
+ + Headers
3986
+ Authorization: dd3343ae567c8f8a0b9e8f
3987
+
3988
+ + Parameters
3989
+ + skip (Number) - Number of records to skip
3990
+ + limit (Number) - Number of records to return
3991
+ + user_id (String) - Id of the user we want to get a statement for
3992
+
3993
+ + Response 200 (application/json)
3994
+
3995
+ {
3996
+ " status" : " success" ,
3997
+ " data" : [{
3998
+ " id" : " 2d3343ae567c8f8a0b9e8f" ,
3999
+ " balance" : 2000 ,
4000
+ " description" : " Reward for writing this description" ,
4001
+ " user_id" : " 2d3343ae567c8f8a0b9e8f"
4002
+ },{
4003
+ " id" : " 2d3343ae567c8f8a0b9e8f" ,
4004
+ " balance" : 2000 ,
4005
+ " description" : " Reward for writing this description" ,
4006
+ " user_id" : " 2d3343ae567c8f8a0b9e8f"
4007
+ }],
4008
+ " total" : 200 ,
4009
+ " limit" : 10 ,
4010
+ " skip" : 20
4011
+ }
4012
+
4013
+ + Response 400 (application/json)
4014
+
4015
+ {
4016
+ " status" : " error" ,
4017
+ " message" : " bad request" , // May come with a more detailed message sometimes
4018
+ " data" : {}
4019
+ }
4020
+
4021
+ + Response 503 (application/json)
4022
+
4023
+ {
4024
+ " status" : " error" ,
4025
+ " message" : " forbidden" , // May come with a more detailed message sometimes
4026
+ " data" : {}
4027
+ }
4028
+
4029
+ + Response 404 (application/json)
4030
+
4031
+ {
4032
+ " status" : " error" ,
4033
+ " message" : " not found"
4034
+ }
4035
+
4036
+ + Response 500 (application/json)
4037
+
4038
+ {
4039
+ " status" : " error" ,
4040
+ " message" : " server error" , // May come with a more detailed message sometimes
4041
+ " data" : {}
4042
+ }
4043
+
3974
4044
+ Response 401 (application/json)
3975
4045
3976
4046
{
@@ -3979,7 +4049,7 @@ Remember to requery the transaction to confirm the true state from the processor
3979
4049
" data" : {}
3980
4050
}
3981
4051
3982
- ### Credit User Rewards [POST /rewards /credit]
4052
+ ### Credit User's Wallet [POST /wallets /credit]
3983
4053
3984
4054
+ Headers
3985
4055
Authorization: dd3343ae567c8f8a0b9e8f
@@ -4043,7 +4113,7 @@ Remember to requery the transaction to confirm the true state from the processor
4043
4113
" data" : {}
4044
4114
}
4045
4115
4046
- ### Debit User Rewards [POST /rewards /debit]
4116
+ ### Debit User's Wallet [POST /wallets /debit]
4047
4117
4048
4118
+ Headers
4049
4119
Authorization: dd3343ae567c8f8a0b9e8f
0 commit comments