POST | /members/{EmployeeGuid}/investmentprofile |
---|
import Foundation
import ServiceStack
public class InvestmentRiskProfileSaveRequest : Codable
{
public var employeeGuid:String?
public var answers:[QuestionnaireAnswers] = []
required public init(){}
}
public class QuestionnaireAnswers : Codable
{
public var questionNumber:Int?
public var optionNumber:Int?
required public init(){}
}
public class InvestmentRiskProfileSaveResponse : Codable
{
public var risk:RiskModel?
public var product:RecommendedProducts?
public var recommendedProductGraph:RecommendedProductGraph?
required public init(){}
}
public class RiskModel : Codable
{
public var recommendedRisk:RecommendedRisk?
public var chosenRisk:RecommendedRisk?
required public init(){}
}
public class RecommendedRisk : Codable
{
public var riskName:String?
public var riskValue:Int?
public var riskId:String?
required public init(){}
}
public class RecommendedProducts : Codable
{
public var recommendedProduct:RecommendedProductType?
public var chosenProduct:RecommendedProductType?
required public init(){}
}
public class RecommendedProductType : Codable
{
public var product:String?
public var investmentProduct:String?
public var score:Double?
public var productType:Int?
public var investmentProducts:[InvestmentProduct] = []
required public init(){}
}
public class InvestmentProduct : Codable
{
public var code:String?
public var name:String?
public var group:String?
public var isAssetClassFund:Bool?
public var allocs:[InvestmentProductAllocationsSpec] = []
public var order:Int?
public var allocationsDictionary:[Int:[String:Double]] = [:]
required public init(){}
}
public class InvestmentProductAllocationsSpec : Codable
{
public var fromAge:Int?
public var term:Int?
public var allocs:[String:Double] = [:]
public var totalAlloc:Double?
required public init(){}
}
public class RecommendedProductGraph : Codable
{
public var barGraphData:[[String:String]] = []
public var pieGraphInfo:MatrixNoRisk?
required public init(){}
}
public class MatrixNoRisk : Codable
{
public var minimumAllocationInStocks:String?
public var maximumAllocationinStocks:String?
required public init(){}
}
Swift InvestmentRiskProfileSaveRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
employeeGuid: 00000000000000000000000000000000,
answers:
[
{
questionNumber: 0,
optionNumber: 0
}
]
}
HTTP/1.1 200 OK Content-Type: text/jsv 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 } } }