You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
455 lines
10 KiB
455 lines
10 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.Ecom
|
|
{
|
|
/// <summary>
|
|
/// Contains information about a single offer within the catalog. Instances of this structure are
|
|
/// created by <see cref="EcomInterface.CopyOfferByIndex" />. They must be passed to <see cref="EcomInterface.Release" />.
|
|
/// Prices are stored in the lowest denomination for the associated currency. If CurrencyCode is
|
|
/// "USD" then a price of 299 represents "$2.99".
|
|
/// </summary>
|
|
public class CatalogOffer : ISettable
|
|
{
|
|
/// <summary>
|
|
/// The index of this offer as it exists on the server.
|
|
/// This is useful for understanding pagination data.
|
|
/// </summary>
|
|
public int ServerIndex { get; set; }
|
|
|
|
/// <summary>
|
|
/// Product namespace in which this offer exists
|
|
/// </summary>
|
|
public string CatalogNamespace { get; set; }
|
|
|
|
/// <summary>
|
|
/// The ID of this offer
|
|
/// </summary>
|
|
public string Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Localized UTF-8 title of this offer
|
|
/// </summary>
|
|
public string TitleText { get; set; }
|
|
|
|
/// <summary>
|
|
/// Localized UTF-8 description of this offer
|
|
/// </summary>
|
|
public string DescriptionText { get; set; }
|
|
|
|
/// <summary>
|
|
/// Localized UTF-8 long description of this offer
|
|
/// </summary>
|
|
public string LongDescriptionText { get; set; }
|
|
|
|
/// <summary>
|
|
/// Deprecated.
|
|
/// <see cref="CatalogOffer" />::TechnicalDetailsText has been deprecated.
|
|
/// <see cref="CatalogItem" />::TechnicalDetailsText is still valid.
|
|
/// </summary>
|
|
public string TechnicalDetailsText_DEPRECATED { get; set; }
|
|
|
|
/// <summary>
|
|
/// The Currency Code for this offer
|
|
/// </summary>
|
|
public string CurrencyCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// If this value is <see cref="Result.Success" /> then OriginalPrice, CurrentPrice, and DiscountPercentage contain valid data.
|
|
/// Otherwise this value represents the error that occurred on the price query.
|
|
/// </summary>
|
|
public Result PriceResult { get; set; }
|
|
|
|
/// <summary>
|
|
/// The original price of this offer as a 32-bit number is deprecated.
|
|
/// </summary>
|
|
public uint OriginalPrice_DEPRECATED { get; set; }
|
|
|
|
/// <summary>
|
|
/// The current price including discounts of this offer as a 32-bit number is deprecated..
|
|
/// </summary>
|
|
public uint CurrentPrice_DEPRECATED { get; set; }
|
|
|
|
/// <summary>
|
|
/// A value from 0 to 100 define the percentage of the OrignalPrice that the CurrentPrice represents
|
|
/// </summary>
|
|
public byte DiscountPercentage { get; set; }
|
|
|
|
/// <summary>
|
|
/// Contains the POSIX timestamp that the offer expires or -1 if it does not expire
|
|
/// </summary>
|
|
public long ExpirationTimestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// The number of times that the requesting account has purchased this offer.
|
|
/// </summary>
|
|
public uint PurchasedCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// The maximum number of times that the offer can be purchased.
|
|
/// A negative value implies there is no limit.
|
|
/// </summary>
|
|
public int PurchaseLimit { get; set; }
|
|
|
|
/// <summary>
|
|
/// True if the user can purchase this offer.
|
|
/// </summary>
|
|
public bool AvailableForPurchase { get; set; }
|
|
|
|
/// <summary>
|
|
/// The original price of this offer as a 64-bit number.
|
|
/// </summary>
|
|
public ulong OriginalPrice64 { get; set; }
|
|
|
|
/// <summary>
|
|
/// The current price including discounts of this offer as a 64-bit number.
|
|
/// </summary>
|
|
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);
|
|
}
|
|
}
|
|
}
|