Class Reward

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Reward extends Object
Reward
  • Field Details

  • Constructor Details

    • Reward

      public Reward()
  • Method Details

    • id

      public Reward id(String id)
    • getId

      @Nullable public String getId()
      Unique reward ID, assigned by Voucherify.
      Returns:
      id
    • setId

      public void setId(String id)
    • name

      public Reward name(String name)
    • getName

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

      public void setName(String name)
    • stock

      public Reward stock(Integer stock)
    • getStock

      @Nullable public Integer getStock()
      Configurable for **material rewards**. The number of units of the product that you want to share as reward.
      Returns:
      stock
    • setStock

      public void setStock(Integer stock)
    • redeemed

      public Reward redeemed(Integer redeemed)
    • getRedeemed

      @Nullable public Integer getRedeemed()
      Defines the number of already invoked (successful) reward redemptions.
      Returns:
      redeemed
    • setRedeemed

      public void setRedeemed(Integer redeemed)
    • attributes

      public Reward attributes(RewardAttributes attributes)
    • getAttributes

      @Nullable public RewardAttributes getAttributes()
      Get attributes
      Returns:
      attributes
    • setAttributes

      public void setAttributes(RewardAttributes attributes)
    • metadata

      public Reward metadata(Object metadata)
    • getMetadata

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

      public void setMetadata(Object metadata)
    • type

      public Reward type(Reward.TypeEnum type)
    • getType

      @Nullable public Reward.TypeEnum getType()
      Reward type.
      Returns:
      type
    • setType

      public void setType(Reward.TypeEnum type)
    • parameters

      public Reward parameters(RewardType parameters)
    • getParameters

      @Nullable public RewardType getParameters()
      Get parameters
      Returns:
      parameters
    • setParameters

      public void setParameters(RewardType parameters)
    • createdAt

      public Reward createdAt(OffsetDateTime createdAt)
    • getCreatedAt

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

      public void setCreatedAt(OffsetDateTime createdAt)
    • updatedAt

      public Reward updatedAt(OffsetDateTime updatedAt)
    • getUpdatedAt

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

      public void setUpdatedAt(OffsetDateTime updatedAt)
    • _object

      public Reward _object(Reward.ObjectEnum _object)
    • getObject

      @Nonnull public Reward.ObjectEnum getObject()
      The type of the object represented by the JSON. This object stores information about the reward.
      Returns:
      _object
    • setObject

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

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