mapFlutterPurchaseToPurchase function
Implementation
Purchase mapFlutterPurchaseToPurchase(FlutterPurchase flutterPurchase) {
return Purchase._(
purchaseId: flutterPurchase.purchaseId,
productId: flutterPurchase.productId,
invoiceId: flutterPurchase.invoiceId,
orderId: flutterPurchase.orderId,
purchaseType:
mapFlutterPurchaseTypeToPurchaseType(flutterPurchase.purchaseType),
productType:
mapFlutterProductTypeToProductType(flutterPurchase.productType),
description: flutterPurchase.description,
purchaseTime: flutterPurchase.purchaseTime,
price: flutterPurchase.price,
amountLabel: flutterPurchase.amountLabel,
currency: flutterPurchase.currency,
quantity: flutterPurchase.quantity,
status: mapFlutterPurchaseStatusToPurchaseStatus(flutterPurchase.status),
developerPayload: flutterPurchase.developerPayload,
sandbox: flutterPurchase.sandbox,
);
}