Class OrderItemProduct

java.lang.Object
io.voucherify.client.model.OrderItemProduct

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class OrderItemProduct extends Object
An object containing details of the related product.
  • Field Details

  • Constructor Details

    • OrderItemProduct

      public OrderItemProduct()
  • Method Details

    • id

      public OrderItemProduct id(String id)
    • getId

      @Nullable public String getId()
      A unique identifier that represents the product and is assigned by Voucherify.
      Returns:
      id
    • setId

      public void setId(String id)
    • sourceId

      public OrderItemProduct sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service.
      Returns:
      sourceId
    • setSourceId

      public void setSourceId(String sourceId)
    • override

      public OrderItemProduct override(Boolean override)
    • getOverride

      @Nullable public Boolean getOverride()
      The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database.
      Returns:
      override
    • setOverride

      public void setOverride(Boolean override)
    • name

      public OrderItemProduct name(String name)
    • getName

      @Nullable public String getName()
      Product name.
      Returns:
      name
    • setName

      public void setName(String name)
    • metadata

      public OrderItemProduct metadata(Object metadata)
    • getMetadata

      @Nullable public Object getMetadata()
      A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections.
      Returns:
      metadata
    • setMetadata

      public void setMetadata(Object metadata)
    • price

      public OrderItemProduct price(BigDecimal price)
    • getPrice

      @Nullable public BigDecimal getPrice()
      Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00).
      Returns:
      price
    • setPrice

      public void setPrice(BigDecimal price)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromJson

      public static OrderItemProduct fromJson(String jsonString) throws IOException
      Create an instance of OrderItemProduct given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of OrderItemProduct
      Throws:
      IOException - if the JSON string is invalid with respect to OrderItemProduct
    • toJson

      public String toJson()
      Convert an instance of OrderItemProduct to an JSON string
      Returns:
      JSON string