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

com.adyen.model.checkout.LineItem Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Adyen Checkout API
 *
 * The version of the OpenAPI document: 71
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.checkout;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * LineItem
 */
@JsonPropertyOrder({
  LineItem.JSON_PROPERTY_AMOUNT_EXCLUDING_TAX,
  LineItem.JSON_PROPERTY_AMOUNT_INCLUDING_TAX,
  LineItem.JSON_PROPERTY_BRAND,
  LineItem.JSON_PROPERTY_COLOR,
  LineItem.JSON_PROPERTY_DESCRIPTION,
  LineItem.JSON_PROPERTY_ID,
  LineItem.JSON_PROPERTY_IMAGE_URL,
  LineItem.JSON_PROPERTY_ITEM_CATEGORY,
  LineItem.JSON_PROPERTY_MANUFACTURER,
  LineItem.JSON_PROPERTY_MARKETPLACE_SELLER_ID,
  LineItem.JSON_PROPERTY_PRODUCT_URL,
  LineItem.JSON_PROPERTY_QUANTITY,
  LineItem.JSON_PROPERTY_RECEIVER_EMAIL,
  LineItem.JSON_PROPERTY_SIZE,
  LineItem.JSON_PROPERTY_SKU,
  LineItem.JSON_PROPERTY_TAX_AMOUNT,
  LineItem.JSON_PROPERTY_TAX_PERCENTAGE,
  LineItem.JSON_PROPERTY_UPC
})

public class LineItem {
  public static final String JSON_PROPERTY_AMOUNT_EXCLUDING_TAX = "amountExcludingTax";
  private Long amountExcludingTax;

  public static final String JSON_PROPERTY_AMOUNT_INCLUDING_TAX = "amountIncludingTax";
  private Long amountIncludingTax;

  public static final String JSON_PROPERTY_BRAND = "brand";
  private String brand;

  public static final String JSON_PROPERTY_COLOR = "color";
  private String color;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_IMAGE_URL = "imageUrl";
  private String imageUrl;

  public static final String JSON_PROPERTY_ITEM_CATEGORY = "itemCategory";
  private String itemCategory;

  public static final String JSON_PROPERTY_MANUFACTURER = "manufacturer";
  private String manufacturer;

  public static final String JSON_PROPERTY_MARKETPLACE_SELLER_ID = "marketplaceSellerId";
  private String marketplaceSellerId;

  public static final String JSON_PROPERTY_PRODUCT_URL = "productUrl";
  private String productUrl;

  public static final String JSON_PROPERTY_QUANTITY = "quantity";
  private Long quantity;

  public static final String JSON_PROPERTY_RECEIVER_EMAIL = "receiverEmail";
  private String receiverEmail;

  public static final String JSON_PROPERTY_SIZE = "size";
  private String size;

  public static final String JSON_PROPERTY_SKU = "sku";
  private String sku;

  public static final String JSON_PROPERTY_TAX_AMOUNT = "taxAmount";
  private Long taxAmount;

  public static final String JSON_PROPERTY_TAX_PERCENTAGE = "taxPercentage";
  private Long taxPercentage;

  public static final String JSON_PROPERTY_UPC = "upc";
  private String upc;

  public LineItem() { 
  }

  /**
   * Item amount excluding the tax, in minor units.
   *
   * @param amountExcludingTax Item amount excluding the tax, in minor units.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem amountExcludingTax(Long amountExcludingTax) {
    this.amountExcludingTax = amountExcludingTax;
    return this;
  }

  /**
   * Item amount excluding the tax, in minor units.
   * @return amountExcludingTax Item amount excluding the tax, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT_EXCLUDING_TAX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Long getAmountExcludingTax() {
    return amountExcludingTax;
  }

  /**
   * Item amount excluding the tax, in minor units.
   *
   * @param amountExcludingTax Item amount excluding the tax, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT_EXCLUDING_TAX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAmountExcludingTax(Long amountExcludingTax) {
    this.amountExcludingTax = amountExcludingTax;
  }

  /**
   * Item amount including the tax, in minor units.
   *
   * @param amountIncludingTax Item amount including the tax, in minor units.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem amountIncludingTax(Long amountIncludingTax) {
    this.amountIncludingTax = amountIncludingTax;
    return this;
  }

  /**
   * Item amount including the tax, in minor units.
   * @return amountIncludingTax Item amount including the tax, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT_INCLUDING_TAX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Long getAmountIncludingTax() {
    return amountIncludingTax;
  }

  /**
   * Item amount including the tax, in minor units.
   *
   * @param amountIncludingTax Item amount including the tax, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_AMOUNT_INCLUDING_TAX)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAmountIncludingTax(Long amountIncludingTax) {
    this.amountIncludingTax = amountIncludingTax;
  }

  /**
   * Brand of the item.
   *
   * @param brand Brand of the item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem brand(String brand) {
    this.brand = brand;
    return this;
  }

  /**
   * Brand of the item.
   * @return brand Brand of the item.
   */
  @JsonProperty(JSON_PROPERTY_BRAND)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getBrand() {
    return brand;
  }

  /**
   * Brand of the item.
   *
   * @param brand Brand of the item.
   */
  @JsonProperty(JSON_PROPERTY_BRAND)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBrand(String brand) {
    this.brand = brand;
  }

  /**
   * Color of the item.
   *
   * @param color Color of the item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem color(String color) {
    this.color = color;
    return this;
  }

  /**
   * Color of the item.
   * @return color Color of the item.
   */
  @JsonProperty(JSON_PROPERTY_COLOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getColor() {
    return color;
  }

  /**
   * Color of the item.
   *
   * @param color Color of the item.
   */
  @JsonProperty(JSON_PROPERTY_COLOR)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setColor(String color) {
    this.color = color;
  }

  /**
   * Description of the line item.
   *
   * @param description Description of the line item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Description of the line item.
   * @return description Description of the line item.
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getDescription() {
    return description;
  }

  /**
   * Description of the line item.
   *
   * @param description Description of the line item.
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDescription(String description) {
    this.description = description;
  }

  /**
   * ID of the line item.
   *
   * @param id ID of the line item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem id(String id) {
    this.id = id;
    return this;
  }

  /**
   * ID of the line item.
   * @return id ID of the line item.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }

  /**
   * ID of the line item.
   *
   * @param id ID of the line item.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(String id) {
    this.id = id;
  }

  /**
   * Link to the picture of the purchased item.
   *
   * @param imageUrl Link to the picture of the purchased item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem imageUrl(String imageUrl) {
    this.imageUrl = imageUrl;
    return this;
  }

  /**
   * Link to the picture of the purchased item.
   * @return imageUrl Link to the picture of the purchased item.
   */
  @JsonProperty(JSON_PROPERTY_IMAGE_URL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getImageUrl() {
    return imageUrl;
  }

  /**
   * Link to the picture of the purchased item.
   *
   * @param imageUrl Link to the picture of the purchased item.
   */
  @JsonProperty(JSON_PROPERTY_IMAGE_URL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setImageUrl(String imageUrl) {
    this.imageUrl = imageUrl;
  }

  /**
   * Item category, used by the payment methods PayPal and Ratepay.
   *
   * @param itemCategory Item category, used by the payment methods PayPal and Ratepay.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem itemCategory(String itemCategory) {
    this.itemCategory = itemCategory;
    return this;
  }

  /**
   * Item category, used by the payment methods PayPal and Ratepay.
   * @return itemCategory Item category, used by the payment methods PayPal and Ratepay.
   */
  @JsonProperty(JSON_PROPERTY_ITEM_CATEGORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getItemCategory() {
    return itemCategory;
  }

  /**
   * Item category, used by the payment methods PayPal and Ratepay.
   *
   * @param itemCategory Item category, used by the payment methods PayPal and Ratepay.
   */
  @JsonProperty(JSON_PROPERTY_ITEM_CATEGORY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setItemCategory(String itemCategory) {
    this.itemCategory = itemCategory;
  }

  /**
   * Manufacturer of the item.
   *
   * @param manufacturer Manufacturer of the item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem manufacturer(String manufacturer) {
    this.manufacturer = manufacturer;
    return this;
  }

  /**
   * Manufacturer of the item.
   * @return manufacturer Manufacturer of the item.
   */
  @JsonProperty(JSON_PROPERTY_MANUFACTURER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getManufacturer() {
    return manufacturer;
  }

  /**
   * Manufacturer of the item.
   *
   * @param manufacturer Manufacturer of the item.
   */
  @JsonProperty(JSON_PROPERTY_MANUFACTURER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setManufacturer(String manufacturer) {
    this.manufacturer = manufacturer;
  }

  /**
   * Marketplace seller id.
   *
   * @param marketplaceSellerId Marketplace seller id.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem marketplaceSellerId(String marketplaceSellerId) {
    this.marketplaceSellerId = marketplaceSellerId;
    return this;
  }

  /**
   * Marketplace seller id.
   * @return marketplaceSellerId Marketplace seller id.
   */
  @JsonProperty(JSON_PROPERTY_MARKETPLACE_SELLER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getMarketplaceSellerId() {
    return marketplaceSellerId;
  }

  /**
   * Marketplace seller id.
   *
   * @param marketplaceSellerId Marketplace seller id.
   */
  @JsonProperty(JSON_PROPERTY_MARKETPLACE_SELLER_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMarketplaceSellerId(String marketplaceSellerId) {
    this.marketplaceSellerId = marketplaceSellerId;
  }

  /**
   * Link to the purchased item.
   *
   * @param productUrl Link to the purchased item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem productUrl(String productUrl) {
    this.productUrl = productUrl;
    return this;
  }

  /**
   * Link to the purchased item.
   * @return productUrl Link to the purchased item.
   */
  @JsonProperty(JSON_PROPERTY_PRODUCT_URL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getProductUrl() {
    return productUrl;
  }

  /**
   * Link to the purchased item.
   *
   * @param productUrl Link to the purchased item.
   */
  @JsonProperty(JSON_PROPERTY_PRODUCT_URL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProductUrl(String productUrl) {
    this.productUrl = productUrl;
  }

  /**
   * Number of items.
   *
   * @param quantity Number of items.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem quantity(Long quantity) {
    this.quantity = quantity;
    return this;
  }

  /**
   * Number of items.
   * @return quantity Number of items.
   */
  @JsonProperty(JSON_PROPERTY_QUANTITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Long getQuantity() {
    return quantity;
  }

  /**
   * Number of items.
   *
   * @param quantity Number of items.
   */
  @JsonProperty(JSON_PROPERTY_QUANTITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setQuantity(Long quantity) {
    this.quantity = quantity;
  }

  /**
   * Email associated with the given product in the basket (usually in electronic gift cards).
   *
   * @param receiverEmail Email associated with the given product in the basket (usually in electronic gift cards).
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem receiverEmail(String receiverEmail) {
    this.receiverEmail = receiverEmail;
    return this;
  }

  /**
   * Email associated with the given product in the basket (usually in electronic gift cards).
   * @return receiverEmail Email associated with the given product in the basket (usually in electronic gift cards).
   */
  @JsonProperty(JSON_PROPERTY_RECEIVER_EMAIL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getReceiverEmail() {
    return receiverEmail;
  }

  /**
   * Email associated with the given product in the basket (usually in electronic gift cards).
   *
   * @param receiverEmail Email associated with the given product in the basket (usually in electronic gift cards).
   */
  @JsonProperty(JSON_PROPERTY_RECEIVER_EMAIL)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReceiverEmail(String receiverEmail) {
    this.receiverEmail = receiverEmail;
  }

  /**
   * Size of the item.
   *
   * @param size Size of the item.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem size(String size) {
    this.size = size;
    return this;
  }

  /**
   * Size of the item.
   * @return size Size of the item.
   */
  @JsonProperty(JSON_PROPERTY_SIZE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getSize() {
    return size;
  }

  /**
   * Size of the item.
   *
   * @param size Size of the item.
   */
  @JsonProperty(JSON_PROPERTY_SIZE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSize(String size) {
    this.size = size;
  }

  /**
   * Stock keeping unit.
   *
   * @param sku Stock keeping unit.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem sku(String sku) {
    this.sku = sku;
    return this;
  }

  /**
   * Stock keeping unit.
   * @return sku Stock keeping unit.
   */
  @JsonProperty(JSON_PROPERTY_SKU)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getSku() {
    return sku;
  }

  /**
   * Stock keeping unit.
   *
   * @param sku Stock keeping unit.
   */
  @JsonProperty(JSON_PROPERTY_SKU)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSku(String sku) {
    this.sku = sku;
  }

  /**
   * Tax amount, in minor units.
   *
   * @param taxAmount Tax amount, in minor units.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem taxAmount(Long taxAmount) {
    this.taxAmount = taxAmount;
    return this;
  }

  /**
   * Tax amount, in minor units.
   * @return taxAmount Tax amount, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_TAX_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Long getTaxAmount() {
    return taxAmount;
  }

  /**
   * Tax amount, in minor units.
   *
   * @param taxAmount Tax amount, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_TAX_AMOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTaxAmount(Long taxAmount) {
    this.taxAmount = taxAmount;
  }

  /**
   * Tax percentage, in minor units.
   *
   * @param taxPercentage Tax percentage, in minor units.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem taxPercentage(Long taxPercentage) {
    this.taxPercentage = taxPercentage;
    return this;
  }

  /**
   * Tax percentage, in minor units.
   * @return taxPercentage Tax percentage, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_TAX_PERCENTAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Long getTaxPercentage() {
    return taxPercentage;
  }

  /**
   * Tax percentage, in minor units.
   *
   * @param taxPercentage Tax percentage, in minor units.
   */
  @JsonProperty(JSON_PROPERTY_TAX_PERCENTAGE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTaxPercentage(Long taxPercentage) {
    this.taxPercentage = taxPercentage;
  }

  /**
   * Universal Product Code.
   *
   * @param upc Universal Product Code.
   * @return the current {@code LineItem} instance, allowing for method chaining
   */
  public LineItem upc(String upc) {
    this.upc = upc;
    return this;
  }

  /**
   * Universal Product Code.
   * @return upc Universal Product Code.
   */
  @JsonProperty(JSON_PROPERTY_UPC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getUpc() {
    return upc;
  }

  /**
   * Universal Product Code.
   *
   * @param upc Universal Product Code.
   */
  @JsonProperty(JSON_PROPERTY_UPC)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUpc(String upc) {
    this.upc = upc;
  }

  /**
   * Return true if this LineItem object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    LineItem lineItem = (LineItem) o;
    return Objects.equals(this.amountExcludingTax, lineItem.amountExcludingTax) &&
        Objects.equals(this.amountIncludingTax, lineItem.amountIncludingTax) &&
        Objects.equals(this.brand, lineItem.brand) &&
        Objects.equals(this.color, lineItem.color) &&
        Objects.equals(this.description, lineItem.description) &&
        Objects.equals(this.id, lineItem.id) &&
        Objects.equals(this.imageUrl, lineItem.imageUrl) &&
        Objects.equals(this.itemCategory, lineItem.itemCategory) &&
        Objects.equals(this.manufacturer, lineItem.manufacturer) &&
        Objects.equals(this.marketplaceSellerId, lineItem.marketplaceSellerId) &&
        Objects.equals(this.productUrl, lineItem.productUrl) &&
        Objects.equals(this.quantity, lineItem.quantity) &&
        Objects.equals(this.receiverEmail, lineItem.receiverEmail) &&
        Objects.equals(this.size, lineItem.size) &&
        Objects.equals(this.sku, lineItem.sku) &&
        Objects.equals(this.taxAmount, lineItem.taxAmount) &&
        Objects.equals(this.taxPercentage, lineItem.taxPercentage) &&
        Objects.equals(this.upc, lineItem.upc);
  }

  @Override
  public int hashCode() {
    return Objects.hash(amountExcludingTax, amountIncludingTax, brand, color, description, id, imageUrl, itemCategory, manufacturer, marketplaceSellerId, productUrl, quantity, receiverEmail, size, sku, taxAmount, taxPercentage, upc);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class LineItem {\n");
    sb.append("    amountExcludingTax: ").append(toIndentedString(amountExcludingTax)).append("\n");
    sb.append("    amountIncludingTax: ").append(toIndentedString(amountIncludingTax)).append("\n");
    sb.append("    brand: ").append(toIndentedString(brand)).append("\n");
    sb.append("    color: ").append(toIndentedString(color)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
    sb.append("    itemCategory: ").append(toIndentedString(itemCategory)).append("\n");
    sb.append("    manufacturer: ").append(toIndentedString(manufacturer)).append("\n");
    sb.append("    marketplaceSellerId: ").append(toIndentedString(marketplaceSellerId)).append("\n");
    sb.append("    productUrl: ").append(toIndentedString(productUrl)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    receiverEmail: ").append(toIndentedString(receiverEmail)).append("\n");
    sb.append("    size: ").append(toIndentedString(size)).append("\n");
    sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
    sb.append("    taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
    sb.append("    taxPercentage: ").append(toIndentedString(taxPercentage)).append("\n");
    sb.append("    upc: ").append(toIndentedString(upc)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

/**
   * Create an instance of LineItem given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of LineItem
   * @throws JsonProcessingException if the JSON string is invalid with respect to LineItem
   */
  public static LineItem fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, LineItem.class);
  }
/**
  * Convert an instance of LineItem to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy