ocbc_loans: Make requests to OCBC Loans category APIs

Description Usage Arguments Value Examples

View source: R/Loans.R

Description

This function makes the information from the OCBC Loans category APIs easily accessible in an R-readable format. There are 8 different types of Loans, each with their own unique API. The 'Loans Accounts List' category requires an OAuth 2.0 authentication, hence only 7 APIs are made available.
1. Car Loans
2. Cash Loans
3. Home Loans
4. Property Loans
5. Secured Overdraft
6. SME Loans
7. Study Loans

Usage

1
2
3
4
5
6
7
ocbc_loans(
  loan_type = c("Car", "Cash", "Home", "Property", "Secured Overdraft", "SME", "Study"),
  acctoken,
  subCategory = NULL,
  productName = NULL,
  benefit = NULL
)

Arguments

loan_type

The loan type, hence the API that the function will call from. Required. Options are Car, Cash, Home, Property, Secured Overdraft, SME and Study. Note: it is recommended to only specify 1 loan 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 loans by subcategory names. Optional.

productName

Filter loans by product name.

benefit

Filter loans by benefit.

Value

A detailed dataframe of OCBC loans with variables such as product name, description, eligbility, benefits, loan amount etc.

Examples

1
ocbc_loans("Car", acctoken = Sys.getenv("ACC_TOKEN_OCBC"), productName = "New Car Financing")

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