Class EventsCreateRequestBodyLoyalty

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

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class EventsCreateRequestBodyLoyalty extends Object
If an earning rule in a loyalty program is based on a custom event. This objects let's you specify the loyalty card to which the custom event should be attributed to.
  • Field Details

  • Constructor Details

    • EventsCreateRequestBodyLoyalty

      public EventsCreateRequestBodyLoyalty()
  • Method Details

    • code

    • getCode

      @Nullable public String getCode()
      Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code.
      Returns:
      code
    • setCode

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

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