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 enum
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final long
The field for theamount
record component.private final Optional
<ContextInfo> The field for thecontextInfo
record component.private final String
The field for thecurrency
record component.private final String
The field for theid
record component.private final int
The field for theitemCount
record component.The field for themessage
record component.private final Jid
The field for thesellerId
record component.private final PaymentOrderMessage.Status
The field for thestatus
record component.private final PaymentOrderMessage.PaymentOrderSurface
The field for thesurface
record component.private final Optional
<byte[]> The field for thethumbnail
record component.The field for thetitle
record component.private final String
The field for thetoken
record 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 aPaymentOrderMessage
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
amount()
Returns the value of theamount
record component.Returns the value of thecontextInfo
record component.currency()
Returns the value of thecurrency
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.int
Returns the value of theitemCount
record component.message()
Returns the value of themessage
record component.sellerId()
Returns the value of thesellerId
record component.status()
Returns the value of thestatus
record component.surface()
Returns the value of thesurface
record component.Optional
<byte[]> Returns the value of thethumbnail
record component.title()
Returns the value of thetitle
record component.token()
Returns the value of thetoken
record component.final String
toString()
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, wait
Methods inherited from interface it.auties.whatsapp.model.message.model.PaymentMessage
category
-
Field Details
-
id
The field for theid
record component. -
thumbnail
The field for thethumbnail
record component. -
itemCount
private final int itemCountThe field for theitemCount
record component. -
status
The field for thestatus
record component. -
surface
The field for thesurface
record component. -
message
The field for themessage
record component. -
title
The field for thetitle
record component. -
sellerId
The field for thesellerId
record component. -
token
The field for thetoken
record component. -
amount
private final long amountThe field for theamount
record component. -
currency
The field for thecurrency
record component. -
contextInfo
The field for thecontextInfo
record 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 aPaymentOrderMessage
record class.- Parameters:
id
- the value for theid
record componentthumbnail
- the value for thethumbnail
record componentitemCount
- the value for theitemCount
record componentstatus
- the value for thestatus
record componentsurface
- the value for thesurface
record componentmessage
- the value for themessage
record componenttitle
- the value for thetitle
record componentsellerId
- the value for thesellerId
record componenttoken
- the value for thetoken
record componentamount
- the value for theamount
record componentcurrency
- the value for thecurrency
record componentcontextInfo
- the value for thecontextInfo
record component
-
-
Method Details
-
type
Description copied from interface:Message
Return 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 theid
record component.- Returns:
- the value of the
id
record component
-
thumbnail
Returns the value of thethumbnail
record component.- Returns:
- the value of the
thumbnail
record component
-
itemCount
public int itemCount()Returns the value of theitemCount
record component.- Returns:
- the value of the
itemCount
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
surface
Returns the value of thesurface
record component.- Returns:
- the value of the
surface
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
sellerId
Returns the value of thesellerId
record component.- Returns:
- the value of the
sellerId
record component
-
token
Returns the value of thetoken
record component.- Returns:
- the value of the
token
record component
-
amount
public long amount()Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-
currency
Returns the value of thecurrency
record component.- Returns:
- the value of the
currency
record component
-
contextInfo
Returns the value of thecontextInfo
record component.- Specified by:
contextInfo
in interfaceContextualMessage
- Returns:
- the value of the
contextInfo
record component
-