Touchstone Re 2023 API Reference
GetPortfolios Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsurancePortfolioManagementServiceClient Class : GetPortfolios Method
Contains a GetPortfoliosRequest that identifies the Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of portfolios to retrieve.
Retrieves a list of the existing Portfolios in a given Business Unit and SQL Server Instance.

A portfolio in Touchstone Re is a collection of reinsurance treaties (or Layers) sourced from various Reinsurance Programs.

Syntax
Public Function GetPortfolios( _
   ByVal request As GetPortfoliosRequest _
) As GetPortfoliosResponse
Dim instance As ReinsurancePortfolioManagementServiceClient
Dim request As GetPortfoliosRequest
Dim value As GetPortfoliosResponse
 
value = instance.GetPortfolios(request)

Parameters

request
Contains a GetPortfoliosRequest that identifies the Business Unit Sequential Identifier (SID) and SQL Instance SID associated with the list of portfolios to retrieve.

Return Value

A GetPortfoliosResponse that contains a list of portfolios in the specified SQL server instance and business unit.
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 the existing Portfolios using the GetPortfolios() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.PortfolioManagement.Api;
using System;
            
class SnippetPortfolioAPIs
{
    private static void GetPortfolios(int businessUnitSid, int sqlInstanceSid)
    {
        ReinsurancePortfolioManagementServiceClient client = new ReinsurancePortfolioManagementServiceClient();
            
        GetPortfoliosRequest request = new GetPortfoliosRequest();
        //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
        GetPortfoliosResponse response = client.GetPortfolios(request);
        //Validate the response. Response is valid if Response.Status.Code is equal to StatusCode.Success
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (var p in response.Portfolios)
            {
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine("    *****    Portfolio: " + p.Name + "     *****    ");
                Console.WriteLine("Sid: " + p.Sid);
                Console.WriteLine("Description: " + p.Description);
                Console.WriteLine("Type: " + p.PortfolioType.ToString());
            }
        }
    }
}
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