Reader

@Serializable(with = ReaderSerializer::class)
class Reader @JvmOverloads constructor(val deviceType: DeviceType = DeviceType.UNKNOWN, locationRaw: ExpandableLocation? = null, var locationStatus: LocationStatus = UNKNOWN, id: String? = null, val isSimulated: Boolean = false, val networkStatus: Reader.NetworkStatus? = null, 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, readerInfoBatteryLevel: Float? = null, readerInfoConfigVersion: String? = null, var settingsVersion: String? = null, readerInfoFirmwareVersion: String? = null, readerInfoHardwareVersion: String? = null, val pinKeyProfileId: String? = null, val macKeyProfileId: String? = null, val trackKeyProfileId: String? = null, val emvKeyProfileId: String? = null, readerInfoPinKeysetId: String? = null, val macKeysetId: String? = null, val trackKeysetId: String? = null, val emvKeysetId: String? = null, val serial: String? = null, isDebug: Boolean? = false, val rawReaderData: Map<String, String>? = null, val isCharging: Boolean? = null, isDevKit: Boolean = false, val firmwareId: String? = null, val coinCellBatteryVoltage: Float? = null, val isUsbConnected: Boolean? = null) : Serializable

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, locationRaw: ExpandableLocation? = null, locationStatus: LocationStatus = UNKNOWN, id: String? = null, isSimulated: Boolean = false, networkStatus: Reader.NetworkStatus? = null, 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, readerInfoBatteryLevel: Float? = null, readerInfoConfigVersion: String? = null, settingsVersion: String? = null, readerInfoFirmwareVersion: String? = null, readerInfoHardwareVersion: String? = null, pinKeyProfileId: String? = null, macKeyProfileId: String? = null, trackKeyProfileId: String? = null, emvKeyProfileId: String? = null, readerInfoPinKeysetId: String? = null, macKeysetId: String? = null, trackKeysetId: String? = null, emvKeysetId: String? = null, serial: String? = null, isDebug: Boolean? = false, rawReaderData: Map<String, String>? = null, isCharging: Boolean? = null, isDevKit: Boolean = false, firmwareId: String? = null, coinCellBatteryVoltage: Float? = null, isUsbConnected: Boolean? = 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
@Transient
var 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
@Transient
val bluetoothDevice: BluetoothDevice? = null

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

Link copied to clipboard
@Transient
val bootloaderVersion: String? = null
Link copied to clipboard
@Transient
val coinCellBatteryVoltage: Float? = null
Link copied to clipboard
@Transient
var configVersion: String?

Reader config version.

Link copied to clipboard

Get the DeviceType of this reader

Link copied to clipboard
@Transient
val emvKeyProfileId: String? = null
Link copied to clipboard
@Transient
val emvKeysetId: String? = null
Link copied to clipboard
@Transient
val firmwareId: String? = null
Link copied to clipboard
@Transient
var firmwareVersion: String?

Reader firmware version.

Link copied to clipboard
@Transient
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
@Transient
val isCharging: Boolean? = null
Link copied to clipboard
@Transient
val isSimulated: Boolean = false

Return whether this reader is simulated

Link copied to clipboard
@Transient
val isUsbConnected: Boolean? = null
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
@Transient
var location: Location?

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
@Transient
val macKeyProfileId: String? = null
Link copied to clipboard
@Transient
val macKeysetId: String? = null
Link copied to clipboard
@SerialName(value = "status")
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
@Transient
val pinKeyProfileId: String? = null
Link copied to clipboard
@Transient
var pinKeysetId: String?
Link copied to clipboard
@Transient
val rawReaderData: Map<String, String>? = null
Link copied to clipboard
@Transient
val serial: String? = null
Link copied to clipboard
@Transient
val serialNumber: String?

Get the serial number of this reader

Link copied to clipboard
@Transient
var settingsVersion: String?
Link copied to clipboard
@Transient
var softwareVersion: String

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

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

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