Skip to content

Mastercard/locations-atms-api-client-tutorial-app

ATM Locations API Client

Table of Contents

Overview

This project showcases the use case of retrieving atm locations and related information using the Atm Locations API here

Compatibility

References

Tutorial

A tutorial can be found here for setting up and using this service.

Frameworks

Setup

Prerequisites

Application Configuration

  1. Create an account at Mastercard Developers.
  2. Copy the Atms Locations API Spec (atms-locations-api-spec.yaml) to /src/main/resources.
  3. Create a new project and add the ATM Locations API to your project.
  4. Take note of the given consumer key, keyalias, and keystore password given upon the project creation.
  5. Copy the downloaded .p12 file to /src/main/resources.
  6. Update the properties found in src/main/java/com/mastercard/api/atms/Main.java.
    private static final String BASE_URL = "https://sandbox.api.mastercard.com/locations/atms";

    //Below properties will be required for authentication of API calls.
    private static final String CONSUMER_KEY = "Your consumer key"; // This refers to your consumer key. Copy it from "Keys" section on your project page in [Mastercard Developers](https://developer.mastercard.com/dashboard)
    private static final String SIGNING_KEY_ALIAS = "your key alias"; // This is the default value of key alias. If it is modified, use the updated one from keys section in [Mastercard Developers](https://developer.mastercard.com/dashboard).
    private static final String SIGNING_KEY_FILE_PATH = "path to your.p12 private key file"; // This refers to .p12 file found in the signing key. Please place .p12 file at src\main\resources in the project folder and add classpath for .p12 file.
    private static final String SIGNING_KEY_PASSWORD = "your password"; // This is the default value of key alias. If it is modified, use the updated one from keys section in [Mastercard Developers](https://developer.mastercard.com/dashboard).

  1. run mvn compile exec:java to run the project.

Documentation for API Endpoints

All URIs are relative to https://api.mastercard.com/locations/atms

Class Method HTTP request Description
AtmsApi getAtms POST /searches Get a list of ATM details
CountriesApi getCountries GET /countries Get a list of countries
CountriesApi getCountrySubdivisions GET /country-subdivisions Get a list of country subdivisions

Documentation for Models

Support

If you would like further information, please send an email to apisupport@mastercard.com

License

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.

License

Apache 2 License

Copyright © 1994-2020, All Right Reserved by Mastercard.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
license.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages