All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fintecsystems.xs2a.java.services.ApiWizardService.kt Maven / Gradle / Ivy

The newest version!
package com.fintecsystems.xs2a.java.services

import com.fintecsystems.xs2a.java.helper.JsonSerializer
import com.fintecsystems.xs2a.java.models.wizard.WizardResponse
import okhttp3.OkHttpClient

@Suppress("unused")
class ApiWizardService(
    apiKey: String,
    client: OkHttpClient = defaultClient,
    backendUrl: String = defaultBackendUrl
) : ServiceBase(
    apiKey,
    client = client,
    backendUrl = backendUrl
) {

    constructor(apiKey: String) : this(apiKey, defaultClient)

    constructor(apiKey: String, backendUrl: String) : this(apiKey, defaultClient, backendUrl)

    constructor(apiKey: String, client: OkHttpClient) : this(apiKey, client, defaultBackendUrl)

    fun navigate(body: Map): WizardResponse {
        val response = apiService.post("api/wizard", JsonSerializer.toJson(body))

        return JsonSerializer.parseJson(response)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy