public static async Task CanCreateAndReadDisbursement(this IActionstepService actionstepService, int actionId, TokenSetQuery tokenSetQuery)
        {
            if (actionstepService is null)
            {
                throw new ArgumentNullException(nameof(actionstepService));
            }
            if (tokenSetQuery is null)
            {
                throw new ArgumentNullException(nameof(tokenSetQuery));
            }

            var newDisbursement = new Disbursement()
            {
                Description = "Test from API",
                Links       =
                {
                    Action = actionId
                }
            };

            var newDisbursementRequest = new CreateDisbursementsRequest()
            {
                Disbursements = { newDisbursement },
                TokenSetQuery = tokenSetQuery
            };

            var result = await actionstepService.Handle <ListDisbursementsResponse>(newDisbursementRequest);
        }
Пример #2
0
 public GetMatterInfoHandler(
     ActionstepMatterInfoQuery.Validator validator,
     IActionstepService actionstepService)
 {
     _validator         = validator;
     _actionstepService = actionstepService;
 }
Пример #3
0
 public Handler(
     ValidatorCollection validator,
     IActionstepService actionstepService)
 {
     _validator         = validator;
     _actionstepService = actionstepService;
 }
 public StorePexaWorkspaceIdInActionstepMatterCommandHandler(
     WCADbContext wCADbContext,
     IActionstepService actionstepService)
 {
     _actionstepService = actionstepService;
     _wCADbContext      = wCADbContext;
 }
Пример #5
0
#pragma warning disable CA1054 // Uri parameters should not be strings: We don't want Uri throwing exceptions here, we'd rather have invalid returnURls thrown around.
        public IntegrationsController(
            UserManager <WCAUser> userManager,
            IMediator mediator,
            IOptions <WCACoreSettings> settingsAccessor,
            IHttpClientFactory httpClientFactory,
            WCASignInManager signInManager,
            IClock clock,
            IExtendedPexaService pEXAService,
            IActionstepService actionstepService,
            IGlobalXService globalXService)
        {
            if (settingsAccessor is null)
            {
                throw new ArgumentNullException(nameof(settingsAccessor));
            }

            _userManager        = userManager;
            _mediator           = mediator;
            _httpClientFactory  = httpClientFactory;
            _actionstepSettings = settingsAccessor.Value.ActionstepSettings;
            _pexaSettings       = settingsAccessor.Value.PEXASettings;
            _globalXOptions     = settingsAccessor.Value.GlobalXOptions;
            _signInManager      = signInManager;
            _clock             = clock;
            _pEXAService       = pEXAService;
            _actionstepService = actionstepService;
            _globalXService    = globalXService;
        }
 public CreateDisbursementsCommandHandler(
     IActionstepService actionstepService,
     Validator validator)
 {
     _actionstepService = actionstepService;
     _validator         = validator;
 }
 public StampDutyCalculatorInfoQueryHandler(
     StampDutyCalculatorInfoQuery.Validator validator,
     IActionstepService actionstepService)
 {
     _validator         = validator;
     _actionstepService = actionstepService;
 }
Пример #8
0
 public RunIntegrationTestsHandler(
     RunIntegrationTestsCommand.Validator validator,
     IActionstepService actionstepService)
 {
     _validator         = validator;
     _actionstepService = actionstepService;
 }
 public FirstTitlePolicyRequestFromActionstepQueryHandler(
     IActionstepService actionstepService,
     IActionstepToWCAMapper actionstepToWCAMapper
     )
 {
     _actionstepService     = actionstepService;
     _actionstepToWCAMapper = actionstepToWCAMapper;
 }
 public RefreshTokensByRefreshExpiry(
     ITokenSetRepository tokenSetRepository,
     IActionstepService actionstepService,
     IClock clock)
 {
     _tokenSetRepository = tokenSetRepository;
     _actionstepService  = actionstepService;
     _clock = clock;
 }
Пример #11
0
 public Handler(
     ValidatorCollection validator,
     IActionstepService actionstepService,
     ITokenSetRepository tokenSetRepository)
 {
     _validator          = validator;
     _actionstepService  = actionstepService;
     _tokenSetRepository = tokenSetRepository;
 }
 public CopyDocumentVersionToActionstepCommandHandler(
     IGlobalXService globalXService,
     IActionstepService actionstepService,
     Validator validator)
 {
     _globalXService    = globalXService;
     _actionstepService = actionstepService;
     _validator         = validator;
 }
Пример #13
0
 public Handler(
     ValidatorCollection validator,
     IActionstepService actionstepService,
     InfoTrackService infoTrackService)
 {
     _validator         = validator;
     _actionstepService = actionstepService;
     _infoTrackService  = infoTrackService;
 }
Пример #14
0
 public PEXAWorkspaceCreationRequestFromActionstepQueryHandler(
     IActionstepService actionstepService,
     IMapper mapper,
     IActionstepToWCAMapper actionstepToWCAMapper)
 {
     _actionstepService     = actionstepService;
     _mapper                = mapper;
     _actionstepToWCAMapper = actionstepToWCAMapper;
 }
Пример #15
0
 public ValidateActionstepMatterCommandHandler(
     IActionstepService actionstepService,
     WCADbContext wCADbContext,
     Validator validator)
 {
     _actionstepService = actionstepService;
     _wCADbContext      = wCADbContext;
     _validator         = validator;
 }
Пример #16
0
 public ConveyancingDataFromActionstepQueryHandler(
     IActionstepService actionstepService,
     IGlobalXService globalXService,
     IMapper mapper,
     IActionstepToWCAMapper actionstepToWCAMapper)
 {
     _actionstepService     = actionstepService;
     _globalXService        = globalXService;
     _mapper                = mapper;
     _actionstepToWCAMapper = actionstepToWCAMapper;
 }
Пример #17
0
 public Handler(
     IConverter converter,
     Validator validator,
     IMediator mediator,
     IActionstepService actionstepService)
 {
     _converter         = converter;
     _validator         = validator;
     _mediator          = mediator;
     _actionstepService = actionstepService;
 }
Пример #18
0
        public SettlementCalculatorUrlQueryHandler(
            IActionstepService actionstepService,
            IOptions <WCACoreSettings> appSettings)
        {
            if (appSettings is null)
            {
                throw new ArgumentNullException(nameof(appSettings));
            }

            _actionstepService = actionstepService;
            _settings          = appSettings.Value.ConveyancingSettings;
        }
 public NewCustomerCommandHandler(
     IOptions <WCACoreSettings> appSettings,
     IMediator mediator,
     IHttpClientFactory httpClientFactory,
     WCADbContext wCADbContext,
     ITelemetryLogger telemetryLogger,
     IActionstepService actionstepService)
 {
     this.appSettings       = appSettings;
     this.mediator          = mediator;
     this.httpClientFactory = httpClientFactory;
     this.wCADbContext      = wCADbContext;
     this.telemetryLogger   = telemetryLogger;
     this.actionstepService = actionstepService;
 }
            public Handler(
                Validator validator,
                IActionstepService actionstepService,
                IOptions <WCACoreSettings> settingsAccessor,
                IMediator mediator,
                IInfoTrackCredentialRepository infoTrackCredentialRepository,
                ITelemetryLogger telemetryLogger)
            {
                if (settingsAccessor is null)
                {
                    throw new ArgumentNullException(nameof(settingsAccessor));
                }

                this.validator                     = validator ?? throw new ArgumentNullException(nameof(validator));
                this.actionstepService             = actionstepService ?? throw new ArgumentNullException(nameof(actionstepService));
                this.mediator                      = mediator ?? throw new ArgumentNullException(nameof(mediator));
                this.infoTrackCredentialRepository = infoTrackCredentialRepository ?? throw new ArgumentNullException(nameof(infoTrackCredentialRepository));
                this.telemetryLogger               = telemetryLogger ?? throw new ArgumentNullException(nameof(telemetryLogger));
                actionstepSettings                 = settingsAccessor.Value?.ActionstepSettings;
            }
Пример #21
0
 public Handler(
     IActionstepService actionstepService,
     IMediator mediator,
     WCADbContext wCADbContext,
     IMapper mapper,
     ITelemetryLogger telemetryLogger,
     IInfoTrackCredentialRepository infoTrackCredentialRepository,
     ILoggerFactory loggerFactory,
     IOptions <WCACoreSettings> appSettings,
     ITokenSetRepository tokenSetRepository)
 {
     _actionstepService             = actionstepService;
     _mediator                      = mediator;
     _wCADbContext                  = wCADbContext;
     _mapper                        = mapper;
     _telemetryLogger               = telemetryLogger;
     _infoTrackCredentialRepository = infoTrackCredentialRepository;
     _appSettings                   = appSettings;
     _tokenSetRepository            = tokenSetRepository;
     _logger                        = loggerFactory.CreateLogger <Handler>();
 }
Пример #22
0
            private async Task <(int?gstTaxCodeId, int?nonGstTaxCodeId)> GetTaxCodeIds(
                IActionstepService actionstepService,
                TokenSetQuery tokenSetQuery,
                ITelemetryLogger telemetryLogger,
                int infoTrackOrderId,
                string orgKey,
                int matterId,
                Guid executionId)
            {
                // Get GST and Non GST tax codes for disbursement creation

                var taxCodeInfo = await actionstepService.Handle <dynamic>(new GenericActionstepRequest(tokenSetQuery, $"/rest/taxcodes?fields=code", HttpMethod.Get));

                var gstTaxCodeNames = new[] { "S 10.0", "GST" };
                int?gstTaxCodeId    = LookupTaxCodeId(taxCodeInfo?.taxcodes, gstTaxCodeNames);

                if (gstTaxCodeId == null)
                {
                    telemetryLogger.TrackTrace(
                        "Couldn't determine GST Tax Code when creating InfoTrack disbursement. " +
                        "Actionstep default will be used instead.",
                        WCASeverityLevel.Warning,
                        new Dictionary <string, string>()
                    {
                        { "GST Tax Code names attempted", string.Join(", ", gstTaxCodeNames) },
                        { "InfoTrack Order ID", infoTrackOrderId.ToString(CultureInfo.InvariantCulture) },
                        { "Actionstep org key", orgKey },
                        { "Actionstep matter", matterId.ToString(CultureInfo.InvariantCulture) },
                        { "ExecutionId", executionId.ToString() }
                    });
                }

                var nonGstTaxCodeNames = new[] { "N-T", "GST Free", "Other GST Free", "No Tax" };

                // TODO: Make this properly configurable! This is just a quick hack :(
                // See:
                //  - PBI:    https://dev.azure.com/workcloudapps/WorkCloudApps/_backlogs/backlog/WorkCloudApps%20Team/Backlog%20items/?workitem=700
                //  - Ticket: https://workcloud.freshdesk.com/a/tickets/10010?note=6238878382
                if (!string.IsNullOrEmpty(orgKey) && orgKey.Equals("swslawyers", StringComparison.InvariantCulture))
                {
                    nonGstTaxCodeNames = new[] { "BAS Excluded", "N-T", "GST Free", "Other GST Free", "No Tax" };
                }

                int?nonGstTaxCodeId = LookupTaxCodeId(taxCodeInfo.taxcodes, nonGstTaxCodeNames);

                if (nonGstTaxCodeId == null)
                {
                    telemetryLogger.TrackTrace(
                        "Couldn't determine Non-GST Tax Code when creating InfoTrack disbursement. " +
                        "Actionstep default will be used instead.",
                        WCASeverityLevel.Warning,
                        new Dictionary <string, string>()
                    {
                        { "Non-GST Tax Code names attempted", string.Join(", ", nonGstTaxCodeNames) },
                        { "InfoTrack Order ID", infoTrackOrderId.ToString(CultureInfo.InvariantCulture) },
                        { "Actionstep org key", orgKey },
                        { "Actionstep matter", matterId.ToString(CultureInfo.InvariantCulture) },
                        { "ExecutionId", executionId.ToString() }
                    });
                }

                return(gstTaxCodeId, nonGstTaxCodeId);
            }
Пример #23
0
 public UIDefinitionsController(IActionstepService actionstepService, IFeatureManager featureManager)
 {
     _actionstepService = actionstepService;
     _featureManager    = featureManager;
 }
 public CreateDisbursementsCommandHandler(IActionstepService actionstepService)
 {
     _actionstepService = actionstepService;
 }
Пример #25
0
 public Handler(IActionstepService actionstepService)
 {
     _actionstepService = actionstepService;
 }
Пример #26
0
 public SavePolicyPDFToActionstepCommandHandler(IActionstepService actionstepService)
 {
     _actionstepService = actionstepService;
 }