AssetStoreOrders
public static class AssetStoreOrdersLocal, account-scoped order queries. No method in this facade starts a network request.
Methods
Section titled “Methods”
GetEditorAccountId()
Section titled “GetEditorAccountId()”public static string GetEditorAccountId()Returns the Unity Editor's current signed-in user ID without starting an authentication request.
Returns
System.String
GetAccountId()
Section titled “GetAccountId()”public static string GetAccountId()Returns the stored account selection, otherwise preferring the Editor account's cached data or the first known account.
Returns
System.String
SetAccountId(string)
Section titled “SetAccountId(string)”public static void SetAccountId(string accountId)Stores a nonempty account identifier of at most 64 characters as the default for order queries and notifies listeners.
Parameters
| Name | Type |
|---|---|
accountId |
System.String |
GetAccounts()
Section titled “GetAccounts()”public static List<OrderAccountInfo> GetAccounts()Returns known cached accounts with order-detail coverage and last successful refresh times, sorted by name.
Returns
System.Collections.Generic.List{AssetInventory.OrderAccountInfo}
List(OrderQuery)
Section titled “List(OrderQuery)”public static List<AssetStoreOrder> List(OrderQuery query = null)Returns a page of matching cached orders for the requested or selected account, newest first.
Parameters
| Name | Type |
|---|---|
query |
AssetInventory.OrderQuery |
Returns
System.Collections.Generic.List{AssetInventory.AssetStoreOrder}
Count(OrderQuery)
Section titled “Count(OrderQuery)”public static int Count(OrderQuery query = null)Counts matching cached orders for the requested or selected account without applying pagination.
Parameters
| Name | Type |
|---|---|
query |
AssetInventory.OrderQuery |
Returns
System.Int32
Get(int, string)
Section titled “Get(int, string)”public static AssetStoreOrder Get(int orderRowId, string accountId = null)Finds a cached order by its local row ID within the requested or selected account, returning null when absent.
Parameters
| Name | Type |
|---|---|
orderRowId |
System.Int32 |
accountId |
System.String |
Returns
AssetInventory.AssetStoreOrder
GetByOrderId(string, string)
Section titled “GetByOrderId(string, string)”public static AssetStoreOrder GetByOrderId(string accountId, string orderId)Finds a cached order by its Store order ID within the requested or selected account, returning null when absent.
Parameters
| Name | Type |
|---|---|
accountId |
System.String |
orderId |
System.String |
Returns
AssetInventory.AssetStoreOrder
GetItems(int)
Section titled “GetItems(int)”public static List<AssetStoreOrderItem> GetItems(int orderRowId)Returns the cached line items for a local order row in ascending line-row order.
Parameters
| Name | Type |
|---|---|
orderRowId |
System.Int32 |
Returns
System.Collections.Generic.List{AssetInventory.AssetStoreOrderItem}
GetItems(IEnumerable)
Section titled “GetItems(IEnumerable)”public static Dictionary<int, List<AssetStoreOrderItem>> GetItems(IEnumerable<int> orderRowIds)Returns cached line items grouped by local order row ID, omitting orders with no cached items.
Parameters
| Name | Type |
|---|---|
orderRowIds |
System.Collections.Generic.IEnumerable{System.Int32} |
Returns
System.Collections.Generic.Dictionary{System.Int32,System.Collections.Generic.List{AssetInventory.AssetStoreOrderItem}}
GetPackagePurchases(AssetInfo, string)
Section titled “GetPackagePurchases(AssetInfo, string)”public static List<PackageOrderInfo> GetPackagePurchases(AssetInfo package, string accountId = null)Returns all cached acquisition and order pairs matching the package's Store product identity in the requested or selected account.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.AssetInfo |
accountId |
System.String |
Returns
System.Collections.Generic.List{AssetInventory.PackageOrderInfo}
GetPackagePurchases(IEnumerable, string)
Section titled “GetPackagePurchases(IEnumerable, string)”public static Dictionary<int, List<PackageOrderInfo>> GetPackagePurchases(IEnumerable<AssetInfo> packages, string accountId = null)Groups matching cached acquisitions by catalog package ID, retaining empty lists for packages with no recorded match.
Parameters
| Name | Type |
|---|---|
packages |
System.Collections.Generic.IEnumerable{AssetInventory.AssetInfo} |
accountId |
System.String |
Returns
System.Collections.Generic.Dictionary{System.Int32,System.Collections.Generic.List{AssetInventory.PackageOrderInfo}}
GetLatestPurchase(IEnumerable)
Section titled “GetLatestPurchase(IEnumerable)”public static PackageOrderInfo GetLatestPurchase(IEnumerable<PackageOrderInfo> purchases)Returns the newest completed, nontentative acquisition with a positive quantity, or null when none qualify.
Parameters
| Name | Type |
|---|---|
purchases |
System.Collections.Generic.IEnumerable{AssetInventory.PackageOrderInfo} |
Returns
AssetInventory.PackageOrderInfo
TryAmount(string, out decimal)
Section titled “TryAmount(string, out decimal)”public static bool TryAmount(string raw, out decimal amount)Parses a signed invariant decimal amount without currency symbols or thousands separators.
Parameters
| Name | Type |
|---|---|
raw |
System.String |
amount |
System.Decimal |
Returns
System.Boolean
FormatAmount(string, string)
Section titled “FormatAmount(string, string)”public static string FormatAmount(string raw, string currency)Formats an invariant decimal and currency code, or returns "Unavailable" for an invalid source amount.
Parameters
| Name | Type |
|---|---|
raw |
System.String |
currency |
System.String |
Returns
System.String
GetAmountBasis(AssetStoreOrder, IEnumerable)
Section titled “GetAmountBasis(AssetStoreOrder, IEnumerable)”public static string GetAmountBasis(AssetStoreOrder order, IEnumerable<AssetStoreOrderItem> items)Describes the reported tax basis when complete order details and monetary totals establish it, otherwise reporting unavailable evidence.
Parameters
| Name | Type |
|---|---|
order |
AssetInventory.AssetStoreOrder |
items |
System.Collections.Generic.IEnumerable{AssetInventory.AssetStoreOrderItem} |
Returns
System.String
Properties
Section titled “Properties”
Revision
Section titled “Revision”public static int Revision { get; }Returns
System.Int32
Events
Section titled “Events”
Changed
Section titled “Changed”public static event Action ChangedRaised when cached order data or the selected account changes.
Returns
System.Action