class CustomerRegistry (View source)

Billable 모델별 PortOne 고객 ID를 보장하는 레지스트리.

Billable 참조(모델 종류 + 키)당 고객 레코드 1건을 유지한다. 동시 호출이 겹쳐도 하나의 레코드로 수렴한다.

Methods

bool
has(Model $billable)

이 모델에 연결된 고객 레코드가 있는지 확인한다.

string|null
findId(Model $billable)

이 모델의 고객 ID를 조회한다.

string
ensureId(Model $billable)

이 모델의 고객 ID를 만들거나 기존 값을 반환한다.

Details

bool has(Model $billable)

이 모델에 연결된 고객 레코드가 있는지 확인한다.

Parameters

Model $billable

검사할 Billable 모델

Return Value

bool

고객 레코드가 있으면 true

string|null findId(Model $billable)

이 모델의 고객 ID를 조회한다.

Parameters

Model $billable

조회할 Billable 모델

Return Value

string|null

고객 ID, 없으면 null

string ensureId(Model $billable)

이 모델의 고객 ID를 만들거나 기존 값을 반환한다.

Parameters

Model $billable

대상 Billable 모델

Return Value

string

고객 ID (UUID 문자열)