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]>
19 KiB
StoreApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| commerceCreateStore | POST /v1/commerce/store | Create store |
| commerceCreateStoreListing | POST /v1/commerce/store/{storeid}/listing/{key} | Create store listing |
| commerceDeleteStoreListing | DELETE /v1/commerce/store/{storeid}/listing/{key} | Delete store listing |
| commerceGetStore | GET /v1/commerce/store/{storeid} | Get store |
| commerceGetStoreListing | GET /v1/commerce/store/{storeid}/listing/{key} | Get store listing |
| commerceGetStoreProduct | GET /v1/commerce/store/{storeid}/product/{key} | Get store product |
| commerceGetStoreVariant | GET /v1/commerce/store/{storeid}/variant/{key} | Get store variant |
| commerceListStoreListings | GET /v1/commerce/store/{storeid}/listing | List store listings |
| commerceListStores | GET /v1/commerce/store | List stores |
| commercePatchStoreListing | PATCH /v1/commerce/store/{storeid}/listing/{key} | Partially update store listing |
| commerceStoreAuthorize | POST /v1/commerce/store/{storeid}/checkout/authorize | Authorize payment via store |
| commerceStoreCharge | POST /v1/commerce/store/{storeid}/checkout/charge | Charge payment via store |
| commerceUpdateStoreListing | PUT /v1/commerce/store/{storeid}/listing/{key} | Update store listing |
commerceCreateStore
CommerceStore commerceCreateStore(commerceStore)
Create store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val commerceStore : CommerceStore = // CommerceStore |
try {
val result : CommerceStore = apiInstance.commerceCreateStore(commerceStore)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceCreateStore")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceCreateStore")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceStore | CommerceStore |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceCreateStoreListing
CommerceListing commerceCreateStoreListing(storeid, key, commerceListing)
Create store listing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
val commerceListing : CommerceListing = // CommerceListing |
try {
val result : CommerceListing = apiInstance.commerceCreateStoreListing(storeid, key, commerceListing)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceCreateStoreListing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceCreateStoreListing")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | | | key | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceListing | CommerceListing |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceDeleteStoreListing
commerceDeleteStoreListing(storeid, key)
Delete store listing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
try {
apiInstance.commerceDeleteStoreListing(storeid, key)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceDeleteStoreListing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceDeleteStoreListing")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| key | kotlin.String |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceGetStore
CommerceStore commerceGetStore(storeid)
Get store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
try {
val result : CommerceStore = apiInstance.commerceGetStore(storeid)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceGetStore")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceGetStore")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| storeid | 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
commerceGetStoreListing
CommerceListing commerceGetStoreListing(storeid, key)
Get store listing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
try {
val result : CommerceListing = apiInstance.commerceGetStoreListing(storeid, key)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceGetStoreListing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceGetStoreListing")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| key | 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
commerceGetStoreProduct
CommerceProduct commerceGetStoreProduct(storeid, key)
Get store product
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
try {
val result : CommerceProduct = apiInstance.commerceGetStoreProduct(storeid, key)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceGetStoreProduct")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceGetStoreProduct")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| key | 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
commerceGetStoreVariant
CommerceVariant commerceGetStoreVariant(storeid, key)
Get store variant
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
try {
val result : CommerceVariant = apiInstance.commerceGetStoreVariant(storeid, key)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceGetStoreVariant")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceGetStoreVariant")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| key | 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
commerceListStoreListings
kotlin.collections.List<CommerceListing> commerceListStoreListings(storeid)
List store listings
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
try {
val result : kotlin.collections.List<CommerceListing> = apiInstance.commerceListStoreListings(storeid)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceListStoreListings")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceListStoreListings")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| storeid | kotlin.String |
Return type
kotlin.collections.List<CommerceListing>
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
commerceListStores
CommercePaginatedStores commerceListStores(page, display)
List stores
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
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 : CommercePaginatedStores = apiInstance.commerceListStores(page, display)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceListStores")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceListStores")
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
commercePatchStoreListing
CommerceListing commercePatchStoreListing(storeid, key, commerceListing)
Partially update store listing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
val commerceListing : CommerceListing = // CommerceListing |
try {
val result : CommerceListing = apiInstance.commercePatchStoreListing(storeid, key, commerceListing)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commercePatchStoreListing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commercePatchStoreListing")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | | | key | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceListing | CommerceListing |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceStoreAuthorize
CommerceOrder commerceStoreAuthorize(storeid, commerceCheckoutRequest)
Authorize payment via store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceStoreAuthorize(storeid, commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceStoreAuthorize")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceStoreAuthorize")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceStoreCharge
CommerceOrder commerceStoreCharge(storeid, commerceCheckoutRequest)
Charge payment via store
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val commerceCheckoutRequest : CommerceCheckoutRequest = // CommerceCheckoutRequest |
try {
val result : CommerceOrder = apiInstance.commerceStoreCharge(storeid, commerceCheckoutRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceStoreCharge")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceStoreCharge")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceCheckoutRequest | CommerceCheckoutRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
commerceUpdateStoreListing
CommerceListing commerceUpdateStoreListing(storeid, key, commerceListing)
Update store listing
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = StoreApi()
val storeid : kotlin.String = storeid_example // kotlin.String |
val key : kotlin.String = key_example // kotlin.String |
val commerceListing : CommerceListing = // CommerceListing |
try {
val result : CommerceListing = apiInstance.commerceUpdateStoreListing(storeid, key, commerceListing)
println(result)
} catch (e: ClientException) {
println("4xx response calling StoreApi#commerceUpdateStoreListing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling StoreApi#commerceUpdateStoreListing")
e.printStackTrace()
}
Parameters
| storeid | kotlin.String| | | | key | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| commerceListing | CommerceListing |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json