com.ecwid.apiclient.v3.dto.profile.request.StoreProfileRequest.kt Maven / Gradle / Ivy
package com.ecwid.apiclient.v3.dto.profile.request
import com.ecwid.apiclient.v3.dto.ApiRequest
import com.ecwid.apiclient.v3.impl.RequestInfo
import com.ecwid.apiclient.v3.responsefields.ResponseFields
data class StoreProfileRequest(
val lang: String? = null,
val responseFields: ResponseFields = ResponseFields.All,
) : ApiRequest {
override fun toRequestInfo() = RequestInfo.createGetRequest(
pathSegments = listOf(
"profile"
),
params = toParams(),
responseFields = responseFields,
)
private fun toParams(): Map {
val request = this
return mutableMapOf().apply {
request.lang?.let { put("lang", it) }
}.toMap()
}
}