org.openapitools.client.ApiCallback Maven / Gradle / Ivy
The newest version!
/*
* Golden Service API
* An API that conforms to the standards and best practices that should be adhered to in all Mastercard owned APIs. Can be used to create subscriptions to reports that are generated twice daily (6am & 6pm) that deliver e-commerce spending across multiple sectors and locations.
--- * **All requests must be signed using oauth 1.0a. Please refer to: https://developer.mastercard.com/platform/documentation/using-oauth-1a-to-access-mastercard-apis/_** --- * **The user must provide their card details when creating a subscription. These details must be encrypted before entering transit. Please refer to [Mastercard security](https://stage.developer.mastercard.com/platform/documentation/securing-sensitive-data-using-payload-encryption/)** ---
*
* The version of the OpenAPI document: 1.1.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client;
import java.io.IOException;
import java.util.Map;
import java.util.List;
/**
* Callback for asynchronous API call.
*
* @param The return type
*/
public interface ApiCallback {
/**
* This is called when the API call fails.
*
* @param e The exception causing the failure
* @param statusCode Status code of the response if available, otherwise it would be 0
* @param responseHeaders Headers of the response if available, otherwise it would be null
*/
void onFailure(ApiException e, int statusCode, Map> responseHeaders);
/**
* This is called when the API call succeeded.
*
* @param result The result deserialized from response
* @param statusCode Status code of the response
* @param responseHeaders Headers of the response
*/
void onSuccess(T result, int statusCode, Map> responseHeaders);
/**
* This is called when the API upload processing.
*
* @param bytesWritten bytes Written
* @param contentLength content length of request body
* @param done write end
*/
void onUploadProgress(long bytesWritten, long contentLength, boolean done);
/**
* This is called when the API downlond processing.
*
* @param bytesRead bytes Read
* @param contentLength content lenngth of the response
* @param done Read end
*/
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
}