Simulation Paths

During development and testing phase, it is possible to use the simulation keywords to evaluate how your software responds to all possible order submission schenarios.
Below you can find all simulation keywords that can be set using the Note json property present for all order submission.

Order Submission Failed

The "!#PORTFOLIO-SUBMISSION-FAIL#!" keyword is used to simulate an order submission failment, due to network problem.

								
  var orderPortfolioCreationInputModel = new
  {
	AccountHoldingInstitutionCode = accountHoldingInstitution.Code,
	UserId = thirdFactorRegistrationResult.UserId,
	InvestmentCategoryId = investmentCategory3A.Id,
	ProposalId = proposalSelectedByUser.Id,
	ReasonToChangeProposalResponsesIds = default(List<long>),
	Note = "!#PORTFOLIO-SUBMISSION-FAIL#!"
  };

  var httpContent = HttpHelper.CreateMultipartFormDataHttpContent(orderPortfolioCreationInputModel, pdfContractAsByteArray);
  _ = await httpClient.PostAsync("api/v1/user-portfolio-orders/creation", httpContent);
										

Order Submitted

The "!#PORTFOLIO-SUBMITTED#!" keyword is used to simulate an order submission done, generating a fake order ID.

								
  var orderPortfolioCreationInputModel = new
  {
	AccountHoldingInstitutionCode = accountHoldingInstitution.Code,
	UserId = thirdFactorRegistrationResult.UserId,
	InvestmentCategoryId = investmentCategory3A.Id,
	ProposalId = proposalSelectedByUser.Id,
	ReasonToChangeProposalResponsesIds = default(List<long>),
	Note = "!#PORTFOLIO-SUBMITTED#!"
  };

  var httpContent = HttpHelper.CreateMultipartFormDataHttpContent(orderPortfolioCreationInputModel, pdfContractAsByteArray);
  _ = await httpClient.PostAsync("api/v1/user-portfolio-orders/creation", httpContent);
										

Order Accepted

The "!#PORTFOLIO-ACCEPTED#!" keyword is used to simulate an order submission accepted, generating a fake order ID.

								
  var orderPortfolioCreationInputModel = new
  {
	AccountHoldingInstitutionCode = accountHoldingInstitution.Code,
	UserId = thirdFactorRegistrationResult.UserId,
	InvestmentCategoryId = investmentCategory3A.Id,
	ProposalId = proposalSelectedByUser.Id,
	ReasonToChangeProposalResponsesIds = default(List<long>),
	Note = "!#PORTFOLIO-ACCEPTED#!"
  };

  var httpContent = HttpHelper.CreateMultipartFormDataHttpContent(orderPortfolioCreationInputModel, pdfContractAsByteArray);
  _ = await httpClient.PostAsync("api/v1/user-portfolio-orders/creation", httpContent);
										

Order Accepted and Portfolio Invested

The "!#PORTFOLIO-TRADED#!" keyword is used to simulate an order submission accepted and a complete investment.

								
  var orderPortfolioCreationInputModel = new
  {
	AccountHoldingInstitutionCode = accountHoldingInstitution.Code,
	UserId = thirdFactorRegistrationResult.UserId,
	InvestmentCategoryId = investmentCategory3A.Id,
	ProposalId = proposalSelectedByUser.Id,
	ReasonToChangeProposalResponsesIds = default(List<long>),
	Note = "!#PORTFOLIO-TRADED#!"
  };

  var httpContent = HttpHelper.CreateMultipartFormDataHttpContent(orderPortfolioCreationInputModel, pdfContractAsByteArray);
  _ = await httpClient.PostAsync("api/v1/user-portfolio-orders/creation", httpContent);
										

Order Rejected

The "!#PORTFOLIO-REJECTED#!" keyword is used to simulate an order submission reject.

								
  var orderPortfolioCreationInputModel = new
  {
	AccountHoldingInstitutionCode = accountHoldingInstitution.Code,
	UserId = thirdFactorRegistrationResult.UserId,
	InvestmentCategoryId = investmentCategory3A.Id,
	ProposalId = proposalSelectedByUser.Id,
	ReasonToChangeProposalResponsesIds = default(List<long>),
	Note = "!#PORTFOLIO-REJECTED#!"
  };

  var httpContent = HttpHelper.CreateMultipartFormDataHttpContent(orderPortfolioCreationInputModel, pdfContractAsByteArray);
  _ = await httpClient.PostAsync("api/v1/user-portfolio-orders/creation", httpContent);