RefundEntry.fromAppleTransaction constructor

RefundEntry.fromAppleTransaction(
  1. JWSTransactionDecodedPayload tx
)

Implementation

factory RefundEntry.fromAppleTransaction(JWSTransactionDecodedPayload tx) {
  return RefundEntry(
    platform: RefundPlatform.apple,
    transactionId: tx.transactionId,
    originalId: tx.originalTransactionId,
    productId: tx.productId,
    refundDate: DateTime.fromMillisecondsSinceEpoch(tx.revocationDate ?? 0),
    reasonCode: null,
    raw: tx.toJson(),
  );
}