Touchstone Re 2023 API Reference
CreateProgram Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceProgramManagementServiceClient Class : CreateProgram Method
Contains a CreateProgramRequest that identifies the details of the program to create, as well as the Business Unit Sequential Identifier (SID) and and SQL Instance SID associated with the program.
Creates a new Touchstone Re Reinsurance Program.

A reinsurance program is a collection of one or more layers or reinsurance treaties that you can use when you run analyses.

Syntax
Public Function CreateProgram( _
   ByVal request As CreateProgramRequest _
) As CreateProgramResponse
Dim instance As ReinsuranceProgramManagementServiceClient
Dim request As CreateProgramRequest
Dim value As CreateProgramResponse
 
value = instance.CreateProgram(request)

Parameters

request
Contains a CreateProgramRequest that identifies the details of the program to create, as well as the Business Unit Sequential Identifier (SID) and and SQL Instance SID associated with the program.

Return Value

A CreateProgramResponse containing the details of the program that you created.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

Example
The following example shows how to create a Program using the CreateProgram() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.ProgramManagement.Api;
using System;
using System.Collections.Generic;
            
class SnippetCreateProgram
{
   private static void CreateProgram(int businessUnitSid, int sqlInstanceSid, int companySid, int expsoureSetSid)
   {
       ReinsuranceProgramManagementServiceClient client = new ReinsuranceProgramManagementServiceClient();              
// Create a new instance of CreateProgramRequest 
            CreateProgramRequest request = new CreateProgramRequest();
// Set the BusinessUnitSid property (required property)
            request.BusinessUnitSid = _businessUnitSid;
// Set the SqlInstanceSid property (required property)
            request.SqlInstanceSid = _sqlServerSid;
// Set the Program property (required property)           
            request.Program = new AIR.Services.Reinsurance.ProgramManagement.Data.Program()
            {
            CompanySid = companySid,
            Name = "Program created on " + DateTime.Now.ToString("dd MMM yyyy HH:mm"),
            ProgramTypeCode = ProgramTypeCode.CatastropheBond,
            ProgramTypeCode = ProgramTypeCode.CatastropheExcessOfLoss,
            CatBondNotes = catBondValues,
            Targets = new List()
                { 
                new ProgramTarget()
                    {
                        ExposureSetSid = expsoureSetSid,
                        ExposureTypeCode = ExposureTypeCode.SumsInsured,
                        IsLatestYear = true
                }
           },
           Layers = new List()
                { 
                    new Layer()
                        {
                            CusipID = "CB",
                            AnnualSpreadPercent = 22,
                            PrincipalAmount = 222222,
                            ID = "Layer1",
                            SubmitStatusCode = AIR.Services.Common.Exposure.Data.ContractStatus.Bound,
                            PerilSetCode = PerilSetCode.AllLicensedPerils,
                            TriggerStartingEventNumber = 1,
                            CoinsurancePercent = 99.99,
                            ParticipationGrossPercent = 0,
                            ParticipationNetPercent = 0,
                            Participation3Percent = 0,
                            Participation4Percent = 0,
                            PercentPlaced = 90,
                            Reinstatement = 2,
                            Premium = 1000,
                            OccurrenceLimit = 10000,
                            OccurrenceRetention = 1000000,
                            AggregateLimit = 10000,
                            AggregateRetention = 1000000,
                            TriggerCompanyLossMaximum = 1000000,
                            TriggerCompanyLossMinimum = 10000,
                            TriggerIndustryLossMinimum = 10000,
                            TriggerIndustryLossMaximum = 1000000,
                            AggregateResetDay = 4,
                            TerrorismSetCode = TerrorismOptions.TerrorismCovered | TerrorismOptions.CBRNInternational | TerrorismOptions.CBRNPollutionExclusion,
                            
                            ReinstatementPremiums = new List()
                                {
                                    new AIR.Services.Reinsurance.Common.Data.ReinstatementPremium()
                                    { 
                                        PercentOfInitialPremium = 90, TimeProvisionPercent = "85",  AmountProvisionPercent = "Pro Rata",  },
                                        new AIR.Services.Reinsurance.Common.Data.ReinstatementPremium()
                                        { 
                                            PercentOfInitialPremium = 77, TimeProvisionPercent = "Pro Rata",  AmountProvisionPercent = "55.33",  }
                        },
                            StepLayers = new List()
                             {
                                new Layer()
                       {
                                ID = "steplayer1",
                                PerilSetCode= PerilSetCode.Earthquake | PerilSetCode.Terrorism,
                        },
                        },
                            Lookup GeographySid in [AIRGeography].[dbo].[tGeography]
                         
                            AppliesToArea = new AIR.Services.Reinsurance.Common.Data.ReinsuranceAppliesToArea()
                            {
                                Name = "US",
                                GeographyItems = new List;()
                            {
                                new AIR.Services.Geography.Data.GeographyLeafItem()
                       {
                                GeographySid=234,
                                CededPercentage = 25.56
                       },
                        new AIR.Services.Geography.Data.GeographyLeafItem()
                       {
                            GeographySid=233,
                            CededPercentage = 33.89
                                    }
                                }
                        },
                    
                    AppliesToEventsFilters = new List;()
                        {
                        
                            new AIR.Services.Reinsurance.Common.Data.ReinsuranceAppliesToEventsFilter()
                            {
                                GeographySids =  new List
                                    {
                                        234,233
                                    },
                                Name = "Event subsets",
             
 
                            EventParameters = new List;AIR.Services.LossAnalysis.EventFilter.Data.FilterByRule>()
            
                          {
                            new AIR.Services.LossAnalysis.EventFilter.Data.FilterByRule()
                              {
                                    EventAttributeID = 1,
                                    OperatorID = AIR.Services.LossAnalysis.EventFilter.Data.Operator.IsLessThan,
                                    Value1 = 45,
                               },
                            new AIR.Services.LossAnalysis.EventFilter.Data.FilterByRule()
                              {
                                    EventAttributeID = 12,
                                    OperatorID = AIR.Services.LossAnalysis.EventFilter.Data.Operator.IsEqualTo,
                                    Value1 = 0
                              },
                           new AIR.Services.LossAnalysis.EventFilter.Data.FilterByRule()
                               {
                                    EventAttributeID = 8,
                                    OperatorID = AIR.Services.LossAnalysis.EventFilter.Data.Operator.IsEqualTo,
                                    Value1 = 0
                               },
                           new AIR.Services.LossAnalysis.EventFilter.Data.FilterByRule()
                              {
                                    EventAttributeID = 13,
                                    OperatorID = AIR.Services.LossAnalysis.EventFilter.Data.Operator.IsNotEqualTo,
                                    Value1 = 1.2
                               }
                        }
                    }
                }
            }
        },
    };
{
    CreateProgramResponse response = TouchstoneClients.ReinsuranceProgramManagementClient.CreateProgram(request);
             
       if (ValidateResponse(response))
       {
            Console.WriteLine("Successfully created program with Sid: " + response.Program.Sid);
}
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReinsuranceProgramManagementServiceClient Class
ReinsuranceProgramManagementServiceClient Members