public static AbortRequest CreateAbortRequest(TaxAbortRequest abortRequest, SovosTaxClientOptions userInfo) { return(new AbortRequest() { UserName = userInfo.User, Password = userInfo.Password, TransactionId = abortRequest.OrderId, TransactionSource = abortRequest.TransactionSource, }); }
/// <summary> /// Aborts a pending tax request, purging it. /// </summary> public async Task <TaxAbortResponse> AbortPendingTaxCalculation(TaxAbortRequest abortRequest) { var sovosAbortRequest = PendingTaxRelayMapper.CreateAbortRequest(abortRequest, _sovosSettings); try { var sovosAbortResponse = await _client.AbortWithResponsePendingGTDAuditTransactionAsync(sovosAbortRequest); var abortResponse = PendingTaxRelayMapper.CreateAbortResponse(sovosAbortResponse); return(abortResponse); } catch (Refit.ApiException ex) { var abortResponse = new TaxAbortResponse(); return((TaxAbortResponse)abortResponse.CreateErrorResponse(ex.Content)); } }