Loading...
Searching...
No Matches
AccelByte::Api::Item Class Reference

Item API for buying things from the online store. An item represents a single product sold in the online store. Each category has items inside it. You can get a list of items by criteria or by its ID. More...

#include <AccelByteItemApi.h>

Inheritance diagram for AccelByte::Api::Item:

Public Member Functions

 Item (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr)
 Item (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
FAccelByteTaskWPtr GetItemById (FString const &ItemId, FString const &Language, FString const &Region, THandler< FAccelByteModelsPopulatedItemInfo > const &OnSuccess, FErrorHandler const &OnError, FString const &StoreId=TEXT(""), bool bPopulateBundle=false, bool AutoCalcEstimatedPrice=false)
 Get one item information from an online store.
FAccelByteTaskWPtr GetItemByAppId (FString const &AppId, FString const &Language, FString const &Region, THandler< FAccelByteModelsItemInfo > const &OnSuccess, FErrorHandler const &OnError)
 Get one item information from an online store.
FAccelByteTaskWPtr GetItemsByCriteria (FAccelByteModelsItemCriteria const &ItemCriteria, int32 Offset, int32 Limit, THandler< FAccelByteModelsItemPagingSlicedResult > const &OnSuccess, FErrorHandler const &OnError, TArray< EAccelByteItemListSortBy > const &SortBy={}, FString const &StoreId=TEXT(""), bool AutoCalcEstimatedPrice=false)
 Get an array of items with specific criteria/filter from online store.
FAccelByteTaskWPtr SearchItem (FString const &Language, FString const &Keyword, int32 Offset, int32 Limit, FString const &Region, THandler< FAccelByteModelsItemPagingSlicedResult > const &OnSuccess, FErrorHandler const &OnError, bool AutoCalcEstimatedPrice=false)
 Search items by keyword in title, description and long description from published store. Language constrained. If item does not exist in the specified region, default region item will be returned.
FAccelByteTaskWPtr GetItemBySku (FString const &Sku, FString const &Language, FString const &Region, THandler< FAccelByteModelsItemInfo > const &OnSuccess, FErrorHandler const &OnError, bool AutoCalcEstimatedPrice=false)
 Get Item information by SKU number from an online store.
FAccelByteTaskWPtr GetItemDynamicData (FString const &ItemId, THandler< FAccelByteModelsItemDynamicData > const &OnSuccess, FErrorHandler const &OnError)
 Get Dynamic Data information from specified Item.
FAccelByteTaskWPtr BulkGetLocaleItems (const TArray< FString > &ItemIds, FString const &Region, FString const &Language, THandler< TArray< FAccelByteModelsItemInfo > > const &OnSuccess, FErrorHandler const &OnError, FString const &StoreId=TEXT(""), bool AutoCalcEstimatedPrice=false)
 Get Item information by SKU number from an online store.
FAccelByteTaskWPtr GetListAllStores (THandler< TArray< FAccelByteModelsPlatformStore > > const &OnSuccess, FErrorHandler const &OnError)
 Get list all stores in a namespace.
FAccelByteTaskWPtr GetEstimatedPrice (const TArray< FString > &ItemIds, FString const &Region, THandler< TArray< FAccelByteModelsEstimatedPrices > > const &OnSuccess, FErrorHandler const &OnError)
 Get estimated prices of item.
FAccelByteTaskWPtr GetItemMappings (EAccelBytePlatformMapping Platform, THandler< FAccelByteModelsItemMappingsResponse > const &OnSuccess, FErrorHandler const &OnError)
 Retrieve other supported platform store items mapping.
Public Member Functions inherited from AccelByte::FApiBase
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)
 FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform)
void SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient)

Additional Inherited Members

Protected Member Functions inherited from AccelByte::FApiBase
template<typename T>
bool ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError)
Protected Attributes inherited from AccelByte::FApiBase
TSharedRef< Credentials const, ESPMode::ThreadSafe > CredentialsRef
Settings const & SettingsRef
FHttpRetrySchedulerBaseHttpRef
FHttpClient HttpClient
FAccelBytePlatformPtr AccelBytePlatformPtr

Detailed Description

Item API for buying things from the online store. An item represents a single product sold in the online store. Each category has items inside it. You can get a list of items by criteria or by its ID.

Member Function Documentation

◆ BulkGetLocaleItems()

FAccelByteTaskWPtr AccelByte::Api::Item::BulkGetLocaleItems ( const TArray< FString > & ItemIds,
FString const & Region,
FString const & Language,
THandler< TArray< FAccelByteModelsItemInfo > > const & OnSuccess,
FErrorHandler const & OnError,
FString const & StoreId = TEXT(""),
bool AutoCalcEstimatedPrice = false )

Get Item information by SKU number from an online store.

Parameters
ItemIdsItemId array.
RegionISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
LanguageISO 639-1 language tag, e.g., "en, "zh".
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsItemInfo&.
OnErrorThis will be called when the operation failed.
StoreIdIf it's leaved string empty, the value will be got from published store id on the namespace.
AutoCalcEstimatedPriceThis will Auto Calculate Estimated Price. Default is false, if autoCalcEstimatedPrice is true and item is flexible bundle, will auto calc price.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetEstimatedPrice()

FAccelByteTaskWPtr AccelByte::Api::Item::GetEstimatedPrice ( const TArray< FString > & ItemIds,
FString const & Region,
THandler< TArray< FAccelByteModelsEstimatedPrices > > const & OnSuccess,
FErrorHandler const & OnError )

Get estimated prices of item.

Parameters
ItemIdsThe item's IDs to check, commas separated item ids.
RegionRegion Code, ISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
OnSuccessThis will be called when the operation succeeded. The result is TArray<FAccelByteModelsEstimatedPrices>.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemByAppId()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemByAppId ( FString const & AppId,
FString const & Language,
FString const & Region,
THandler< FAccelByteModelsItemInfo > const & OnSuccess,
FErrorHandler const & OnError )

Get one item information from an online store.

Parameters
AppIdThe App ID.
LanguageISO 639-1 language tag, e.g., "en, "zh". @param Region ISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPopulatedItemInfo&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemById()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemById ( FString const & ItemId,
FString const & Language,
FString const & Region,
THandler< FAccelByteModelsPopulatedItemInfo > const & OnSuccess,
FErrorHandler const & OnError,
FString const & StoreId = TEXT(""),
bool bPopulateBundle = false,
bool AutoCalcEstimatedPrice = false )

Get one item information from an online store.

Parameters
ItemIdThe item ID.
LanguageISO 639-1 language tag, e.g., "en, "zh". @param Region ISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsPopulatedItemInfo&.
OnErrorThis will be called when the operation failed.
StoreIdIf it's leaved string empty, the value will be got from published store id on the namespace.
bPopulateBundleWhether populate bundled items if it's a bundle, default value is false.
AutoCalcEstimatedPriceThis will Auto Calculate Estimated Price. Default is false, if autoCalcEstimatedPrice is true and item is flexible bundle, will auto calc price.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemBySku()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemBySku ( FString const & Sku,
FString const & Language,
FString const & Region,
THandler< FAccelByteModelsItemInfo > const & OnSuccess,
FErrorHandler const & OnError,
bool AutoCalcEstimatedPrice = false )

Get Item information by SKU number from an online store.

Parameters
Skushould contain specific number of item Sku.
LanguageISO 639-1 language tag, e.g., "en, "zh". @param Region ISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsItemInfo&.
OnErrorThis will be called when the operation failed.
AutoCalcEstimatedPriceThis will Auto Calculate Estimated Price. Default is false, if autoCalcEstimatedPrice is true and item is flexible bundle, will auto calc price.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemDynamicData()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemDynamicData ( FString const & ItemId,
THandler< FAccelByteModelsItemDynamicData > const & OnSuccess,
FErrorHandler const & OnError )

Get Dynamic Data information from specified Item.

Parameters
ItemIdThe Item ID.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsItemDynamicData&.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemMappings()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemMappings ( EAccelBytePlatformMapping Platform,
THandler< FAccelByteModelsItemMappingsResponse > const & OnSuccess,
FErrorHandler const & OnError )

Retrieve other supported platform store items mapping.

Parameters
PlatformThe type of the platform.
OnSuccessThis will be called when the operation succeeded.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetItemsByCriteria()

FAccelByteTaskWPtr AccelByte::Api::Item::GetItemsByCriteria ( FAccelByteModelsItemCriteria const & ItemCriteria,
int32 Offset,
int32 Limit,
THandler< FAccelByteModelsItemPagingSlicedResult > const & OnSuccess,
FErrorHandler const & OnError,
TArray< EAccelByteItemListSortBy > const & SortBy = {},
FString const & StoreId = TEXT(""),
bool AutoCalcEstimatedPrice = false )

Get an array of items with specific criteria/filter from online store.

Parameters
ItemCriteriashould be contain some parameters for query.
OffsetPage number.
LimitPage size.
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsItemPagingSlicedResult&.
OnErrorThis will be called when the operation failed.
SortByMake sure to always use more than one sort if the first sort is not an unique value for example, if you wish to sort by displayOrder, make sure to include other sort such as name or createdAt after the first sort, eg: displayOrder:asc,name:asc if it leave with empty array, it will be set to default value: name:asc,displayOrder:asc
StoreIdThe Store Id, default value is published store id. Note that It will only one available published store in each game namespace, if you assigned this with other, means you will be able to expose items on draft store. Nonetheless it will only user who has SANDBOX role (set on AP) and has permission and ability to hit this end point with other StoreId value.
AutoCalcEstimatedPriceThis will Auto Calculate Estimated Price. Default is false, if autoCalcEstimatedPrice is true and item is flexible bundle, will auto calc price.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ GetListAllStores()

FAccelByteTaskWPtr AccelByte::Api::Item::GetListAllStores ( THandler< TArray< FAccelByteModelsPlatformStore > > const & OnSuccess,
FErrorHandler const & OnError )

Get list all stores in a namespace.

Parameters
OnSuccessThis will be called when the operation succeeded. The result is array of FAccelByteModelsPlatformStore.
OnErrorThis will be called when the operation failed.
Returns
AccelByteTask object to track and cancel the ongoing API operation.

◆ SearchItem()

FAccelByteTaskWPtr AccelByte::Api::Item::SearchItem ( FString const & Language,
FString const & Keyword,
int32 Offset,
int32 Limit,
FString const & Region,
THandler< FAccelByteModelsItemPagingSlicedResult > const & OnSuccess,
FErrorHandler const & OnError,
bool AutoCalcEstimatedPrice = false )

Search items by keyword in title, description and long description from published store. Language constrained. If item does not exist in the specified region, default region item will be returned.

Parameters
LanguageISO 639-1 language tag, e.g., "en, "zh". @param Keyword Item's keyword in title or description or long description. @param Offset Offset item. @param Limit Limit item. @param Region ISO 3166-1 alpha-2 country tag, e.g., "US", "CN".
OnSuccessThis will be called when the operation succeeded. The result is const FAccelByteModelsItemPagingSlicedResult&.
OnErrorThis will be called when the operation failed.
AutoCalcEstimatedPriceThis will Auto Calculate Estimated Price. Default is false, if autoCalcEstimatedPrice is true and item is flexible bundle, will auto calc price.
Returns
AccelByteTask object to track and cancel the ongoing API operation.