POST | /members/{EmployeeGuid}/investmentprofile |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AlbaApi.ServiceModel;
using AlbaApi.Model;
using TasSyd.Model.Core;
namespace AlbaApi.Model
{
public partial class InvestmentRiskProfileSaveResponse
{
public virtual RiskModel Risk { get; set; }
public virtual RecommendedProducts Product { get; set; }
public virtual RecommendedProductGraph RecommendedProductGraph { get; set; }
}
public partial class MatrixNoRisk
{
public virtual string MinimumAllocationInStocks { get; set; }
public virtual string MaximumAllocationinStocks { get; set; }
}
public partial class QuestionnaireAnswers
{
public virtual int QuestionNumber { get; set; }
public virtual int OptionNumber { get; set; }
}
public partial class RecommendedProductGraph
{
public RecommendedProductGraph()
{
BarGraphData = new List<Dictionary<String,String>>{};
}
public virtual List<Dictionary<String,String>> BarGraphData { get; set; }
public virtual MatrixNoRisk PieGraphInfo { get; set; }
}
public partial class RecommendedProducts
{
public virtual RecommendedProductType RecommendedProduct { get; set; }
public virtual RecommendedProductType ChosenProduct { get; set; }
}
public partial class RecommendedProductType
{
public RecommendedProductType()
{
InvestmentProducts = new List<InvestmentProduct>{};
}
public virtual string Product { get; set; }
public virtual string InvestmentProduct { get; set; }
public virtual double? Score { get; set; }
public virtual int ProductType { get; set; }
public virtual List<InvestmentProduct> InvestmentProducts { get; set; }
}
public partial class RecommendedRisk
{
public virtual string RiskName { get; set; }
public virtual int? RiskValue { get; set; }
public virtual string RiskId { get; set; }
}
public partial class RiskModel
{
public virtual RecommendedRisk RecommendedRisk { get; set; }
public virtual RecommendedRisk ChosenRisk { get; set; }
}
}
namespace AlbaApi.ServiceModel
{
public partial class InvestmentRiskProfileSaveRequest
{
public InvestmentRiskProfileSaveRequest()
{
Answers = new QuestionnaireAnswers[]{};
}
public virtual Guid EmployeeGuid { get; set; }
public virtual QuestionnaireAnswers[] Answers { get; set; }
}
}
namespace TasSyd.Model.Core
{
public partial class InvestmentProduct
{
public InvestmentProduct()
{
Allocs = new List<InvestmentProductAllocationsSpec>{};
AllocationsDictionary = new Dictionary<int, Dictionary<String,Double>>{};
}
public virtual string Code { get; set; }
public virtual string Name { get; set; }
public virtual string Group { get; set; }
public virtual bool IsAssetClassFund { get; set; }
public virtual List<InvestmentProductAllocationsSpec> Allocs { get; set; }
public virtual int Order { get; set; }
public virtual Dictionary<int, Dictionary<String,Double>> AllocationsDictionary { get; set; }
}
public partial class InvestmentProductAllocationsSpec
{
public InvestmentProductAllocationsSpec()
{
Allocs = new Dictionary<string, double>{};
}
public virtual int FromAge { get; set; }
public virtual int? Term { get; set; }
public virtual Dictionary<string, double> Allocs { get; set; }
public virtual double TotalAlloc { get; set; }
}
}
C# InvestmentRiskProfileSaveRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /members/{EmployeeGuid}/investmentprofile HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: application/json
Content-Type: application/json
Content-Length: length
{"employeeGuid":"00000000000000000000000000000000","answers":[{"questionNumber":0,"optionNumber":0}]}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"risk":{"recommendedRisk":{"riskName":"String","riskValue":0,"riskId":"String"},"chosenRisk":{"riskName":"String","riskValue":0,"riskId":"String"}},"product":{"recommendedProduct":{"product":"String","investmentProduct":"String","score":0,"productType":0,"investmentProducts":[{"riskId":"String","riskName":"String"}]},"chosenProduct":{"product":"String","investmentProduct":"String","score":0,"productType":0,"investmentProducts":[{"riskId":"String","riskName":"String"}]}},"recommendedProductGraph":{"barGraphData":[{"String":"String"}],"pieGraphInfo":{"minimumAllocationInStocks":"String","maximumAllocationinStocks":"String"}}}