Package com.braintreegateway.util
Class GraphQLClient
- java.lang.Object
-
- com.braintreegateway.util.Http
-
- com.braintreegateway.util.GraphQLClient
-
public class GraphQLClient extends Http
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphQLClient.ErrorClass-
Nested classes/interfaces inherited from class com.braintreegateway.util.Http
Http.RequestMethod
-
-
Field Summary
Fields Modifier and Type Field Description private Configurationconfigurationprivate static StringERROR_CLASS_KEYprivate static StringERROR_EXTENSIONS_KEYprivate static StringERROR_MESSAGE_KEYprivate static StringERROR_OBJECT_KEY
-
Constructor Summary
Constructors Constructor Description GraphQLClient(Configuration configuration)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringformatGraphQLRequest(String definition, Map<String,Object> variables)static ValidationErrorsgetErrors(Map<String,Object> response)private static ValidationErrorCodegetValidationErrorCode(Map<String,Object> error)Map<String,Object>query(String definition)Map<String,Object>query(String definition, Request request)Map<String,Object>query(String definition, Map<String,Object> variables)private voidthrowExceptionIfGraphQLErrorResponse(Map<String,Object> response)-
Methods inherited from class com.braintreegateway.util.Http
authorizationHeader, buildConnection, constructHeaders, delete, formatSanitizeBodyForLog, get, getCurrentTime, getSSLSocketFactory, httpDo, post, post, post, postMultipart, put, put, throwExceptionIfErrorStatusCode
-
-
-
-
Field Detail
-
configuration
private Configuration configuration
-
ERROR_OBJECT_KEY
private static final String ERROR_OBJECT_KEY
- See Also:
- Constant Field Values
-
ERROR_MESSAGE_KEY
private static final String ERROR_MESSAGE_KEY
- See Also:
- Constant Field Values
-
ERROR_EXTENSIONS_KEY
private static final String ERROR_EXTENSIONS_KEY
- See Also:
- Constant Field Values
-
ERROR_CLASS_KEY
private static final String ERROR_CLASS_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GraphQLClient
public GraphQLClient(Configuration configuration)
-
-
Method Detail
-
formatGraphQLRequest
public static String formatGraphQLRequest(String definition, Map<String,Object> variables)
-
throwExceptionIfGraphQLErrorResponse
private void throwExceptionIfGraphQLErrorResponse(Map<String,Object> response)
-
getErrors
public static ValidationErrors getErrors(Map<String,Object> response)
-
getValidationErrorCode
private static ValidationErrorCode getValidationErrorCode(Map<String,Object> error)
-
-