PaymentRefundResponse.fromMap constructor

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

Implementation

factory PaymentRefundResponse.fromMap(Map<String, dynamic> map) {
  return PaymentRefundResponse(
    id: map['id'] ?? '',
    type: map['type'] ?? 'refund',
    attributes: PaymentRefundResponseAttributes.fromMap(map['attributes']),
    availableAt: map['available_at'] != null
        ? DateTime.fromMillisecondsSinceEpoch(map['available_at'])
        : null,
    createdAt: fromTimeStamp(map['created_at']),
    updatedAt: fromTimeStamp(map['updated_at']),
    paidAt: fromTimeStamp(map['paid_at']),
  );
}