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.
70 lines
1.9 KiB
70 lines
1.9 KiB
using System; |
|
using System.Collections.Generic; |
|
|
|
namespace com.adjust.sdk |
|
{ |
|
public class AdjustEvent |
|
{ |
|
internal string currency; |
|
internal string eventToken; |
|
internal string callbackId; |
|
internal string transactionId; |
|
internal double? revenue; |
|
internal List<string> partnerList; |
|
internal List<string> callbackList; |
|
// iOS specific members |
|
internal string receipt; |
|
internal bool isReceiptSet; |
|
|
|
public AdjustEvent(string eventToken) |
|
{ |
|
this.eventToken = eventToken; |
|
this.isReceiptSet = false; |
|
} |
|
|
|
public void setRevenue(double amount, string currency) |
|
{ |
|
this.revenue = amount; |
|
this.currency = currency; |
|
} |
|
|
|
public void addCallbackParameter(string key, string value) |
|
{ |
|
if (callbackList == null) |
|
{ |
|
callbackList = new List<string>(); |
|
} |
|
callbackList.Add(key); |
|
callbackList.Add(value); |
|
} |
|
|
|
public void addPartnerParameter(string key, string value) |
|
{ |
|
if (partnerList == null) |
|
{ |
|
partnerList = new List<string>(); |
|
} |
|
partnerList.Add(key); |
|
partnerList.Add(value); |
|
} |
|
|
|
public void setTransactionId(string transactionId) |
|
{ |
|
this.transactionId = transactionId; |
|
} |
|
|
|
public void setCallbackId(string callbackId) |
|
{ |
|
this.callbackId = callbackId; |
|
} |
|
|
|
// iOS specific methods |
|
[Obsolete("This is an obsolete method. Please use the adjust purchase SDK for purchase verification (https://github.com/adjust/unity_purchase_sdk)")] |
|
public void setReceipt(string receipt, string transactionId) |
|
{ |
|
this.receipt = receipt; |
|
this.transactionId = transactionId; |
|
this.isReceiptSet = true; |
|
} |
|
} |
|
}
|
|
|