팩토리 클래스

삼성 및 Google 팩토리 클래스를 사용하여 ResellerService 객체를 만듭니다. ResellerService 객체를 사용하면 일반적인 메서드 집합을 사용하여 삼성과 기타 Android 기기를 등록하고 등록할 수 있습니다.

삼성리셀러 서비스 팩토리

SamsungResellerServiceFactory 클래스를 사용하여 ResellerService 객체를 생성하려면 먼저 KDP에 온보딩해야 합니다. 다음은 SamsungResellerServiceFactory 클래스를 사용하여 ResellerService 객체를 만들기 위한 메서드 서명입니다.

public static ResellerService createResellerService(String resellerId, String serviceAccountKeyFilePath, String clientIdentifier) throws CommonException;

입력 매개변수

숙소 이름 필수 설명
resellerId string KDP 시스템에서 제공하는 리셀러의 고유 식별자입니다.
serviceAccountKeyFilePath string 서비스 계정 키의 파일 경로입니다.
clientIdentifier string KDP 시스템에서 제공하는 클라이언트 식별자입니다.

오류 동작

오류가 발생하면 라이브러리에서 다음 오류 코드 중 하나가 포함된 CommonException이 발생합니다.

오류 코드
INVALID_RESELLER_ID
AUTHORIZATION_FAIL

Google리셀러 서비스 팩토리

GoogleResellerServiceFactory 클래스를 사용하여 ResellerService 객체를 생성하려면 먼저 리셀러로 제로터치 등록을 온보딩해야 합니다.

다음은 GoogleResellerServiceFactory 클래스를 사용하여 ResellerService 객체를 만드는 메서드 서명입니다.

public static ResellerService createResellerService(long resellerId, String serviceAccountKeyFilePath) throws CommonException, InterruptedException;

입력 매개변수

숙소 이름 필수 설명
resellerId long 제로터치 시스템에서 제공하는 리셀러의 고유 식별자입니다.
serviceAccountKeyFilePath string 서비스 계정 키의 파일 경로입니다.

오류 동작

오류가 발생하면 라이브러리에서 다음 오류 코드 중 하나가 포함된 CommonException이 발생합니다.

오류 코드
INVALID_PARAM_DEFAULT
INVALID_RESELLER_ID
INTERNAL_SERVER_ERROR