Touchstone Re 2023 API Reference
SubmitCopyCompany Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > ReinsuranceDataImportServiceClient Class : SubmitCopyCompany Method
Contains a SubmitCopyCompanyRequest that specifies the Business Unit SID and SQL Instance SID associated with the company to copy, as well as the CopyOptions object that enables you to configure the copy job.
Submits a request to copy a Touchstone Re Company.

A company is a container for exposure data, company loss sets, reinsurance programs, and loss results that you want to keep together.

When you copy a company, you can optionally copy the following items associated with the company:

When submitting the request, you specify the data to copy as well as a name for the copied company.

Syntax
Public Function SubmitCopyCompany( _
   ByVal request As SubmitCopyCompanyRequest _
) As SubmitCopyCompanyResponse
Dim instance As ReinsuranceDataImportServiceClient
Dim request As SubmitCopyCompanyRequest
Dim value As SubmitCopyCompanyResponse
 
value = instance.SubmitCopyCompany(request)

Parameters

request
Contains a SubmitCopyCompanyRequest that specifies the Business Unit SID and SQL Instance SID associated with the company to copy, as well as the CopyOptions object that enables you to configure the copy job.

Return Value

A SubmitCopyCompanyResponse that contains the Activity SID that uniquely identifies the asynchronous web service call that you made to submit the copy job.
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.

To find the Company SID to pass into this method, call the GetCompanies() method.

Example
The following example shows how to copy a Touchstone Re company using the SubmitCopyCompany() method:
using AIR.Services.Common.Data;
using AIR.Services.Reinsurance.DataImport.Api;
using AIR.Services.Reinsurance.DataImport.Data;
using System;
            
public class SnippetSubmitCopyCompany
{
   private static void SubmitCopyCompany(int businessUnitSid, int sqlInstanceSid, int companySid)
   {
       ReinsuranceDataImportServiceClient client = new ReinsuranceDataImportServiceClient();
       SubmitCopyCompanyRequest request = new SubmitCopyCompanyRequest();
       request.BusinessUnitSid = businessUnitSid;
       request.SqlInstanceSid = sqlInstanceSid;
            
       request.CopyOptions = new CopyCompanyOptions()
       {
           CompanySid = companySid,
           NewCompanyName = "Company " + DateTime.Now.Ticks,
           CopyAllExposureSets = true,
           CopyAllPrograms = true,
           CopyAllUserDefinedCategories = true,
       };
       SubmitCopyCompanyResponse response = client.SubmitCopyCompany(request);
       if ((response.Status.Code == StatusCode.Success))
       {
           Console.WriteLine("Copy company submitted with Activity Sid: " + response.ActivitySid);
       }
   }
}
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

ReinsuranceDataImportServiceClient Class
ReinsuranceDataImportServiceClient Members