Package com.getsensibill.core.common.dataprovider

Types

BaseDataProvider
Link copied to clipboard
abstract class BaseDataProvider
A base class of which all our data providers will inherit, will contain some generic handling and helpers that can be used by any data provider.
DataProviderLiveRequest
Link copied to clipboard
sealed class DataProviderLiveRequest<T>
DataProviderResponse
Link copied to clipboard
sealed class DataProviderResponse<T>
A standard Response/result type for requests going through Sensibill Data Providers.
DebugError
Link copied to clipboard
class DebugError : RequestError
GenericDataProviderResponseHandler
Link copied to clipboard
class GenericDataProviderResponseHandler
Helper class to provide standard interpretation and handling of a data provider API call
Http400Error
Link copied to clipboard
class Http400Error : RequestError
Something in the request itself was invalid, this is likely an SDK problem, please reach out to client success
Http401Error
Link copied to clipboard
class Http401Error : RequestError
Unauthorized - please check to make sure you're providing a valid access token when requested with the com.getsensibill.tokenprovider.TokenProvider that you're providing to the SDK
Http403Error
Link copied to clipboard
class Http403Error : RequestError
Forbidden - in our APIs this usually means you're trying to access something that you're not configured to use.
Http404Error
Link copied to clipboard
class Http404Error : RequestError
The requested entity was not found on the server
Http500Error
Link copied to clipboard
class Http500Error : RequestError
Something went wrong on the server, could be worth retrying the request
InternalRequestError
Link copied to clipboard
class InternalRequestError : RequestError
MalformedResponse
Link copied to clipboard
class MalformedResponse : RequestError
The request succeeded, but the response wasn't the object we were expecting
MissingResponse
Link copied to clipboard
class MissingResponse : RequestError
The request succeeded, but we were expecting a response body and didn't get one
RequestError
Link copied to clipboard
abstract class RequestError : Exception
The Base error type that can be returned by a Sensibill DataProvider request
RequestTimeoutError
Link copied to clipboard
class RequestTimeoutError : RequestError
The request timed out
TransformationFailure
Link copied to clipboard
class TransformationFailure : RequestError
The request succeeded, but the response wasn't the object we were expecting
UnknownError
Link copied to clipboard
class UnknownError : RequestError
Unknown -- Otherwise uncaught exception
UnknownExternalError
Link copied to clipboard
class UnknownExternalError(extraInformation: String?, message: String, cause: Throwable?, response: Response<*>?) : RequestError
An alternative to UnknownError which can be created outside of this module

Functions

dataProviderRequestAsLiveData
Link copied to clipboard
fun <T> CoroutineScope.dataProviderRequestAsLiveData(request: suspend () -> DataProviderResponse<T>): LiveData<DataProviderLiveRequest<T>>
suspend fun <T> dataProviderRequestAsLiveData(liveData: MutableLiveData<DataProviderLiveRequest<T>>, request: suspend () -> DataProviderResponse<T>)