Class Phone

java.lang.Object
com.whatsapp.api.domain.messages.Phone

public class Phone extends Object
Optional.

Contact phone number(s) formatted as a phone object. The object can contain the following fields:

  • phone – Optional. Automatically populated with the `wa_id` value as a formatted phone number.
  • type – Optional. Standard Values are CELL, MAIN, IPHONE, HOME, and WORK.
  • wa_id – Optional. WhatsApp ID.
  • Constructor Details

    • Phone

      public Phone()
  • Method Details

    • getPhone

      public String getPhone()
      Gets phone.
      Returns:
      the phone
    • setPhone

      public Phone setPhone(String phone)
      Sets phone.
      Parameters:
      phone - Optional. Automatically populated with the `wa_id` value as a formatted phone number.
      Returns:
      the phone
    • getWaId

      public String getWaId()
      Gets wa id.
      Returns:
      the wa id
    • setWaId

      public Phone setWaId(String waId)
      Sets wa id.
      Parameters:
      waId - Optional. WhatsApp ID.
      Returns:
      the wa id
    • getType

      public PhoneType getType()
      Gets type.
      Returns:
      the type
    • setType

      public Phone setType(PhoneType type)
      Sets type.
      Parameters:
      type - Optional. Standard Values are CELL, MAIN, IPHONE, HOME, and WORK.
      Returns:
      the type