// Create Insurance Claim
var client = new BFSServiceReference.bfsapiSoapClient();
var credentials = new BFSServiceReference.Credentials()
{
UserName = bfsusername, //Username of administrative user in your instance of BFS
Password = bfspassword, //Password of the administrative user in your instance of BFS
};
Guid insurancePolicyId = GetInsurancePolicyId("Your ExternalReference"); // Can be implemented user API function GetInsurancePolicies
var response = client.CreateInsuranceClaims(new BFSServiceReference.CreateInsuranceClaimsRequest()
{
Credentials = credentials,
identify = bfsidentifier, //Identifier is a unique token for your instance of BFS
Entities = new[]
{
new InsuranceClaim()
{
InsurancePolicyId = new Guid("15b1f034-c9b9-4747-a03a-5bb06edd0ad1"), // Should be the ID of an existing insurance policy
InsuranceCoverId = new Guid("15b1f034-c9b9-4747-a03a-5bb06edd0ad1"), // Should be the ID of an existing insurance cover
}
}
});
foreach (var c in response.Entities)
{
Console.WriteLine(c.BrickId + ", " + c.ClaimNo);
} |