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

com.ecwid.apiclient.v3.converter.FetchedCart.kt Maven / Gradle / Ivy

There is a newer version: 0.347.0
Show newest version
package com.ecwid.apiclient.v3.converter

import com.ecwid.apiclient.v3.dto.cart.request.UpdatedCart
import com.ecwid.apiclient.v3.dto.cart.result.FetchedCart

fun FetchedCart.toUpdated(): UpdatedCart {
	return UpdatedCart(
		hidden = hidden,
		taxesOnShipping = taxesOnShipping?.map(FetchedCart.TaxOnShipping::toUpdated)
	)
}

fun FetchedCart.TaxOnShipping.toUpdated(): UpdatedCart.TaxOnShipping {
	return UpdatedCart.TaxOnShipping(
		name = name,
		value = value,
		total = total
	)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy