Package classes
Class Preferabli
- java.lang.Object
-
- classes.Preferabli
-
public class Preferabli extends java.lang.ObjectThis is the primary class you will utilize to access the Preferabli Data SDK.
-
-
Field Summary
Fields Modifier and Type Field Description static longCHANNEL_IDThe channel id of your integration.static longINTEGRATION_IDThe id of your integration.static longPRIMARY_INVENTORY_IDThe primary inventory id of your integration.
-
Constructor Summary
Constructors Constructor Description Preferabli()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteTag(long tag_id, API_ResultHandler<Object_Product> handler)Delete the specifiedObject_Tag.voideditTag(long tag_id, Object_Tag.Other_TagType tag_type, int year, Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Edit an existingObject_Tag.voidforgotPassword(java.lang.String email, API_ResultHandler<java.lang.Boolean> handler)Resets the password of an existing Preferabli user.voidgetCustomer(java.lang.Boolean force_refresh, API_ResultHandler<Object_Customer> handler)Get the current logged inObject_Customer.voidgetFoods(API_ResultHandler<java.util.ArrayList<Object_Food>> handler)Get a list of foods to choose from to be used ingetRecs(Object_Product.Other_ProductCategory, Object_Product.Other_ProductType, Long, Integer, Integer, ArrayList, ArrayList, Boolean, API_ResultHandler).voidgetGuidedRec(long guided_rec_id, API_ResultHandler<Object_GuidedRec> handler)Get all the questions and choices needed to run a Guided Rec.voidgetGuidedRecResults(long guided_rec_id, java.util.ArrayList<java.lang.Long> selected_choice_ids, java.lang.Integer price_min, java.lang.Integer price_max, java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get Guided Rec results based on the selectedObject_GuidedRec.Object_GuidedRecChoice.voidgetPreferabliProductId(java.lang.String merchant_product_id, java.lang.String merchant_variant_id, API_ResultHandler<java.lang.Long> handler)Call this to convert your merchant product / variant id to the Preferabli product id for use with our functions.voidgetPreferabliScore(long product_id, java.lang.Integer year, API_ResultHandler<Object_PreferenceData> handler)Get a customer's preference data for a givenObject_Product.voidgetProfile(java.lang.Boolean force_refresh, API_ResultHandler<Object_Profile> handler)Get the Preference Profile of the customer.voidgetPurchasedProducts(java.lang.Boolean force_refresh, java.lang.Boolean lock_to_integration, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get purchased products.voidgetRatedProducts(java.lang.Boolean force_refresh, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get rated products.voidgetRecs(Object_Product.Other_ProductCategory product_category, Object_Product.Other_ProductType product_type, java.lang.Long collection_id, java.lang.Integer price_min, java.lang.Integer price_max, java.util.ArrayList<java.lang.Long> style_ids, java.util.ArrayList<java.lang.Long> food_ids, java.lang.Boolean include_merchant_links, API_ResultHandler<Object_Recommendation> handler)Get a personalized, preference based recommendation for a customer.static intgetVersionCode()Get the version code of the SDK.voidgetWishlistedProducts(java.lang.Boolean force_refresh, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get wishlisted products.static voidinitialize(android.app.Application application, java.lang.String client_interface, java.lang.Long integration_id)Call this in your Application onCreate with your supplied information.static voidinitialize(android.app.Application application, java.lang.String client_interface, java.lang.Long integration_id, java.lang.Boolean logging_enabled)Call this in your Application onCreate with your supplied information.static booleanisCustomerLoggedIn()Will let you know if a customer is logged in or not.static booleanisLoggingEnabled()Is logging enabled for the SDK?static booleanisPreferabliUserLoggedIn()Will let you know if a user is logged in or not.voidlabelRecognition(java.io.File label_file, java.lang.Boolean include_merchant_links, API_ResultHandler<Object_LabelRecResults> handler)Performs label recognition on a supplied image.voidloginCustomer(java.lang.String merchant_customer_identification, java.lang.String merchant_customer_verification, API_ResultHandler<Object_Customer> handler)Link an existing customer or create a new one if they are not in our system.voidloginPreferabliUser(java.lang.String email, java.lang.String password, API_ResultHandler<Object_PreferabliUser> handler)Login an existing Preferabli user.voidlogout(API_ResultHandler<java.lang.Boolean> handler)Logout a customer.voidlttt(long product_id, java.lang.Integer year, java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get a Like This, Try That recommendation.static Preferablimain()Get and use this instance to make Preferabli API calls.voidrateProduct(long product_id, int year, Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Rate aObject_Product.voidsearchProducts(java.lang.String query, java.lang.Boolean lock_to_integration, java.util.ArrayList<Object_Product.Other_ProductCategory> product_categories, java.util.ArrayList<Object_Product.Other_ProductType> product_types, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Search for aObject_Product.voidwhereToBuy(long product_id, Other_FulfillSort fulfill_sort, java.lang.Boolean append_nonconforming_results, java.lang.Boolean lock_to_integration, API_ResultHandler<Object_WhereToBuy> handler)Get help finding out where aObject_Productis in stock.voidwishlistProduct(long product_id, int year, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Wishlist aObject_Product.
-
-
-
Method Detail
-
main
public static Preferabli main()
Get and use this instance to make Preferabli API calls.- Returns:
- an instance of
Preferabli
-
initialize
public static void initialize(android.app.Application application, java.lang.String client_interface, java.lang.Long integration_id)Call this in your Application onCreate with your supplied information. Contact us if you do not have your client_interface and/or integration_id.- Parameters:
application- pass an instance of your application context.client_interface- your unique identifier - provided by Preferabli.integration_id- your integration id - provided by Preferabli. You may have more than one integration for different segments of your business (depending on how your account is set up)
-
initialize
public static void initialize(android.app.Application application, java.lang.String client_interface, java.lang.Long integration_id, java.lang.Boolean logging_enabled)Call this in your Application onCreate with your supplied information. Contact us if you do not have your client_interface and/or integration_id.- Parameters:
application- pass an instance of your application context.client_interface- your unique identifier - provided by Preferabli.integration_id- your integration id - provided by Preferabli. You may have more than one integration for different segments of your business (depending on how your account is set up).logging_enabled- pass true for full logging. Defaults to false.
-
isPreferabliUserLoggedIn
public static boolean isPreferabliUserLoggedIn()
Will let you know if a user is logged in or not.- Returns:
- bool.
-
isCustomerLoggedIn
public static boolean isCustomerLoggedIn()
Will let you know if a customer is logged in or not.- Returns:
- bool.
-
loginPreferabliUser
public void loginPreferabliUser(java.lang.String email, java.lang.String password, API_ResultHandler<Object_PreferabliUser> handler)Login an existing Preferabli user. Most SDK installations will never use this.- Parameters:
email- user's email address.password- user's password.handler- returnsObject_PreferabliUserif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
loginCustomer
public void loginCustomer(java.lang.String merchant_customer_identification, java.lang.String merchant_customer_verification, API_ResultHandler<Object_Customer> handler)Link an existing customer or create a new one if they are not in our system.- Parameters:
merchant_customer_identification- unique identifier for your customer. Usually an email address or a phone number.merchant_customer_verification- authentication key given to you by your API.handler- returnsObject_Customerif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
logout
public void logout(API_ResultHandler<java.lang.Boolean> handler)
Logout a customer.- Parameters:
handler- returns true if the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
forgotPassword
public void forgotPassword(java.lang.String email, API_ResultHandler<java.lang.Boolean> handler)Resets the password of an existing Preferabli user. Most SDK installations will never use this.- Parameters:
email- user's email address.handler- returns true if the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
searchProducts
public void searchProducts(java.lang.String query, java.lang.Boolean lock_to_integration, java.util.ArrayList<Object_Product.Other_ProductCategory> product_categories, java.util.ArrayList<Object_Product.Other_ProductType> product_types, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Search for aObject_Product.- Parameters:
query- your search query.lock_to_integration- pass true if you only want to draw results from your integration. Defaults to true.product_categories- pass anyObject_Product.Other_ProductCategorythat you would like the results to conform to. Pass null for all results.product_types- pass anyObject_Product.Other_ProductTypethat you would like the results to conform to. Pass null for all results.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
labelRecognition
public void labelRecognition(java.io.File label_file, java.lang.Boolean include_merchant_links, API_ResultHandler<Object_LabelRecResults> handler)Performs label recognition on a supplied image. Returns anyObject_Productmatches.- Parameters:
label_file- label image you want to search for.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returnsObject_LabelRecResultsif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getGuidedRec
public void getGuidedRec(long guided_rec_id, API_ResultHandler<Object_GuidedRec> handler)Get all the questions and choices needed to run a Guided Rec. Present the questions to the user, then pass the answers togetGuidedRecResults(long, ArrayList, Integer, Integer, Long, Boolean, API_ResultHandler).- Parameters:
guided_rec_id- id of the Guided Rec you wish to run. SeeObject_GuidedRecfor all the default Guided Rec options.handler- returnsObject_GuidedRecif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getGuidedRecResults
public void getGuidedRecResults(long guided_rec_id, java.util.ArrayList<java.lang.Long> selected_choice_ids, java.lang.Integer price_min, java.lang.Integer price_max, java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get Guided Rec results based on the selectedObject_GuidedRec.Object_GuidedRecChoice.- Parameters:
guided_rec_id- id of the Guided Rec you wish to run.selected_choice_ids- an array of selectedObject_GuidedRec.Object_GuidedRecChoiceids.price_min- pass if you want to lock results to a minimum price. Pass null to ignore.price_max- pass if you want to lock results to a maximum price. Pass null to ignore.collection_id- the id of a specificObject_Collectionthat you want to draw results from. PassPRIMARY_INVENTORY_IDfor results from your primary inventory. Pass null for results from anywhere.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
whereToBuy
public void whereToBuy(long product_id, Other_FulfillSort fulfill_sort, java.lang.Boolean append_nonconforming_results, java.lang.Boolean lock_to_integration, API_ResultHandler<Object_WhereToBuy> handler)Get help finding out where aObject_Productis in stock.- Parameters:
product_id- id of the startingObject_Product. Only pass a Preferabli product id. If necessary, callgetPreferabliProductId(String, String, API_ResultHandler)to convert your product id into a Preferabli product id.fulfill_sort- passOther_FulfillSortfor sorting & filtering options. If sorting by distance,Object_LocationMUST be present!append_nonconforming_results- pass true if you want results that DO NOT conform to all filtering & sorting parameters to be returned. Useful so that something is returned even if the user's filter parameters are too narrow. All results that do not conform contain nonconforming_result = true within. Defaults to true.lock_to_integration- pass true if you only want to draw results from your integration. Defaults to true.handler- returnsObject_WhereToBuyif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
lttt
public void lttt(long product_id, java.lang.Integer year, java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get a Like This, Try That recommendation. Start with aObject_Product, get similar tasting results. This function will return personalized results if a user is logged in.- Parameters:
product_id- id of the startingObject_Product. Only pass a Preferabli product id. If necessary, callgetPreferabliProductId(String, String, API_ResultHandler)to convert your product id into a Preferabli product id.year- year of theObject_Variantthat you want to get results on. Defaults toObject_Variant.CURRENT_VARIANT_YEAR.collection_id- the id of a specificObject_Collectionthat you want to draw results from. Defaults toPRIMARY_INVENTORY_ID.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getPreferabliScore
public void getPreferabliScore(long product_id, java.lang.Integer year, API_ResultHandler<Object_PreferenceData> handler)Get a customer's preference data for a givenObject_Product.- Parameters:
product_id- id of the startingObject_Product. Only pass a Preferabli product id. If necessary, callgetPreferabliProductId(String, String, API_ResultHandler)to convert your product id into a Preferabli product id.year- year of theObject_Variantthat you want to get results on. Defaults toObject_Variant.CURRENT_VARIANT_YEAR.handler- returnsObject_PreferenceDataif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getProfile
public void getProfile(java.lang.Boolean force_refresh, API_ResultHandler<Object_Profile> handler)Get the Preference Profile of the customer. Customer must be logged in to run this call.- Parameters:
force_refresh- pass true if you want to force a refresh from the API and wait for the results to return. Otherwise, the call will load locally if available and run a background refresh only if one has not been initiated in the past 5 minutes. Defaults to false.handler- returnsObject_Profileif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getRatedProducts
public void getRatedProducts(java.lang.Boolean force_refresh, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get rated products. Customer must be logged in to run this call.- Parameters:
force_refresh- pass true if you want to force a refresh from the API and wait for the results to return. Otherwise, the call will load locally if available and run a background refresh only if one has not been initiated in the past 5 minutes. Defaults to false.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getWishlistedProducts
public void getWishlistedProducts(java.lang.Boolean force_refresh, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get wishlisted products. Customer / Preferabli user must be logged in to run this call.- Parameters:
force_refresh- pass true if you want to force a refresh from the API and wait for the results to return. Otherwise, the call will load locally if available and run a background refresh only if one has not been initiated in the past 5 minutes. Defaults to false.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getPurchasedProducts
public void getPurchasedProducts(java.lang.Boolean force_refresh, java.lang.Boolean lock_to_integration, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)Get purchased products. Customer must be logged in to run this call.- Parameters:
force_refresh- pass true if you want to force a refresh from the API and wait for the results to return. Otherwise, the call will load locally if available and run a background refresh only if one has not been initiated in the past 5 minutes. Defaults to false.lock_to_integration- pass true if you only want to draw results from your integration. Defaults to true.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returns an array ofObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getCustomer
public void getCustomer(java.lang.Boolean force_refresh, API_ResultHandler<Object_Customer> handler)Get the current logged inObject_Customer.- Parameters:
force_refresh- pass true if you want to force a refresh from the API and wait for the results to return. Otherwise, the call will load locally if available and run a background refresh only if one has not been initiated in the past 5 minutes. Defaults to false.handler- returnsObject_Customerif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getPreferabliProductId
public void getPreferabliProductId(java.lang.String merchant_product_id, java.lang.String merchant_variant_id, API_ResultHandler<java.lang.Long> handler)Call this to convert your merchant product / variant id to the Preferabli product id for use with our functions.- Parameters:
merchant_product_id- the id of your product (as it appears in your system). Either this or merchant_variant_id is required.merchant_variant_id- the id of your product variant (as it appears in your system). Used only if you have a hierarchical database format for your products.handler- returns product id as a long if the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
rateProduct
public void rateProduct(long product_id, int year, Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Rate aObject_Product. Creates aObject_Tagof typeObject_Tag.Other_TagType.RATINGwhich is returned within the relevant productObject_Variant. Customer must be logged in to run this call.- Parameters:
product_id- id of the startingObject_Product. Only pass a Preferabli product id. If necessary, callgetPreferabliProductId(String, String, API_ResultHandler)to convert your product id into a Preferabli product id.year- year of theObject_Variantthat you want to rate. Can useObject_Variant.CURRENT_VARIANT_YEARif you want to rate the latest variant, orObject_Variant.NON_VARIANTif the product is not vintaged.rating- pass one ofObject_Tag.Other_RatingLevel.LOVE,Object_Tag.Other_RatingLevel.LIKE,Object_Tag.Other_RatingLevel.SOSO,Object_Tag.Other_RatingLevel.DISLIKE.location- location where the rating occurred. Defaults to null.notes- any notes to go along with the rating. Defaults to null.price- price of the product rated. Defaults to null.quantity- quantity purchased of the product rated. Defaults to null.format_ml- size of the product rated. Defaults to null.handler- returnsObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
wishlistProduct
public void wishlistProduct(long product_id, int year, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Wishlist aObject_Product. Creates aObject_Tagof typeObject_Tag.Other_TagType.WISHLISTwhich is returned within the relevant productObject_Variant. Customer must be logged in to run this call.- Parameters:
product_id- id of the startingObject_Product. Only pass a Preferabli product id. If necessary, callgetPreferabliProductId(String, String, API_ResultHandler)to convert your product id into a Preferabli product id.year- year of theObject_Variantthat you want to wishlist. Can useObject_Variant.CURRENT_VARIANT_YEARif you want to wishlist the latest variant, orObject_Variant.NON_VARIANTif the product is not vintaged.location- location where the wishlisted item exists. Defaults to null.notes- any notes to go along with the wishlisting. Defaults to null.price- price of the product wishlisted. Defaults to null.quantity- quantity desired of the product wishlisted. Defaults to null.format_ml- size of the product wishlisted. Defaults to null.handler- returnsObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
editTag
public void editTag(long tag_id, Object_Tag.Other_TagType tag_type, int year, Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)Edit an existingObject_Tag.- Parameters:
tag_id- id of theObject_Tagthat needs to be edited.tag_type- type of theObject_Tagyou wish to edit. This value is not editable. Can be eitherObject_Tag.Other_TagType.RATING,Object_Tag.Other_TagType.CELLAR,Object_Tag.Other_TagType.PURCHASE, orObject_Tag.Other_TagType.WISHLIST.year- year of theObject_Variant. Can useObject_Variant.CURRENT_VARIANT_YEARif you want the latest variant, orObject_Variant.NON_VARIANTif the product is not vintaged.rating- pass one ofObject_Tag.Other_RatingLevel.LOVE,Object_Tag.Other_RatingLevel.LIKE,Object_Tag.Other_RatingLevel.SOSO,Object_Tag.Other_RatingLevel.DISLIKE. PassObject_Tag.Other_RatingLevel.NONEis not a rating. Defaults toObject_Tag.Other_RatingLevel.NONE.location- location of the tag. Defaults to null.notes- any notes to go along with the tag. Defaults to null.price- price of the product tagged. Defaults to null.quantity- quantity purchased of the product tagged. Defaults to null.format_ml- size of the product tagged in milliliters. Defaults to null.handler- returnsObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
deleteTag
public void deleteTag(long tag_id, API_ResultHandler<Object_Product> handler)Delete the specifiedObject_Tag.- Parameters:
tag_id- id of theObject_Tagyou want to delete.handler- returnsObject_Productif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getRecs
public void getRecs(Object_Product.Other_ProductCategory product_category, Object_Product.Other_ProductType product_type, java.lang.Long collection_id, java.lang.Integer price_min, java.lang.Integer price_max, java.util.ArrayList<java.lang.Long> style_ids, java.util.ArrayList<java.lang.Long> food_ids, java.lang.Boolean include_merchant_links, API_ResultHandler<Object_Recommendation> handler)
Get a personalized, preference based recommendation for a customer.- Parameters:
product_category- pass aObject_Product.Other_ProductCategorythat you would like the results to conform to.product_type- pass aObject_Product.Other_ProductTypethat you would like the results to conform to. PassObject_Product.Other_ProductType.OTHERifObject_Product.Other_ProductCategoryis not set toObject_Product.Other_ProductCategory.WINE. IfObject_Product.Other_ProductCategory.WINEis passed, a type of wine must be passed here.collection_id- the id of a specificObject_Collectionthat you want to draw results from. PassPRIMARY_INVENTORY_IDfor results from your primary collection. Pass null for results from anywhere.price_min- pass if you want to lock results to a minimum price. Defaults to null.price_max- pass if you want to lock results to a maximum price. Defaults to null.style_ids- an array ofObject_Styleids that you want to constrain results to. Get available styles fromgetProfile(Boolean, API_ResultHandler). Defaults to null.food_ids- an array ofObject_Foodids that should pair with the recommendation. Get available foods fromgetFoods(API_ResultHandler). Defaults to null.include_merchant_links- pass true if you want the results to include an array ofObject_MerchantProductLinkembedded inObject_Variant. These connect Preferabli products to your own. Passing true requires additional resources and therefore will take longer. Defaults to true.handler- returnsObject_Recommendationif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
getFoods
public void getFoods(API_ResultHandler<java.util.ArrayList<Object_Food>> handler)
Get a list of foods to choose from to be used ingetRecs(Object_Product.Other_ProductCategory, Object_Product.Other_ProductType, Long, Integer, Integer, ArrayList, ArrayList, Boolean, API_ResultHandler).- Parameters:
handler- returns an array ofObject_Foodif the call was successful. ReturnsAPI_PreferabliExceptionif the call fails.
-
isLoggingEnabled
public static boolean isLoggingEnabled()
Is logging enabled for the SDK?- Returns:
- true if logging is enabled.
-
getVersionCode
public static int getVersionCode()
Get the version code of the SDK.- Returns:
- the version code as an int.
-
-