game / pragma.inventory / InventoryService /

InventoryService #

class InventoryService(pragmaNode: PragmaNode, instanceId: UUID, uuidProxy: UUIDProxy = UUIDProxy(), content: InventoryServiceContent = InventoryServiceContent(), rewardsEngine: RewardsEngine = RewardsEngine(content), ledgerBuilder: LedgerBuilder = LedgerBuilder(content, uuidProxy, rewardsEngine), inventoryFilter: InventoryFilter = InventoryFilter(content), playerNotifier: PlayerNotifier = PlayerNotifier(pragmaNode), playerInventoryProxy: PlayerInventoryProxy = PlayerInventoryProxyImpl(ledgerBuilder, inventoryFilter, playerNotifier), fulfillment: Fulfillment = Fulfillment(playerInventoryProxy, LedgerOperationsFactory(content)), purchaseConstraintsFactory: PurchaseConstraintsFactory = PurchaseConstraintsFactory(content), storeEntryPurchaser: StoreEntryPurchaser = StoreEntryPurchaser(purchaseConstraintsFactory, content), purchaseCommand: StorePurchaseCommand = StorePurchaseCommand(playerInventoryProxy, storeEntryPurchaser), stores: Stores = Stores(content, playerInventoryProxy, storeEntryPurchaser), craftCommand: CraftCommand = CraftCommand(playerInventoryProxy, content, purchaseConstraintsFactory), updateCommand: UpdateCommand = UpdateCommand(playerInventoryProxy), grantRewardsCommand: GrantRewardsCommand = GrantRewardsCommand(playerInventoryProxy), matchEndCommand: InventoryMatchEndCommand = InventoryMatchEndCommand(pragmaNode, playerInventoryProxy), grantCommand: GrantCommand = GrantCommand(playerInventoryProxy), grantCommandBulk: GrantCommandBulk = GrantCommandBulk(), destroyCommand: DestroyCommand = DestroyCommand(playerInventoryProxy), limitedGrantCommand: LimitedGrantCommand = LimitedGrantCommand(content, playerInventoryProxy), loginDataCommand: LoginDataCommand = LoginDataCommand( content, playerInventoryProxy, stores, limitedGrantCommand ), applyContentCommand: ApplyContentChangesCommand = applyCommandFactory(pragmaNode), updateContentCommand: UpdateContentCommand = UpdateContentCommand(), planContentCommand: PlanContentChangesCommand = PlanContentChangesCommand(), contentVersionCountsCommand: ContentVersionCountsCommand = ContentVersionCountsCommand(), socialPaymentServiceClient: SocialPaymentServiceClient = SocialPaymentServiceClient(pragmaNode), applyInventoryOperationsCommand: ApplyInventoryOperationsCommand = ApplyInventoryOperationsCommand(playerInventoryProxy), itemBundleGrantCommand: ItemBundleGrantCommand = ItemBundleGrantCommand(fulfillment), getContentSourceCommand: GetContentSourceCommand = GetContentSourceCommand(), socialAccountServiceClient: SocialAccountServiceClient = SocialAccountServiceClient(), playerDataEntitlementFulfiller: PlayerDataEntitlementFulfiller = PlayerDataEntitlementFulfiller(), entitlementsCommand: EntitlementsCommand = EntitlementsCommand(InventoryEntitlementFulfiller(fulfillment), playerDataEntitlementFulfiller), inventoryCache: InventoryCache = InventoryCache(PragmaLoggerFactory.getILoggerFactory().getLogger("pragma.inventory.InventoryCache"))) : DistributedService, ConfigHandler<InventoryServiceConfig>

LEGACY Instead of InventoryService, see PlayerDataService .

InventoryService is responsible for interactions with Player Inventory, management of Instanced and Stackable items, reward and content grants, and store purchasing.

References

Constructors #

InventoryService

internal fun InventoryService(pragmaNode: PragmaNode, instanceId: UUID, uuidProxy: UUIDProxy = UUIDProxy(), content: InventoryServiceContent = InventoryServiceContent(), rewardsEngine: RewardsEngine = RewardsEngine(content), ledgerBuilder: LedgerBuilder = LedgerBuilder(content, uuidProxy, rewardsEngine), inventoryFilter: InventoryFilter = InventoryFilter(content), playerNotifier: PlayerNotifier = PlayerNotifier(pragmaNode), playerInventoryProxy: PlayerInventoryProxy = PlayerInventoryProxyImpl(ledgerBuilder, inventoryFilter, playerNotifier), fulfillment: Fulfillment = Fulfillment(playerInventoryProxy, LedgerOperationsFactory(content)), purchaseConstraintsFactory: PurchaseConstraintsFactory = PurchaseConstraintsFactory(content), storeEntryPurchaser: StoreEntryPurchaser = StoreEntryPurchaser(purchaseConstraintsFactory, content), purchaseCommand: StorePurchaseCommand = StorePurchaseCommand(playerInventoryProxy, storeEntryPurchaser), stores: Stores = Stores(content, playerInventoryProxy, storeEntryPurchaser), craftCommand: CraftCommand = CraftCommand(playerInventoryProxy, content, purchaseConstraintsFactory), updateCommand: UpdateCommand = UpdateCommand(playerInventoryProxy), grantRewardsCommand: GrantRewardsCommand = GrantRewardsCommand(playerInventoryProxy), matchEndCommand: InventoryMatchEndCommand = InventoryMatchEndCommand(pragmaNode, playerInventoryProxy), grantCommand: GrantCommand = GrantCommand(playerInventoryProxy), grantCommandBulk: GrantCommandBulk = GrantCommandBulk(), destroyCommand: DestroyCommand = DestroyCommand(playerInventoryProxy), limitedGrantCommand: LimitedGrantCommand = LimitedGrantCommand(content, playerInventoryProxy), loginDataCommand: LoginDataCommand = LoginDataCommand( content, playerInventoryProxy, stores, limitedGrantCommand ), applyContentCommand: ApplyContentChangesCommand = applyCommandFactory(pragmaNode), updateContentCommand: UpdateContentCommand = UpdateContentCommand(), planContentCommand: PlanContentChangesCommand = PlanContentChangesCommand(), contentVersionCountsCommand: ContentVersionCountsCommand = ContentVersionCountsCommand(), socialPaymentServiceClient: SocialPaymentServiceClient = SocialPaymentServiceClient(pragmaNode), applyInventoryOperationsCommand: ApplyInventoryOperationsCommand = ApplyInventoryOperationsCommand(playerInventoryProxy), itemBundleGrantCommand: ItemBundleGrantCommand = ItemBundleGrantCommand(fulfillment), getContentSourceCommand: GetContentSourceCommand = GetContentSourceCommand(), socialAccountServiceClient: SocialAccountServiceClient = SocialAccountServiceClient(), playerDataEntitlementFulfiller: PlayerDataEntitlementFulfiller = PlayerDataEntitlementFulfiller(), entitlementsCommand: EntitlementsCommand = EntitlementsCommand(InventoryEntitlementFulfiller(fulfillment), playerDataEntitlementFulfiller), inventoryCache: InventoryCache = InventoryCache(PragmaLoggerFactory.getILoggerFactory().getLogger("pragma.inventory.InventoryCache")))

Functions #

NameSummary

applyContentChangesV1

suspend fun applyContentChangesV1(operatorSession: OperatorSession, request: InventoryRpc.ApplyContentChangesV1Request): InventoryRpc.ApplyContentChangesV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

applyInventoryOperationsOperatorV1

suspend fun applyInventoryOperationsOperatorV1(session: OperatorSession, request: InventoryRpc.ApplyInventoryOperationsOperatorV1Request): InventoryRpc.ApplyInventoryOperationsOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

applyInventoryOperationsPartnerV1

suspend fun applyInventoryOperationsPartnerV1(partnerSession: PartnerSession, request: InventoryRpc.ApplyInventoryOperationsPartnerV1Request): InventoryRpc.ApplyInventoryOperationsPartnerV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

applyInventoryOperationsServiceV1

suspend fun applyInventoryOperationsServiceV1(partnerSession: ServiceSession, request: InventoryRpc.ApplyInventoryOperationsServiceV1Request): InventoryRpc.ApplyInventoryOperationsServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

cancelOrderV1

suspend fun cancelOrderV1(session: PlayerSession, request: InventoryRpc.CancelOrderV1Request): InventoryRpc.CancelOrderV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

clearAllInventoryCacheOperatorV1

suspend fun clearAllInventoryCacheOperatorV1(session: OperatorSession, request: InventoryRpc.ClearAllInventoryCacheOperatorV1Request): InventoryRpc.ClearAllInventoryCacheOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

clearAllInventoryCacheServiceV1

suspend fun clearAllInventoryCacheServiceV1(session: ServiceSession, request: InventoryRpc.ClearAllInventoryCacheServiceV1Request): InventoryRpc.ClearAllInventoryCacheServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

clearPlayerInventoryCacheOperatorV1

suspend fun clearPlayerInventoryCacheOperatorV1(session: OperatorSession, request: InventoryRpc.ClearPlayerInventoryCacheOperatorV1Request): InventoryRpc.ClearPlayerInventoryCacheOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

clearPlayerInventoryCachePartnerV1

suspend fun clearPlayerInventoryCachePartnerV1(session: PartnerSession, request: InventoryRpc.ClearPlayerInventoryCachePartnerV1Request): InventoryRpc.ClearPlayerInventoryCachePartnerV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

clearPlayerInventoryCacheServiceV1

suspend fun clearPlayerInventoryCacheServiceV1(session: ServiceSession, request: InventoryRpc.ClearPlayerInventoryCacheServiceV1Request): InventoryRpc.ClearPlayerInventoryCacheServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

contentVersionCountsV1

suspend fun contentVersionCountsV1(operatorSession: OperatorSession, request: InventoryRpc.ContentVersionCountsV1Request): InventoryRpc.ContentVersionCountsV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

craftV1

suspend fun craftV1(session: PlayerSession, request: InventoryRpc.CraftV1Request): InventoryRpc.CraftV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

deleteAllInventoryDbAndCacheV1

suspend fun deleteAllInventoryDbAndCacheV1(session: OperatorSession, request: InventoryRpc.DeleteAllInventoryDbAndCacheV1Request): InventoryRpc.DeleteAllInventoryDbAndCacheV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

deletePlayerInventoryOperatorV1

suspend fun deletePlayerInventoryOperatorV1(session: OperatorSession, request: InventoryRpc.DeletePlayerInventoryOperatorV1Request): InventoryRpc.DeletePlayerInventoryOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

deletePlayerInventoryPartnerV1

suspend fun deletePlayerInventoryPartnerV1(session: PartnerSession, request: InventoryRpc.DeletePlayerInventoryPartnerV1Request): InventoryRpc.DeletePlayerInventoryPartnerV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

deletePlayerInventoryServiceV1

suspend fun deletePlayerInventoryServiceV1(session: ServiceSession, request: InventoryRpc.DeletePlayerInventoryServiceV1Request): InventoryRpc.DeletePlayerInventoryServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

deletePlayerInventoryV3

suspend fun deletePlayerInventoryV3(session: PlayerSession, request: InventoryRpc.DeletePlayerInventoryV3Request): InventoryRpc.DeletePlayerInventoryV3Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

destroyItemsOperatorV1

suspend fun destroyItemsOperatorV1(session: OperatorSession, request: InventoryRpc.DestroyItemsOperatorV1Request): InventoryRpc.DestroyItemsOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

destroyItemsPartnerV2

suspend fun destroyItemsPartnerV2(session: PartnerSession, request: InventoryRpc.DestroyItemsPartnerV2Request): InventoryRpc.DestroyItemsPartnerV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

destroyItemsServiceV2

suspend fun destroyItemsServiceV2(session: ServiceSession, request: InventoryRpc.DestroyItemsServiceV2Request): InventoryRpc.DestroyItemsServiceV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

finalizeInProgressOrdersV1

suspend fun finalizeInProgressOrdersV1(session: PlayerSession, request: InventoryRpc.FinalizeInProgressOrdersV1Request): InventoryRpc.FinalizeInProgressOrdersV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

finalizeOrderV1

suspend fun finalizeOrderV1(session: PlayerSession, request: InventoryRpc.FinalizeOrderV1Request): InventoryRpc.FinalizeOrderV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getCatalogOperatorV1

suspend fun getCatalogOperatorV1(session: OperatorSession, request: InventoryRpc.GetCatalogOperatorV1Request): InventoryRpc.GetCatalogOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getContentSourceOperatorV1

suspend fun getContentSourceOperatorV1(session: OperatorSession, request: InventoryRpc.GetContentSourceOperatorV1Request): InventoryRpc.GetContentSourceOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getInventoryOperatorV1

suspend fun getInventoryOperatorV1(session: OperatorSession, request: InventoryRpc.GetInventoryOperatorV1Request): InventoryRpc.GetInventoryOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getInventoryPartnerV2

suspend fun getInventoryPartnerV2(session: PartnerSession, request: InventoryRpc.GetInventoryPartnerV2Request): InventoryRpc.GetInventoryPartnerV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getInventoryServiceV3

suspend fun getInventoryServiceV3(session: ServiceSession, request: InventoryRpc.GetInventoryServiceV3Request): InventoryRpc.GetInventoryServiceV3Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getInventoryV2

suspend fun getInventoryV2(session: PlayerSession, request: InventoryRpc.GetInventoryV2Request): InventoryRpc.GetInventoryV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getLoginDataServiceV2

suspend fun getLoginDataServiceV2(session: ServiceSession, request: InventoryRpc.GetLoginDataServiceV2Request): InventoryRpc.GetLoginDataServiceV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

getProviderEntitlementHistoryOperatorV1

suspend fun getProviderEntitlementHistoryOperatorV1(operatorSession: OperatorSession, request: InventoryRpc.GetProviderEntitlementHistoryOperatorV1Request): InventoryRpc.GetProviderEntitlementHistoryOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

getProviderEntitlementHistoryPartnerV1

suspend fun getProviderEntitlementHistoryPartnerV1(partnerSession: PartnerSession, request: InventoryRpc.GetProviderEntitlementHistoryPartnerV1Request): InventoryRpc.GetProviderEntitlementHistoryPartnerV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

getRawContentSourceOperatorV1

suspend fun getRawContentSourceOperatorV1(session: OperatorSession, request: InventoryRpc.GetRawContentSourceOperatorV1Request): InventoryRpc.GetRawContentSourceOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

grantItemsBulkOperatorV1

suspend fun grantItemsBulkOperatorV1(session: OperatorSession, request: InventoryRpc.GrantItemsBulkOperatorV1Request): InventoryRpc.GrantItemsBulkOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

grantItemsOperatorV1

suspend fun grantItemsOperatorV1(session: OperatorSession, request: InventoryRpc.GrantItemsOperatorV1Request): InventoryRpc.GrantItemsOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

grantItemsPartnerV2

suspend fun grantItemsPartnerV2(partnerSession: PartnerSession, request: InventoryRpc.GrantItemsPartnerV2Request): InventoryRpc.GrantItemsPartnerV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

grantItemsServiceV2

suspend fun grantItemsServiceV2(session: ServiceSession, request: InventoryRpc.GrantItemsServiceV2Request): InventoryRpc.GrantItemsServiceV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

initializeOrderV1

suspend fun initializeOrderV1(session: PlayerSession, request: InventoryRpc.InitializeOrderV1Request): InventoryRpc.InitializeOrderV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

matchEndV4

suspend fun matchEndV4(session: ServiceSession, request: InventoryRpc.MatchEndV4Request): InventoryRpc.MatchEndV4Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

operatorGrantRewardsV0

suspend fun operatorGrantRewardsV0(session: OperatorSession, request: InventoryRpc.OperatorGrantRewardsV0Request): InventoryRpc.OperatorGrantRewardsV0Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

planContentChangesOperatorV1

suspend fun planContentChangesOperatorV1(operatorSession: OperatorSession, request: InventoryRpc.PlanContentChangesOperatorV1Request): InventoryRpc.PlanContentChangesOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

serviceGrantRewardsV2

suspend fun serviceGrantRewardsV2(session: ServiceSession, request: InventoryRpc.ServiceGrantRewardsV2Request): InventoryRpc.ServiceGrantRewardsV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

simulateRewardsV2

suspend fun simulateRewardsV2(session: PartnerSession, request: InventoryRpc.SimulateRewardsV2Request): InventoryRpc.SimulateRewardsV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

storePurchaseV4

suspend fun storePurchaseV4(session: PlayerSession, request: InventoryRpc.StorePurchaseV4Request): InventoryRpc.StorePurchaseV4Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

syncEntitlementsOperatorV1

suspend fun syncEntitlementsOperatorV1(session: OperatorSession, request: InventoryRpc.SyncEntitlementsOperatorV1Request): InventoryRpc.SyncEntitlementsOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

syncEntitlementsPartnerV1

suspend fun syncEntitlementsPartnerV1(session: PartnerSession, request: InventoryRpc.SyncEntitlementsPartnerV1Request): InventoryRpc.SyncEntitlementsPartnerV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

syncEntitlementsServiceV1

suspend fun syncEntitlementsServiceV1(session: ServiceSession, request: InventoryRpc.SyncEntitlementsServiceV1Request): InventoryRpc.SyncEntitlementsServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

syncEntitlementsV1

suspend fun syncEntitlementsV1(session: PlayerSession, request: InventoryRpc.SyncEntitlementsV1Request): InventoryRpc.SyncEntitlementsV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see Orders and the Fulfillment services.

updateContentSourceDataV1

suspend fun updateContentSourceDataV1(session: OperatorSession, request: InventoryRpc.UpdateContentSourceDataV1Request): InventoryRpc.UpdateContentSourceDataV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateItemsOperatorV1

suspend fun updateItemsOperatorV1(session: OperatorSession, request: InventoryRpc.UpdateItemsOperatorV1Request): InventoryRpc.UpdateItemsOperatorV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateItemsPartnerV2

suspend fun updateItemsPartnerV2(session: PartnerSession, request: InventoryRpc.UpdateItemsPartnerV2Request): InventoryRpc.UpdateItemsPartnerV2Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateItemsV0

suspend fun updateItemsV0(session: PlayerSession, request: InventoryRpc.UpdateItemsV0Request): InventoryRpc.UpdateItemsV0Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateItemV4

suspend fun updateItemV4(session: PlayerSession, request: InventoryRpc.UpdateItemV4Request): InventoryRpc.UpdateItemV4Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateRawContentSourceDataServiceV1

suspend fun updateRawContentSourceDataServiceV1(session: ServiceSession, request: InventoryRpc.UpdateRawContentSourceDataServiceV1Request): InventoryRpc.UpdateRawContentSourceDataServiceV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.

updateRawContentSourceDataV1

suspend fun updateRawContentSourceDataV1(session: OperatorSession, request: InventoryRpc.UpdateRawContentSourceDataV1Request): InventoryRpc.UpdateRawContentSourceDataV1Response

LEGACY InventoryService is deprecated. Instead of InventoryService, see PlayerDataService.