Touchstone Re 2023 API Reference
CreateLayer Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ExposureManagementServiceClient Class : CreateLayer Method
Contains a CreateLayerRequest that identifies the properties of the Layer that you want to create, along with the associated Touchstone-generated Contract Sequential Identifier (SID), Business Unit SID, and SQL Instance SID.
Creates a new Touchstone® Layer for an existing Contract. This new Layer can include Sublimits.
Syntax
Public Function CreateLayer( _
   ByVal request As CreateLayerRequest _
) As CreateLayerResponse
Dim instance As ExposureManagementServiceClient
Dim request As CreateLayerRequest
Dim value As CreateLayerResponse
 
value = instance.CreateLayer(request)
public CreateLayerResponse CreateLayer( 
   CreateLayerRequest request
)

Parameters

request
Contains a CreateLayerRequest that identifies the properties of the Layer that you want to create, along with the associated Touchstone-generated Contract Sequential Identifier (SID), Business Unit SID, and SQL Instance SID.

Return Value

A CreateLayerResponse containing the Layer SID, which uniquely identifies the Layer that you have created.
Remarks
Note: To associate Locations and Sublimits using the Sublimit Area property, create the desired Layers and Sublimits first and include the desired Sublimit Area value when creating the Sublimit(s). Then, create the corresponding Locations, supplying the appropriate Sublimit Area value when creating these Locations.

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.

To find the Contract SID to pass into this method, call the GetContracts() method.

Example
The following example shows how to create a Touchstone Layer using the CreateLayer() method:
using System;
using System.Collections.Generic;
using AIR.Services.Common.Data;
using AIR.Services.Common.Exposure.Data;
using AIR.Services.ExposureManagement.Api;
            
class SnippetCreateLayerRequest
{
    private static void CreateLayer(int businessUnitSid, int sqlInstanceSid, string layerId, int contractSid, int dataSourceSid)
    {
        ExposureManagementServiceClient exposureManagementClient = new ExposureManagementServiceClient();
        CreateLayerRequest request = new CreateLayerRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.ContractSid = contractSid;
        request.Layer = new Layer
        {
            ID = layerId,
            DataSourceSid = dataSourceSid,
            Perils = PerilSetCode.Earthquake | PerilSetCode.TropicalCyclone,
            Limit = new LayerBlanketLimit
            {
                AttachmentPoint = 50000,
                TotalLimit = 5000000,
            },
            Deductible = new LayerMinimumMaximumDeductible
            {
                MinimumDeductible = 500,
                MaximumDeductible = 16000
            },
            Sublimits = new List<Sublimit>()
            {
                new Sublimit{
                    Perils = PerilSetCode.Earthquake,
                    Limit = new SublimitBlanketLimit{
                        AttachmentPoint = 40000,
                        TotalLimit = 4000000,
                    },
                    Deductible = new SublimitMinimumDeductible
                    {
                        MinimumDeductible = 4500
                    },
                }
            }
        };
            
        CreateLayerResponse response = exposureManagementClient.CreateLayer(request);
            
        if (response.Status.Code == StatusCode.Success)
        {
            Console.WriteLine(" Layer: " + layerId + " created with SID: " + response.LayerSid);
        }
    }
}
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

ExposureManagementServiceClient Class
ExposureManagementServiceClient Members