SKM.V3.MethodsVersion: 4.0.54. Both packages; all six documented target frameworks.
Result == ResultType.Success before using its data. In version 4.0.54, handled request and JSON errors normally return ResultType.Error with a diagnostic Message. A non-null result alone does not mean the request succeeded. See Request Errors.
Constructors
CustomerMethods()
Creates an empty CustomerMethods object. This constructor does not send an API request.Methods
AddCustomer(string, AddCustomerModel)
This method will add new customer. To remove an existing customer, please seeRemoveCustomer(string, RemoveCustomerModel)
Returns:
AddCustomerResult. The API response. Check Result and Message before using the returned data.
EditCustomer(string, EditCustomerModel)
This method will edit an existing customer. It will only change the properties that you specify.
Returns:
EditCustomerResult. The API response. Check Result and Message before using the returned data.
GetCustomerLicenses(string, GetCustomerLicensesModel)
This method will return a list of license keys that belong to a certain customer.
Returns:
GetCustomerLicensesResult. The API response. Check Result and Message before using the returned data.
GetCustomerLicensesBySecret(string, GetCustomerLicensesBySecretModel)
Retrieves licenses using a customer secret you already have.
Returns:
GetCustomerLicensesResult. The API response. Check Result and Message before using the returned data.
The access token needs the GetCustomerLicensesBySecret permission. This method does not retrieve the customer secret.
GetCustomers(string, GetCustomersModel)
Retrieves customers by search text or customer ID.
Returns:
GetCustomersResult. The API response. Check Result and Message before using the returned data.
The access token needs the GetCustomers permission. This SDK wrapper requests model version 1 and returns List<Customer>, which has no Secret property. To retrieve an existing secret, call the Web API with ModelVersion=2 or 3; see GetCustomers.
RemoveCustomer(string, RemoveCustomerModel)
Removes an existing customer by customer ID. To add a customer, useAddCustomer(string, AddCustomerModel).
Returns:
BasicResult. The API response. Check Result and Message before using the returned data.
FAQ
Can GetCustomers Return a Customer Secret?
Can GetCustomers Return a Customer Secret?
The Web API can, but this SDK method cannot in 4.0.54. It sends
ModelVersion=1 and returns Customer objects without a Secret property. Make a direct GetCustomers request with ModelVersion=2 or 3, a specific CustomerId and the Get Customers permission.If you already have the secret, use GetCustomerLicensesBySecret to retrieve that customer’s licenses. This requires the Get Customer Licenses By Secret permission. See the Customer Secret guide.