Skip to content

Repository files navigation

cloud-airlines-java

Airline API

  • API version: v1.1
    • Generator version: 7.10.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

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.

Maven users

Add this dependency to your project's POM:

<dependency>
<groupId>com.hopper.cloud</groupId>
<artifactId>cloud-airlines-java</artifactId>
<version>2.1.0</version>
<scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

 repositories {
mavenCentral() // Needed if the 'cloud-airlines-java' jar has been published to maven central.
mavenLocal() // Needed if the 'cloud-airlines-java' jar has been published to the local maven repo.
}
dependencies {
implementation "com.hopper.cloud:cloud-airlines-java:2.0.0"
}

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/cloud-airlines-java-2.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:importcom.hopper.cloud.airlines.ApiClient;
importcom.hopper.cloud.airlines.ApiException;
importcom.hopper.cloud.airlines.Configuration;
importcom.hopper.cloud.airlines.auth.*;
importcom.hopper.cloud.airlines.model.*;
importcom.hopper.cloud.airlines.api.AnalyticsApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://airlines-api.hopper.com/airline/v1.1");
// Configure API key authorization: SessionAuthApiKeyAuthSessionAuth = (ApiKeyAuth) defaultClient.getAuthentication("SessionAuth");
SessionAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)//SessionAuth.setApiKeyPrefix("Token");AnalyticsApiapiInstance = newAnalyticsApi(defaultClient);
CfarEventcfarEvent = newCfarEvent(); // CfarEvent | try {
apiInstance.postCustomerEvents(cfarEvent);
} catch (ApiExceptione) {
System.err.println("Exception when calling AnalyticsApi#postCustomerEvents");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}

Documentation for API Endpoints

All URIs are relative to https://airlines-api.hopper.com/airline/v1.1

ClassMethodHTTP requestDescription
AnalyticsApipostEventsPOST /eventsSend a Backend Event
AuthenticationApipostAuthPOST /authCreate an authentication token
CancelForAnyReasonCfarApigetCfarContractsIdGET /cfar_contracts/{id}Get a CFAR Contract
CancelForAnyReasonCfarApigetCustomerCfarPayoutReceiptGET /customer/cfar/payout/receiptGet payout receipt PDF
CancelForAnyReasonCfarApipostCfarContractExercisesPOST /cfar_contract_exercisesCreate CFAR Exercise
CancelForAnyReasonCfarApipostCfarContractsPOST /cfar_contractsCreate a CFAR Contract
CancelForAnyReasonCfarApipostCfarContractsIdPaymentPOST /cfar_contracts/{id}/paymentProcess CFAR Payment
CancelForAnyReasonCfarApipostCfarOffersPOST /cfar_offersCreate CFAR Offers
CancelForAnyReasonCfarApipostCfarOffersExternalPOST /cfar_offers/externalCreate External CFAR Offer
CancelForAnyReasonCfarApiputCfarContractExercisesIdMarkCompletedPUT /cfar_contract_exercises/{id}/mark_completedComplete CFAR Exercise
CancelForAnyReasonCfarApiputCfarContractsIdFormsOfPaymentPUT /cfar_contracts/{id}/forms_of_paymentUpdate forms of payment of a CFAR Contract
CancelForAnyReasonCfarApiputCfarContractsIdItinerarySlicesPUT /cfar_contracts/{id}/itinerary_slicesUpdate CFAR Contract Itinerary Slices
CancelForAnyReasonCfarApiputCfarContractsIdUpdateStatusPUT /cfar_contracts/{id}/update_statusUpdate CFAR Contract Status
DisruptionGuaranteeDgApigetCustomerDgExercisesIdSessionGET /customer/dg_exercises/{id}/sessionGet session ID by DG exercise ID
DisruptionGuaranteeDgApigetCustomerDgPayoutReceiptGET /customer/dg/payout/receiptGet payout receipt PDF
DisruptionGuaranteeDgApigetDgContractsIdGET /dg_contracts/{id}Get a DG contract
DisruptionGuaranteeDgApipostDgContractExercisesPOST /dg_contract_exercisesCreate DG Exercise
DisruptionGuaranteeDgApipostDgContractsPOST /dg_contractsCreate a DG Contract
DisruptionGuaranteeDgApipostDgContractsIdPaymentPOST /dg_contracts/{id}/paymentProcess DG payment
DisruptionGuaranteeDgApipostDgOffersPOST /dg_offersCreate DG Offers
DisruptionGuaranteeDgApiputDgContractsIdItinerarySlicesPUT /dg_contracts/{id}/itinerary_slicesUpdate DG Contract Itinerary Slices
DisruptionGuaranteeDgApiputDgContractsIdUpdateStatusPUT /dg_contracts/{id}/update_statusUpdate DG Contract Status
SessionsApipostSessionsPOST /sessionsCreate a Session

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

PartnerAuth

  • Type: HTTP Bearer Token authentication

SessionAuth

  • Type: API key
  • API key parameter name: HC-Session-ID
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages