Acrosure 1.0.0

dotnet add package Acrosure --version 1.0.0
NuGet\Install-Package Acrosure -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Acrosure" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Acrosure --version 1.0.0
#r "nuget: Acrosure, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Acrosure as a Cake Addin
#addin nuget:?package=Acrosure&version=1.0.0

// Install Acrosure as a Cake Tool
#tool nuget:?package=Acrosure&version=1.0.0

acrosure-dotnet-sdk

Acrosure

.NET SDK for connecting with Acrosure Insurance Gateway

Installation

Install via Install-Package :

Install-Package acrosure-dotnet-sdk

Getting Started

Import Acrosure into your project.

using Acrosure;

Instantiate with an API key from Acrosure Dashboard.

If you're using this on client-side, DO NOT use your secret token.

AcrosureClient AcrosureClient  = new AcrosureClient("<your_api_key>")

Basic Usage

AcrosureClient provides several objects such as application, product, etc. and associated APIs.

Any data will be inside an response object with data key, along with meta data, such as:

{
  "data": { ... },
  "status": "ok",
  ...
}

AcrosureClient will return in Json.NET

Instantiate with Json.NET from Json.NET.

Application

Get

Get application with specified id.

JObject application = AcrosureClient.Application.Get("<application_id>")
Create

Create an application.

JObject createdApplication = await AcrosureClient.Application.Create(@"{
  productId: '<product_id>', // required
  basic_data: {},
  package_options: {},
  additional_data: {},
  package_code: '<package_code>',
  attachments: []
}")
Update

Update an application.

JObject updatedApplication = await AcrosureClient.Application.Update(@"{
  application_id: '<application_id>', // required
  basic_data: {},
  package_options: {},
  additional_data: {},
  package_code: '<package_code>',
  attachments: []
}")
Get packages

Get current application available packages.

JObject packages = await AcrosureClient.Application.GetPackages(
  "<application_id>"
)
Select package

Select package for current application.

JObject updatedApplication = await AcrosureClient.Application.selectPackage({
  application_id: "<application_id>",
  package_code: "<package_code>"
});
Get package

Get selected package of current application.

JObject currentPackage = await AcrosureClient.Application.GetPackage(
  "<application_id>"
);
Submit

Submit current application.

JObject submittedApplication = await AcrosureClient.Application.Submit(
  "<application_id>"
);
Confirm

Confirm current application.

This function needs secret API key.

JObject confirmedApplication = await AcrosureClient.Application.Confirm(
  "<application_id>"
);
List

List your applications .

JObject applications = await AcrosureClient.Application.List();

Product

Get

Get product with specified id.

JObject product = await AcrosureClient.Product.Get("<product_id>");
List

List your products.

JObject products = await AcrosureClient.Product.List();

Policy

Get

Get policy with specified id.

JObject policy = await AcrosureClient.policy.Get("<policy_id>");
List

List your policies .

JObject policies = await AcrosureClient.policy.List();

Data

Get

Get values for a handler (with or without dependencies, please refer to Acrosure API Document).

// Without dependencies
JObject values = await AcrosureClient.Data.Get(@"{
  handler: "<some_handler>"
}");

// With dependencies
JObject values = await AcrosureClient.Data.Get(@"{
  handler: '<some_handler>',
  dependencies: ['<dependency_1>', '<dependency_2>']
}");

Team

Get info

Get current team information.

const teamInfo = await AcrosureClient.Team.getInfo();

Other functionality

Verify webhook signature

Verify webhook signature by specify signature and raw data string. (Only Node.js environment)

bool isSignatureValid = AcrosureClient.verifySignature(
  "<signature>",
  @"{'data':'<raw_data>'}"
);

Advanced Usage

Please refer to this document for AcrosureClient usage.

And refer to Acrosure API Document for more details on Acrosure API.

Associated Acrosure API endpoints

Application

/applications/get
/applications/list
/applications/create
/applications/update
/applications/get-packages
/applications/get-package
/applications/select-package
/applications/submit
/applications/confirm

Product

/products/get
/products/list

Policy

/policies/get
/policies/list

Data

/data/get

Team

/teams/get-info
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 881 10/12/2018

.NET SDK for connecting with Acrosure Insurance Gateway