using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.CompanyLossSetManagement.Api;
using AIR.Services.Reinsurance.CompanyLossSetManagement.Data;
using System;
using System.Collections.Generic;
class SnippetSubmitEpToUlfRequest
{
private static void SubmitEpToUlfRequest(int businessUnitSid, int sqlInstanceSid)
{
ReinsuranceCompanyLossSetManagementServiceClient client = new ReinsuranceCompanyLossSetManagementServiceClient();
SubmitEpToUlfRequest request = new SubmitEpToUlfRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
request.ConvertEpToUlfOptions = new AIR.Services.Reinsurance.CompanyLossSetManagement.Data.ConvertEpToUlfOptions()
{
AreaDetail = GeoResolution.Area,
EpFileCurrencyCode = "USD",
CurrencyExchangeRateSetSid = 5,
EpFileLossNumberUnits = UnitType.Ones,
EpFilePath = @\\Workarea\EP_file.csv,
EpOrRp = EpOrRpType.Ep,
EventSetSid = 46,
ExtendedComment = "Comments",
LossCurvesReflectDemandSurge = true,
LossSetName = "API_EPTOULF",
TargetCurve = TargetCurveType.Aggregate,
UlfFileCurrencyCode = "USD",
UlfFileOutputDirectory = @\\Workarea\output
};
request.ConvertEpToUlfOptions.CurveAppliesToAreaPerils = new List lt; CurveAppliesToAreaPeril gt; ()
{
new CurveAppliesToAreaPeril()
{
Name ="CurveA",
PerilSetCode = AIR.Services.Common.Data.PerilSetCode.Earthquake | AIR.Services.Common.Data.PerilSetCode.FireFollowingEarthquake,
AppliesToArea = new AIR.Services.Reinsurance.Common.Data.ReinsuranceAppliesToArea()
{
Name="CurveA AppliesToAreaUS",
GeographyItems = new List lt; AIR.Services.Geography.Data.GeographyLeafItem gt;()
{
new AIR.Services.Geography.Data.GeographyLeafItem()
{
GeographySid = 234 }, //US
}
}
}
};
SubmitEpToUlfResponse response = client.SubmitEpToUlf(request);
if (response.Status.Code == StatusCode.Success)
{
Console.WriteLine("Submitted with activity Sid: " + response.ActivitySid);
}
}
}