toMap property

Map<String, String?> get toMap

Implementation

Map<String, String?> get toMap {
  Map<String, String?> subscriptionMap = new Map<String, String?>();

  if (_price != null) {
    subscriptionMap['price'] = _price;
  }
  if (_currency != null) {
    subscriptionMap['currency'] = _currency;
  }
  if (_sku != null) {
    subscriptionMap['sku'] = _sku;
  }
  if (_orderId != null) {
    subscriptionMap['orderId'] = _orderId;
  }
  if (_signature != null) {
    subscriptionMap['signature'] = _signature;
  }
  if (_purchaseToken != null) {
    subscriptionMap['purchaseToken'] = _purchaseToken;
  }
  if (_billingStore != null) {
    subscriptionMap['billingStore'] = _billingStore;
  }
  if (_purchaseTime != null) {
    subscriptionMap['purchaseTime'] = _purchaseTime;
  }
  if (_callbackParameters!.length > 0) {
    subscriptionMap['callbackParameters'] = json.encode(_callbackParameters);
  }
  if (_partnerParameters!.length > 0) {
    subscriptionMap['partnerParameters'] = json.encode(_partnerParameters);
  }

  return subscriptionMap;
}