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

com.ecwid.apiclient.v3.dto.variation.request.AdjustVariationInventoryRequest.kt Maven / Gradle / Ivy

There is a newer version: 0.347.0
Show newest version
package com.ecwid.apiclient.v3.dto.variation.request

import com.ecwid.apiclient.v3.dto.ApiRequest
import com.ecwid.apiclient.v3.httptransport.HttpBody
import com.ecwid.apiclient.v3.impl.RequestInfo

data class AdjustVariationInventoryRequest(
	val productId: Int = 0,
	val variationId: Int = 0,
	val checkLowStockNotification: Boolean = false,
	val quantityDelta: Int = 0
) : ApiRequest {
	override fun toRequestInfo() = RequestInfo.createPutRequest(
		pathSegments = listOf(
			"products",
			"$productId",
			"combinations",
			"$variationId",
			"inventory"
		),
		params = mapOf("checkLowStockNotification" to checkLowStockNotification.toString()),
		httpBody = HttpBody.JsonBody(
			obj = mapOf("quantityDelta" to quantityDelta)
		)
	)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy