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 (_transactionId != null) {
subscriptionMap['transactionId'] = _transactionId;
}
if (_receipt != null) {
subscriptionMap['receipt'] = _receipt;
}
if (_transactionDate != null) {
subscriptionMap['transactionDate'] = _transactionDate;
}
if (_salesRegion != null) {
subscriptionMap['salesRegion'] = _salesRegion;
}
if (_billingStore != null) {
subscriptionMap['billingStore'] = _billingStore;
}
if (_callbackParameters!.length > 0) {
subscriptionMap['callbackParameters'] = json.encode(_callbackParameters);
}
if (_partnerParameters!.length > 0) {
subscriptionMap['partnerParameters'] = json.encode(_partnerParameters);
}
return subscriptionMap;
}