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 (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;
}