mirror of
https://github.com/hanzo-kt/sdk.git
synced 2026-10-30 20:43:57 +00:00
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]>
5.8 KiB
5.8 KiB
AffiliatesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| commerceConnectAffiliate | GET /v1/commerce/affiliate/{affiliateid}/connect | Connect affiliate |
| commerceCreateAffiliate | POST /v1/commerce/affiliate | Create affiliate |
| commerceGetAffiliate | GET /v1/commerce/affiliate/{affiliateid} | Get affiliate |
| commerceListAffiliates | GET /v1/commerce/affiliate | List affiliates |
commerceConnectAffiliate
kotlin.Any commerceConnectAffiliate(affiliateid)
Connect affiliate
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AffiliatesApi()
val affiliateid : kotlin.String = affiliateid_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.commerceConnectAffiliate(affiliateid)
println(result)
} catch (e: ClientException) {
println("4xx response calling AffiliatesApi#commerceConnectAffiliate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AffiliatesApi#commerceConnectAffiliate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| affiliateid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceCreateAffiliate
CommerceAffiliate commerceCreateAffiliate(commerceAffiliate)
Create affiliate
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AffiliatesApi()
val commerceAffiliate : CommerceAffiliate = // CommerceAffiliate |
try {
val result : CommerceAffiliate = apiInstance.commerceCreateAffiliate(commerceAffiliate)
println(result)
} catch (e: ClientException) {
println("4xx response calling AffiliatesApi#commerceCreateAffiliate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AffiliatesApi#commerceCreateAffiliate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceAffiliate | CommerceAffiliate |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceGetAffiliate
CommerceAffiliate commerceGetAffiliate(affiliateid)
Get affiliate
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AffiliatesApi()
val affiliateid : kotlin.String = affiliateid_example // kotlin.String |
try {
val result : CommerceAffiliate = apiInstance.commerceGetAffiliate(affiliateid)
println(result)
} catch (e: ClientException) {
println("4xx response calling AffiliatesApi#commerceGetAffiliate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AffiliatesApi#commerceGetAffiliate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| affiliateid | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceListAffiliates
CommercePaginatedAffiliates commerceListAffiliates(page, display)
List affiliates
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AffiliatesApi()
val page : kotlin.Int = 56 // kotlin.Int | Page number (1-indexed)
val display : kotlin.Int = 56 // kotlin.Int | Number of items per page
try {
val result : CommercePaginatedAffiliates = apiInstance.commerceListAffiliates(page, display)
println(result)
} catch (e: ClientException) {
println("4xx response calling AffiliatesApi#commerceListAffiliates")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AffiliatesApi#commerceListAffiliates")
e.printStackTrace()
}
Parameters
| page | kotlin.Int| Page number (1-indexed) | [optional] [default to 1] |
| Name | Type | Description | Notes |
|---|---|---|---|
| display | kotlin.Int | Number of items per page | [optional] [default to 20] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json