/// <summary> /// Update an existing token request. /// </summary> /// <param name="requestId">token request ID</param> /// <param name="options">new token request options</param> /// <returns>a task</returns> public Task UpdateTokenRequest( string requestId, Proto.Common.TokenProtos.TokenRequestOptions options) { var request = new UpdateTokenRequestRequest { RequestId = requestId, RequestOptions = options }; return(gateway(authenticationContext()).UpdateTokenRequestAsync(request).ToTask()); }
/// <summary> /// Stores a transfer token request. /// </summary> /// <param name="payload">the token request payload (immutable fields)</param> /// <param name="options">the token request options (mutable fields)</param> /// <returns>an id to reference the token request</returns> public Task <string> StoreTokenRequest( TokenRequestPayload payload, Proto.Common.TokenProtos.TokenRequestOptions options) { var request = new StoreTokenRequestRequest { RequestPayload = payload, RequestOptions = options }; return(gateway(authenticationContext()).StoreTokenRequestAsync(request) .ToTask(response => response.TokenRequest.Id)); }