public void Then_The_PostUrl_Is_Correctly_Built( int applicationId, long accountId, AcceptFundingRequestData data) { var actual = new AcceptFundingRequest(applicationId, accountId, data); Assert.AreEqual( $"/accounts/{accountId}/applications/{applicationId}/accept-funding", actual.PostUrl); }
private async Task <HttpStatusCode> AcceptFunding(SetApplicationAcceptanceCommand request, CancellationToken cancellationToken) { _logger.LogInformation($"Accepting funding for Application {request.ApplicationId}. {request}"); var apiRequestData = new AcceptFundingRequestData { UserId = request.UserId, UserDisplayName = request.UserDisplayName, AccountId = request.AccountId, ApplicationId = request.ApplicationId }; var apiRequest = new AcceptFundingRequest(request.ApplicationId, request.AccountId, apiRequestData); var result = await _levyTransferMatchingService.AcceptFunding(apiRequest, cancellationToken); return(result.StatusCode); }
public async Task <ApiResponse <AcceptFundingRequest> > AcceptFunding(AcceptFundingRequest request, CancellationToken cancellationToken = default) { return(await _levyTransferMatchingApiClient.PostWithResponseCode <AcceptFundingRequest>(request)); }