public class JQuotsImplementation extends Object implements JQuots
| Constructor and Description |
|---|
JQuotsImplementation(org.asynchttpclient.AsyncHttpClient client,
String appId,
String appSecret,
QuotsConsumer quotsConsumer) |
| Modifier and Type | Method and Description |
|---|---|
Future<org.asynchttpclient.Response> |
canProceed(String userid,
String usageType,
String usageSize)
Checks user's ability to continue the task after the call users credits will be subtracted after a GET method at /users/{id}/quots with appid, usageType and usageSize params.
|
void |
close() |
Future<org.asynchttpclient.Response> |
createUser(String id,
String username,
String email)
Creates user A POST method at /users The request body should be a QuotsUser
|
Future<org.asynchttpclient.Response> |
deleteUser(String userid)
Deletes user by id
A Delete method at /users/{id} path
|
Future<org.asynchttpclient.Response> |
getUserById(String id)
Get user by id A GET method at /users/{id} path.
|
Future<org.asynchttpclient.Response> |
updateUserCredits(QuotsUser qu)
Updates user's credits
The provided credits will be the user's credits!
A PUT method at /users/{id} path.
|
public JQuotsImplementation(org.asynchttpclient.AsyncHttpClient client,
String appId,
String appSecret,
QuotsConsumer quotsConsumer)
public Future<org.asynchttpclient.Response> getUserById(String id)
getUserById in interface JQuotsid - is the users to be created idpublic Future<org.asynchttpclient.Response> createUser(String id, String username, String email)
createUser in interface JQuotsid - is the users to be created idusername - is the users to be created usernameemail - is the users to be created emailpublic Future<org.asynchttpclient.Response> canProceed(String userid, String usageType, String usageSize)
canProceed in interface JQuotsuserid - is the users idusageType - is the procedures typeusageSize - is the procedures sizepublic Future<org.asynchttpclient.Response> updateUserCredits(QuotsUser qu)
updateUserCredits in interface JQuotsqu - is the user that is to be updatedpublic Future<org.asynchttpclient.Response> deleteUser(String userid)
deleteUser in interface JQuotsuserid - is the users idpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2019 Euclia. All rights reserved.