Package com.clover.sdk.v1.printer
Class TypeDetails
- java.lang.Object
-
- com.clover.sdk.v1.printer.TypeDetails
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
public class TypeDetails extends Object implements Parcelable, JSONifiable
This is a replacement for theType
class. Instances of this class may be obtained via thePrinterConnector.getPrinterTypeDetails(Printer)
method. ThefromCursor(Cursor)
method may also be used to read an instance passed via JSON in Cursor rows from the columnPrinterContract.DevicesColumns.TYPE_DETAILS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<TypeDetails>
CREATOR
static JSONifiable.Creator<TypeDetails>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
describeContents()
boolean
equals(Object o)
static TypeDetails
fromCursor(Cursor cursor)
Searches for aPrinterContract.DevicesColumns.TYPE_DETAILS
column in the given cursor and extracts a TypeDetails instance from it.String
getImageUrl()
Returns an HTTP URL that points to an image of this printer type.JSONObject
getJSONObject()
String
getModel()
A human readable model name for this printer.int
getNumCashDrawersSupported()
Deprecated.UseCashDrawers.list()
to get cash drawer information instead.int
getNumDotsWidth()
If this printer can print bitmaps this is number of dots per that the printer is capable of printing.List<Category>
getSupportedCategories()
A list of the categories this printer supports.String
getTypeName()
A unique string that identifies this type of printer (matchesType.name()
).int
hashCode()
boolean
isLocal()
True if this printer is physically attached in some way as opposed to being connected via network or other wireless interface.String
toString()
void
writeToParcel(Parcel dest, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<TypeDetails> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<TypeDetails> JSON_CREATOR
-
-
Method Detail
-
getTypeName
public String getTypeName()
A unique string that identifies this type of printer (matchesType.name()
).
-
getModel
public String getModel()
A human readable model name for this printer.
-
getSupportedCategories
public List<Category> getSupportedCategories()
A list of the categories this printer supports.
-
getNumDotsWidth
public int getNumDotsWidth()
If this printer can print bitmaps this is number of dots per that the printer is capable of printing. If the printer cannot print bitmaps this returns 0.
-
isLocal
public boolean isLocal()
True if this printer is physically attached in some way as opposed to being connected via network or other wireless interface.
-
getNumCashDrawersSupported
@Deprecated public int getNumCashDrawersSupported()
Deprecated.UseCashDrawers.list()
to get cash drawer information instead.Returns the number of cash drawers that this type of printer can provide.
-
getImageUrl
@Nullable public String getImageUrl()
Returns an HTTP URL that points to an image of this printer type.- Returns:
- A
String
, the URL, or null if no URL is available.
-
fromCursor
public static TypeDetails fromCursor(Cursor cursor)
Searches for aPrinterContract.DevicesColumns.TYPE_DETAILS
column in the given cursor and extracts a TypeDetails instance from it. Returns null if the column cannot be found.
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
getJSONObject
public JSONObject getJSONObject()
- Specified by:
getJSONObject
in interfaceJSONifiable
-
-