listPurchaseOptions

Returns the purchase options (offers and offer sets) available to the buyer. You can filter results by product, seller, purchase option type, visibility scope, and availability status.

You must include at least one of the following filters in the request: a PRODUCT_ID filter to specify the product for which to retrieve purchase options, or a VISIBILITY_SCOPE filter to retrieve purchase options by visibility.

Samples

import aws.sdk.kotlin.services.marketplacediscovery.model.PurchaseOptionFilter
import aws.sdk.kotlin.services.marketplacediscovery.model.PurchaseOptionFilterType

fun main() { 
   //sampleStart 
   // Filter by Product ID
val resp = marketplaceDiscoveryClient.listPurchaseOptions {
    filters = listOf<PurchaseOptionFilter>(
        PurchaseOptionFilter {
            filterType = PurchaseOptionFilterType.fromValue("PRODUCT_ID")
            filterValues = listOf<String>(
                "prod-sampleOfferId"
            )
        }            
    )
} 
   //sampleEnd
}
import aws.sdk.kotlin.services.marketplacediscovery.model.PurchaseOptionFilter
import aws.sdk.kotlin.services.marketplacediscovery.model.PurchaseOptionFilterType

fun main() { 
   //sampleStart 
   // Filter by Seller with Private Offerset
val resp = marketplaceDiscoveryClient.listPurchaseOptions {
    filters = listOf<PurchaseOptionFilter>(
        PurchaseOptionFilter {
            filterType = PurchaseOptionFilterType.fromValue("SELLER_OF_RECORD_PROFILE_ID")
            filterValues = listOf<String>(
                "seller-sampleResellerId"
            )
        },
        PurchaseOptionFilter {
            filterType = PurchaseOptionFilterType.fromValue("PURCHASE_OPTION_TYPE")
            filterValues = listOf<String>(
                "OFFERSET"
            )
        },
        PurchaseOptionFilter {
            filterType = PurchaseOptionFilterType.fromValue("VISIBILITY_SCOPE")
            filterValues = listOf<String>(
                "PRIVATE"
            )
        }            
    )
} 
   //sampleEnd
}