package com.shopr.api.clickouts.api.v0.models import com.fasterxml.jackson.annotation.JsonIgnoreProperties import com.fasterxml.jackson.annotation.JsonProperty import java.io.Serializable import java.math.BigDecimal import kotlin.Int import kotlin.String import org.threeten.bp.Instant /** * This code was generated by [models.generator.kotlin.KotlinGenerator] * Represents an Offer click-out. It contains all the information needed to properly identify the * offer, trace it ot the user navigating from search page, and relevant information about the offer at * the click-out moment (e.g.: price, lowest price among other offers, etc.) */ @JsonIgnoreProperties(ignoreUnknown=true) data class Clickout( @JsonProperty("productId") @get:JsonProperty("productId") val productId: String, @JsonProperty("seller") @get:JsonProperty("seller") val seller: String, @JsonProperty("sellerProductId") @get:JsonProperty("sellerProductId") val sellerProductId: String, @JsonProperty("price") @get:JsonProperty("price") val price: BigDecimal, @JsonProperty("deepUrl") @get:JsonProperty("deepUrl") val deepUrl: String, @JsonProperty("lowestPrice") @get:JsonProperty("lowestPrice") val lowestPrice: BigDecimal, @JsonProperty("highestPrice") @get:JsonProperty("highestPrice") val highestPrice: BigDecimal, @JsonProperty("offerCount") @get:JsonProperty("offerCount") val offerCount: Int, @JsonProperty("offerPosition") @get:JsonProperty("offerPosition") val offerPosition: Int, @JsonProperty("categoryId") @get:JsonProperty("categoryId") val categoryId: String, @JsonProperty("tracking") @get:JsonProperty("tracking") val tracking: Tracking, @JsonProperty("creationTime") @get:JsonProperty("creationTime") val creationTime: Instant ) : Serializable { fun toJsonString(): String = com.shopr.api.clickouts.api.v0.models.JacksonObjectMapperFactory.create().writeValueAsString(this) companion object { fun parseJson(json: String): Clickout = com.shopr.api.clickouts.api.v0.models.JacksonObjectMapperFactory.create().readValue( json, Clickout::class.java) } }