toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'id': id,
'productID': productID,
'productType': ProductTypeConverter.toStringValue(productType),
'ownershipType': OwnershipTypeConverter.toStringValue(ownershipType),
'price': price,
'currency': currency,
'originalID': originalID,
'originalPurchaseDate': originalPurchaseDate,
'purchaseDate': purchaseDate,
'purchasedQuantity': purchasedQuantity,
'purchaseReason': PurchaseReasonConverter.toStringValue(purchaseReason),
'subscriptionGroupID': subscriptionGroupID,
'expirationDate': expirationDate,
'isUpgraded': isUpgraded,
'hasRevocation': hasRevocation,
'revocationDate': revocationDate,
'revocationReason': revocationReason,
'environment': environment,
'appAccountToken': appAccountToken,
'appBundleID': appBundleID,
'appTransactionID': appTransactionID,
'signedDate': signedDate,
'storefrontId': storefrontId,
'storefrontCountryCode': storefrontCountryCode,
'storefrontCurrency': storefrontCurrency,
'webOrderLineItemID': webOrderLineItemID,
'deviceVerificationNonce': deviceVerificationNonce,
'deviceVerification': deviceVerification,
'offer': offer?.toMap(),
'isSubscribedButFreeTrailCancelled': isSubscribedButFreeTrailCancelled,
};
}