Skip to content

Commit

Permalink
Merge pull request #12 from ayeshLK/master
Browse files Browse the repository at this point in the history
Update module.md and package.md
  • Loading branch information
ayeshLK committed Mar 28, 2024
2 parents ef76658 + c2c40f1 commit 2fd2030
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 0 deletions.
97 changes: 97 additions & 0 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
## Overview

[Guidewire InsuranceNow](https://www.guidewire.com/products/insurancenow) is a cloud-based insurance platform offering comprehensive tools for policy, billing, and claims management, designed to streamline operations and improve customer service in the insurance industry.

The `ballerinax/guidewire.insnow` package provides a client API to connect to Guidewire InsuranceNow cloud API using Ballerina.

The Ballerina Guidewire InsuranceNow connector is compatible with the Guidewire InsuranceNow `2023.3 (Innsbruck)` REST API version.

## Setup guide

To use the Ballerina Guidewire InsuranceNow connector, access to the Guidewire API is required. Access is granted to partners or customers of the Guidewire platform. To become a partner or customer, reach out to Guidewire's sales team via the [Guidewire website](https://www.guidewire.com/contact-us/). For detailed instructions on obtaining authentication/authorization keys, please go through the [portal development guide](https://docs.guidewire.com/cloud/in/20233/portaldev/PortalDevelopment/topics/c_overview_portal_development.html).

## Quickstart

To use the Guidewire InsuranceNow connector in your Ballerina application, modify the `.bal` file as follows:

### Step 1: Import the connector

Import `ballerinax/guidewire.insnow` module into your Ballerina project.

```ballerina
import ballerinax/guidewire.insnow;
```

### Step 2: Instantiate a new connector

Create an `insnow:Client` object with your domain URL and relevant authentication options.

```ballerina
configurable string username = ?;
configurable string password = ?;
insnow:ConnectionConfig insnowConfig = {
auth: {
username,
password
}
};
insnow:Client insnow = check new (insnowConfig, "https://<your-domain>/coreapi/v5");
```

### Step 3: Invoke the connector operations

Now, utilize the available connector operations.

#### List applications

```ballerina
insnow:ListApplication applications = check insuranceNow->/applications();
```

#### Create application

```ballerina
insnow:Attachment attachment = {
compositeFile: [
{
fileName: "insurance_application_form.pdf",
id: "comp-app-form-001"
}
],
description: "Application and supporting documents for auto insurance policy.",
filename: "complete_insurance_application_bundle.pdf",
id: "doc-789456",
linkReferences: [
{
description: "Link to customer's policy.",
id: "link-policy-456789",
idRef: "policy-123456",
modelName: "CustomerPolicy",
status: "Pending",
systemIdRef: "gw-insurance-system-001"
}
],
tags: [
{
id: "tag-policy-application",
name: "Policy Application",
tagTemplateIdRef: "template-policy-app"
},
{
id: "tag-auto-insurance",
name: "Auto Insurance",
tagTemplateIdRef: "template-auto-ins"
}
],
templateId: "template-insurance-application"
};
_ = check insuranceNow->/applications/["123"]/documents.post(attachment);
```

### Step 4: Run the Ballerina application

```Shell
bal run
```
98 changes: 98 additions & 0 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
## Package overview

[Guidewire InsuranceNow](https://www.guidewire.com/products/insurancenow) is a cloud-based insurance platform offering comprehensive tools for policy, billing, and claims management, designed to streamline operations and improve customer service in the insurance industry.

The `ballerinax/guidewire.insnow` package provides a client API to connect to Guidewire InsuranceNow cloud API using Ballerina.

The Ballerina Guidewire InsuranceNow connector is compatible with Guidewire InsuranceNow `2023.3 (Innsbruck)` version.

## Setup guide

To use the Ballerina Guidewire InsuranceNow connector, access to the Guidewire API is required. Access is granted to partners or customers of the Guidewire platform. To become a partner or customer, reach out to Guidewire's sales team via the [Guidewire website](https://www.guidewire.com/contact-us/). For detailed instructions on obtaining authentication/authorization keys, please go through the [portal development guide](https://docs.guidewire.com/cloud/in/20233/portaldev/PortalDevelopment/topics/c_overview_portal_development.html).

## Quickstart

To use the Guidewire InsuranceNow connector in your Ballerina application, modify the `.bal` file as follows:

### Step 1: Import the connector

Import `ballerinax/guidewire.insnow` module into your Ballerina project.

```ballerina
import ballerinax/guidewire.insnow;
```

### Step 2: Instantiate a new connector

Create an `insnow:Client` object with your domain URL and relevant authentication options.

```ballerina
configurable string username = ?;
configurable string password = ?;
insnow:ConnectionConfig insnowConfig = {
auth: {
username,
password
}
};
insnow:Client insnow = check new (insnowConfig, "https://<your-domain>/coreapi/v5");
```

### Step 3: Invoke the connector operations

Now, utilize the available connector operations.

#### List applications

```ballerina
insnow:ListApplication applications = check insuranceNow->/applications();
```

#### Create application

```ballerina
insnow:Attachment attachment = {
compositeFile: [
{
fileName: "insurance_application_form.pdf",
id: "comp-app-form-001"
}
],
description: "Application and supporting documents for auto insurance policy.",
filename: "complete_insurance_application_bundle.pdf",
id: "doc-789456",
linkReferences: [
{
description: "Link to customer's policy.",
id: "link-policy-456789",
idRef: "policy-123456",
modelName: "CustomerPolicy",
status: "Pending",
systemIdRef: "gw-insurance-system-001"
}
],
tags: [
{
id: "tag-policy-application",
name: "Policy Application",
tagTemplateIdRef: "template-policy-app"
},
{
id: "tag-auto-insurance",
name: "Auto Insurance",
tagTemplateIdRef: "template-auto-ins"
}
],
templateId: "template-insurance-application"
};
_ = check insuranceNow->/applications/["123"]/documents.post(attachment);
```

### Step 4: Run the Ballerina application

```Shell
bal run
```

0 comments on commit 2fd2030

Please sign in to comment.