Class OrderItemSku

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

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

  • Constructor Details

    • OrderItemSku

      public OrderItemSku()
  • Method Details

    • id

      public OrderItemSku id(String id)
    • getId

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

      public void setId(String id)
    • sourceId

      public OrderItemSku sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      The merchant's SKU ID (if it is different than Voucherify's SKU 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 OrderItemSku 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.
      Returns:
      override
    • setOverride

      public void setOverride(Boolean override)
    • sku

      public OrderItemSku sku(String sku)
    • getSku

      @Nullable public String getSku()
      The SKU name.
      Returns:
      sku
    • setSku

      public void setSku(String sku)
    • price

      public OrderItemSku price(BigDecimal price)
    • getPrice

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

      public void setPrice(BigDecimal price)
    • metadata

      public OrderItemSku metadata(Object metadata)
    • getMetadata

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

      public void setMetadata(Object metadata)
    • 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 OrderItemSku fromJson(String jsonString) throws IOException
      Create an instance of OrderItemSku given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of OrderItemSku
      Throws:
      IOException - if the JSON string is invalid with respect to OrderItemSku
    • toJson

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