AdapterClient

GDS/NDC 어댑터 API를 호출하는 클라이언트. 항공편 검색, 운임 상세, 운임 규정 조회를 담당한다.

상속

ClientSupport 상속

설정

  • endpoint: infrastructureProperties.adapter.internalEndpoint
  • timeout: infrastructureProperties.adapter.fuelTimeout

헤더

헤더
Content-Typeapplication/json
X-Triple-Api-Origin고정값
X-Triple-Sales-ChannelMDCHolder에서 조회
X-Triple-Sales-FunnelMDCHolder에서 조회

메서드

getFareItineraries

fun getFareItineraries(
    supplier: String,
    originDestinationLocationInfos: List<OriginDestinationLocationInfo>,
    cabins: Set<CabinType>,
    airlines: Set<String>,
    sotoAirlines: Set<String>,
    onlyDirect: Boolean,
    onlyFreeBaggageInclude: Boolean,
    useCache: Boolean = true,
    preferences: List<SearchPreferenceInfo>,
    advancedOption: AdvancedSearchOptionInfo?,
    useMultiTicket: Boolean,
): List<FareItineraryResponse>

항공편 검색. POST /{supplier}/search


getFareItinerary

fun getFareItinerary(
    key: String,
    supplier: String,
    adult: Int,
    child: Int,
    infant: Int,
): FareItineraryDetailResponse

운임 상세 조회. GET /{supplier}/search?key=&adult=&child=&infant=

에러 처리:

에러 코드예외
INVALID_CACHE_KEYCacheKeyInvalidException
NO_QUOTANOT_ENOUGH_CAPPINGS
INVALID_PASSENGER_TYPEINVALID_PASSENGERS_CHANGE
MAINTENANCESystemMaintenanceException

getFareRules

fun getFareRules(
    key: String,
    supplier: String,
    adult: Int,
    child: Int,
    infant: Int,
): List<FareRule>

운임 규정 조회. GET /{supplier}/fare-rules

CallerCallee
FareRuleService.getFareRulesAdapter API

getFareRulesGroups

fun getFareRulesGroups(
    detailKey: String,
    adult: Int,
    child: Int,
    infant: Int,
): FareRuleGroup

운임 규정 그룹 조회. detailKey에서 supplier 추출.

CallerCallee
FareRuleService.getFareRulesGroupsAdapter API

getStructuredFareRules

fun getStructuredFareRules(detailKey: String): StructuredFareRuleDetail

구조화된 운임 규정 조회. GET /{supplier}/fare-rules/structured


getFareItinerariesByPnr

fun getFareItinerariesByPnr(
    supplier: String,
    pnr: String,
    supplierIdentificationKey: String?,
    adult: Int,
    child: Int,
    infant: Int,
    ...
): List<FareItineraryResponse>

재발행용 PNR 기반 검색. POST /{supplier}/search/reissue


getFareItineraryByPnr

fun getFareItineraryByPnr(
    key: String,
    pnr: String,
    supplier: String,
): FareItineraryDetailResponse

재발행용 PNR 기반 상세 조회. GET /{supplier}/search/reissue

특징

  • Fuel HTTP 클라이언트: Fuel 라이브러리 사용
  • 에러 파싱: AdapterErrorResponse로 에러 코드 파싱
  • MDC 전달: Sales Channel/Funnel 헤더 자동 전달