appleRefund static method
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,
);
}