io.paymenthighway.sdk.util / CallbackResultConvert / <init>

<init>

CallbackResultConvert(completion: (Result<R, Exception>) -> Unit, convert: (T) -> Result<R, Exception>)

Helper for connecting the Retrofit2 Callback into Result completion with a convertion of the data received

Parameters

T - the type of the data for success operation

R - the type of the data returned after transformation

completion - sdk callback result

convert - convert function to transform the received data R in the completion data T