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

tech.carpentum.sdk.payment.internal.api.EnhancedAccountsApi.kt Maven / Gradle / Ivy

The newest version!
package tech.carpentum.sdk.payment.internal.api

import tech.carpentum.sdk.payment.internal.generated.api.AccountsApi
import tech.carpentum.sdk.payment.internal.generated.infrastructure.RequestConfig
import java.time.Duration

internal class EnhancedAccountsApi(
    basePath: String = defaultBasePath,
    private val accessToken: String,
    private val brand: String?,
    callTimeout: Duration
) : AccountsApi(basePath, ApiUtils.getClient(callTimeout)) {

    override fun  updateRequestHeaders(requestConfig: RequestConfig) {
        requestConfig.addAuthorizationHeader(accessToken)
        brand?.apply { requestConfig.addBrandHeader(this) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy