GET | /clientcountryconfig/{Country}/{Client} | ||
---|---|---|---|
GET | /clientcountryconfig | ||
POST | /clientcountryconfig |
import java.math.*
import java.util.*
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
open class AlbaClientCountryConfigReq
{
var countryCode:String? = null
var clientCode:String? = null
}
open class ClientCountryConfig : DatedEntity()
{
var clientCode:String? = null
var clientName:String? = null
var countryCode:String? = null
var source:DataSourceResult? = null
var ageRMin:Int? = null
var ageRMax:Int? = null
var primarySalary:String? = null
var annuityConfig:AnnuityConfig? = null
var assets:ArrayList<AssetConfig> = ArrayList<AssetConfig>()
var contTables:ArrayList<ContributionTableSpec> = ArrayList<ContributionTableSpec>()
var investments:ArrayList<InvestmentProduct> = ArrayList<InvestmentProduct>()
var content:HashMap<String,ArrayList<Content>> = HashMap<String,ArrayList<Content>>()
var environments:HashMap<String,String> = HashMap<String,String>()
var customNumericConstraints:HashMap<String,Constraint<BigDecimal>> = HashMap<String,Constraint<BigDecimal>>()
var assetReturnRates:HashMap<String,ReturnRates> = HashMap<String,ReturnRates>()
var investmentPropertyRates:Double? = null
var getAssetClassFundDictionary:HashMap<String,Boolean> = HashMap<String,Boolean>()
var getTermBasedFundDictionary:HashMap<String,Boolean> = HashMap<String,Boolean>()
var getAllocationsDictionary:HashMap<String,HashMap<Int,HashMap<String,Double>>> = HashMap<String,HashMap<Int,HashMap<String,Double>>>()
var assetNameMap:HashMap<String,String> = HashMap<String,String>()
var assetContNameMap:HashMap<String,HashMap<String,String>> = HashMap<String,HashMap<String,String>>()
var cacheKey:String? = null
}
open class DatedEntity : Entity(), IDatedEntity
{
var asAt:Date? = null
}
open class Entity : IEntity
{
var id:String? = null
}
open class DataSourceResult
{
var d:DataSource? = null
var t:Long? = null
}
enum class DataSource
{
Db,
Cache,
Parameter,
Na,
}
open class AnnuityConfig
{
var tableNames:ArrayList<LifeTableName> = ArrayList<LifeTableName>()
var imprFactorTableNames:ArrayList<LifeTableName> = ArrayList<LifeTableName>()
var reversion:Double? = null
var guarantee:Double? = null
var timing:Double? = null
var allowDiscountPreRet:Boolean? = null
var scaleQx:Double? = null
var scaleImpr:Double? = null
var ageRating:Int? = null
var spouseAgeRating:Int? = null
var expense:Double? = null
var percBalanceSpent:Double? = null
var amountSpent:Double? = null
var incomePurchased:Double? = null
var deferralPeriod:Int? = null
var indexationName:String? = null
var drStochastic:String? = null
var impliedInflationStochasticSeries:String? = null
var targetTpx:Double? = null
var priceType:AnnuityPriceType? = null
var price:Double? = null
}
open class LifeTableName
{
var name:String? = null
var gender:Gender? = null
}
enum class Gender
{
Female,
Male,
Other,
}
enum class AnnuityPriceType
{
Calc,
Table,
}
open class AssetConfig
{
var code:String? = null
var name:String? = null
var rebalance:Boolean? = null
var canEditInvestmentChoice:Boolean? = null
var willSpend:Boolean? = null
var investments:ArrayList<String> = ArrayList<String>()
var contributions:ArrayList<ContributionSpec> = ArrayList<ContributionSpec>()
var isOneOff:Boolean? = null
}
open class ContributionSpec
{
var code:String? = null
var name:String? = null
@SerializedName("type") var Type:ContributionType? = null
var isEmployeeCont:Boolean? = null
var table:String? = null
var ccy:String? = null
var fromAge:Int? = null
var toAge:Int? = null
var indexationType:String? = null
var salaryType:String? = null
var isTaxable:Boolean? = null
var relatedRate:String? = null
var order:Int? = null
var editable:Boolean? = null
var constraints:ArrayList<ContributionConstraint> = ArrayList<ContributionConstraint>()
var amountType:AmountType? = null
var isOneOff:Boolean? = null
}
enum class ContributionType
{
Fixed,
Time,
Lookup,
Match,
}
open class ContributionConstraint
{
var fromAge:Int? = null
var toAge:Int? = null
var min:Double? = null
var max:Double? = null
var step:Double? = null
}
enum class AmountType
{
Any,
Amount,
Rate,
}
open class ContributionTableSpec
{
var code:String? = null
@SerializedName("type") var Type:ContributionType? = null
var rates:HashMap<String,Double> = HashMap<String,Double>()
var rateSpecs:ArrayList<ContributionRateSpec> = ArrayList<ContributionRateSpec>()
var keyTemplate:String? = null
}
open class ContributionRateSpec
{
var fromAge:Int? = null
var toAge:Int? = null
var fromService:Int? = null
var toService:Int? = null
var sourceRate:Double? = null
var dateFrom:Date? = null
var dateTo:Date? = null
var upperLimit:Double? = null
var rate:Double? = null
var coreRate:Double? = null
var lookupKey:String? = null
}
open class InvestmentProduct
{
var code:String? = null
var name:String? = null
var group:String? = null
var isAssetClassFund:Boolean? = null
var allocs:ArrayList<InvestmentProductAllocationsSpec> = ArrayList<InvestmentProductAllocationsSpec>()
var order:Int? = null
var allocationsDictionary:HashMap<Int,HashMap<String,Double>> = HashMap<Int,HashMap<String,Double>>()
}
open class InvestmentProductAllocationsSpec
{
var fromAge:Int? = null
var term:Int? = null
var allocs:HashMap<String,Double> = HashMap<String,Double>()
var totalAlloc:Double? = null
}
open class ReturnRates
{
var earningRates:ArrayList<Double> = ArrayList<Double>()
var taxRates:ArrayList<Double> = ArrayList<Double>()
}
Kotlin AlbaClientCountryConfigReq DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /clientcountryconfig HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AlbaClientCountryConfigReq xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AlbaApi.ServiceModel">
<ClientCode>String</ClientCode>
<CountryCode>String</CountryCode>
</AlbaClientCountryConfigReq>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ClientCountryConfig xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Client"> <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id> <AsAt xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">0001-01-01T00:00:00</AsAt> <AgeRMax>0</AgeRMax> <AgeRMin>0</AgeRMin> <AnnuityConfig> <AgeRating>0</AgeRating> <AllowDiscountPreRet>false</AllowDiscountPreRet> <AmountSpent>0</AmountSpent> <DRStochastic>String</DRStochastic> <DeferralPeriod>0</DeferralPeriod> <Expense>0</Expense> <Guarantee>0</Guarantee> <ImpliedInflationStochasticSeries>String</ImpliedInflationStochasticSeries> <ImprFactorTableNames> <LifeTableName> <Gender>Female</Gender> <Name>String</Name> </LifeTableName> </ImprFactorTableNames> <IncomePurchased>0</IncomePurchased> <IndexationName>String</IndexationName> <PercBalanceSpent>0</PercBalanceSpent> <Price>0</Price> <PriceType>Calc</PriceType> <Reversion>0</Reversion> <ScaleImpr>0</ScaleImpr> <ScaleQx>0</ScaleQx> <SpouseAgeRating>0</SpouseAgeRating> <TableNames> <LifeTableName> <Gender>Female</Gender> <Name>String</Name> </LifeTableName> </TableNames> <TargetTpx>0</TargetTpx> <Timing>0</Timing> </AnnuityConfig> <AssetContNameMap xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1> <d2p1:Key>String</d2p1:Key> <d2p1:Value> <d2p1:KeyValueOfstringstring> <d2p1:Key>String</d2p1:Key> <d2p1:Value>String</d2p1:Value> </d2p1:KeyValueOfstringstring> </d2p1:Value> </d2p1:KeyValueOfstringArrayOfKeyValueOfstringstringty7Ep6D1> </AssetContNameMap> <AssetNameMap xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>String</d2p1:Key> <d2p1:Value>String</d2p1:Value> </d2p1:KeyValueOfstringstring> </AssetNameMap> <AssetReturnRates xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringReturnRatesnS1zg5F4> <d2p1:Key>String</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Core"> <d4p1:EarningRates> <d2p1:double>0</d2p1:double> </d4p1:EarningRates> <d4p1:TaxRates> <d2p1:double>0</d2p1:double> </d4p1:TaxRates> </d2p1:Value> </d2p1:KeyValueOfstringReturnRatesnS1zg5F4> </AssetReturnRates> <Assets> <AssetConfig> <CanEditInvestmentChoice>false</CanEditInvestmentChoice> <Code>String</Code> <Contributions xmlns:d4p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Core.Contributions"> <d4p1:ContributionSpec> <d4p1:AmountType>Any</d4p1:AmountType> <d4p1:Ccy>String</d4p1:Ccy> <d4p1:Code>String</d4p1:Code> <d4p1:Constraints> <d4p1:ContributionConstraint> <d4p1:FromAge>0</d4p1:FromAge> <d4p1:Max>0</d4p1:Max> <d4p1:Min>0</d4p1:Min> <d4p1:Step>0</d4p1:Step> <d4p1:ToAge>0</d4p1:ToAge> </d4p1:ContributionConstraint> </d4p1:Constraints> <d4p1:Editable>false</d4p1:Editable> <d4p1:FromAge>0</d4p1:FromAge> <d4p1:IndexationType>String</d4p1:IndexationType> <d4p1:IsEmployeeCont>false</d4p1:IsEmployeeCont> <d4p1:IsOneOff>false</d4p1:IsOneOff> <d4p1:IsTaxable>false</d4p1:IsTaxable> <d4p1:Name>String</d4p1:Name> <d4p1:Order>0</d4p1:Order> <d4p1:RelatedRate>String</d4p1:RelatedRate> <d4p1:SalaryType>String</d4p1:SalaryType> <d4p1:Table>String</d4p1:Table> <d4p1:ToAge>0</d4p1:ToAge> <d4p1:Type>Fixed</d4p1:Type> </d4p1:ContributionSpec> </Contributions> <Investments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:string>String</d4p1:string> </Investments> <Name>String</Name> <Rebalance>false</Rebalance> <WillSpend>false</WillSpend> </AssetConfig> </Assets> <ClientCode>String</ClientCode> <ClientName>String</ClientName> <ContTables xmlns:d2p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Core.Contributions"> <d2p1:ContributionTableSpec> <d2p1:Code>String</d2p1:Code> <d2p1:KeyTemplate>age-service-rate</d2p1:KeyTemplate> <d2p1:RateSpecs> <d2p1:ContributionRateSpec> <d2p1:CoreRate>0</d2p1:CoreRate> <d2p1:DateFrom>0001-01-01T00:00:00</d2p1:DateFrom> <d2p1:DateTo>0001-01-01T00:00:00</d2p1:DateTo> <d2p1:FromAge>0</d2p1:FromAge> <d2p1:FromService>0</d2p1:FromService> <d2p1:LookupKey>String</d2p1:LookupKey> <d2p1:Rate>0</d2p1:Rate> <d2p1:SourceRate>0</d2p1:SourceRate> <d2p1:ToAge>0</d2p1:ToAge> <d2p1:ToService>0</d2p1:ToService> <d2p1:UpperLimit>0</d2p1:UpperLimit> </d2p1:ContributionRateSpec> </d2p1:RateSpecs> <d2p1:Rates xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfstringdouble> <d4p1:Key>String</d4p1:Key> <d4p1:Value>0</d4p1:Value> </d4p1:KeyValueOfstringdouble> </d2p1:Rates> <d2p1:Type>Fixed</d2p1:Type> </d2p1:ContributionTableSpec> </ContTables> <Content xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringArrayOfContentlNVkt6SI> <d2p1:Key>String</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/TasSyd.Model"> <d4p1:Content> <Id xmlns="http://schemas.datacontract.org/2004/07/TasSyd.Model.Base">String</Id> <d4p1:App>String</d4p1:App> <d4p1:Company>String</d4p1:Company> <d4p1:CompanyId>String</d4p1:CompanyId> <d4p1:Country>String</d4p1:Country> <d4p1:Elements> <d2p1:KeyValueOfstringstring> <d2p1:Key>String</d2p1:Key> <d2p1:Value>String</d2p1:Value> </d2p1:KeyValueOfstringstring> </d4p1:Elements> <d4p1:ItemCode>String</d4p1:ItemCode> <d4p1:ItemId>String</d4p1:ItemId> <d4p1:Lang>String</d4p1:Lang> <d4p1:Section>String</d4p1:Section> </d4p1:Content> </d2p1:Value> </d2p1:KeyValueOfstringArrayOfContentlNVkt6SI> </Content> <CountryCode>String</CountryCode> <CustomNumericConstraints xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringConstraintOfdecimalnS1zg5F4> <d2p1:Key>String</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Core"> <d4p1:Max>0</d4p1:Max> <d4p1:Min>0</d4p1:Min> <d4p1:Step>0</d4p1:Step> </d2p1:Value> </d2p1:KeyValueOfstringConstraintOfdecimalnS1zg5F4> </CustomNumericConstraints> <Environments xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>String</d2p1:Key> <d2p1:Value>String</d2p1:Value> </d2p1:KeyValueOfstringstring> </Environments> <GetAllocationsDictionary xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringArrayOfKeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1ty7Ep6D1> <d2p1:Key>String</d2p1:Key> <d2p1:Value> <d2p1:KeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1> <d2p1:Key>0</d2p1:Key> <d2p1:Value /> </d2p1:KeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1> </d2p1:Value> </d2p1:KeyValueOfstringArrayOfKeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1ty7Ep6D1> </GetAllocationsDictionary> <GetAssetClassFundDictionary xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringboolean> <d2p1:Key>String</d2p1:Key> <d2p1:Value>false</d2p1:Value> </d2p1:KeyValueOfstringboolean> </GetAssetClassFundDictionary> <GetTermBasedFundDictionary xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringboolean> <d2p1:Key>String</d2p1:Key> <d2p1:Value>true</d2p1:Value> </d2p1:KeyValueOfstringboolean> </GetTermBasedFundDictionary> <InvestmentPropertyRates>0</InvestmentPropertyRates> <Investments xmlns:d2p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Core"> <d2p1:InvestmentProduct> <d2p1:AllocationsDictionary xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:KeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1> <d4p1:Key>0</d4p1:Key> <d4p1:Value /> </d4p1:KeyValueOfintArrayOfKeyValueOfstringdoublety7Ep6D1> </d2p1:AllocationsDictionary> <d2p1:Allocs> <d2p1:InvestmentProductAllocationsSpec> <d2p1:Allocs xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d6p1:KeyValueOfstringdouble> <d6p1:Key>String</d6p1:Key> <d6p1:Value>0</d6p1:Value> </d6p1:KeyValueOfstringdouble> </d2p1:Allocs> <d2p1:FromAge>0</d2p1:FromAge> <d2p1:Term>0</d2p1:Term> </d2p1:InvestmentProductAllocationsSpec> </d2p1:Allocs> <d2p1:Code>String</d2p1:Code> <d2p1:Group>String</d2p1:Group> <d2p1:IsAssetClassFund>false</d2p1:IsAssetClassFund> <d2p1:Name>String</d2p1:Name> <d2p1:Order>0</d2p1:Order> </d2p1:InvestmentProduct> </Investments> <PrimarySalary>String</PrimarySalary> <Source xmlns:d2p1="http://schemas.datacontract.org/2004/07/TasSyd.Model.Stochastic"> <d2p1:D>Db</d2p1:D> <d2p1:T>0</d2p1:T> </Source> </ClientCountryConfig>