PricingClient
Pricing API를 호출하는 클라이언트. 프로모션, 할인, TASF, 운임 원칙을 조회한다.
상속
ClientSupport 상속
설정
- endpoint:
infrastructureProperties.pricing.internalEndpoint - timeout:
infrastructureProperties.pricing.fuelTimeout
메서드
getActivePricingPrinciples
fun getActivePricingPrinciples(
tripType: TripType,
departureAirports: Set<String>,
arrivalAirports: Set<String>,
departureDate: LocalDate,
departureNation: String,
arrivalNation: String,
adult: Int,
child: Int,
infant: Int,
funnels: List<Funnel>,
useMultiTicket: Boolean,
onlyRepresentativeCardPromotion: Boolean,
): PricingPrincipleActiveResponse?활성 프로모션/할인 원칙 조회. GET /pricing-principles/active
| Caller | Callee |
|---|---|
| FlightSearchService.searchFlightsBySearchConditions | Pricing API |
요청 파라미터:
- channel, funnels, tripType
- 출발/도착 공항, 국가
- 승객 수
- useMultiTicket, onlyRepresentativeCardPromotion
getMatchedSellerDiscountsAndPromotions
fun getMatchedSellerDiscountsAndPromotions(
fareItinerary: FareItineraryDetailResponse,
airportMap: Map<String, Airport>,
adult: Int,
child: Int,
infant: Int,
): Pair<DiscountPrinciple?, List<PromotionPrinciple>>매칭되는 판매자 할인/프로모션 조회. GET /pricing-principles/discounts/matched
| Caller | Callee |
|---|---|
| FlightDetailService.getMatchedPromotionPrinciple | Pricing API |
GROUPAIR 예외: supplier가 GROUPAIR이면 빈 결과 반환.
getMatchedTasfPrinciplesByPassengerType
fun getMatchedTasfPrinciplesByPassengerType(
fareItineraryDetail: FareItineraryDetailResponse,
departureNation: String,
arrivalNation: String,
airportMap: Map<String, Airport>,
tripType: TripType,
adult: Int,
child: Int,
infant: Int,
): Map<PassengerType, TasfPrincipleSetResponse>?승객 타입별 TASF 원칙 조회. GET /pricing-principles/tasfs/matched
| Caller | Callee |
|---|---|
| FlightDetailService.getFlightDetail | Pricing API |
getMatchedFarePrinciple
fun getMatchedFarePrinciple(
fareItinerary: FareItineraryDetailResponse,
airportMap: Map<String, Airport>,
): FarePrinciple?매칭되는 운임 원칙 조회. GET /pricing-principles/fares/matched
| Caller | Callee |
|---|---|
| FlightDetailService.getFlightDetail | Pricing API |
운임 원칙 용도: display == false면 운임 미노출.
응답 객체
PricingPrincipleActiveResponse
검색 시 적용할 프로모션/할인 정보.
DiscountPrinciple
판매자 할인 원칙.
PromotionPrinciple
프로모션 원칙 (카드 프로모션 등).
TasfPrincipleSetResponse
TASF(Travel Agent Service Fee) 원칙.
FarePrinciple
운임 노출/미노출 정책.
특징
- Graceful Degradation: 실패 시 null/빈 리스트 반환 (검색 실패 방지)
- 파라미터 변환: Request 객체의
toParameters()메서드로 쿼리 파라미터 변환 - MDC 활용: Channel/Funnel 정보 자동 포함