Module it.auties.cobalt
Class PaymentInvoiceMessage
java.lang.Object
it.auties.whatsapp.model.message.payment.PaymentInvoiceMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,MutableAttachmentProvider<PaymentInvoiceMessage>,ContextualMessage<PaymentInvoiceMessage>,MediaMessage<PaymentInvoiceMessage>,Message,PaymentMessage
public final class PaymentInvoiceMessage
extends Object
implements PaymentMessage, MediaMessage<PaymentInvoiceMessage>
A model class that represents a message to notify the invoice about a successful payment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various types of attachment that an invoice can wrap -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContextInfoprivate Stringprivate byte[]private byte[]private Longprivate byte[]private final Stringprivate final Stringprivate final PaymentInvoiceMessage.PaymentAttachmentTypeprivate final byte[]private final String -
Constructor Summary
ConstructorsConstructorDescriptionPaymentInvoiceMessage(String note, String token, PaymentInvoiceMessage.PaymentAttachmentType paymentAttachmentType, String mimeType, byte[] mediaKey, Long mediaKeyTimestampSeconds, byte[] mediaSha256, byte[] mediaEncryptedSha256, String mediaDirectPath, byte[] thumbnail, ContextInfo contextInfo) -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this attachmentcategory()Return message categoryReturns the direct path to the mediaOptional<byte[]> Returns the sha256 of this encrypted mediaOptional<byte[]> mediaKey()Returns the key of this mediaReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()Optional<byte[]> Returns the sha256 of this mediaReturns the size of this mediaReturns the media type of the media that this object wrapsmediaUrl()Returns the url to the mediamimeType()note()setContextInfo(ContextInfo contextInfo) setMediaDirectPath(String mediaDirectPath) Sets the direct path of this providersetMediaEncryptedSha256(byte[] bytes) Sets the sha256 of the encrypted media in this providersetMediaKey(byte[] bytes) Sets the media key of this providersetMediaKeyTimestamp(Long timestamp) Sets the timestamp of the media keysetMediaSha256(byte[] bytes) Sets the sha256 of the media in this providersetMediaSize(long mediaSize) Sets the size of this mediasetMediaUrl(String mediaUrl) Sets the media url of this providerOptional<byte[]> token()type()Return message type
-
Field Details
-
note
-
token
-
paymentAttachmentType
-
mimeType
-
mediaKey
private byte[] mediaKey -
mediaKeyTimestampSeconds
-
mediaSha256
private byte[] mediaSha256 -
mediaEncryptedSha256
private byte[] mediaEncryptedSha256 -
mediaDirectPath
-
thumbnail
private final byte[] thumbnail -
contextInfo
-
-
Constructor Details
-
PaymentInvoiceMessage
public PaymentInvoiceMessage(String note, String token, PaymentInvoiceMessage.PaymentAttachmentType paymentAttachmentType, String mimeType, byte[] mediaKey, Long mediaKeyTimestampSeconds, byte[] mediaSha256, byte[] mediaEncryptedSha256, String mediaDirectPath, byte[] thumbnail, ContextInfo contextInfo)
-
-
Method Details
-
note
-
token
-
thumbnail
-
paymentAttachmentType
-
mimeType
-
mediaKey
Description copied from interface:MutableAttachmentProviderReturns the key of this media- Specified by:
mediaKeyin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a non-null array of bytes
-
setMediaKey
Description copied from interface:MutableAttachmentProviderSets the media key of this provider- Specified by:
setMediaKeyin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
setMediaKeyTimestamp
Description copied from interface:MutableAttachmentProviderSets the timestamp of the media key- Specified by:
setMediaKeyTimestampin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
mediaKeyTimestampSeconds
Description copied from interface:MediaMessageReturns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampSecondsin interfaceMediaMessage<PaymentInvoiceMessage>- Returns:
- an unsigned long
-
mediaKeyTimestamp
Description copied from interface:MediaMessageReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampin interfaceMediaMessage<PaymentInvoiceMessage>- Returns:
- a zoned date time
-
mediaSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this media- Specified by:
mediaSha256in interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a non-null array of bytes
-
setMediaSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the media in this provider- Specified by:
setMediaSha256in interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
mediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this encrypted media- Specified by:
mediaEncryptedSha256in interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the encrypted media in this provider- Specified by:
setMediaEncryptedSha256in interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
mediaDirectPath
Description copied from interface:MutableAttachmentProviderReturns the direct path to the media- Specified by:
mediaDirectPathin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a nullable String
-
setMediaDirectPath
Description copied from interface:MutableAttachmentProviderSets the direct path of this provider- Specified by:
setMediaDirectPathin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
mediaUrl
Description copied from interface:MutableAttachmentProviderReturns the url to the media- Specified by:
mediaUrlin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a nullable String
-
setMediaUrl
Description copied from interface:MutableAttachmentProviderSets the media url of this provider- Specified by:
setMediaUrlin interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- the same provider
-
mediaSize
Description copied from interface:MutableAttachmentProviderReturns the size of this media- Specified by:
mediaSizein interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a long
-
setMediaSize
Description copied from interface:MutableAttachmentProviderSets the size of this media- Specified by:
setMediaSizein interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a long
-
type
Description copied from interface:MessageReturn message type- Specified by:
typein interfaceMediaMessage<PaymentInvoiceMessage>- Specified by:
typein interfaceMessage- Returns:
- a non-null message type
-
attachmentType
Description copied from interface:MutableAttachmentProviderReturns the type of this attachment- Specified by:
attachmentTypein interfaceMediaMessage<PaymentInvoiceMessage>- Specified by:
attachmentTypein interfaceMutableAttachmentProvider<PaymentInvoiceMessage>- Returns:
- a non-null attachment
-
mediaType
Description copied from interface:MediaMessageReturns the media type of the media that this object wraps- Specified by:
mediaTypein interfaceMediaMessage<PaymentInvoiceMessage>- Returns:
- a non-null
MediaMessageType
-
contextInfo
- Specified by:
contextInfoin interfaceContextualMessage<PaymentInvoiceMessage>
-
category
Description copied from interface:MessageReturn message category- Specified by:
categoryin interfaceMediaMessage<PaymentInvoiceMessage>- Specified by:
categoryin interfaceMessage- Specified by:
categoryin interfacePaymentMessage- Returns:
- a non-null message category
-
setContextInfo
- Specified by:
setContextInfoin interfaceContextualMessage<PaymentInvoiceMessage>
-