Package io.token.bank.model
Class TransferConsentBuilder
- java.lang.Object
-
- io.token.bank.model.TransferConsentBuilder
-
public class TransferConsentBuilder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description TransferConsentBuilder(GatewayClient gatewayClient, java.lang.String userMemberId)
Deprecated.TransferConsentBuilder(GatewayClient gatewayClient, java.lang.String userMemberId, java.lang.String consentRequestId)
Creates an instance ofTransferConsentBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.Observable<io.token.proto.common.consent.ConsentProtos.Consent>
build()
Builds theConsentProtos.Consent
with all specified settings.TransferConsentBuilder
forAccountIdentifier(java.lang.String accountIdentifier)
Adds a bank's source account identifier.TransferConsentBuilder
setEffectiveAtMs(long effectiveAtMs)
Sets the effective date.TransferConsentBuilder
setEndorseUntilMs(long endorseUntilMs)
Sets the time after which endorse is no longer possible.TransferConsentBuilder
setExpiresAtMs(long expiresAtMs)
Sets the expiration date.TransferConsentBuilder
withConsentRequestId(java.lang.String consentRequestId)
Adds a consent request id.
-
-
-
Constructor Detail
-
TransferConsentBuilder
@Deprecated public TransferConsentBuilder(GatewayClient gatewayClient, java.lang.String userMemberId)
Deprecated.Creates an instance ofTransferConsentBuilder
.- Parameters:
gatewayClient
- the bank clientuserMemberId
- the user member id
-
TransferConsentBuilder
public TransferConsentBuilder(GatewayClient gatewayClient, java.lang.String userMemberId, java.lang.String consentRequestId)
Creates an instance ofTransferConsentBuilder
.- Parameters:
gatewayClient
- the bank clientuserMemberId
- the user member idconsentRequestId
- the consent request id
-
-
Method Detail
-
withConsentRequestId
public TransferConsentBuilder withConsentRequestId(java.lang.String consentRequestId)
Adds a consent request id.- Parameters:
consentRequestId
- the consent request id- Returns:
- builder
-
forAccountIdentifier
public TransferConsentBuilder forAccountIdentifier(java.lang.String accountIdentifier)
Adds a bank's source account identifier. The account Identifier is opaque to Token. In Token's Bank Integration SDK, the account identifier can be found in theAccountProtos.BankAccount
'sAccountProtos.BankAccount.Custom
payload. For example: String accountIdentifier = bankAccount.getCustom().getPayload();- Parameters:
accountIdentifier
- a bank's account Identifier- Returns:
- builder
-
setExpiresAtMs
public TransferConsentBuilder setExpiresAtMs(long expiresAtMs)
Sets the expiration date.- Parameters:
expiresAtMs
- expiration date in ms.- Returns:
- builder
-
setEffectiveAtMs
public TransferConsentBuilder setEffectiveAtMs(long effectiveAtMs)
Sets the effective date.- Parameters:
effectiveAtMs
- effective date in ms.- Returns:
- builder
-
setEndorseUntilMs
public TransferConsentBuilder setEndorseUntilMs(long endorseUntilMs)
Sets the time after which endorse is no longer possible.- Parameters:
endorseUntilMs
- endorse until, in milliseconds.- Returns:
- builder
-
build
public io.reactivex.Observable<io.token.proto.common.consent.ConsentProtos.Consent> build()
Builds theConsentProtos.Consent
with all specified settings.- Returns:
- the consent
-
-