| 
									
										
										
										
											2023-12-26 03:52:53 +00:00
										 |  |  |  | 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 string productId; | 
					
						
							|  |  |  |  |         internal double? revenue; | 
					
						
							|  |  |  |  |         internal List<string> partnerList; | 
					
						
							|  |  |  |  |         internal List<string> callbackList; | 
					
						
							|  |  |  |  |         // iOS specific members | 
					
						
							|  |  |  |  |         internal string receipt; | 
					
						
							| 
									
										
										
										
											2024-04-16 05:30:31 +00:00
										 |  |  |  |         internal string receiptBase64; | 
					
						
							| 
									
										
										
										
											2023-12-26 03:52:53 +00:00
										 |  |  |  |         internal bool isReceiptSet; | 
					
						
							|  |  |  |  |         // Android specific members | 
					
						
							|  |  |  |  |         internal string purchaseToken; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         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 setCallbackId(string callbackId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.callbackId = callbackId; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         // iOS / Android mixed | 
					
						
							|  |  |  |  |         public void setTransactionId(string transactionId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.transactionId = transactionId; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public void setProductId(string productId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.productId = productId; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         // iOS specific methods | 
					
						
							|  |  |  |  |         [Obsolete("This is an obsolete method. Please use separate setter methods for purchase verification parameters.")] | 
					
						
							|  |  |  |  |         public void setReceipt(string receipt, string transactionId) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             // this.receipt = receipt; | 
					
						
							|  |  |  |  |             // this.transactionId = transactionId; | 
					
						
							|  |  |  |  |             // this.isReceiptSet = true; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         public void setReceipt(string receipt) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.receipt = receipt; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-16 05:30:31 +00:00
										 |  |  |  |         public void setReceiptBase64(string receiptBase64) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.receiptBase64 = receiptBase64; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-26 03:52:53 +00:00
										 |  |  |  |         // Android specific methods | 
					
						
							|  |  |  |  |         public void setPurchaseToken(string purchaseToken) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             this.purchaseToken = purchaseToken; | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |