appleRefund static method

RefundEntry appleRefund(
  1. AppleJwsPayload tx
)

Maps a transaction from getRefundHistory to a RefundEntry.

Implementation

static RefundEntry appleRefund(AppleJwsPayload tx) {
  return RefundEntry(
    platform: StorePlatform.apple,
    transactionId: tx.transactionId ?? '',
    originalId: tx.originalTransactionId ?? '',
    productId: tx.productId,
    refundDate: DateTime.fromMillisecondsSinceEpoch(tx.revocationDate ?? 0),
    raw: tx.json,
  );
}