Giter Club home page Giter Club logo

credit-analytics-reference-app's Introduction

Small Business Credit Analytics Reference App

Table of Contents

Overview

This is a reference application to demonstrate how the Small Business Credit Analytics(SBCA) API is used. To call the API, a consumer key and .p12 file are required - they can be obtained by creating a project on https://developer.mastercard.com - see the Configuration section below for detailed instructions.

Requirements

  • Java 11
  • IntelliJ IDEA (or any other IDE)

Frameworks/Libraries

  • Apache Maven
  • OpenAPI Generator

Integrating with OpenAPI Generator

OpenAPI Generator generates API client libraries from OpenAPI Specs. It provides generators and library templates for supporting multiple languages and frameworks. Check Generating and Configuring a Mastercard API Client to learn more about how to generate a simple API client for consuming APIs.

Configuration

  1. Create an account on Mastercard Developers if you don't have one already.
  2. Once logged in, create a new project, add the Small Business Credit Analytics API to it, and click continue.
  3. Click the button to generate and download your private signing key - a .p12 file will be downloaded.
  4. Copy the downloaded .p12 file to the src/main/resources folder in your code.
  5. Open src/main/java/com/mastercard/creditanalytics/api/ApiExamples.java and configure the default ApiClient creation logic:
  • apiBasePath- This is the URL Path to the API endpoint, one of:
  • signingKeyPath- Path to the key (*.p12) file on your machine. If you placed the file in your src/main/resources directory, your path might look like ./src/main/resources/*.p12 to run locally.
  • signingKeyAlias - The alias of your key. The default value for sandbox keys is keyalias.
  • signingKeyPassword - The password for your Keystore. The default value for sandbox projects is keystorepassword.
  • consumerKey - This is your consumer key from the Sandbox Keys or Production Keys section of your project page.

Use-Cases

  1. /matches Match a merchant's details to Mastercard's locations database
    Use this endpoint to retrieve potential matches to the merchant's provided name and address metadata in Mastercard's database.

  2. /metrics/{location_id} Get performance metrics for a merchant
    Use this endpoint to retrieve performance metrics for a matched merchant returned from /matches

More details can be found here.

Execute the Use-Cases

  1. Run mvn clean install from the root of the project directory.
  2. When the project builds successfully, you can run the following command to start the project: java -jar target/creditanalytics-referenceapp-1.0.0.jar
  3. This will start the application and run through a set of examples exercising all the use cases mentioned above

Service Documentation

Small Business Credit Analytics documentation can be found here.

API Reference

The OpenAPI specification can be found here.

Support

Please email [email protected] with any questions or feedback you may have.

License

Copyright 2021 Mastercard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.