public class MemberAsync extends java.lang.Object implements RepresentableAsync
Modifier and Type | Method and Description |
---|---|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.AddressRecord> |
addAddress(java.lang.String name,
io.token.proto.common.address.AddressProtos.Address address)
Creates a new member address.
|
io.reactivex.Completable |
addAlias(io.token.proto.common.alias.AliasProtos.Alias alias)
Adds a new alias for the member.
|
io.reactivex.Completable |
addAliases(java.util.List<io.token.proto.common.alias.AliasProtos.Alias> aliasList)
Adds new aliases for the member.
|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> |
addRecoveryRule(io.token.proto.common.member.MemberProtos.RecoveryRule recoveryRule)
Adds the recovery rule.
|
io.reactivex.Completable |
addTrustedBeneficiary(java.lang.String memberId)
Adds a trusted beneficiary for whom the SCA will be skipped.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.alias.AliasProtos.Alias>> |
aliases()
Gets all aliases owned by the member.
|
io.reactivex.Completable |
applySca(java.util.List<java.lang.String> accountIds)
Apply SCA for the given list of account IDs.
|
io.reactivex.Completable |
approveKey(io.token.security.keystore.SecretKeyPair key,
io.token.proto.common.security.SecurityProtos.Key.Level level)
Approves a key owned by this member.
|
io.reactivex.Completable |
approveKey(io.token.proto.common.security.SecurityProtos.Key key)
Approves a public key owned by this member.
|
io.reactivex.Completable |
approveKeys(java.util.List<io.token.proto.common.security.SecurityProtos.Key> keys)
Approves public keys owned by this member.
|
io.reactivex.Observable<io.token.proto.common.security.SecurityProtos.Signature> |
authorizeRecovery(io.token.proto.common.member.MemberProtos.MemberRecoveryOperation.Authorization authorization)
Authorizes recovery as a trusted agent.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> |
cancelToken(io.token.proto.common.token.TokenProtos.Token token)
Cancels the token by signing it.
|
void |
clearAccessToken()
Deprecated.
|
void |
clearSecurityMetadata()
Clears security metadata.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
createAccessToken(AccessTokenBuilder accessTokenBuilder)
Creates an access token built from a given
AccessTokenBuilder . |
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
createAccessToken(AccessTokenBuilder accessTokenBuilder,
java.lang.String tokenRequestId)
Creates an access token built from a given
AccessTokenBuilder . |
io.reactivex.Observable<AccountAsync> |
createAndLinkTestBankAccount(double balance,
java.lang.String currency)
Creates a test bank account in a fake bank and links the account.
|
io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Attachment> |
createBlob(java.lang.String ownerId,
java.lang.String type,
java.lang.String name,
byte[] data)
Creates and uploads a blob.
|
io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Attachment> |
createBlob(java.lang.String ownerId,
java.lang.String type,
java.lang.String name,
byte[] data,
io.token.proto.common.blob.BlobProtos.Blob.AccessMode accessMode)
Creates and uploads a blob.
|
io.reactivex.Observable<java.lang.String> |
createCustomization(io.token.proto.common.blob.BlobProtos.Blob.Payload logo,
java.util.Map<java.lang.String,java.lang.String> colors,
java.lang.String consentText,
java.lang.String name,
java.lang.String appName)
Creates a customization.
|
io.reactivex.Observable<io.token.proto.banklink.Banklink.OauthBankAuthorization> |
createTestBankAccount(double balance,
java.lang.String currency)
Creates a test bank account in a fake bank.
|
TransferTokenBuilder |
createTransferToken(double amount,
java.lang.String currency)
Creates a new transfer token builder.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
createTransferToken(io.token.proto.common.token.TokenProtos.TokenPayload payload)
Creates a new transfer token from a token payload.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
createTransferToken(io.token.proto.common.token.TokenProtos.TokenPayload payload,
java.lang.String tokenRequestId)
Creates a new transfer token from a token payload.
|
io.reactivex.Completable |
deleteAddress(java.lang.String addressId)
Deletes a member address by its id.
|
io.reactivex.Completable |
deleteMember()
Delete the member.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> |
endorseToken(io.token.proto.common.token.TokenProtos.Token token,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Endorses the token by signing it.
|
boolean |
equals(java.lang.Object obj) |
io.reactivex.Observable<io.token.proto.common.alias.AliasProtos.Alias> |
firstAlias()
Gets the first alias owner by the user.
|
RepresentableAsync |
forAccessToken(java.lang.String tokenId)
Creates a
RepresentableAsync that acts as another member using the access token
that was granted by that member. |
RepresentableAsync |
forAccessToken(java.lang.String tokenId,
boolean customerInitiated)
Creates a
RepresentableAsync that acts as another member using the access token
that was granted by that member. |
io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,java.lang.String>> |
getAccessTokens(java.lang.String offset,
int limit)
Looks up access tokens owned by the member.
|
io.reactivex.Observable<AccountAsync> |
getAccount(java.lang.String accountId)
Looks up a funding bank account linked to Token.
|
io.reactivex.Observable<java.util.List<AccountAsync>> |
getAccounts()
Links a funding bank account to Token and returns it to the caller.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
getActiveAccessToken(java.lang.String toMemberId)
Looks up a existing access token where the calling member is the grantor and given member is
the grantee.
|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.AddressRecord> |
getAddress(java.lang.String addressId)
Looks up an address by id.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.AddressRecord>> |
getAddresses()
Looks up member addresses.
|
io.reactivex.Observable<io.token.proto.common.money.MoneyProtos.Money> |
getAvailableBalance(java.lang.String accountId,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up available account balance.
|
io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> |
getBalance(java.lang.String accountId,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up account balance.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance>> |
getBalances(java.util.List<java.lang.String> accountIds,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up balances for a list of accounts.
|
io.reactivex.Observable<io.token.proto.common.bank.BankProtos.BankInfo> |
getBankInfo(java.lang.String bankId)
Returns linking information for the specified bank id.
|
io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> |
getBlob(java.lang.String blobId)
Retrieves a blob from the server.
|
io.reactivex.Observable<io.token.proto.common.money.MoneyProtos.Money> |
getCurrentBalance(java.lang.String accountId,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up current account balance.
|
io.reactivex.Observable<AccountAsync> |
getDefaultAccount(java.lang.String memberId)
Get the default bank account for this member.
|
io.reactivex.Observable<java.lang.String> |
getDefaultAgent()
Gets the member id of the default recovery agent.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.security.SecurityProtos.Key>> |
getKeys()
Gets all public keys for this member.
|
io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.Notification> |
getNotification(java.lang.String notificationId)
Gets a notification by id.
|
io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.notification.NotificationProtos.Notification,java.lang.String>> |
getNotifications(java.lang.String offset,
int limit)
Gets a list of the member's notifications.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.Device>> |
getPairedDevices()
Get list of paired devices.
|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> |
getProfile(java.lang.String memberId)
Gets a member's public profile.
|
io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> |
getProfilePicture(java.lang.String memberId,
io.token.proto.common.member.MemberProtos.ProfilePictureSize size)
Gets a member's public profile picture.
|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.ReceiptContact> |
getReceiptContact()
Gets the member's receipt email address.
|
io.reactivex.Observable<io.token.proto.common.subscriber.SubscriberProtos.Subscriber> |
getSubscriber(java.lang.String subscriberId)
Gets a subscriber by id.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.subscriber.SubscriberProtos.Subscriber>> |
getSubscribers()
Gets subscribers.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> |
getToken(java.lang.String tokenId)
Looks up a existing token.
|
io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> |
getTokenBlob(java.lang.String tokenId,
java.lang.String blobId)
Retrieves a blob that is attached to a transfer token.
|
TokenIO.TokenCluster |
getTokenCluster()
Get the Token cluster, e.g.
|
io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Transaction> |
getTransaction(java.lang.String accountId,
java.lang.String transactionId,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up an existing transaction for a given account.
|
io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,java.lang.String>> |
getTransactions(java.lang.String accountId,
java.lang.String offset,
int limit,
io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Looks up transactions for a given account.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
getTransfer(java.lang.String transferId)
Looks up an existing token transfer.
|
io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transfer.TransferProtos.Transfer,java.lang.String>> |
getTransfers(java.lang.String offset,
int limit,
java.lang.String tokenId)
Looks up existing token transfers.
|
io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,java.lang.String>> |
getTransferTokens(java.lang.String offset,
int limit)
Looks up transfer tokens owned by the member.
|
io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.TrustedBeneficiary>> |
getTrustedBeneficiaries()
Gets a list of all trusted beneficiaries.
|
int |
hashCode() |
io.reactivex.Observable<java.util.List<Account>> |
initiateAccountLinking(java.lang.String bankId)
Links accounts by navigating browser through bank authorization pages.
|
java.util.List<io.token.proto.common.security.SecurityProtos.Key> |
keys()
Deprecated.
|
io.reactivex.Observable<java.lang.String> |
lastHash()
Gets the last hash.
|
io.reactivex.Observable<java.util.List<AccountAsync>> |
linkAccounts(io.token.proto.banklink.Banklink.BankAuthorization authorization)
Links a funding bank accounts to Token and returns it to the caller.
|
io.reactivex.Observable<java.util.List<AccountAsync>> |
linkAccounts(java.lang.String bankId,
java.lang.String accessToken)
Links funding bank accounts to Token and returns them to the caller.
|
java.lang.String |
memberId()
Gets member ID.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
redeemToken(io.token.proto.common.token.TokenProtos.Token token)
Redeems a transfer token.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
redeemToken(io.token.proto.common.token.TokenProtos.Token token,
java.lang.Double amount,
java.lang.String currency,
java.lang.String description,
io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination,
java.lang.String refId)
Redeems a transfer token.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
redeemToken(io.token.proto.common.token.TokenProtos.Token token,
java.lang.String refId)
Redeems a transfer token.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
redeemToken(io.token.proto.common.token.TokenProtos.Token token,
io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination)
Redeems a transfer token.
|
io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> |
redeemToken(io.token.proto.common.token.TokenProtos.Token token,
io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination,
java.lang.String refId)
Redeems a transfer token.
|
io.reactivex.Completable |
removeAlias(io.token.proto.common.alias.AliasProtos.Alias alias)
Removes an alias for the member.
|
io.reactivex.Completable |
removeAliases(java.util.List<io.token.proto.common.alias.AliasProtos.Alias> aliasList)
Removes aliases for the member.
|
io.reactivex.Completable |
removeKey(java.lang.String keyId)
Removes a public key owned by this member.
|
io.reactivex.Completable |
removeKeys(java.util.List<java.lang.String> keyIds)
Removes public keys owned by this member.
|
io.reactivex.Completable |
removeNonStoredKeys()
Removes all public keys that do not have a corresponding private key stored on
the current device from tke member.
|
io.reactivex.Completable |
removeTrustedBeneficiary(java.lang.String memberId)
Removes a trusted beneficiary.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> |
replaceAccessToken(io.token.proto.common.token.TokenProtos.Token tokenToCancel,
AccessTokenBuilder tokenToCreate)
Cancels the existing access token and creates a replacement for it.
|
io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> |
replaceAndEndorseAccessToken(io.token.proto.common.token.TokenProtos.Token tokenToCancel,
AccessTokenBuilder tokenToCreate)
|
io.reactivex.Observable<java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint>> |
resolveTransferDestinations(java.lang.String accountId)
Resolves transfer destinations for the given account ID.
|
io.reactivex.Observable<java.lang.String> |
retryVerification(io.token.proto.common.alias.AliasProtos.Alias alias)
Retries alias verification.
|
io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> |
setProfile(io.token.proto.common.member.MemberProtos.Profile profile)
Replaces auth'd member's public profile.
|
io.reactivex.Completable |
setProfilePicture(java.lang.String type,
byte[] data)
Replaces auth'd member's public profile picture.
|
io.reactivex.Completable |
setReceiptContact(io.token.proto.common.member.MemberProtos.ReceiptContact contact)
Replaces the member's receipt contact.
|
void |
setSecurityMetadata(io.token.proto.common.security.SecurityProtos.SecurityMetadata securityMetadata)
Sets security metadata included in all requests.
|
io.reactivex.Observable<io.token.proto.common.security.SecurityProtos.Signature> |
signTokenRequestState(java.lang.String tokenRequestId,
java.lang.String tokenId,
java.lang.String state)
Sign with a Token signature a token request state payload.
|
io.reactivex.Observable<java.lang.String> |
storeTokenRequest(TokenRequest tokenRequest)
Stores a token request.
|
io.reactivex.Observable<io.token.proto.common.subscriber.SubscriberProtos.Subscriber> |
subscribeToNotifications(java.lang.String handler,
java.util.Map<java.lang.String,java.lang.String> handlerInstructions)
Creates a subscriber to push notifications.
|
Member |
sync()
Gets a sync version of the account API.
|
java.lang.String |
toString() |
io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> |
triggerBalanceStepUpNotification(java.util.List<java.lang.String> accountIds)
Trigger a step up notification for balance requests.
|
io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> |
triggerTokenStepUpNotification(java.lang.String tokenId)
Trigger a step up notification for tokens.
|
io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> |
triggerTransactionStepUpNotification(java.lang.String accountId)
Trigger a step up notification for transaction requests.
|
io.reactivex.Completable |
unlinkAccounts(java.util.List<java.lang.String> accountIds)
Unlinks bank accounts previously linked via linkAccounts call.
|
io.reactivex.Completable |
unsubscribeFromNotifications(java.lang.String subscriberId)
Removes a subscriber.
|
void |
useAccessToken(java.lang.String accessTokenId)
Deprecated.
|
void |
useAccessToken(java.lang.String accessTokenId,
boolean customerInitiated)
Deprecated.
|
io.reactivex.Completable |
useDefaultRecoveryRule()
Set Token as the recovery agent.
|
io.reactivex.Completable |
verifyAffiliate(java.lang.String memberId)
Verifies an affiliated TPP.
|
io.reactivex.Completable |
verifyAlias(java.lang.String verificationId,
java.lang.String code)
Verifies a given alias.
|
public Member sync()
public java.lang.String memberId()
public io.reactivex.Observable<java.lang.String> lastHash()
public io.reactivex.Observable<io.token.proto.common.alias.AliasProtos.Alias> firstAlias()
public io.reactivex.Observable<java.util.List<io.token.proto.common.alias.AliasProtos.Alias>> aliases()
@Deprecated public java.util.List<io.token.proto.common.security.SecurityProtos.Key> keys()
public io.reactivex.Observable<java.util.List<io.token.proto.common.security.SecurityProtos.Key>> getKeys()
@Deprecated public void useAccessToken(java.lang.String accessTokenId)
accessTokenId
- the access token id@Deprecated public void useAccessToken(java.lang.String accessTokenId, boolean customerInitiated)
accessTokenId
- the access token idcustomerInitiated
- whether the request is customer initiated@Deprecated public void clearAccessToken()
public RepresentableAsync forAccessToken(java.lang.String tokenId)
RepresentableAsync
that acts as another member using the access token
that was granted by that member.tokenId
- the token idRepresentableAsync
public RepresentableAsync forAccessToken(java.lang.String tokenId, boolean customerInitiated)
RepresentableAsync
that acts as another member using the access token
that was granted by that member.tokenId
- the token idcustomerInitiated
- whether the call is initiated by the customerRepresentableAsync
public io.reactivex.Completable addAlias(io.token.proto.common.alias.AliasProtos.Alias alias)
alias
- alias, e.g. 'john', must be uniquepublic io.reactivex.Completable addAliases(java.util.List<io.token.proto.common.alias.AliasProtos.Alias> aliasList)
aliasList
- aliases, e.g. 'john', must be uniquepublic io.reactivex.Observable<java.lang.String> retryVerification(io.token.proto.common.alias.AliasProtos.Alias alias)
alias
- the alias to be verifiedpublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Member> addRecoveryRule(io.token.proto.common.member.MemberProtos.RecoveryRule recoveryRule)
recoveryRule
- the recovery rulepublic io.reactivex.Completable useDefaultRecoveryRule()
public io.reactivex.Observable<io.token.proto.common.security.SecurityProtos.Signature> authorizeRecovery(io.token.proto.common.member.MemberProtos.MemberRecoveryOperation.Authorization authorization)
authorization
- the authorizationpublic io.reactivex.Observable<java.lang.String> getDefaultAgent()
public io.reactivex.Completable verifyAlias(java.lang.String verificationId, java.lang.String code)
verificationId
- the verification idcode
- the codepublic io.reactivex.Completable removeAlias(io.token.proto.common.alias.AliasProtos.Alias alias)
alias
- alias, e.g. 'john'public io.reactivex.Completable removeAliases(java.util.List<io.token.proto.common.alias.AliasProtos.Alias> aliasList)
aliasList
- aliases, e.g. 'john'public io.reactivex.Completable approveKey(io.token.security.keystore.SecretKeyPair key, io.token.proto.common.security.SecurityProtos.Key.Level level)
key
- key to add to the approved listlevel
- key privilege levelpublic io.reactivex.Completable approveKey(io.token.proto.common.security.SecurityProtos.Key key)
key
- key to add to the approved listpublic io.reactivex.Completable approveKeys(java.util.List<io.token.proto.common.security.SecurityProtos.Key> keys)
keys
- keys to add to the approved listpublic io.reactivex.Completable removeKey(java.lang.String keyId)
keyId
- key ID of the key to removepublic io.reactivex.Completable removeKeys(java.util.List<java.lang.String> keyIds)
keyIds
- key IDs of the keys to removepublic io.reactivex.Completable removeNonStoredKeys()
public io.reactivex.Observable<io.token.proto.common.subscriber.SubscriberProtos.Subscriber> subscribeToNotifications(java.lang.String handler, java.util.Map<java.lang.String,java.lang.String> handlerInstructions)
handler
- specify the handler of the notificationshandlerInstructions
- map of instructions for the handlerpublic io.reactivex.Observable<java.util.List<io.token.proto.common.subscriber.SubscriberProtos.Subscriber>> getSubscribers()
public io.reactivex.Observable<io.token.proto.common.subscriber.SubscriberProtos.Subscriber> getSubscriber(java.lang.String subscriberId)
subscriberId
- Id of the subscriberpublic io.reactivex.Completable unsubscribeFromNotifications(java.lang.String subscriberId)
subscriberId
- subscriberIdpublic io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.notification.NotificationProtos.Notification,java.lang.String>> getNotifications(@Nullable java.lang.String offset, int limit)
offset
- offset to startlimit
- how many notifications to getpublic io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.Notification> getNotification(java.lang.String notificationId)
notificationId
- Id of the notificationpublic io.reactivex.Observable<java.util.List<Account>> initiateAccountLinking(java.lang.String bankId) throws BankAuthorizationRequiredException
bankId
- the bank idBankAuthorizationRequiredException
- if bank authorization payload
is required to link accountspublic io.reactivex.Observable<java.util.List<AccountAsync>> linkAccounts(io.token.proto.banklink.Banklink.BankAuthorization authorization)
authorization
- an authorization to accounts, from the bankpublic io.reactivex.Observable<java.util.List<AccountAsync>> linkAccounts(java.lang.String bankId, java.lang.String accessToken) throws BankAuthorizationRequiredException
bankId
- bank idaccessToken
- OAuth access tokenBankAuthorizationRequiredException
- if bank authorization payload
is required to link accountspublic io.reactivex.Completable unlinkAccounts(java.util.List<java.lang.String> accountIds)
accountIds
- account ids to unlinkpublic io.reactivex.Observable<java.util.List<AccountAsync>> getAccounts()
getAccounts
in interface RepresentableAsync
public io.reactivex.Observable<AccountAsync> getAccount(java.lang.String accountId)
getAccount
in interface RepresentableAsync
accountId
- account idpublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> getTransfer(java.lang.String transferId)
transferId
- ID of the transfer recordpublic io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transfer.TransferProtos.Transfer,java.lang.String>> getTransfers(@Nullable java.lang.String offset, int limit, @Nullable java.lang.String tokenId)
offset
- optional offset to start atlimit
- max number of records to returntokenId
- optional token id to restrict the searchpublic io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Attachment> createBlob(java.lang.String ownerId, java.lang.String type, java.lang.String name, byte[] data)
ownerId
- id of the owner of the blobtype
- MIME type of the filename
- namedata
- file datapublic io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Attachment> createBlob(java.lang.String ownerId, java.lang.String type, java.lang.String name, byte[] data, io.token.proto.common.blob.BlobProtos.Blob.AccessMode accessMode)
ownerId
- id of the owner of the blobtype
- MIME type of the filename
- namedata
- file dataaccessMode
- Normal access or publicpublic io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> getBlob(java.lang.String blobId)
blobId
- id of the blobpublic io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> getTokenBlob(java.lang.String tokenId, java.lang.String blobId)
tokenId
- id of the tokenblobId
- id of the blobpublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.AddressRecord> addAddress(java.lang.String name, io.token.proto.common.address.AddressProtos.Address address)
name
- the name of the addressaddress
- the addresspublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.AddressRecord> getAddress(java.lang.String addressId)
getAddress
in interface RepresentableAsync
addressId
- the address idpublic io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.AddressRecord>> getAddresses()
getAddresses
in interface RepresentableAsync
public io.reactivex.Completable deleteAddress(java.lang.String addressId)
addressId
- the id of the addresspublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> setProfile(io.token.proto.common.member.MemberProtos.Profile profile)
profile
- profile to setpublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.Profile> getProfile(java.lang.String memberId)
memberId
- member ID of member whose profile we wantpublic io.reactivex.Completable setProfilePicture(java.lang.String type, byte[] data)
type
- MIME type of picturedata
- image datapublic io.reactivex.Observable<io.token.proto.common.blob.BlobProtos.Blob> getProfilePicture(java.lang.String memberId, io.token.proto.common.member.MemberProtos.ProfilePictureSize size)
memberId
- member ID of member whose profile we wantsize
- desired size category (small, medium, large, original)public io.reactivex.Completable setReceiptContact(io.token.proto.common.member.MemberProtos.ReceiptContact contact)
contact
- receipt contact to setpublic io.reactivex.Observable<io.token.proto.common.member.MemberProtos.ReceiptContact> getReceiptContact()
public io.reactivex.Observable<java.lang.String> storeTokenRequest(TokenRequest tokenRequest)
tokenRequest
- token requestpublic TransferTokenBuilder createTransferToken(double amount, java.lang.String currency)
amount
- transfer amountcurrency
- currency code, e.g. "USD"public io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> createTransferToken(io.token.proto.common.token.TokenProtos.TokenPayload payload)
payload
- transfer token payloadpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> createTransferToken(io.token.proto.common.token.TokenProtos.TokenPayload payload, java.lang.String tokenRequestId)
payload
- transfer token payloadtokenRequestId
- token request idpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> createAccessToken(AccessTokenBuilder accessTokenBuilder)
AccessTokenBuilder
.accessTokenBuilder
- an AccessTokenBuilder
to create access token frompublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> createAccessToken(AccessTokenBuilder accessTokenBuilder, java.lang.String tokenRequestId)
AccessTokenBuilder
.accessTokenBuilder
- an AccessTokenBuilder
to create access token fromtokenRequestId
- token request idpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getToken(java.lang.String tokenId)
tokenId
- token idpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.Token> getActiveAccessToken(java.lang.String toMemberId)
toMemberId
- beneficiary of the active access tokenpublic io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,java.lang.String>> getTransferTokens(@Nullable java.lang.String offset, int limit)
offset
- optional offset to start atlimit
- max number of records to returnpublic io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.token.TokenProtos.Token,java.lang.String>> getAccessTokens(@Nullable java.lang.String offset, int limit)
offset
- optional offset to start atlimit
- max number of records to returnpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> endorseToken(io.token.proto.common.token.TokenProtos.Token token, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
If the key's level is too low, the result's status is MORE_SIGNATURES_NEEDED and the system pushes a notification to the member prompting them to use a higher-privilege key.
token
- token to endorsekeyLevel
- key level to be used to endorse the tokenpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> cancelToken(io.token.proto.common.token.TokenProtos.Token token)
token
- token to cancelpublic io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> replaceAccessToken(io.token.proto.common.token.TokenProtos.Token tokenToCancel, AccessTokenBuilder tokenToCreate)
tokenToCancel
- old token to canceltokenToCreate
- an AccessTokenBuilder
to create new token from@Deprecated public io.reactivex.Observable<io.token.proto.common.token.TokenProtos.TokenOperationResult> replaceAndEndorseAccessToken(io.token.proto.common.token.TokenProtos.Token tokenToCancel, AccessTokenBuilder tokenToCreate)
replaceAccessToken(io.token.proto.common.token.TokenProtos.Token, io.token.AccessTokenBuilder)
and endorseToken(io.token.proto.common.token.TokenProtos.Token, io.token.proto.common.security.SecurityProtos.Key.Level)
insteadtokenToCancel
- old token to canceltokenToCreate
- an AccessTokenBuilder
to create new token frompublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> redeemToken(io.token.proto.common.token.TokenProtos.Token token)
token
- transfer token to redeempublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> redeemToken(io.token.proto.common.token.TokenProtos.Token token, java.lang.String refId)
token
- transfer token to redeemrefId
- transfer reference idpublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> redeemToken(io.token.proto.common.token.TokenProtos.Token token, io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination)
token
- transfer token to redeemdestination
- transfer instruction destinationpublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> redeemToken(io.token.proto.common.token.TokenProtos.Token token, io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination, java.lang.String refId)
token
- transfer token to redeemdestination
- transfer instruction destinationrefId
- transfer reference idpublic io.reactivex.Observable<io.token.proto.common.transfer.TransferProtos.Transfer> redeemToken(io.token.proto.common.token.TokenProtos.Token token, @Nullable java.lang.Double amount, @Nullable java.lang.String currency, @Nullable java.lang.String description, @Nullable io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint destination, @Nullable java.lang.String refId)
token
- transfer token to redeemamount
- transfer amountcurrency
- transfer currency code, e.g. "EUR"description
- transfer descriptiondestination
- the transfer instruction destinationrefId
- transfer reference idpublic io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Transaction> getTransaction(java.lang.String accountId, java.lang.String transactionId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
getTransaction
in interface RepresentableAsync
accountId
- the account idtransactionId
- ID of the transactionkeyLevel
- key levelpublic io.reactivex.Observable<io.token.proto.PagedList<io.token.proto.common.transaction.TransactionProtos.Transaction,java.lang.String>> getTransactions(java.lang.String accountId, @Nullable java.lang.String offset, int limit, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
getTransactions
in interface RepresentableAsync
accountId
- the account idoffset
- optional offset to start atlimit
- max number of records to returnkeyLevel
- key levelpublic io.reactivex.Observable<AccountAsync> getDefaultAccount(java.lang.String memberId)
memberId
- the member's idpublic io.reactivex.Observable<io.token.proto.common.transaction.TransactionProtos.Balance> getBalance(java.lang.String accountId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
getBalance
in interface RepresentableAsync
accountId
- the account idkeyLevel
- key levelpublic io.reactivex.Observable<io.token.proto.common.money.MoneyProtos.Money> getCurrentBalance(java.lang.String accountId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
accountId
- the account idkeyLevel
- key levelpublic io.reactivex.Observable<io.token.proto.common.money.MoneyProtos.Money> getAvailableBalance(java.lang.String accountId, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
accountId
- the account idkeyLevel
- key levelpublic io.reactivex.Observable<java.util.List<io.token.proto.common.transaction.TransactionProtos.Balance>> getBalances(java.util.List<java.lang.String> accountIds, io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
getBalances
in interface RepresentableAsync
accountIds
- list of account idskeyLevel
- key levelpublic io.reactivex.Observable<io.token.proto.common.bank.BankProtos.BankInfo> getBankInfo(java.lang.String bankId)
bankId
- the bank idpublic io.reactivex.Observable<AccountAsync> createAndLinkTestBankAccount(double balance, java.lang.String currency)
balance
- account balance to setcurrency
- currency code, e.g. "EUR"public io.reactivex.Observable<io.token.proto.banklink.Banklink.OauthBankAuthorization> createTestBankAccount(double balance, java.lang.String currency)
balance
- account balance to setcurrency
- currency code, e.g. "EUR"public io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerTokenStepUpNotification(java.lang.String tokenId)
tokenId
- token idpublic io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerBalanceStepUpNotification(java.util.List<java.lang.String> accountIds)
accountIds
- list of account idspublic io.reactivex.Observable<io.token.proto.common.notification.NotificationProtos.NotifyStatus> triggerTransactionStepUpNotification(java.lang.String accountId)
accountId
- account idpublic io.reactivex.Completable applySca(java.util.List<java.lang.String> accountIds)
accountIds
- list of account idspublic io.reactivex.Observable<io.token.proto.common.security.SecurityProtos.Signature> signTokenRequestState(java.lang.String tokenRequestId, java.lang.String tokenId, java.lang.String state)
tokenRequestId
- token request idtokenId
- token idstate
- statepublic io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.Device>> getPairedDevices()
public io.reactivex.Completable deleteMember()
public io.reactivex.Completable verifyAffiliate(java.lang.String memberId)
memberId
- member ID of the TPP to verifypublic io.reactivex.Observable<java.util.List<io.token.proto.common.transferinstructions.TransferInstructionsProtos.TransferEndpoint>> resolveTransferDestinations(java.lang.String accountId)
resolveTransferDestinations
in interface RepresentableAsync
accountId
- account IDpublic io.reactivex.Completable addTrustedBeneficiary(java.lang.String memberId)
memberId
- the member id of the beneficiarypublic io.reactivex.Completable removeTrustedBeneficiary(java.lang.String memberId)
memberId
- the member id of the beneficiarypublic io.reactivex.Observable<java.util.List<io.token.proto.common.member.MemberProtos.TrustedBeneficiary>> getTrustedBeneficiaries()
public io.reactivex.Observable<java.lang.String> createCustomization(io.token.proto.common.blob.BlobProtos.Blob.Payload logo, java.util.Map<java.lang.String,java.lang.String> colors, java.lang.String consentText, java.lang.String name, java.lang.String appName)
logo
- logocolors
- map of ARGB colors #AARRGGBBconsentText
- consent textname
- display nameappName
- corresponding app namepublic TokenIO.TokenCluster getTokenCluster()
public void setSecurityMetadata(io.token.proto.common.security.SecurityProtos.SecurityMetadata securityMetadata)
securityMetadata
- security metadatapublic void clearSecurityMetadata()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object