mapFlutterPurchaseToPurchase function

Purchase mapFlutterPurchaseToPurchase(
  1. FlutterPurchase flutterPurchase
)

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),
      subscriptionToken: flutterPurchase.subscriptionToken,
      developerPayload: flutterPurchase.developerPayload);
}