Class Customer

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

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

  • Constructor Details

    • Customer

      public Customer()
  • Method Details

    • id

      public Customer id(String id)
    • getId

      @Nullable public String getId()
      The ID of an existing customer.
      Returns:
      id
    • setId

      public void setId(String id)
    • sourceId

      public Customer sourceId(String sourceId)
    • getSourceId

      @Nullable public String getSourceId()
      A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored.
      Returns:
      sourceId
    • setSourceId

      public void setSourceId(String sourceId)
    • name

      public Customer name(String name)
    • getName

      @Nullable public String getName()
      Customer's first and last name.
      Returns:
      name
    • setName

      public void setName(String name)
    • description

      public Customer description(String description)
    • getDescription

      @Nullable public String getDescription()
      An arbitrary string that you can attach to a customer object.
      Returns:
      description
    • setDescription

      public void setDescription(String description)
    • email

      public Customer email(String email)
    • getEmail

      @Nullable public String getEmail()
      Customer's email address.
      Returns:
      email
    • setEmail

      public void setEmail(String email)
    • phone

      public Customer phone(String phone)
    • getPhone

      @Nullable public String getPhone()
      Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel.
      Returns:
      phone
    • setPhone

      public void setPhone(String phone)
    • birthday

      public Customer birthday(LocalDate birthday)
    • getBirthday

      @Nullable public LocalDate getBirthday()
      `Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.
      Returns:
      birthday
    • setBirthday

      public void setBirthday(LocalDate birthday)
    • birthdate

      public Customer birthdate(LocalDate birthdate)
    • getBirthdate

      @Nullable public LocalDate getBirthdate()
      Customer's birthdate; format YYYY-MM-DD.
      Returns:
      birthdate
    • setBirthdate

      public void setBirthdate(LocalDate birthdate)
    • address

      public Customer address(CustomerAddress address)
    • getAddress

      @Nullable public CustomerAddress getAddress()
      Get address
      Returns:
      address
    • setAddress

      public void setAddress(CustomerAddress address)
    • metadata

      public Customer metadata(Object metadata)
    • getMetadata

      @Nullable public Object getMetadata()
      A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments.
      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 Customer fromJson(String jsonString) throws IOException
      Create an instance of Customer given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of Customer
      Throws:
      IOException - if the JSON string is invalid with respect to Customer
    • toJson

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