AI-generated Key Takeaways
- 
          
ResellerServiceobjects, created using Samsung and Google factory classes, enable claiming and enrolling Samsung and other Android devices. - 
          
The
SamsungResellerServiceFactoryrequires onboarding with KDP and usesresellerId,serviceAccountKeyFilePath, andclientIdentifierto create aResellerService. - 
          
The
GoogleResellerServiceFactoryrequires onboarding with zero-touch enrollment and usesresellerIdandserviceAccountKeyFilePathto create aResellerService. - 
          
Both factories throw a
CommonExceptionwhen errors occur, with specific error codes likeINVALID_RESELLER_IDandAUTHORIZATION_FAILfor Samsung andINVALID_PARAM_DEFAULTandINTERNAL_SERVER_ERRORfor Google. 
Use the Samsung and Google factory classes to create ResellerService objects.
With ResellerService objects, a common set of methods
is available to claim and enroll Samsung and other Android devices.
SamsungResellerServiceFactory
Before you can use the SamsungResellerServiceFactory class to generate a
ResellerService object, you need to onboard with KDP.
Below is the method signature for creating a ResellerService object using the
SamsungResellerServiceFactory class:
public static ResellerService createResellerService(String resellerId, String serviceAccountKeyFilePath, String clientIdentifier) throws CommonException;
Input parameters
| Property name | Value | Required | Description | 
|---|---|---|---|
resellerId | 
string | 
Yes | Reseller's unique identifier, provided by the KDP system. | 
serviceAccountKeyFilePath | 
string | 
Yes | File path to the service account key. | 
clientIdentifier | 
string | 
Yes | Client identifier provided by the KDP system. | 
Error behavior
When an error occurs, the library throws a
CommonException
containing one of the following error codes:
| Error code | 
|---|
INVALID_RESELLER_ID | 
AUTHORIZATION_FAIL | 
GoogleResellerServiceFactory
Before you can use the GoogleResellerServiceFactory class to generate a
ResellerService object, you must onboard to zero-touch enrollment
as a reseller.
Here's the method signature for creating a ResellerService object using the
GoogleResellerServiceFactory class:
public static ResellerService createResellerService(long resellerId, String serviceAccountKeyFilePath) throws CommonException, InterruptedException;
Input parameters
| Property name | Value | Required | Description | 
|---|---|---|---|
resellerId | 
long | 
Yes | Reseller's unique identifier, provided by the zero-touch system. | 
serviceAccountKeyFilePath | 
string | 
Yes | File path to the service account key. | 
Error behavior
When an error occurs, the library throws a
CommonException
containing one of the following error codes:
| Error code | 
|---|
INVALID_PARAM_DEFAULT | 
INVALID_RESELLER_ID | 
INTERNAL_SERVER_ERROR |