Record Class PaymentInfo

java.lang.Object
java.lang.Record
it.auties.whatsapp.model.info.PaymentInfo
All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage, it.auties.protobuf.model.ProtobufObject, Info

public record PaymentInfo(PaymentInfo.Currency currencyDeprecated, long amount1000, Jid receiverJid, PaymentInfo.Status status, long transactionTimestampSeconds, ChatMessageKey requestMessageKey, long expiryTimestampSeconds, boolean futureProofed, String currency, PaymentInfo.TransactionStatus transactionStatus, boolean useNoviFormat, PaymentMoney primaryAmount, PaymentMoney exchangeAmount) extends Record implements Info, it.auties.protobuf.model.ProtobufMessage
A model class that holds the information related to a payment.
  • Field Details

    • currencyDeprecated

      @Deprecated private final PaymentInfo.Currency currencyDeprecated
      Deprecated.
      The field for the currencyDeprecated record component.
    • amount1000

      private final long amount1000
      The field for the amount1000 record component.
    • receiverJid

      private final Jid receiverJid
      The field for the receiverJid record component.
    • status

      private final PaymentInfo.Status status
      The field for the status record component.
    • transactionTimestampSeconds

      private final long transactionTimestampSeconds
      The field for the transactionTimestampSeconds record component.
    • requestMessageKey

      private final ChatMessageKey requestMessageKey
      The field for the requestMessageKey record component.
    • expiryTimestampSeconds

      private final long expiryTimestampSeconds
      The field for the expiryTimestampSeconds record component.
    • futureProofed

      private final boolean futureProofed
      The field for the futureProofed record component.
    • currency

      private final String currency
      The field for the currency record component.
    • transactionStatus

      private final PaymentInfo.TransactionStatus transactionStatus
      The field for the transactionStatus record component.
    • useNoviFormat

      private final boolean useNoviFormat
      The field for the useNoviFormat record component.
    • primaryAmount

      private final PaymentMoney primaryAmount
      The field for the primaryAmount record component.
    • exchangeAmount

      private final PaymentMoney exchangeAmount
      The field for the exchangeAmount record component.
  • Constructor Details

    • PaymentInfo

      public PaymentInfo(@Deprecated PaymentInfo.Currency currencyDeprecated, long amount1000, Jid receiverJid, PaymentInfo.Status status, long transactionTimestampSeconds, ChatMessageKey requestMessageKey, long expiryTimestampSeconds, boolean futureProofed, String currency, PaymentInfo.TransactionStatus transactionStatus, boolean useNoviFormat, PaymentMoney primaryAmount, PaymentMoney exchangeAmount)
      Creates an instance of a PaymentInfo record class.
      Parameters:
      currencyDeprecated - the value for the currencyDeprecated record component
      amount1000 - the value for the amount1000 record component
      receiverJid - the value for the receiverJid record component
      status - the value for the status record component
      transactionTimestampSeconds - the value for the transactionTimestampSeconds record component
      requestMessageKey - the value for the requestMessageKey record component
      expiryTimestampSeconds - the value for the expiryTimestampSeconds record component
      futureProofed - the value for the futureProofed record component
      currency - the value for the currency record component
      transactionStatus - the value for the transactionStatus record component
      useNoviFormat - the value for the useNoviFormat record component
      primaryAmount - the value for the primaryAmount record component
      exchangeAmount - the value for the exchangeAmount record component
  • Method Details

    • transactionTimestamp

      public Optional<ZonedDateTime> transactionTimestamp()
      Returns when the transaction happened
      Returns:
      an optional
    • expiryTimestamp

      public Optional<ZonedDateTime> expiryTimestamp()
      Returns when the transaction expires
      Returns:
      an optional
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • currencyDeprecated

      @Deprecated public PaymentInfo.Currency currencyDeprecated()
      Deprecated.
      Returns the value of the currencyDeprecated record component.
      Returns:
      the value of the currencyDeprecated record component
    • amount1000

      public long amount1000()
      Returns the value of the amount1000 record component.
      Returns:
      the value of the amount1000 record component
    • receiverJid

      public Jid receiverJid()
      Returns the value of the receiverJid record component.
      Returns:
      the value of the receiverJid record component
    • status

      public PaymentInfo.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • transactionTimestampSeconds

      public long transactionTimestampSeconds()
      Returns the value of the transactionTimestampSeconds record component.
      Returns:
      the value of the transactionTimestampSeconds record component
    • requestMessageKey

      public ChatMessageKey requestMessageKey()
      Returns the value of the requestMessageKey record component.
      Returns:
      the value of the requestMessageKey record component
    • expiryTimestampSeconds

      public long expiryTimestampSeconds()
      Returns the value of the expiryTimestampSeconds record component.
      Returns:
      the value of the expiryTimestampSeconds record component
    • futureProofed

      public boolean futureProofed()
      Returns the value of the futureProofed record component.
      Returns:
      the value of the futureProofed record component
    • currency

      public String currency()
      Returns the value of the currency record component.
      Returns:
      the value of the currency record component
    • transactionStatus

      public PaymentInfo.TransactionStatus transactionStatus()
      Returns the value of the transactionStatus record component.
      Returns:
      the value of the transactionStatus record component
    • useNoviFormat

      public boolean useNoviFormat()
      Returns the value of the useNoviFormat record component.
      Returns:
      the value of the useNoviFormat record component
    • primaryAmount

      public PaymentMoney primaryAmount()
      Returns the value of the primaryAmount record component.
      Returns:
      the value of the primaryAmount record component
    • exchangeAmount

      public PaymentMoney exchangeAmount()
      Returns the value of the exchangeAmount record component.
      Returns:
      the value of the exchangeAmount record component