Touchstone 11.0 API Reference
GetMasterPortfolioLayers Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsurancePortfolioManagementServiceClient Class : GetMasterPortfolioLayers Method
Contains a GetMasterPortfolioLayersRequest that identifies the Filter to apply to the master portfolio, as well as the Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the master portfolio.
Retrieves a list of the existing reinsurance treaties (or Layers) in the master portfolio that meet a given set of Filter criteria.

There are three types of portfolios in Touchstone Re: master, static, and dynamic.

The master portfolio contains all the treaties in the business unit. A static portfolio is a collection of reinsurance treaties that you explicitly select from the master portfolio. A dynamic portfolio is a collection of reinsurance treaties that you select from the master portfolio by defining a filter. As treaties are added, modified, and removed from the master portfolio, the content of the dynamic portfolio changes automatically.

Syntax
Public Function GetMasterPortfolioLayers( _
   ByVal request As GetMasterPortfolioLayersRequest _
) As GetMasterPortfolioLayersResponse
Dim instance As ReinsurancePortfolioManagementServiceClient
Dim request As GetMasterPortfolioLayersRequest
Dim value As GetMasterPortfolioLayersResponse
 
value = instance.GetMasterPortfolioLayers(request)
public GetMasterPortfolioLayersResponse GetMasterPortfolioLayers( 
   GetMasterPortfolioLayersRequest request
)

Parameters

request
Contains a GetMasterPortfolioLayersRequest that identifies the Filter to apply to the master portfolio, as well as the Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the master portfolio.

Return Value

A GetMasterPortfolioLayersResponse that contains a list of layers that meet the specified filter criteria in the specified business unit and SQL Server instance.
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 retrieve a list of layers that meet a given set of filter criteria using the GetMasterPortfolioLayers() method:
using AIR.Services.Common.Data;
 using AIR.Services.Reinsurance.PortfolioManagement.Api;
 using System;
            
 class SnippetPortfolioAPIs
 {
    private static void GetMasterPortfolioLayers(int businessUnitSid, int sqlInstanceSid)
    {
        ReinsurancePortfolioManagementServiceClient client = new ReinsurancePortfolioManagementServiceClient();
            
        GetMasterPortfolioLayersRequest request = new GetMasterPortfolioLayersRequest();
        //Set the BusinessUnitSid property (required property)
        request.BusinessUnitSid = businessUnitSid;
        //Set the SqlInstanceSid property (required property)
        request.SqlInstanceSid = sqlInstanceSid;
        //Submit the request and get response back
        GetMasterPortfolioLayersResponse response = client.GetMasterPortfolioLayers(request);
        //Validate the response. Response is valid if Response.Status.Code is equal to StatusCode.Success
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (var layer in response.Layers)
            {
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("    *****    Portfolio: " + layer.LayerName + "     *****    ");
                Console.WriteLine("Sid: " + layer.LayerSid);
                Console.WriteLine("Company: " + layer.CompanyName);
                Console.WriteLine("Progam: " + layer.ProgramName);
            }
        }
    }
}
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

ReinsurancePortfolioManagementServiceClient Class
ReinsurancePortfolioManagementServiceClient Members