public class

BatteryInfo

extends PayPalRetailObject
java.lang.Object
   ↳ PayPalRetailObject
     ↳ com.paypal.paypalretailsdk.BatteryInfo

Class Overview

BatteryInfo class contains information about the health of the device battery and the instant it was measured

Summary

Public Constructors
BatteryInfo(Integer percentage, Boolean isCharging, Date measuredOn, batteryStatus status)
Create a new Battery info object
Public Methods
Boolean getIsCharging()
Indicates if the device battery is connected to power
Boolean getIsLevelCritical()
Indicates that the device battery is at Critical or less and not charging
Boolean getIsLevelUpdateCritical()
Indicates that the device battery is at UpdateCritical or less and not charging
Date getMeasuredOn()
The time the battery information was retrieved
Integer getPercentage()
The level of battery in percentage
batteryStatus getStatus()
Status of the battery
void setIsCharging(Boolean value)
Indicates if the device battery is connected to power
void setIsLevelCritical(Boolean value)
Indicates that the device battery is at Critical or less and not charging
void setIsLevelUpdateCritical(Boolean value)
Indicates that the device battery is at UpdateCritical or less and not charging
void setMeasuredOn(Date value)
The time the battery information was retrieved
void setPercentage(Integer value)
The level of battery in percentage
void setStatus(batteryStatus value)
Status of the battery
String toString()
Returns a string representing the serialized state of the BatteryInfo object
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BatteryInfo (Integer percentage, Boolean isCharging, Date measuredOn, batteryStatus status)

Create a new Battery info object

Public Methods

public Boolean getIsCharging ()

Indicates if the device battery is connected to power

public Boolean getIsLevelCritical ()

Indicates that the device battery is at Critical or less and not charging

public Boolean getIsLevelUpdateCritical ()

Indicates that the device battery is at UpdateCritical or less and not charging

public Date getMeasuredOn ()

The time the battery information was retrieved

public Integer getPercentage ()

The level of battery in percentage

public batteryStatus getStatus ()

Status of the battery

public void setIsCharging (Boolean value)

Indicates if the device battery is connected to power

public void setIsLevelCritical (Boolean value)

Indicates that the device battery is at Critical or less and not charging

public void setIsLevelUpdateCritical (Boolean value)

Indicates that the device battery is at UpdateCritical or less and not charging

public void setMeasuredOn (Date value)

The time the battery information was retrieved

public void setPercentage (Integer value)

The level of battery in percentage

public void setStatus (batteryStatus value)

Status of the battery

public String toString ()

Returns a string representing the serialized state of the BatteryInfo object