Reader

@JsonClass(generateAdapter = true)
class Reader @JvmOverloads constructor(val deviceType: DeviceType = DeviceType.UNKNOWN, @Json(name = "location") locationRaw: ExpandableLocation? = null, var locationStatus: LocationStatus = UNKNOWN, id: String? = null, readerInfo: ReaderInfo? = null, val isSimulated: Boolean = false, @Json(name = "status") val networkStatus: Reader.NetworkStatus? = null, @Json(name = "serialNumber") rawSerialNumber: String? = null, val label: String? = null, deviceSwVersion: String? = null, val baseUrl: String? = null, val ipAddress: String? = null, val livemode: Boolean? = null, val bluetoothDevice: BluetoothDevice? = null, val usbDevice: UsbDevice? = null, location: Location? = null)

The Reader is a representation of a physical reader device.

Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal

Constructors

Link copied to clipboard
constructor(deviceType: DeviceType = DeviceType.UNKNOWN, @Json(name = "location") locationRaw: ExpandableLocation? = null, locationStatus: LocationStatus = UNKNOWN, id: String? = null, readerInfo: ReaderInfo? = null, isSimulated: Boolean = false, @Json(name = "status") networkStatus: Reader.NetworkStatus? = null, @Json(name = "serialNumber") rawSerialNumber: String? = null, label: String? = null, deviceSwVersion: String? = null, baseUrl: String? = null, ipAddress: String? = null, livemode: Boolean? = null, bluetoothDevice: BluetoothDevice? = null, usbDevice: UsbDevice? = null, location: Location? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Contains possible states for the network connectivity status of the reader

Properties

Link copied to clipboard

If, during connection to the reader, a ReaderSoftwareUpdate is found that is not yet required, it will be stored in this field for future installation. When Terminal.installAvailableUpdate is called, this is the update that will be installed.

Link copied to clipboard
val baseUrl: String? = null

The base url for this reader (Only set for internet connected readers)

Link copied to clipboard

Get the current battery level as a boxed float in the range 0, 1. If the reader does not have a battery, or the battery level is unknown, this will return null.

Link copied to clipboard

Raw bluetooth device information (Only set for bluetooth connected readers)

Link copied to clipboard
Link copied to clipboard

Reader config version.

Link copied to clipboard

Get the DeviceType of this reader

Link copied to clipboard
Link copied to clipboard

Reader firmware version.

Link copied to clipboard
Link copied to clipboard
var id: String?

An identifier for the reader

Link copied to clipboard
val ipAddress: String? = null

The ip address of this reader. (Only set for internet connected readers)

Link copied to clipboard

Return whether this reader is simulated

Link copied to clipboard
val label: String? = null

A custom label that may be given to a reader for easier identification. (Only set for internet connected readers)

Link copied to clipboard
val livemode: Boolean? = null

Whether this reader is in livemode

Link copied to clipboard

Get the Location this reader is registered to, if any

Link copied to clipboard

Get the LocationStatus of this reader, to know what can be expected in the registeredLocation field

Link copied to clipboard
Link copied to clipboard

The networking status of the reader: either offline or online. Note that (Only set for internet connected readers)

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the serial number of this reader

Link copied to clipboard
Link copied to clipboard

Get the current software version on the reader, expressed as a string

Link copied to clipboard
Link copied to clipboard

Raw usb device information (Only set for usb connected readers)

Functions

Link copied to clipboard
fun activate(readerId: String?, location: Location?, canonicalReaderVersion: Long? = null)
Link copied to clipboard
fun toDeviceInfo(): DeviceInfo
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard