AlbaApi

<back to all web services

AlbaClientCountryConfigReq

The following routes are available for this service:
GET/clientcountryconfig/{Country}/{Client}
GET/clientcountryconfig
POST/clientcountryconfig

export class Entity implements IEntity
{
    public id?: string;

    public constructor(init?: Partial<Entity>) { (Object as any).assign(this, init); }
}

export class DatedEntity extends Entity implements IDatedEntity
{
    public asAt?: string;

    public constructor(init?: Partial<DatedEntity>) { super(init); (Object as any).assign(this, init); }
}

export enum DataSource
{
    Db = 'Db',
    Cache = 'Cache',
    Parameter = 'Parameter',
    NA = 'NA',
}

export class DataSourceResult
{
    public d?: DataSource;
    public t?: number;

    public constructor(init?: Partial<DataSourceResult>) { (Object as any).assign(this, init); }
}

export enum Gender
{
    Female = 'Female',
    Male = 'Male',
    Other = 'Other',
}

export class LifeTableName
{
    public name?: string;
    public gender?: Gender;

    public constructor(init?: Partial<LifeTableName>) { (Object as any).assign(this, init); }
}

export enum AnnuityPriceType
{
    Calc = 'Calc',
    Table = 'Table',
}

export class AnnuityConfig
{
    public tableNames?: LifeTableName[];
    public imprFactorTableNames?: LifeTableName[];
    public reversion?: number;
    public guarantee?: number;
    public timing?: number;
    public allowDiscountPreRet?: boolean;
    public scaleQx?: number;
    public scaleImpr?: number;
    public ageRating?: number;
    public spouseAgeRating?: number;
    public expense?: number;
    public percBalanceSpent?: number;
    public amountSpent?: number;
    public incomePurchased?: number;
    public deferralPeriod?: number;
    public indexationName?: string;
    public drStochastic?: string;
    public impliedInflationStochasticSeries?: string;
    public targetTpx?: number;
    public priceType?: AnnuityPriceType;
    public price?: number;

    public constructor(init?: Partial<AnnuityConfig>) { (Object as any).assign(this, init); }
}

export enum ContributionType
{
    Fixed = 'Fixed',
    Time = 'Time',
    Lookup = 'Lookup',
    Match = 'Match',
}

export class ContributionConstraint
{
    public fromAge?: number;
    public toAge?: number;
    public min?: number;
    public max?: number;
    public step?: number;

    public constructor(init?: Partial<ContributionConstraint>) { (Object as any).assign(this, init); }
}

export enum AmountType
{
    Any = 'Any',
    Amount = 'Amount',
    Rate = 'Rate',
}

export class ContributionSpec
{
    public code?: string;
    public name?: string;
    public type?: ContributionType;
    public isEmployeeCont?: boolean;
    public table?: string;
    public ccy?: string;
    public fromAge?: number;
    public toAge?: number;
    public indexationType?: string;
    public salaryType?: string;
    public isTaxable?: boolean;
    public relatedRate?: string;
    public order?: number;
    public editable?: boolean;
    public constraints?: ContributionConstraint[];
    public amountType?: AmountType;
    public isOneOff?: boolean;

    public constructor(init?: Partial<ContributionSpec>) { (Object as any).assign(this, init); }
}

export class AssetConfig
{
    public code?: string;
    public name?: string;
    public rebalance?: boolean;
    public canEditInvestmentChoice?: boolean;
    public willSpend?: boolean;
    public investments?: string[];
    public contributions?: ContributionSpec[];
    public isOneOff?: boolean;

    public constructor(init?: Partial<AssetConfig>) { (Object as any).assign(this, init); }
}

export class ContributionRateSpec
{
    public fromAge?: number;
    public toAge?: number;
    public fromService?: number;
    public toService?: number;
    public sourceRate?: number;
    public dateFrom?: string;
    public dateTo?: string;
    public upperLimit?: number;
    public rate?: number;
    public coreRate?: number;
    public lookupKey?: string;

    public constructor(init?: Partial<ContributionRateSpec>) { (Object as any).assign(this, init); }
}

export class ContributionTableSpec
{
    public code?: string;
    public type?: ContributionType;
    public rates?: { [index: string]: number; };
    public rateSpecs?: ContributionRateSpec[];
    public keyTemplate?: string;

    public constructor(init?: Partial<ContributionTableSpec>) { (Object as any).assign(this, init); }
}

export class InvestmentProductAllocationsSpec
{
    public fromAge?: number;
    public term?: number;
    public allocs?: { [index: string]: number; };
    public totalAlloc?: number;

    public constructor(init?: Partial<InvestmentProductAllocationsSpec>) { (Object as any).assign(this, init); }
}

export class InvestmentProduct
{
    public code?: string;
    public name?: string;
    public group?: string;
    public isAssetClassFund?: boolean;
    public allocs?: InvestmentProductAllocationsSpec[];
    public order?: number;
    public allocationsDictionary?: { [index: number]: { [index:string]: number; }; };

    public constructor(init?: Partial<InvestmentProduct>) { (Object as any).assign(this, init); }
}

export class ReturnRates
{
    public earningRates?: number[];
    public taxRates?: number[];

    public constructor(init?: Partial<ReturnRates>) { (Object as any).assign(this, init); }
}

export class ClientCountryConfig extends DatedEntity
{
    public clientCode?: string;
    public clientName?: string;
    public countryCode?: string;
    public source?: DataSourceResult;
    public ageRMin?: number;
    public ageRMax?: number;
    public primarySalary?: string;
    public annuityConfig?: AnnuityConfig;
    public assets?: AssetConfig[];
    public contTables?: ContributionTableSpec[];
    public investments?: InvestmentProduct[];
    public content?: { [index: string]: Content[]; };
    public environments?: { [index: string]: string; };
    public customNumericConstraints?: { [index: string]: Constraint<number>; };
    public assetReturnRates?: { [index: string]: ReturnRates; };
    public investmentPropertyRates?: number;
    public getAssetClassFundDictionary?: { [index: string]: boolean; };
    public getTermBasedFundDictionary?: { [index: string]: boolean; };
    public getAllocationsDictionary?: { [index: string]: { [index:number]: { [index:string]: number; }; }; };
    public assetNameMap?: { [index: string]: string; };
    public assetContNameMap?: { [index: string]: { [index:string]: string; }; };
    public cacheKey?: string;

    public constructor(init?: Partial<ClientCountryConfig>) { super(init); (Object as any).assign(this, init); }
}

export class AlbaClientCountryConfigReq
{
    public countryCode?: string;
    public clientCode?: string;

    public constructor(init?: Partial<AlbaClientCountryConfigReq>) { (Object as any).assign(this, init); }
}

TypeScript AlbaClientCountryConfigReq DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	countryCode: String,
	clientCode: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	clientCode: String,
	clientName: String,
	countryCode: String,
	source: 
	{
		d: Db,
		t: 0
	},
	ageRMin: 0,
	ageRMax: 0,
	primarySalary: String,
	annuityConfig: 
	{
		tableNames: 
		[
			{
				name: String,
				gender: Female
			}
		],
		imprFactorTableNames: 
		[
			{
				name: String,
				gender: Female
			}
		],
		reversion: 0,
		guarantee: 0,
		timing: 0,
		allowDiscountPreRet: False,
		scaleQx: 0,
		scaleImpr: 0,
		ageRating: 0,
		spouseAgeRating: 0,
		expense: 0,
		percBalanceSpent: 0,
		amountSpent: 0,
		incomePurchased: 0,
		deferralPeriod: 0,
		indexationName: String,
		drStochastic: String,
		impliedInflationStochasticSeries: String,
		targetTpx: 0,
		priceType: Calc,
		price: 0
	},
	assets: 
	[
		{
			code: String,
			name: String,
			rebalance: False,
			canEditInvestmentChoice: False,
			willSpend: False,
			investments: 
			[
				String
			],
			contributions: 
			[
				{
					code: String,
					name: String,
					type: Fixed,
					isEmployeeCont: False,
					table: String,
					ccy: String,
					fromAge: 0,
					toAge: 0,
					indexationType: String,
					salaryType: String,
					isTaxable: False,
					relatedRate: String,
					order: 0,
					editable: False,
					constraints: 
					[
						{
							fromAge: 0,
							toAge: 0,
							min: 0,
							max: 0,
							step: 0
						}
					],
					amountType: Any,
					isOneOff: False
				}
			],
			isOneOff: False
		}
	],
	contTables: 
	[
		{
			code: String,
			type: Fixed,
			rates: 
			{
				String: 0
			},
			rateSpecs: 
			[
				{
					fromAge: 0,
					toAge: 0,
					fromService: 0,
					toService: 0,
					sourceRate: 0,
					dateFrom: 0001-01-01,
					dateTo: 0001-01-01,
					upperLimit: 0,
					rate: 0,
					coreRate: 0,
					lookupKey: String
				}
			],
			keyTemplate: age-service-rate
		}
	],
	investments: 
	[
		{
			code: String,
			name: String,
			group: String,
			isAssetClassFund: False,
			allocs: 
			[
				{
					fromAge: 0,
					term: 0,
					allocs: 
					{
						String: 0
					},
					totalAlloc: 0
				}
			],
			order: 0,
			allocationsDictionary: 
			{
				0: {}
			}
		}
	],
	content: 
	{
		String: 
		[
			{
				section: String,
				itemId: String,
				itemCode: String,
				country: String,
				lang: String,
				app: String,
				companyId: String,
				company: String,
				elements: 
				{
					String: String
				},
				id: String
			}
		]
	},
	environments: 
	{
		String: String
	},
	customNumericConstraints: 
	{
		String: 
		{
			min: 0,
			max: 0,
			step: 0
		}
	},
	assetReturnRates: 
	{
		String: 
		{
			earningRates: 
			[
				0
			],
			taxRates: 
			[
				0
			]
		}
	},
	investmentPropertyRates: 0,
	getAssetClassFundDictionary: 
	{
		String: False
	},
	getTermBasedFundDictionary: 
	{
		String: True
	},
	getAllocationsDictionary: 
	{
		String: 
		{
			0: {}
		}
	},
	assetNameMap: 
	{
		String: String
	},
	assetContNameMap: 
	{
		String: 
		{
			String: String
		}
	},
	cacheKey: ClientCountryConfig-String-String,
	asAt: 0001-01-01,
	id: String
}