// 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 struct CatalogOffer { /// /// 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 Utf8String CatalogNamespace { get; set; } /// /// The ID of this offer /// public Utf8String Id { get; set; } /// /// Localized UTF-8 title of this offer /// public Utf8String TitleText { get; set; } /// /// Localized UTF-8 description of this offer /// public Utf8String DescriptionText { get; set; } /// /// Localized UTF-8 long description of this offer /// public Utf8String LongDescriptionText { get; set; } /// /// Deprecated. /// is still valid. /// public Utf8String TechnicalDetailsText_DEPRECATED { get; set; } /// /// The Currency Code for this offer /// public Utf8String 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; } /// /// The decimal point for the provided price. For example, DecimalPoint '2' and CurrentPrice64 '12345' would be '123.45'. /// public uint DecimalPoint { get; set; } internal void Set(ref CatalogOfferInternal other) { 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; DecimalPoint = other.DecimalPoint; } } [System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 8)] internal struct CatalogOfferInternal : IGettable, 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; private uint m_DecimalPoint; public int ServerIndex { get { return m_ServerIndex; } set { m_ServerIndex = value; } } public Utf8String CatalogNamespace { get { Utf8String value; Helper.Get(m_CatalogNamespace, out value); return value; } set { Helper.Set(value, ref m_CatalogNamespace); } } public Utf8String Id { get { Utf8String value; Helper.Get(m_Id, out value); return value; } set { Helper.Set(value, ref m_Id); } } public Utf8String TitleText { get { Utf8String value; Helper.Get(m_TitleText, out value); return value; } set { Helper.Set(value, ref m_TitleText); } } public Utf8String DescriptionText { get { Utf8String value; Helper.Get(m_DescriptionText, out value); return value; } set { Helper.Set(value, ref m_DescriptionText); } } public Utf8String LongDescriptionText { get { Utf8String value; Helper.Get(m_LongDescriptionText, out value); return value; } set { Helper.Set(value, ref m_LongDescriptionText); } } public Utf8String TechnicalDetailsText_DEPRECATED { get { Utf8String value; Helper.Get(m_TechnicalDetailsText_DEPRECATED, out value); return value; } set { Helper.Set(value, ref m_TechnicalDetailsText_DEPRECATED); } } public Utf8String CurrencyCode { get { Utf8String value; Helper.Get(m_CurrencyCode, out value); return value; } set { Helper.Set(value, ref m_CurrencyCode); } } 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.Get(m_AvailableForPurchase, out value); return value; } set { Helper.Set(value, ref m_AvailableForPurchase); } } public ulong OriginalPrice64 { get { return m_OriginalPrice64; } set { m_OriginalPrice64 = value; } } public ulong CurrentPrice64 { get { return m_CurrentPrice64; } set { m_CurrentPrice64 = value; } } public uint DecimalPoint { get { return m_DecimalPoint; } set { m_DecimalPoint = value; } } public void Set(ref CatalogOffer other) { 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; DecimalPoint = other.DecimalPoint; } public void Set(ref CatalogOffer? other) { if (other.HasValue) { m_ApiVersion = EcomInterface.CatalogofferApiLatest; 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; DecimalPoint = other.Value.DecimalPoint; } } public void Dispose() { Helper.Dispose(ref m_CatalogNamespace); Helper.Dispose(ref m_Id); Helper.Dispose(ref m_TitleText); Helper.Dispose(ref m_DescriptionText); Helper.Dispose(ref m_LongDescriptionText); Helper.Dispose(ref m_TechnicalDetailsText_DEPRECATED); Helper.Dispose(ref m_CurrencyCode); } public void Get(out CatalogOffer output) { output = new CatalogOffer(); output.Set(ref this); } } }