VCVCMS API Corpus
비즈니스 레시피

활성 빌링 숙소

현재 빌링이 활성화된 숙소를 추적하고, 미설정 또는 체험판 상태인 숙소를 파악합니다.

비즈니스 질문

현재 빌링이 활성화된 숙소는?

이 레시피가 필요한 이유

재무, CS, 운영팀이 어떤 숙소에 빌링이 적용되어 있고, 어떤 숙소가 아직 미설정이거나 비활성 상태인지 빠르게 파악해야 할 때 사용합니다.

추천 패턴

2단계 패턴입니다:

  1. 숙소 목록과 함께 빌링 지표를 조회합니다.
  2. 상세 구독 데이터가 필요한 경우에만 readBilling을 추가로 호출합니다.
query ListAccommodationsWithBilling($userId: ULID) {
  readAccommodations(userId: $userId) {
    id
    name
    type
    isLaunched
    isBillingActive
    subscriptionBilling {
      id
      type
      status
      paymentCurrency
      depositAmount
    }
  }
}
query ReadBillingForAccommodation($type: BillingType, $accommodationId: ULID) {
  readBilling(type: $type, accommodationId: $accommodationId) {
    id
    type
    status
    paymentCurrency
    quotas {
      id
      type
      chargeRate
      quantity
    }
  }
}

해석 참고

  • BillingStatus.CLAIMED를 "빌링 활성" 상태의 기준으로 봅니다.
  • subscriptionBilling: null은 보통 빌링 설정이 아직 안 된 상태입니다.
  • isBillingActive는 빌링 상세가 필요 없을 때 가장 빠른 boolean 판별 값입니다.

관련 자료