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

com.konduto.sdk.models.KondutoItem Maven / Gradle / Ivy

Go to download

Easily integrate with Konduto (https://konduto.com), a fraud prevention service.

There is a newer version: 2.17.4
Show newest version
package com.konduto.sdk.models;

/**
 * Item model.
 *
 * @see Konduto API Spec
 */
public class KondutoItem extends KondutoModel {
	private String sku;
	private Integer category;
	private String name;
	private String description;
	private String productCode;
	private Double unitCost;
	private Double quantity;
	private Double discount;

	/* Constructors */

	public KondutoItem(){}

	/**
	 * Fluent constructor
	 * @param attributeName the attribute name (e.g totalAmount)
	 * @param attributeValue the attribute value (e.g 123.2)
	 * @return a new instance
	 */
	@Override
	public KondutoItem with(String attributeName, Object attributeValue) {
		return (KondutoItem) super.with(attributeName, attributeValue);
	}


	/* Equals */

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof KondutoItem)) return false;

		KondutoItem that = (KondutoItem) o;

		if (category != null ? !category.equals(that.category) : that.category != null) return false;
		if (description != null ? !description.equals(that.description) : that.description != null) return false;
		if (discount != null ? !discount.equals(that.discount) : that.discount != null) return false;
		if (name != null ? !name.equals(that.name) : that.name != null) return false;
		if (productCode != null ? !productCode.equals(that.productCode) : that.productCode != null) return false;
		if (quantity != null ? !quantity.equals(that.quantity) : that.quantity != null) return false;
		if (sku != null ? !sku.equals(that.sku) : that.sku != null) return false;
		if (unitCost != null ? !unitCost.equals(that.unitCost) : that.unitCost != null) return false;

		return true;
	}

	/* Getters and Setters */

	public String getSku() {
		return sku;
	}

	public void setSku(String sku) {
		this.sku = sku;
	}

	public Integer getCategory() {
		return category;
	}

	public void setCategory(Integer category) {
		this.category = category;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public Double getUnitCost() {
		return unitCost;
	}

	public void setUnitCost(Double unitCost) {
		this.unitCost = unitCost;
	}

	public Double getQuantity() {
		return quantity;
	}

	public void setQuantity(Double quantity) {
		this.quantity = quantity;
	}

	public Double getDiscount() {
		return discount;
	}

	public void setDiscount(Double discount) {
		this.discount = discount;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy