Package io.bayonet.helpers
Class DataHelper
java.lang.Object
io.bayonet.helpers.DataHelper
public class DataHelper
extends java.lang.Object
Created by imranarshad on 11/27/17
Helper class to assist with all data operations, eg. parsing JSON, data validations, etc.
-
Constructor Summary
Constructors Constructor Description DataHelper() -
Method Summary
Modifier and Type Method Description static voidvalidateApiKey(java.lang.String api_key)Helper function to validate the provided api key - Api key should be non-null and non-emptystatic voidvalidateApiVersion(java.lang.String api_version, java.util.HashSet<java.lang.String> supported_versions)Helper function to validate the provided Api version - Api version should be non-null and non-empty - Api version should be one of the versions supported by this SDK
-
Constructor Details
-
DataHelper
public DataHelper()
-
-
Method Details
-
validateApiKey
Helper function to validate the provided api key - Api key should be non-null and non-empty- Parameters:
api_key- to validate- Throws:
BayonetException- if the Api key is invalid
-
validateApiVersion
public static void validateApiVersion(java.lang.String api_version, java.util.HashSet<java.lang.String> supported_versions) throws BayonetExceptionHelper function to validate the provided Api version - Api version should be non-null and non-empty - Api version should be one of the versions supported by this SDK- Parameters:
api_version- to validatesupported_versions- versions supported by this SDK- Throws:
BayonetException- if the Api version is invalid
-