Reader

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

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
fun Reader(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, device: BluetoothDevice? = null, bluetoothDevice: BluetoothDevice? = null, usbDevice: UsbDevice? = null, location: Location? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
enum NetworkStatus : Enum<Reader.NetworkStatus>

Contains possible states for the network connectivity status of the reader

Functions

Link copied to clipboard
fun activate(readerId: String?, location: Location?, canonicalReaderVersion: Long? = null)
Link copied to clipboard
fun setAvailableUpdate(targetKey: String?, targetConfig: String?, targetFirmware: String?)
Link copied to clipboard
fun toDeviceInfo(): DeviceInfo
Link copied to clipboard
fun update(update: ReaderSoftwareUpdate)

Properties

Link copied to clipboard
var availableUpdate: ReaderSoftwareUpdate? = null

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
val batteryLevel: Float?

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
val bluetoothDevice: BluetoothDevice? = null

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

Link copied to clipboard
val bootloaderVersion: String? = null
Link copied to clipboard
var canonicalReaderVersion: Long? = null
Link copied to clipboard
var configVersion: String?
Link copied to clipboard
val device: BluetoothDevice? = null
Link copied to clipboard
val deviceType: DeviceType

Get the DeviceType of this reader

Link copied to clipboard
val emvKeyProfileId: String?
Link copied to clipboard
var firmwareVersion: String?
Link copied to clipboard
val hardwareVersion: String?
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
val isSimulated: Boolean = false

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
var location: Location?

Get the Location this reader is registered to, if any

Link copied to clipboard
var locationStatus: LocationStatus

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

Link copied to clipboard
val macKeyProfileId: String?
Link copied to clipboard
val networkStatus: Reader.NetworkStatus? = null

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

Link copied to clipboard
val pinKeyProfileId: String?
Link copied to clipboard
var pinKeysetId: String?
Link copied to clipboard
val rawReaderData: Map<String, String>?
Link copied to clipboard
val registeredLocation: Location?
Link copied to clipboard
val serialNumber: String?

Get the serial number of this reader

Link copied to clipboard
var settingsVersion: String? = null
Link copied to clipboard
var softwareVersion: String

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

Link copied to clipboard
val trackKeyProfileId: String?
Link copied to clipboard
val usbDevice: UsbDevice? = null

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