ICButton

This class exposes the data related to interactive button in quick replies and generic templates.

getIdentifier

This method is used to get the Identifier of the Button .

Syntax: String getIdentifier()

Return Value: Returns the Identifier of the Button.

setIdentifier

This method is used to set the Identifier of the Button .

Syntax: void setIdentifier (String identifier)

Parameter:

Parameter

Type

Description

identifier

String

The Identifier of the Button

getTitle

This method is used to get the title of the Button .

Syntax: String getTitle()

Return Value: Returns the title of the Button.

setTitle

This method is used to set the title of the Button .

Syntax: void setTitle(String title)

Parameter:

Parameter

Type

Description

title

String

The title of the Button

getType

This method is used to get the type of the Interactive Data .

Syntax: String getType()

Return Value: Returns the type of the Interactive Data.

setType

This method is used to set the type of the Interactive Data .

Syntax: void setType(String type)

Parameters:

Parameter

Type

Description

type

String

The Type of the Interactive Data

getActionURL

This method is used to get the ActionURL, The url that can be used to open web_link and deep link.

Syntax: String getActionURL ()

Return Value: Returns the ActionURL of the Button.

setActionURL

This method is used to set the ActionURL of the Button .

Syntax: void setActionURL (String actionURL)

Parameter:

Parameter

Type

Description

actionURL

String

The url that can be used to open web_link and deeplink.

getImageURL

This method is used to get the Image URL, The url that can be used to render the image of the Button.

Syntax: String getImageURL ()

Return Value: Returns the Image URL of the Button.

setImageURL

This method is used to set the Image URL of the Button .

Syntax: void setImageURL (String imageURL)

Parameter:

Parameter

Type

Description

imageURL

String

The url that can be used to render the image of the Button.

getPayload

This method is used to get the payload of the Button.

Syntax: JSONObject getPayload ()

Return Value: Returns the payload of the Button.

setPayload

This method is used to set the payload of the Button.

Syntax: void setPayload (JSONObject payload)

Parameter:

Parameter

Type

Description

payload

JSONObject

The payload of the button.

toJSON

This method returns the JSONObject containing the button data.

Syntax: JSONObject toJSON ()

Return Value: Returns JSONObject representation of the Button.

fromJSON

Instantiates a new ICButton instance from the supplied JSONObject.

Syntax: ICButton fromJSON (JSONObject jsonObject)

Parameter:

Parameter

Type

Description

jsonObject

JSONObject

A valid JSONObject instance containing button data.

Return Value: Returns A new ICButton or null if jsonObject is null.