AdjustAppStoreSubscription 类

使用此类来监测 App Store 订阅。

方法

AdjustAppStoreSubscription

初始化带有必要属性的订阅对象。

  • price – 订阅价格。
  • currency – 交易所使用货币的代码。
  • transactionId - 成功付费交易的 ID。
  • receipt - 交易收据。
public AdjustAppStoreSubscription(string price, string currency, string transactionId, string receipt)
C#
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription(
    price,
    currency,
    transactionId,
    receipt);

setTransactionDate

记录购买的日期和时间。

public void setTransactionDate(string transactionDate)
C#
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription(
    price,
    currency,
    transactionId,
    receipt);
//...
subscription.setTransactionDate(transactionDate);

setSalesRegion

记录订阅销售发生的地区。

public void setSalesRegion(string salesRegion)
C#
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription(
    price,
    currency,
    transactionId,
    receipt);
//...
subscription.setSalesRegion(salesRegion);

addCallbackParameter

字符串​ 键值对的形式添加回传参数。

public void addCallbackParameter(string key, string value)
C#
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription(
    price,
    currency,
    transactionId,
    receipt);
//...
subscription.addCallbackParameter("key1", "value1");
subscription.addCallbackParameter("key2", "value2");

addPartnerParameter

字符串​ 键值对的形式添加合作伙伴参数。

public void addPartnerParameter(string key, string value)
C#
AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription(
    price,
    currency,
    transactionId,
    receipt);
//...
subscription.addPartnerParameter("key1", "value1");
subscription.addPartnerParameter("key2", "value2");