Package io.smooch.core
Class MessageAction
- java.lang.Object
-
- io.smooch.core.MessageAction
-
- All Implemented Interfaces:
java.io.Serializable
public class MessageAction extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MessageAction()
Creates an empty message action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
long
getAmount()
The price of the actionjava.lang.String
getCurrency()
The type of currencyjava.lang.String
getFallback()
Fallback URI for action types not supported by the SDKjava.lang.String
getIconUrl()
The icon URL of the actionjava.util.Map<java.lang.String,java.lang.Object>
getMetadata()
The action metadatajava.lang.String
getPayload()
The action payloadjava.lang.String
getSize()
The size of a webviewjava.lang.String
getState()
The state of the actionjava.lang.String
getText()
The text of the actionjava.lang.String
getType()
The type of actionjava.lang.String
getUri()
The URI of the actionboolean
isDefault()
Flag indicating if the message action should be the default for a given MessageItemvoid
setAmount(long amount)
Sets the price of the actionvoid
setCurrency(java.lang.String currency)
Sets the type of currencyvoid
setDefault(boolean isDefault)
Sets the default flagvoid
setFallback(java.lang.String uri)
Sets the fallback URI for action types not supported by the SDKvoid
setIconUrl(java.lang.String iconUrl)
Sets the icon URL of the actionvoid
setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Sets the action metadatavoid
setPayload(java.lang.String payload)
Sets the action payloadvoid
setSize(java.lang.String size)
Sets the size for a webviewvoid
setText(java.lang.String text)
Sets the text of the actionvoid
setType(java.lang.String type)
Sets the type of actionvoid
setUri(java.lang.String uri)
Sets the URI of the action
-
-
-
Method Detail
-
getText
public java.lang.String getText()
The text of the action- Returns:
- The text
-
setText
public void setText(java.lang.String text)
Sets the text of the action
-
getIconUrl
public java.lang.String getIconUrl()
The icon URL of the action- Returns:
- The icon URL
-
setIconUrl
public void setIconUrl(java.lang.String iconUrl)
Sets the icon URL of the action
-
getUri
public java.lang.String getUri()
The URI of the action- Returns:
- The URI
-
setUri
public void setUri(java.lang.String uri)
Sets the URI of the action
-
getFallback
public java.lang.String getFallback()
Fallback URI for action types not supported by the SDK- Returns:
- The fallback Uri
-
setFallback
public void setFallback(java.lang.String uri)
Sets the fallback URI for action types not supported by the SDK
-
getSize
public java.lang.String getSize()
The size of a webview- Returns:
- The size
-
setSize
public void setSize(java.lang.String size)
Sets the size for a webview
-
getAmount
public long getAmount()
The price of the action- Returns:
- The price (in cents)
-
setAmount
public void setAmount(long amount)
Sets the price of the action
-
getState
public java.lang.String getState()
The state of the action- Returns:
- The state of the action
-
getType
public java.lang.String getType()
The type of action- Returns:
- The type
-
setType
public void setType(java.lang.String type)
Sets the type of action
-
getPayload
public java.lang.String getPayload()
The action payload- Returns:
- The payload
-
setPayload
public void setPayload(java.lang.String payload)
Sets the action payload
-
getMetadata
public java.util.Map<java.lang.String,java.lang.Object> getMetadata()
The action metadata- Returns:
- The metadata
-
setMetadata
public void setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Sets the action metadata
-
getCurrency
public java.lang.String getCurrency()
The type of currency- Returns:
- The currency type
-
setCurrency
public void setCurrency(java.lang.String currency)
Sets the type of currency
-
isDefault
public boolean isDefault()
Flag indicating if the message action should be the default for a given MessageItem- Returns:
- True or false
-
setDefault
public void setDefault(boolean isDefault)
Sets the default flag
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-