InappifyMobilePurchaseData.fromMap constructor

InappifyMobilePurchaseData.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory InappifyMobilePurchaseData.fromMap(Map<String, dynamic> map) {
  final status = _optionalString(map, 'storePurchaseStatus');
  final deliveryId = map['deliveryId'];
  return InappifyMobilePurchaseData(
    storePurchaseStatus: status == null
        ? null
        : InappifyStorePurchaseStatus.fromWire(status),
    deliveryId: deliveryId == null
        ? null
        : _count(deliveryId, positive: true),
    verificationRequestId: _optionalString(map, 'verificationRequestId'),
    alreadyProcessed: _boolean(map['alreadyProcessed'] ?? false),
    productIdentifier: _optionalString(map, 'productIdentifier'),
    offeringIdentifier: _optionalString(map, 'offeringIdentifier'),
    packageIdentifier: _optionalString(map, 'packageIdentifier'),
    idempotencyKey: _optionalString(map, 'idempotencyKey'),
    market: _optionalString(map, 'market'),
  );
}