// Copyright Epic Games, Inc. All Rights Reserved. // This file is automatically generated. Changes to this file may be overwritten. namespace Epic.OnlineServices.Ecom { /// /// Contains information about a single offer within the catalog. Instances of this structure are /// created by . They must be passed to . /// Prices are stored in the lowest denomination for the associated currency. If CurrencyCode is /// "USD" then a price of 299 represents "$2.99". /// public class CatalogOffer : ISettable { /// /// The index of this offer as it exists on the server. /// This is useful for understanding pagination data. /// public int ServerIndex { get; set; } /// /// Product namespace in which this offer exists /// public string CatalogNamespace { get; set; } /// /// The ID of this offer /// public string Id { get; set; } /// /// Localized UTF-8 title of this offer /// public string TitleText { get; set; } /// /// Localized UTF-8 description of this offer /// public string DescriptionText { get; set; } /// /// Localized UTF-8 long description of this offer /// public string LongDescriptionText { get; set; } /// /// Deprecated. /// ::TechnicalDetailsText has been deprecated. /// ::TechnicalDetailsText is still valid. /// public string TechnicalDetailsText_DEPRECATED { get; set; } /// /// The Currency Code for this offer /// public string CurrencyCode { get; set; } /// /// If this value is then OriginalPrice, CurrentPrice, and DiscountPercentage contain valid data. /// Otherwise this value represents the error that occurred on the price query. /// public Result PriceResult { get; set; } /// /// The original price of this offer as a 32-bit number is deprecated. /// public uint OriginalPrice_DEPRECATED { get; set; } /// /// The current price including discounts of this offer as a 32-bit number is deprecated.. /// public uint CurrentPrice_DEPRECATED { get; set; } /// /// A value from 0 to 100 define the percentage of the OrignalPrice that the CurrentPrice represents /// public byte DiscountPercentage { get; set; } /// /// Contains the POSIX timestamp that the offer expires or -1 if it does not expire /// public long ExpirationTimestamp { get; set; } /// /// The number of times that the requesting account has purchased this offer. /// public uint PurchasedCount { get; set; } /// /// The maximum number of times that the offer can be purchased. /// A negative value implies there is no limit. /// public int PurchaseLimit { get; set; } /// /// True if the user can purchase this offer. /// public bool AvailableForPurchase { get; set; } /// /// The original price of this offer as a 64-bit number. /// public ulong OriginalPrice64 { get; set; } /// /// The current price including discounts of this offer as a 64-bit number. /// public ulong CurrentPrice64 { get; set; } internal void Set(CatalogOfferInternal? other) { if (other != null) { ServerIndex = other.Value.ServerIndex; CatalogNamespace = other.Value.CatalogNamespace; Id = other.Value.Id; TitleText = other.Value.TitleText; DescriptionText = other.Value.DescriptionText; LongDescriptionText = other.Value.LongDescriptionText; TechnicalDetailsText_DEPRECATED = other.Value.TechnicalDetailsText_DEPRECATED; CurrencyCode = other.Value.CurrencyCode; PriceResult = other.Value.PriceResult; OriginalPrice_DEPRECATED = other.Value.OriginalPrice_DEPRECATED; CurrentPrice_DEPRECATED = other.Value.CurrentPrice_DEPRECATED; DiscountPercentage = other.Value.DiscountPercentage; ExpirationTimestamp = other.Value.ExpirationTimestamp; PurchasedCount = other.Value.PurchasedCount; PurchaseLimit = other.Value.PurchaseLimit; AvailableForPurchase = other.Value.AvailableForPurchase; OriginalPrice64 = other.Value.OriginalPrice64; CurrentPrice64 = other.Value.CurrentPrice64; } } public void Set(object other) { Set(other as CatalogOfferInternal?); } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct CatalogOfferInternal : ISettable, System.IDisposable { private int m_ApiVersion; private int m_ServerIndex; private System.IntPtr m_CatalogNamespace; private System.IntPtr m_Id; private System.IntPtr m_TitleText; private System.IntPtr m_DescriptionText; private System.IntPtr m_LongDescriptionText; private System.IntPtr m_TechnicalDetailsText_DEPRECATED; private System.IntPtr m_CurrencyCode; private Result m_PriceResult; private uint m_OriginalPrice_DEPRECATED; private uint m_CurrentPrice_DEPRECATED; private byte m_DiscountPercentage; private long m_ExpirationTimestamp; private uint m_PurchasedCount; private int m_PurchaseLimit; private int m_AvailableForPurchase; private ulong m_OriginalPrice64; private ulong m_CurrentPrice64; public int ServerIndex { get { return m_ServerIndex; } set { m_ServerIndex = value; } } public string CatalogNamespace { get { string value; Helper.TryMarshalGet(m_CatalogNamespace, out value); return value; } set { Helper.TryMarshalSet(ref m_CatalogNamespace, value); } } public string Id { get { string value; Helper.TryMarshalGet(m_Id, out value); return value; } set { Helper.TryMarshalSet(ref m_Id, value); } } public string TitleText { get { string value; Helper.TryMarshalGet(m_TitleText, out value); return value; } set { Helper.TryMarshalSet(ref m_TitleText, value); } } public string DescriptionText { get { string value; Helper.TryMarshalGet(m_DescriptionText, out value); return value; } set { Helper.TryMarshalSet(ref m_DescriptionText, value); } } public string LongDescriptionText { get { string value; Helper.TryMarshalGet(m_LongDescriptionText, out value); return value; } set { Helper.TryMarshalSet(ref m_LongDescriptionText, value); } } public string TechnicalDetailsText_DEPRECATED { get { string value; Helper.TryMarshalGet(m_TechnicalDetailsText_DEPRECATED, out value); return value; } set { Helper.TryMarshalSet(ref m_TechnicalDetailsText_DEPRECATED, value); } } public string CurrencyCode { get { string value; Helper.TryMarshalGet(m_CurrencyCode, out value); return value; } set { Helper.TryMarshalSet(ref m_CurrencyCode, value); } } public Result PriceResult { get { return m_PriceResult; } set { m_PriceResult = value; } } public uint OriginalPrice_DEPRECATED { get { return m_OriginalPrice_DEPRECATED; } set { m_OriginalPrice_DEPRECATED = value; } } public uint CurrentPrice_DEPRECATED { get { return m_CurrentPrice_DEPRECATED; } set { m_CurrentPrice_DEPRECATED = value; } } public byte DiscountPercentage { get { return m_DiscountPercentage; } set { m_DiscountPercentage = value; } } public long ExpirationTimestamp { get { return m_ExpirationTimestamp; } set { m_ExpirationTimestamp = value; } } public uint PurchasedCount { get { return m_PurchasedCount; } set { m_PurchasedCount = value; } } public int PurchaseLimit { get { return m_PurchaseLimit; } set { m_PurchaseLimit = value; } } public bool AvailableForPurchase { get { bool value; Helper.TryMarshalGet(m_AvailableForPurchase, out value); return value; } set { Helper.TryMarshalSet(ref m_AvailableForPurchase, value); } } public ulong OriginalPrice64 { get { return m_OriginalPrice64; } set { m_OriginalPrice64 = value; } } public ulong CurrentPrice64 { get { return m_CurrentPrice64; } set { m_CurrentPrice64 = value; } } public void Set(CatalogOffer other) { if (other != null) { m_ApiVersion = EcomInterface.CatalogofferApiLatest; ServerIndex = other.ServerIndex; CatalogNamespace = other.CatalogNamespace; Id = other.Id; TitleText = other.TitleText; DescriptionText = other.DescriptionText; LongDescriptionText = other.LongDescriptionText; TechnicalDetailsText_DEPRECATED = other.TechnicalDetailsText_DEPRECATED; CurrencyCode = other.CurrencyCode; PriceResult = other.PriceResult; OriginalPrice_DEPRECATED = other.OriginalPrice_DEPRECATED; CurrentPrice_DEPRECATED = other.CurrentPrice_DEPRECATED; DiscountPercentage = other.DiscountPercentage; ExpirationTimestamp = other.ExpirationTimestamp; PurchasedCount = other.PurchasedCount; PurchaseLimit = other.PurchaseLimit; AvailableForPurchase = other.AvailableForPurchase; OriginalPrice64 = other.OriginalPrice64; CurrentPrice64 = other.CurrentPrice64; } } public void Set(object other) { Set(other as CatalogOffer); } public void Dispose() { Helper.TryMarshalDispose(ref m_CatalogNamespace); Helper.TryMarshalDispose(ref m_Id); Helper.TryMarshalDispose(ref m_TitleText); Helper.TryMarshalDispose(ref m_DescriptionText); Helper.TryMarshalDispose(ref m_LongDescriptionText); Helper.TryMarshalDispose(ref m_TechnicalDetailsText_DEPRECATED); Helper.TryMarshalDispose(ref m_CurrencyCode); } } }