# Alerts

class Alerts

## Properties

rx
Link copied to clipboard
val rx: AlertsRx

## Functions

acceptAlert
Link copied to clipboard
fun acceptAlert(alert: Alert, onCompletion: (SippoResourceError?) -> Unit)

Accept an alert.

addListener
Link copied to clipboard
fun addListener(listener: AlertsListener)

Adds a listener to receive alerts events.

cancelAlert
Link copied to clipboard
fun cancelAlert(alert: Alert, onCompletion: (SippoResourceError?) -> Unit)

Cancel an alert.

getAlerts
Link copied to clipboard
fun getAlerts(acceptedSince: Long? = null, expiredSince: Long? = null, cancelledSince: Long? = null, onCompletion: (Either<AlertContainer, SippoResourceError>) -> Unit)

Fetches all the alerts from the specified params acceptedSince, expiredSince , cancelledSince if they are provided.

getAvailableAlertTemplates
Link copied to clipboard
fun getAvailableAlertTemplates(onCompletion: (Either<List<AlertTemplate>, SippoResourceError>) -> Unit)

Fetches all alert templates available.

removeListener
Link copied to clipboard
fun removeListener(listener: AlertsListener)

Removes the specified listener.

sendAlertByTemplate
Link copied to clipboard
fun sendAlertByTemplate(alertTemplate: AlertTemplate, onCompletion: (SippoResourceError?) -> Unit)

Send an Alert with a specified template by AlertTemplate.