#if UNITY_ANDROID
using UnityEngine;
#endif
namespace JustTrack
{
///
/// A representation of a campaign.
///
public class AttributionCampaign
{
private AttributionCampaign(int pId, string pName, string pType)
{
this.Id = pId;
this.Name = pName;
this.Type = pType;
}
///
/// Gets the ID of the campaign.
///
public int Id { get; private set; }
///
/// Gets the name of the campaign.
///
public string Name { get; private set; }
///
/// Gets the type of the campaign.
///
public string Type { get; private set; }
#if UNITY_ANDROID
internal static AttributionCampaign FromAndroidObject(AndroidJavaObject pCampaign) {
return new AttributionCampaign(
pCampaign.Call("getId"),
pCampaign.Call("getName"),
pCampaign.Call("getType")
);
}
#endif
#if UNITY_IOS || UNITY_WEBGL
internal static AttributionCampaign CreateCampaign(int pId, string pName, string pType) {
return new AttributionCampaign(pId, pName, pType);
}
#endif
#if UNITY_EDITOR
internal static AttributionCampaign CreateFakeCampaign(int pId, string pName, string pType) {
return new AttributionCampaign(pId, pName, pType);
}
#endif
}
}