Class Sku

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Sku extends Object
This is an object representing a product SKU.
  • Field Details

  • Constructor Details

    • Sku

      public Sku()
  • Method Details

    • id

      public Sku 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 Sku sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      A unique SKU identifier from your inventory system.
      Returns:
      sourceId
    • setSourceId

      public void setSourceId(String sourceId)
    • productId

      public Sku productId(String productId)
    • getProductId

      @Nullable public String getProductId()
      The parent product's unique ID.
      Returns:
      productId
    • setProductId

      public void setProductId(String productId)
    • sku

      public Sku sku(String sku)
    • getSku

      @Nullable public String getSku()
      Unique user-defined SKU name.
      Returns:
      sku
    • setSku

      public void setSku(String sku)
    • price

      public Sku price(Integer price)
    • getPrice

      @Nullable public Integer getPrice()
      Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`.
      Returns:
      price
    • setPrice

      public void setPrice(Integer price)
    • currency

      public Sku currency(String currency)
    • getCurrency

      @Nullable public String getCurrency()
      SKU price currency.
      Returns:
      currency
    • setCurrency

      public void setCurrency(String currency)
    • attributes

      public Sku attributes(Object attributes)
    • getAttributes

      @Nullable public Object getAttributes()
      The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family.
      Returns:
      attributes
    • setAttributes

      public void setAttributes(Object attributes)
    • imageUrl

      public Sku imageUrl(String imageUrl)
    • getImageUrl

      @Nullable public String getImageUrl()
      The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image.
      Returns:
      imageUrl
    • setImageUrl

      public void setImageUrl(String imageUrl)
    • metadata

      public Sku metadata(Object metadata)
    • getMetadata

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

      public void setMetadata(Object metadata)
    • createdAt

      public Sku createdAt(OffsetDateTime createdAt)
    • getCreatedAt

      @Nullable public OffsetDateTime getCreatedAt()
      Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.
      Returns:
      createdAt
    • setCreatedAt

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public Sku updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

      @Nullable public OffsetDateTime getUpdatedAt()
      Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.
      Returns:
      updatedAt
    • setUpdatedAt

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • _object

      public Sku _object(Sku.ObjectEnum _object)
    • getObject

      @Nullable public Sku.ObjectEnum getObject()
      The type of the object represented by JSON. This object stores information about the `SKU`.
      Returns:
      _object
    • setObject

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

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