Loyalty Wifi API
- API version: 1.0.0
- Build date: 2020-01-07T11:17:22.737-06:00[America/Chicago]
The Loyalty Boingo Wifi API offers cardholders, via their issuers, the ability to search and connect to Mastercard Global Wifi hotspots around the world through this digital channel. These APIs can be used to build a rich, interactive wifi experience within the issuer's existing mobile or web application.
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.mastercard.developer</groupId>
<artifactId>loyalty-wifi-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
compile "com.mastercard.developer:loyalty-wifi-client:1.0.0"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/loyalty-wifi-client-1.0.0.jar
target/lib/*.jar
Please follow the Steps to run the application from command line to see how it works from command line.
All URIs are relative to https://api.mastercard.com
Class | Method | HTTP request | Description |
---|---|---|---|
BundleProfileApi | createUser | POST /bundle/profile/users | Create Profile |
BundleProfileApi | patchUser | POST /bundle/profile/users/{user_id}/patch | Partially Update Profile |
BundleProfileApi | readUser | GET /bundle/profile/users/{user_id} | Find User by Id |
WiFiApi | loyaltyWifiHotspotsGet | GET /loyalty/wifi/hotspots | Find Wi-Fi hotspots nearby |
- Account
- Address
- BundleUser
- BundleUserData
- BundleUserPatch
- BundleUserResponse
- BundleUserResponseData
- BundleUserResponseErrors
- Consent
- Error
- ErrorItem
- ErrorItems
- ErrorItemsErrors
- Errors
- ErrorsErrors
- Hotspot
- Identification
- Im
- Name
- PatchDocument
- PhoneNumber
- Photo
- User
- UserProduct
- UserProductResponse
- UserReadAccountResponse
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
loyalty-benefits-support@mastercard.flowdock.com
-
Create a new project from Mastercard DevZone - stage.developer.mastercard.com or developer.mastercard.com
-
Select "Loyalty Wifi" from Choose API dropdown and hit continue.
-
Get Sandbox keys and store your .p12 certificate along with the readme/documentation.
-
Please save this Sandbox Keys, .p12, key store password and alias as you are going to use these to run the application.
-
Clone this repository and set up as Maven project
-
Update the following keys in application.properties file
- mastercard.wifi.ref.app.consumer.key: This can be found in the project you created on developerZone
- mastercard.wifi.ref.app.keystore.path: Path where you saved your certs i.e., .p12 file you received while creating a project
- mastercard.wifi.ref.app.keystore.password: This is the password you get with Sandbox cert.
- mastercard.wifi.ref.app.keystore.alias: This is the alias you get with Sandbox cert.
-
Example:
- mastercard.wifi.ref.app.url = https://stage.api.mastercard.com
- mastercard.wifi.ref.app.consumer.key = Abcdfefgjhilklmnopqrstuvwxyz-dxcq_zD7IiPa0df175e!22a7fddba56e800000000000000000
- mastercard.wifi.ref.app.keystore.path = C:\path\provided.p12
- mastercard.wifi.ref.app.keystore.password = pwd
- mastercard.wifi.ref.app.keystore.alias = alias
-
Do a clean build either through IDE or command prompt, if you are doing it through command prompt then the below command should be executed in the directory which contains this repository's pom file Eg: mvn clean install
-
Run the application using below command
- Eg:
java -jar path of the Jar relative to the current directory/loyalty-wifi-client-1.0.0.jar <argument>
- Argument: An argument which defines the feature user wants to run through command line. If you don't specify this argument, it will run all the features(registration,lounges,loungeDetails,dmc,entitlement and loungeHistory, error) one after the other
- registration : Registration for wifi service.
- hotspot : Get Hotspots for Wi-Fi
- error : Error scenario for registering the user for Wi-Fi service
- Eg:
-
Command line example to run the application:
java -jar target/loyalty-wifi-client-1.0.0.jar hotspot
here the application runs only hotspot feature. if you want to run more than one feature then specify the features with comma separated. Eg:java -jar target/loyalty-wifi-client-1.0.0.jar hotspot,registration,error
here it executes only these 3 features.You can remove the argument to run all the features Eg:java -jar target/loyalty-wifi-client-1.0.0.jar
. If you want to run the feature one by one then execute the commandjava -jar target/loyalty-wifi-client-1.0.0.jar hotspot
then again run the command with different featurejava -jar target/loyalty-wifi-client-1.0.0.jar registration
and so on.
If you would like to test this in Sandbox environment please contact Mastercard representative to set up you or your organization in this environment because if this does not happen the authorization fails in the Loyalty Wifi Service API. All the URLs have a prefix reference
in this reference application for all resources of Loyalty Wifi Service API so that it deals with sample data. You need to remove this reference
word from the URLs when testing against real data. Eg: /loyalty/wifi/reference
just for reference application and /loyalty/wifi
to test against real data.
While testing the application with a reference(/loyalty/wifi/reference)
url you need to send the exact inputs that are used in this reference application to get the desired response otherwise the mock returns an error with a message 'the request does not match'.
Find the service documentation for more information.
Client libraries can be generated for a simplified integration with the reference service, for more details
Copyright (c) 2019 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.