Interface CardService
public interface CardService
Main class of the Manage card service for the card issued by D1.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidgetCardList(D1Task.Callback<List<Card>> callback) Retrieves the list of cards which is issued by D1.voidgetCardSettings(String cardID, D1Task.Callback<CardSettings> callback) Retrieves the settings for card issued by D1.voidgetTransactionHistory(String cardID, TransactionQuery query, D1Task.Callback<List<CardTransactionRecord>> callback) Retrieves the transaction history for card issued by D1voidreplaceCard(String cardID, StateReason reason, D1Task.Callback<String> callback) Replaces the card issued by D1.voidresumeCard(String cardID, D1Task.Callback<Void> callback) Resumes the card issued by D1.voidsuspendCard(String cardID, D1Task.Callback<Void> callback) Suspends the card issued by D1.voidupdateCardControlSettings(String cardID, CardControlSettings settings, D1Task.Callback<Void> callback) Updates the control settings for card issued by D1.voidupdateCardLimitSettings(String cardID, CardLimitSettings settings, D1Task.Callback<Void> callback) Updates the limit settings for card issued by D1.
-
Method Details
-
suspendCard
Suspends the card issued by D1.- Parameters:
cardID- The card identifier.callback- The callback for the result. When the callback is successful, a null value will be returned.
Possible errors:
- Since:
- 4.0.0
-
resumeCard
Resumes the card issued by D1.- Parameters:
cardID- The card identifier.callback- The callback for the result. When the callback is successful, a null value will be returned.
Possible errors:
- Since:
- 4.0.0
-
replaceCard
void replaceCard(@NonNull String cardID, @NonNull StateReason reason, @NonNull D1Task.Callback<String> callback) Replaces the card issued by D1.- Parameters:
cardID- The card identifier.reason- StateReason, please find the list of all applicable state reasonsStateReason.getReplaceReasons(). When the SDK receives an invalid reason, the SDK will throwD1Exception.ErrorCode.ERROR_CARD_OPERATION_INVALID_REASONcallback- The callback for the result. When the callback is successful, the returned argument of theD1Task.Callback.onSuccess(Object)is always not a null value.
Possible errors:
D1Exception.ErrorCode.ERROR_CARD_OPERATION_NOT_ALLOWEDD1Exception.ErrorCode.ERROR_CARD_OPERATION_INVALID_REASOND1Exception.ErrorCode.ERROR_CORED1Exception.ErrorCode.ERROR_NOT_LOGGED_IND1Exception.ErrorCode.ERROR_NOT_AUTHORIZEDD1Exception.ErrorCode.ERROR_DEVICE_ENVIRONMENT_UNSAFED1Exception.ErrorCode.ERROR_CARD_NOT_FOUND
- Since:
- 4.0.0
-
getCardList
Retrieves the list of cards which is issued by D1. Use this API to retrieve the `cardID` and `cardMetaData` for each card issued by D1. If a card is deleted or replaced, this card may not be included in the list by the API.- Parameters:
callback- The callback to inform the result. When the callback is successful, the returned argument ofD1Task.Callback.onSuccess(Object)is always not a null value.
Possible errors:
- Since:
- 4.0.0
-
getCardSettings
Retrieves the settings for card issued by D1.- Parameters:
cardID- The card identifier.callback- The callback to inform the result. When the callback is successful, the returned argument of theD1Task.Callback.onSuccess(Object)is always not a null value.
Possible errors:
- Since:
- 4.0.0
-
updateCardControlSettings
void updateCardControlSettings(@NonNull String cardID, CardControlSettings settings, @NonNull D1Task.Callback<Void> callback) Updates the control settings for card issued by D1.- Parameters:
cardID- The card identifier.settings- The card control settings.callback- The callback for the result. When the callback is successful, a null value will be returned.
Possible errors:
D1Exception.ErrorCode.ERROR_CORED1Exception.ErrorCode.ERROR_NOT_LOGGED_IND1Exception.ErrorCode.ERROR_NOT_AUTHORIZEDD1Exception.ErrorCode.ERROR_DEVICE_ENVIRONMENT_UNSAFED1Exception.ErrorCode.ERROR_CARD_NOT_FOUNDD1Exception.ErrorCode.ERROR_CARD_SETTINGS_OPERATION_NOT_ALLOWEDD1Exception.ErrorCode.ERROR_CARD_SETTINGS_INVALID_FORMATD1Exception.ErrorCode.ERROR_CARD_SETTINGS_INVALID_VALUE
- Since:
- 4.0.0
-
updateCardLimitSettings
void updateCardLimitSettings(@NonNull String cardID, CardLimitSettings settings, @NonNull D1Task.Callback<Void> callback) Updates the limit settings for card issued by D1.- Parameters:
cardID- The card identifier.settings- The card limit settings.callback- The callback for the result. When the callback is successful, a null value will be returned.
Possible errors:
D1Exception.ErrorCode.ERROR_CORED1Exception.ErrorCode.ERROR_NOT_LOGGED_IND1Exception.ErrorCode.ERROR_NOT_AUTHORIZEDD1Exception.ErrorCode.ERROR_DEVICE_ENVIRONMENT_UNSAFED1Exception.ErrorCode.ERROR_CARD_NOT_FOUNDD1Exception.ErrorCode.ERROR_CARD_SETTINGS_OPERATION_NOT_ALLOWEDD1Exception.ErrorCode.ERROR_CARD_SETTINGS_INVALID_FORMATD1Exception.ErrorCode.ERROR_CARD_SETTINGS_INVALID_VALUE
- Since:
- 4.0.0
-
getTransactionHistory
void getTransactionHistory(@NonNull String cardID, @Nullable TransactionQuery query, @NonNull D1Task.Callback<List<CardTransactionRecord>> callback) Retrieves the transaction history for card issued by D1- Parameters:
cardID- The card identifierquery- Query for transaction historycallback- The callback for the result. When it succeeds, the returned argument of theD1Task.Callback.onSuccess(Object)is always non-null.
Possible errors:
- Since:
- 4.0.0
-