All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hopper.cloud.airlines.api.CancelForAnyReasonCfarApi Maven / Gradle / Ivy

The newest version!
/*
 * Airline API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.hopper.cloud.airlines.api;

import com.hopper.cloud.airlines.ApiCallback;
import com.hopper.cloud.airlines.ApiClient;
import com.hopper.cloud.airlines.ApiException;
import com.hopper.cloud.airlines.ApiResponse;
import com.hopper.cloud.airlines.Configuration;
import com.hopper.cloud.airlines.Pair;

import com.google.gson.reflect.TypeToken;


import com.hopper.cloud.airlines.api.model.*;
import com.hopper.cloud.airlines.model.*;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CancelForAnyReasonCfarApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public CancelForAnyReasonCfarApi() {
        this(Configuration.getDefaultApiClient());
    }

    public CancelForAnyReasonCfarApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for getCfarContractsId
     * @param id A unique identifier for a CFAR contract (required)
     * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 The requested CFAR contract -
400 Invalid value for: header HC-Session-ID -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
500 The server encountered an internal error -
*/ public okhttp3.Call getCfarContractsIdCall(String id, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/cfar_contracts/{id}" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json", "text/plain" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getCfarContractsIdValidateBeforeCall(String id, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getCfarContractsId(Async)"); } okhttp3.Call localVarCall = getCfarContractsIdCall(id, hcSessionID, _callback); return localVarCall; } /** * Get a CFAR Contract * Get a CFAR contract * @param id A unique identifier for a CFAR contract (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContract * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The requested CFAR contract -
400 Invalid value for: header HC-Session-ID -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
500 The server encountered an internal error -
*/ public CfarContract getCfarContractsId(String id, String hcSessionID) throws ApiException { ApiResponse localVarResp = getCfarContractsIdWithHttpInfo(id, hcSessionID); return localVarResp.getData(); } /** * Get a CFAR Contract * Get a CFAR contract * @param id A unique identifier for a CFAR contract (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContract> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The requested CFAR contract -
400 Invalid value for: header HC-Session-ID -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
500 The server encountered an internal error -
*/ public ApiResponse getCfarContractsIdWithHttpInfo(String id, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = getCfarContractsIdValidateBeforeCall(id, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get a CFAR Contract (asynchronously) * Get a CFAR contract * @param id A unique identifier for a CFAR contract (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The requested CFAR contract -
400 Invalid value for: header HC-Session-ID -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
500 The server encountered an internal error -
*/ public okhttp3.Call getCfarContractsIdAsync(String id, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCfarContractsIdValidateBeforeCall(id, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for postCfarContractExercises * @param createCfarContractExerciseRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarContractExercisesCall(CreateCfarContractExerciseRequest createCfarContractExerciseRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createCfarContractExerciseRequest; // create path and map variables String localVarPath = "/cfar_contract_exercises"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postCfarContractExercisesValidateBeforeCall(CreateCfarContractExerciseRequest createCfarContractExerciseRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCfarContractExerciseRequest' is set if (createCfarContractExerciseRequest == null) { throw new ApiException("Missing the required parameter 'createCfarContractExerciseRequest' when calling postCfarContractExercises(Async)"); } okhttp3.Call localVarCall = postCfarContractExercisesCall(createCfarContractExerciseRequest, hcSessionID, _callback); return localVarCall; } /** * Create CFAR Exercise Request * Record that a request to exercise a CFAR contract has occurred * @param createCfarContractExerciseRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContractExercise * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public CfarContractExercise postCfarContractExercises(CreateCfarContractExerciseRequest createCfarContractExerciseRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = postCfarContractExercisesWithHttpInfo(createCfarContractExerciseRequest, hcSessionID); return localVarResp.getData(); } /** * Create CFAR Exercise Request * Record that a request to exercise a CFAR contract has occurred * @param createCfarContractExerciseRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContractExercise> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse postCfarContractExercisesWithHttpInfo(CreateCfarContractExerciseRequest createCfarContractExerciseRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = postCfarContractExercisesValidateBeforeCall(createCfarContractExerciseRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create CFAR Exercise Request (asynchronously) * Record that a request to exercise a CFAR contract has occurred * @param createCfarContractExerciseRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarContractExercisesAsync(CreateCfarContractExerciseRequest createCfarContractExerciseRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = postCfarContractExercisesValidateBeforeCall(createCfarContractExerciseRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for postCfarContracts * @param createCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract -
204 The CFAR contract creation request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarContractsCall(CreateCfarContractRequest createCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createCfarContractRequest; // create path and map variables String localVarPath = "/cfar_contracts"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postCfarContractsValidateBeforeCall(CreateCfarContractRequest createCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCfarContractRequest' is set if (createCfarContractRequest == null) { throw new ApiException("Missing the required parameter 'createCfarContractRequest' when calling postCfarContracts(Async)"); } okhttp3.Call localVarCall = postCfarContractsCall(createCfarContractRequest, hcSessionID, _callback); return localVarCall; } /** * Create a CFAR Contract * Create a CFAR contract from a purchased CFAR offer * @param createCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContract * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract -
204 The CFAR contract creation request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public CfarContract postCfarContracts(CreateCfarContractRequest createCfarContractRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = postCfarContractsWithHttpInfo(createCfarContractRequest, hcSessionID); return localVarResp.getData(); } /** * Create a CFAR Contract * Create a CFAR contract from a purchased CFAR offer * @param createCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContract> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract -
204 The CFAR contract creation request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse postCfarContractsWithHttpInfo(CreateCfarContractRequest createCfarContractRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = postCfarContractsValidateBeforeCall(createCfarContractRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create a CFAR Contract (asynchronously) * Create a CFAR contract from a purchased CFAR offer * @param createCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR contract -
204 The CFAR contract creation request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarContractsAsync(CreateCfarContractRequest createCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = postCfarContractsValidateBeforeCall(createCfarContractRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for postCfarOffers * @param createCfarOfferRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR offers -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarOffersCall(CreateCfarOfferRequest createCfarOfferRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = createCfarOfferRequest; // create path and map variables String localVarPath = "/cfar_offers"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postCfarOffersValidateBeforeCall(CreateCfarOfferRequest createCfarOfferRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createCfarOfferRequest' is set if (createCfarOfferRequest == null) { throw new ApiException("Missing the required parameter 'createCfarOfferRequest' when calling postCfarOffers(Async)"); } okhttp3.Call localVarCall = postCfarOffersCall(createCfarOfferRequest, hcSessionID, _callback); return localVarCall; } /** * Create a CFAR Offer * Create a CFAR offer for a user's trip * @param createCfarOfferRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return List<CfarOffer> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR offers -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public List postCfarOffers(CreateCfarOfferRequest createCfarOfferRequest, String hcSessionID) throws ApiException { ApiResponse> localVarResp = postCfarOffersWithHttpInfo(createCfarOfferRequest, hcSessionID); return localVarResp.getData(); } /** * Create a CFAR Offer * Create a CFAR offer for a user's trip * @param createCfarOfferRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<List<CfarOffer>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
201 The created CFAR offers -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse> postCfarOffersWithHttpInfo(CreateCfarOfferRequest createCfarOfferRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = postCfarOffersValidateBeforeCall(createCfarOfferRequest, hcSessionID, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create a CFAR Offer (asynchronously) * Create a CFAR offer for a user's trip * @param createCfarOfferRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
201 The created CFAR offers -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call postCfarOffersAsync(CreateCfarOfferRequest createCfarOfferRequest, String hcSessionID, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = postCfarOffersValidateBeforeCall(createCfarOfferRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for putCfarContractExercisesIdMarkCompleted * @param id A unique identifier for a CFAR contract exercise (required) * @param markCfarContractExerciseCompleteRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The updated CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractExercisesIdMarkCompletedCall(String id, MarkCfarContractExerciseCompleteRequest markCfarContractExerciseCompleteRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = markCfarContractExerciseCompleteRequest; // create path and map variables String localVarPath = "/cfar_contract_exercises/{id}/mark_completed" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call putCfarContractExercisesIdMarkCompletedValidateBeforeCall(String id, MarkCfarContractExerciseCompleteRequest markCfarContractExerciseCompleteRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling putCfarContractExercisesIdMarkCompleted(Async)"); } // verify the required parameter 'markCfarContractExerciseCompleteRequest' is set if (markCfarContractExerciseCompleteRequest == null) { throw new ApiException("Missing the required parameter 'markCfarContractExerciseCompleteRequest' when calling putCfarContractExercisesIdMarkCompleted(Async)"); } okhttp3.Call localVarCall = putCfarContractExercisesIdMarkCompletedCall(id, markCfarContractExerciseCompleteRequest, hcSessionID, _callback); return localVarCall; } /** * Complete CFAR Exercise * Record that a request to exercise a CFAR contract has been completed * @param id A unique identifier for a CFAR contract exercise (required) * @param markCfarContractExerciseCompleteRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContractExercise * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The updated CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public CfarContractExercise putCfarContractExercisesIdMarkCompleted(String id, MarkCfarContractExerciseCompleteRequest markCfarContractExerciseCompleteRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = putCfarContractExercisesIdMarkCompletedWithHttpInfo(id, markCfarContractExerciseCompleteRequest, hcSessionID); return localVarResp.getData(); } /** * Complete CFAR Exercise * Record that a request to exercise a CFAR contract has been completed * @param id A unique identifier for a CFAR contract exercise (required) * @param markCfarContractExerciseCompleteRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContractExercise> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The updated CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse putCfarContractExercisesIdMarkCompletedWithHttpInfo(String id, MarkCfarContractExerciseCompleteRequest markCfarContractExerciseCompleteRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = putCfarContractExercisesIdMarkCompletedValidateBeforeCall(id, markCfarContractExerciseCompleteRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Complete CFAR Exercise (asynchronously) * Record that a request to exercise a CFAR contract has been completed * @param id A unique identifier for a CFAR contract exercise (required) * @param markCfarContractExerciseCompleteRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The updated CFAR contract exercise -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractExercisesIdMarkCompletedAsync(String id, MarkCfarContractExerciseCompleteRequest markCfarContractExerciseCompleteRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = putCfarContractExercisesIdMarkCompletedValidateBeforeCall(id, markCfarContractExerciseCompleteRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for putCfarContractsIdUpdateStatus * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract status update request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractsIdUpdateStatusCall(String contractReference, UpdateCfarContractRequest updateCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateCfarContractRequest; // create path and map variables String localVarPath = "/cfar_contracts/{id}/update_status" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(contractReference)); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call putCfarContractsIdUpdateStatusValidateBeforeCall(String contractReference, UpdateCfarContractRequest updateCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'contractReference' is set if (contractReference == null) { throw new ApiException("Missing the required parameter 'contractReference' when calling putCfarContractsIdUpdateStatus(Async)"); } // verify the required parameter 'updateCfarContractRequest' is set if (updateCfarContractRequest == null) { throw new ApiException("Missing the required parameter 'updateCfarContractRequest' when calling putCfarContractsIdUpdateStatus(Async)"); } okhttp3.Call localVarCall = putCfarContractsIdUpdateStatusCall(contractReference, updateCfarContractRequest, hcSessionID, _callback); return localVarCall; } /** * Update a CFAR Contract * Update the CFAR contract * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContract * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract status update request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public CfarContract putCfarContractsIdUpdateStatus(String contractReference, UpdateCfarContractRequest updateCfarContractRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = putCfarContractsIdUpdateStatusWithHttpInfo(contractReference, updateCfarContractRequest, hcSessionID); return localVarResp.getData(); } /** * Update a CFAR Contract * Update the CFAR contract * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContract> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract status update request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse putCfarContractsIdUpdateStatusWithHttpInfo(String contractReference, UpdateCfarContractRequest updateCfarContractRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = putCfarContractsIdUpdateStatusValidateBeforeCall(contractReference, updateCfarContractRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update a CFAR Contract (asynchronously) * Update the CFAR contract * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract status update request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractsIdUpdateStatusAsync(String contractReference, UpdateCfarContractRequest updateCfarContractRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = putCfarContractsIdUpdateStatusValidateBeforeCall(contractReference, updateCfarContractRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for putCfarContractsIdFormsOfPayment * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractFormOfPaymentApiRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract forms of payment update request was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractsIdFormsOfPaymentCall(String contractReference, UpdateCfarContractFormOfPaymentApiRequest updateCfarContractFormOfPaymentApiRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = updateCfarContractFormOfPaymentApiRequest; // create path and map variables String localVarPath = "/cfar_contracts/{id}/forms_of_payment" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(contractReference)); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call putCfarContractsIdFormsOfPaymentValidateBeforeCall(String contractReference, UpdateCfarContractFormOfPaymentApiRequest updateCfarContractFormOfPaymentApiRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'contractReference' is set if (contractReference == null) { throw new ApiException("Missing the required parameter 'contractReference' when calling putCfarContractsIdFormsOfPayment(Async)"); } // verify the required parameter 'updateCfarFormOfPaymentApiRequest' is set if (updateCfarContractFormOfPaymentApiRequest == null) { throw new ApiException("Missing the required parameter 'updateCfarFormOfPaymentApiRequest' when calling putCfarContractsIdFormsOfPayment(Async)"); } okhttp3.Call localVarCall = putCfarContractsIdFormsOfPaymentCall(contractReference, updateCfarContractFormOfPaymentApiRequest, hcSessionID, _callback); return localVarCall; } /** * Update forms of payment in a CFAR Contract * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractFormOfPaymentApiRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContract * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract forms of payment update was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public CfarContract putCfarContractsIdFormsOfPayment(String contractReference, UpdateCfarContractFormOfPaymentApiRequest updateCfarContractFormOfPaymentApiRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = putCfarContractsIdFormsOfPaymentWithHttpInfo(contractReference, updateCfarContractFormOfPaymentApiRequest, hcSessionID); return localVarResp.getData(); } /** * Update forms of payment in a CFAR Contract * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractFormOfPaymentApiRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContract> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract forms of payment update was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public ApiResponse putCfarContractsIdFormsOfPaymentWithHttpInfo(String contractReference, UpdateCfarContractFormOfPaymentApiRequest updateCfarContractFormOfPaymentApiRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = putCfarContractsIdFormsOfPaymentValidateBeforeCall(contractReference, updateCfarContractFormOfPaymentApiRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update forms of payment in a CFAR Contract (asynchronously) * @param contractReference A unique reference for a CFAR contract (required) * @param updateCfarContractFormOfPaymentApiRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 The Updated CFAR contract -
204 The CFAR contract forms of payment update was successfully validated but not performed -
400 Syntactic errors were encountered while handling the request -
401 The client could not be authenticated -
403 The authenticated client does not have permission to call this endpoint -
404 The requested resource could not be found -
422 Semantic errors were encountered while handling the request -
500 The server encountered an internal error -
*/ public okhttp3.Call putCfarContractsIdFormsOfPaymentAsync(String contractReference, UpdateCfarContractFormOfPaymentApiRequest updateCfarContractFormOfPaymentApiRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = putCfarContractsIdFormsOfPaymentValidateBeforeCall(contractReference, updateCfarContractFormOfPaymentApiRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for postCfarContractsIdProcessPayment * @param id A unique identifier for a CFAR contract (required) * @param processCfarPaymentTokenRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object */ public okhttp3.Call postCfarContractsIdProcessPaymentCall(String id, ProcessCfarPaymentTokenRequest processCfarPaymentTokenRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = processCfarPaymentTokenRequest; // create path and map variables String localVarPath = "/cfar_contracts/{id}/payment" .replaceAll("\\{" + "id" + "\\}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (hcSessionID != null) { localVarHeaderParams.put("HC-Session-ID", localVarApiClient.parameterToString(hcSessionID)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "PartnerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postCfarContractsIdProcessPaymentValidateBeforeCall(String id, ProcessCfarPaymentTokenRequest processCfarPaymentTokenRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling postCfarContractsIdProcessPayment(Async)"); } // verify the required parameter 'processCfarPaymentTokenRequest' is set if (processCfarPaymentTokenRequest == null) { throw new ApiException("Missing the required parameter 'processCfarPaymentTokenRequest' when calling postCfarContractsIdProcessPayments(Async)"); } okhttp3.Call localVarCall = postCfarContractsIdProcessPaymentCall(id, processCfarPaymentTokenRequest, hcSessionID, _callback); return localVarCall; } /** * Process payment for CFAR contract * @param id A unique identifier for a CFAR contract (required) * @param processCfarPaymentTokenRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return CfarContract * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ProcessCfarPayment postCfarContractsIdProcessPayment(String id, ProcessCfarPaymentTokenRequest processCfarPaymentTokenRequest, String hcSessionID) throws ApiException { ApiResponse localVarResp = postCfarContractsIdProcessPaymentWithHttpInfo(id, processCfarPaymentTokenRequest, hcSessionID); return localVarResp.getData(); } /** * Process payment for CFAR contract * @param id A unique identifier for a CFAR contract (required) * @param processCfarPaymentTokenRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @return ApiResponse<CfarContract> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse postCfarContractsIdProcessPaymentWithHttpInfo(String id, ProcessCfarPaymentTokenRequest processCfarPaymentTokenRequest, String hcSessionID) throws ApiException { okhttp3.Call localVarCall = postCfarContractsIdProcessPaymentValidateBeforeCall(id, processCfarPaymentTokenRequest, hcSessionID, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Process payment for CFAR contract (asynchronously) * @param id A unique identifier for a CFAR contract (required) * @param processCfarPaymentTokenRequest (required) * @param hcSessionID The ID of the current airline session, see [Sessions](#tag/Sessions) (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ public okhttp3.Call postCfarContractsIdProcessPaymentAsync(String id, ProcessCfarPaymentTokenRequest processCfarPaymentTokenRequest, String hcSessionID, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = postCfarContractsIdProcessPaymentValidateBeforeCall(id, processCfarPaymentTokenRequest, hcSessionID, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy