ocbc_insurance: Make requests to OCBC Insurance category APIs

Description Usage Arguments Value Examples

View source: R/Insurance.R

Description

This function makes the information from the OCBC Insurance category APIs easily accessible in an R-readable format. There are 7 different types of insurance, each with their own unique API
1. Accident and Health Insurance
2. Car Insurance
3. Endowment Insurance
4. Home and Mortgage Insurance
5. Life Insurance
6. Maternity Insurance
7. Travel Insurance

Usage

1
2
3
4
5
6
7
8
ocbc_insurance(
  insurance_type = c("Accident and Health", "Car", "Endowment", "Home and Mortgage",
    "Life", "Maternity", "Travel"),
  acctoken,
  subCategory = NULL,
  productName = NULL,
  benefit = NULL
)

Arguments

insurance_type

The insurance type, hence the API that the function will call from. Required. Options are Accident and Health, Car, Endowment, Home and Mortgage, Life, Maternity and Travel. Note: it is recommended to only specify 1 insurance type at a time.

acctoken

Account token. Required. Users can sign up for their api key, api secret and account token at https://api.ocbc.com/store/home

subCategory

Filter policies by subcategory. Optional.

productName

Filter policies by product name. Optional.

benefit

Filter policies by benefit. Optional.

Value

A detailed dataframe of OCBC insurance policies with variables such as product name, benefits, premiums, eligibility etc.

Examples

1
2
ocbc_insurance("Accident and Health", acctoken = Sys.getenv("ACC_TOKEN_OCBC"),
productName = "Supreme Health")

racheltlw/OCBCR documentation built on Dec. 16, 2019, 12:46 a.m.