InstrumentInfo | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Inherited Constants | Fields | Methods | Inherited Methods | [Expand All]
public final class

# InstrumentInfo

extends Object
implements SafeParcelable

java.lang.Object
↳ | com.google.android.gms.wallet.InstrumentInfo

## Class Overview

Parcelable representing more detailed information about a payment instrument.

## Summary

[Expand] Inherited Constants
From interface android.os.Parcelable
int | CONTENTS_FILE_DESCRIPTOR |
int | PARCELABLE_WRITE_RETURN_VALUE |
From interface com.google.android.gms.common.internal.safeparcel.SafeParcelable
String | NULL |

Fields
public static final Creator<InstrumentInfo> | CREATOR |

Public Methods
int | describeContents()
String | getInstrumentDetails() Details of an instrument that has a finite set of formats.
String | getInstrumentType() Type of an instrument that has a finite set of values.
int | getVersionCode()
void | writeToParcel(Parcel out, int flags)

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
From interface android.os.Parcelable
abstract int | describeContents()
abstract void | writeToParcel(Parcel arg0, int arg1)

## Fields

#### public static final Creator<InstrumentInfo> CREATOR

## Public Methods

#### public int describeContents ()

#### public String getInstrumentDetails ()

Details of an instrument that has a finite set of formats. These details should not be displayed to the user, but can be used when the details of a user's instrument are needed. An example would be a customer support call when the user only knows that one of their credit cards were charged.

You can rely on the format of instrument details not changing once it is defined for a given form of payment in a transaction (i.e. Instrument details of a credit card are always the last four digits of the card). However, you should be able to handle new formats that could be introduced in the future (i.e. InstantBuy adds support for a new form of payment where last four credit card digits has no meaning and other information is returned).

Current expected formats for elements of this array are:

- Credit cards return the last four digits of the card selected

##### Returns

- instrument details that will not be null, but can be the empty string

#### public String getInstrumentType ()

Type of an instrument that has a finite set of values. This type should not be displayed to the user, but can be used when the details of a user's instrument are needed. An example would be a customer support call when the user only knows that one of their credit cards were charged.

You can rely on an instrument type not changing once it is defined for a given instrument in a transaction (i.e. Purchasing with a single Visa card will always return VISA). However, you should be able to handle elements that are not defined in the expected list below (i.e. InstantBuy adds support for a new form of of payment not listed below).

Current expected values for elements of this array are:

- VISA
- MASTERCARD
- DISCOVER
- AMEX

##### Returns

- an instrument type that will be non-empty

#### public int getVersionCode ()

#### public void writeToParcel (Parcel out, int flags)