Module it.auties.cobalt
Record Class RequestPaymentMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.payment.RequestPaymentMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,Message,PaymentMessage
public record RequestPaymentMessage(String currency, long amount1000, Jid requestFrom, Optional<MessageContainer> noteMessage, long expiryTimestampSeconds, PaymentMoney amount, Optional<PaymentBackground> background)
extends Record
implements PaymentMessage
A model class that represents a message to try to place a
PaymentMessage.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PaymentMoneyThe field for theamountrecord component.private final longThe field for theamount1000record component.private final Optional<PaymentBackground> The field for thebackgroundrecord component.private final StringThe field for thecurrencyrecord component.private final longThe field for theexpiryTimestampSecondsrecord component.private final Optional<MessageContainer> The field for thenoteMessagerecord component.private final JidThe field for therequestFromrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionRequestPaymentMessage(String currency, long amount1000, Jid requestFrom, Optional<MessageContainer> noteMessage, long expiryTimestampSeconds, PaymentMoney amount, Optional<PaymentBackground> background) Creates an instance of aRequestPaymentMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.longReturns the value of theamount1000record component.Returns the value of thebackgroundrecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns when the transaction expireslongReturns the value of theexpiryTimestampSecondsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenoteMessagerecord component.Returns the value of therequestFromrecord component.final StringtoString()Returns a string representation of this record class.type()Return message typeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.PaymentMessage
category
-
Field Details
-
currency
The field for thecurrencyrecord component. -
amount1000
private final long amount1000The field for theamount1000record component. -
requestFrom
The field for therequestFromrecord component. -
noteMessage
The field for thenoteMessagerecord component. -
expiryTimestampSeconds
private final long expiryTimestampSecondsThe field for theexpiryTimestampSecondsrecord component. -
amount
The field for theamountrecord component. -
background
The field for thebackgroundrecord component.
-
-
Constructor Details
-
RequestPaymentMessage
public RequestPaymentMessage(String currency, long amount1000, Jid requestFrom, Optional<MessageContainer> noteMessage, long expiryTimestampSeconds, PaymentMoney amount, Optional<PaymentBackground> background) Creates an instance of aRequestPaymentMessagerecord class.- Parameters:
currency- the value for thecurrencyrecord componentamount1000- the value for theamount1000record componentrequestFrom- the value for therequestFromrecord componentnoteMessage- the value for thenoteMessagerecord componentexpiryTimestampSeconds- the value for theexpiryTimestampSecondsrecord componentamount- the value for theamountrecord componentbackground- the value for thebackgroundrecord component
-
-
Method Details
-
expiryTimestamp
Returns when the transaction expires- Returns:
- an optional
-
type
Description copied from interface:MessageReturn message type -
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
amount1000
public long amount1000()Returns the value of theamount1000record component.- Returns:
- the value of the
amount1000record component
-
requestFrom
Returns the value of therequestFromrecord component.- Returns:
- the value of the
requestFromrecord component
-
noteMessage
Returns the value of thenoteMessagerecord component.- Returns:
- the value of the
noteMessagerecord component
-
expiryTimestampSeconds
public long expiryTimestampSeconds()Returns the value of theexpiryTimestampSecondsrecord component.- Returns:
- the value of the
expiryTimestampSecondsrecord component
-
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
background
Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-