> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XStoreCollectionData

> XStoreCollectionData

# XStoreCollectionData

描述用户对特定 SKU 的权益。

## 语法

```cpp theme={null}
typedef struct XStoreCollectionData {  
    time_t acquiredDate;  
    time_t startDate;  
    time_t endDate;  
    bool isTrial;  
    uint32_t trialTimeRemainingInSeconds;  
    uint32_t quantity;  
    const char* campaignId;  
    const char* developerOfferId;  
} XStoreCollectionData  
```

### 成员

*acquiredDate*\
类型：time\_t

获取权益的日期。

*startDate*\
类型：time\_t

权益的开始日期。

*endDate*\
类型：time\_t

权益结束的日期。

*isTrial*\
类型：bool

指示权益是否为试用。

*trialTimeRemainingInSeconds*\
类型：uint32\_t

试用剩余时间。

*quantity*\
类型：uint32\_t

权益中的项目数。对于消耗品，此项表示剩余余额。

*campaignId*\
类型：const char\*

权益的营销活动 ID。

*developerOfferId*\
类型：const char\*

开发人员产品/服务 ID。

## 备注

**XStoreCollectionData** 提供有关商店产品库存量单位 (SKU) 的其他信息。**XStoreCollectionData** 可能引用多种类型的产品或产品集合。因此，如果字段不适用于 SKU，则并非所有字段都具有值。**XStoreCollectionData** 是 [StoreSku](https://docs.xbox.com/zh-CN/reference/system/xstore/structs/xstoresku.md) 结构的成员。

## 要求

**头文件：** XStore.h（包含在 XGameRuntime.h 中）

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 概念文档

* [商店开发权益工具 (DevEntitlementTool.exe)](https://docs.xbox.com/zh-CN/tools/tools-services/live-dev-entitlements-tool.md)

## 另请参阅

[XStore](https://docs.xbox.com/zh-CN/reference/system/xstore/xstore_members.md)\
[XStoreSku](https://docs.xbox.com/zh-CN/reference/system/xstore/structs/xstoresku.md)


## Related topics

- [Store 开发权利工具 (DevEntitlementTool.exe)](https://docs.xbox.com/zh-CN/tools/tools-services/live-dev-entitlements-tool.md)
- [XStoreSku](https://docs.xbox.com/zh-CN/reference/system/xstore/structs/xstoresku.md)
- [XStore（API 内容）](https://docs.xbox.com/zh-CN/reference/system/xstore/xstore_members.md)
- [collections.mp.microsoft.com/v9.0/collections/publisherQuery](https://docs.xbox.com/zh-CN/reference/microsoft-store-apis/xstore-v9-query-for-products.md)
- [Consume Microsoft Store Entitlements](https://docs.xbox.com/api-reference/platform-specific-methods/consume-microsoft-store-entitlements.md)
