Module it.auties.cobalt
Record Class PaymentOrderMessage
java.lang.Object
java.lang.Record
it.auties.whatsapp.model.message.payment.PaymentOrderMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,ContextualMessage,Message,PaymentMessage
public record PaymentOrderMessage(String id, Optional<byte[]> thumbnail, int itemCount, PaymentOrderMessage.Status status, PaymentOrderMessage.PaymentOrderSurface surface, Optional<String> message, Optional<String> title, Jid sellerId, String token, long amount, String currency, Optional<ContextInfo> contextInfo)
extends Record
implements ContextualMessage, PaymentMessage
A model class that represents a message to pay an order.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for theamountrecord component.private final Optional<ContextInfo> The field for thecontextInforecord component.private final StringThe field for thecurrencyrecord component.private final StringThe field for theidrecord component.private final intThe field for theitemCountrecord component.The field for themessagerecord component.private final JidThe field for thesellerIdrecord component.private final PaymentOrderMessage.StatusThe field for thestatusrecord component.private final PaymentOrderMessage.PaymentOrderSurfaceThe field for thesurfacerecord component.private final Optional<byte[]> The field for thethumbnailrecord component.The field for thetitlerecord component.private final StringThe field for thetokenrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPaymentOrderMessage(String id, Optional<byte[]> thumbnail, int itemCount, PaymentOrderMessage.Status status, PaymentOrderMessage.PaymentOrderSurface surface, Optional<String> message, Optional<String> title, Jid sellerId, String token, long amount, String currency, Optional<ContextInfo> contextInfo) Creates an instance of aPaymentOrderMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongamount()Returns the value of theamountrecord component.Returns the value of thecontextInforecord component.currency()Returns the value of thecurrencyrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theitemCountrecord component.message()Returns the value of themessagerecord component.sellerId()Returns the value of thesellerIdrecord component.status()Returns the value of thestatusrecord component.surface()Returns the value of thesurfacerecord component.Optional<byte[]> Returns the value of thethumbnailrecord component.title()Returns the value of thetitlerecord component.token()Returns the value of thetokenrecord 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
-
id
The field for theidrecord component. -
thumbnail
The field for thethumbnailrecord component. -
itemCount
private final int itemCountThe field for theitemCountrecord component. -
status
The field for thestatusrecord component. -
surface
The field for thesurfacerecord component. -
message
The field for themessagerecord component. -
title
The field for thetitlerecord component. -
sellerId
The field for thesellerIdrecord component. -
token
The field for thetokenrecord component. -
amount
private final long amountThe field for theamountrecord component. -
currency
The field for thecurrencyrecord component. -
contextInfo
The field for thecontextInforecord component.
-
-
Constructor Details
-
PaymentOrderMessage
public PaymentOrderMessage(String id, Optional<byte[]> thumbnail, int itemCount, PaymentOrderMessage.Status status, PaymentOrderMessage.PaymentOrderSurface surface, Optional<String> message, Optional<String> title, Jid sellerId, String token, long amount, String currency, Optional<ContextInfo> contextInfo) Creates an instance of aPaymentOrderMessagerecord class.- Parameters:
id- the value for theidrecord componentthumbnail- the value for thethumbnailrecord componentitemCount- the value for theitemCountrecord componentstatus- the value for thestatusrecord componentsurface- the value for thesurfacerecord componentmessage- the value for themessagerecord componenttitle- the value for thetitlerecord componentsellerId- the value for thesellerIdrecord componenttoken- the value for thetokenrecord componentamount- the value for theamountrecord componentcurrency- the value for thecurrencyrecord componentcontextInfo- the value for thecontextInforecord component
-
-
Method Details
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
itemCount
public int itemCount()Returns the value of theitemCountrecord component.- Returns:
- the value of the
itemCountrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
surface
Returns the value of thesurfacerecord component.- Returns:
- the value of the
surfacerecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
sellerId
Returns the value of thesellerIdrecord component.- Returns:
- the value of the
sellerIdrecord component
-
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
amount
public long amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-
contextInfo
Returns the value of thecontextInforecord component.- Specified by:
contextInfoin interfaceContextualMessage- Returns:
- the value of the
contextInforecord component
-