Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
7.3 KiB
CustomersApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| adminAdminCustomerDetail | GET /v1/admin/customers/{org} | One customer's detail |
| adminAdminGrantCredit | POST /v1/admin/customers/{org}/credit | Grant credit (commerce deposit) |
| adminAdminListCustomers | GET /v1/admin/customers | Fleet customer list |
| adminAdminReactivateCustomer | POST /v1/admin/customers/{org}/reactivate | Reactivate a customer (IAM isForbidden=false) |
| adminAdminSuspendCustomer | POST /v1/admin/customers/{org}/suspend | Suspend a customer (IAM isForbidden=true) |
adminAdminCustomerDetail
AdminAdminCustomerDetail200Response adminAdminCustomerDetail(org)
One customer's detail
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CustomersApi()
val org : kotlin.String = org_example // kotlin.String |
try {
val result : AdminAdminCustomerDetail200Response = apiInstance.adminAdminCustomerDetail(org)
println(result)
} catch (e: ClientException) {
println("4xx response calling CustomersApi#adminAdminCustomerDetail")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CustomersApi#adminAdminCustomerDetail")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| org | kotlin.String |
Return type
AdminAdminCustomerDetail200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
adminAdminGrantCredit
AdminAdminGrantCredit200Response adminAdminGrantCredit(org, adminCreditRequest)
Grant credit (commerce deposit)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CustomersApi()
val org : kotlin.String = org_example // kotlin.String |
val adminCreditRequest : AdminCreditRequest = // AdminCreditRequest |
try {
val result : AdminAdminGrantCredit200Response = apiInstance.adminAdminGrantCredit(org, adminCreditRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling CustomersApi#adminAdminGrantCredit")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CustomersApi#adminAdminGrantCredit")
e.printStackTrace()
}
Parameters
| org | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| adminCreditRequest | AdminCreditRequest |
Return type
AdminAdminGrantCredit200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
adminAdminListCustomers
AdminAdminListCustomers200Response adminAdminListCustomers()
Fleet customer list
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CustomersApi()
try {
val result : AdminAdminListCustomers200Response = apiInstance.adminAdminListCustomers()
println(result)
} catch (e: ClientException) {
println("4xx response calling CustomersApi#adminAdminListCustomers")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CustomersApi#adminAdminListCustomers")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
AdminAdminListCustomers200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
adminAdminReactivateCustomer
AdminAdminReactivateCustomer200Response adminAdminReactivateCustomer(org)
Reactivate a customer (IAM isForbidden=false)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CustomersApi()
val org : kotlin.String = org_example // kotlin.String |
try {
val result : AdminAdminReactivateCustomer200Response = apiInstance.adminAdminReactivateCustomer(org)
println(result)
} catch (e: ClientException) {
println("4xx response calling CustomersApi#adminAdminReactivateCustomer")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CustomersApi#adminAdminReactivateCustomer")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| org | kotlin.String |
Return type
AdminAdminReactivateCustomer200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
adminAdminSuspendCustomer
AdminAdminReactivateCustomer200Response adminAdminSuspendCustomer(org)
Suspend a customer (IAM isForbidden=true)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = CustomersApi()
val org : kotlin.String = org_example // kotlin.String |
try {
val result : AdminAdminReactivateCustomer200Response = apiInstance.adminAdminSuspendCustomer(org)
println(result)
} catch (e: ClientException) {
println("4xx response calling CustomersApi#adminAdminSuspendCustomer")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling CustomersApi#adminAdminSuspendCustomer")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| org | kotlin.String |
Return type
AdminAdminReactivateCustomer200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json