@@ -320,6 +320,7 @@ Note: Do html redirect to the password reset successful page and kill the active
320
320
" addressBook" : [{
321
321
" phonenumber" : " +2348077788899" ,
322
322
323
+ " validated" : false ,
323
324
" address" : {
324
325
" line1" : " address line 1" ,
325
326
" line2" : " address line 2" ,
@@ -336,6 +337,7 @@ Note: Do html redirect to the password reset successful page and kill the active
336
337
" addressBook" : [{
337
338
" phonenumber" : " +2348077788899" ,
338
339
340
+ " validated" : false ,
339
341
" address" : {
340
342
" line1" : " address line 1" ,
341
343
" line2" : " address line 2" ,
@@ -407,7 +409,8 @@ Note: Do html redirect to the password reset successful page and kill the active
407
409
" lastname" : " Doe" ,
408
410
" addressBook" : [{
409
411
" phonenumber" : " +2348077788899" ,
410
-
412
+
413
+ " validated" : false
411
414
}]
412
415
}
413
416
}
@@ -2213,7 +2216,7 @@ Note: Do html redirect to the password reset successful page and kill the active
2213
2216
}
2214
2217
2215
2218
### 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
2217
2220
2218
2221
+ Headers
2219
2222
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3852,9 +3855,10 @@ Remember to requery the transaction to confirm the true state from the processor
3852
3855
3853
3856
+ Response 401 (text/html)
3854
3857
3855
- ## Rewards [/rewards ]
3858
+ ## Wallets [/wallets ]
3856
3859
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
3858
3862
3859
3863
+ Headers
3860
3864
Authorization: dd3343ae567c8f8a0b9e8f
@@ -3911,14 +3915,83 @@ Remember to requery the transaction to confirm the true state from the processor
3911
3915
" data" : {}
3912
3916
}
3913
3917
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]
3915
3987
3916
3988
+ Headers
3917
3989
Authorization: dd3343ae567c8f8a0b9e8f
3918
3990
3919
3991
+ Parameters
3920
3992
+ skip (Number) - Number of records to skip
3921
3993
+ limit (Number) - Number of records to return
3994
+ + user_id (String) - Id of the user we want to get a statement for
3922
3995
3923
3996
+ Response 200 (application/json)
3924
3997
@@ -3979,7 +4052,7 @@ Remember to requery the transaction to confirm the true state from the processor
3979
4052
" data" : {}
3980
4053
}
3981
4054
3982
- ### Credit User Rewards [POST /rewards /credit]
4055
+ ### Credit User's Wallet [POST /wallets /credit]
3983
4056
3984
4057
+ Headers
3985
4058
Authorization: dd3343ae567c8f8a0b9e8f
@@ -4043,7 +4116,7 @@ Remember to requery the transaction to confirm the true state from the processor
4043
4116
" data" : {}
4044
4117
}
4045
4118
4046
- ### Debit User Rewards [POST /rewards /debit]
4119
+ ### Debit User's Wallet [POST /wallets /debit]
4047
4120
4048
4121
+ Headers
4049
4122
Authorization: dd3343ae567c8f8a0b9e8f
0 commit comments