TerminalReaderReaderResourceReaderAction.fromJson constructor

TerminalReaderReaderResourceReaderAction.fromJson(
  1. Object? json
)

Implementation

factory TerminalReaderReaderResourceReaderAction.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TerminalReaderReaderResourceReaderAction(
    failureCode:
        map['failure_code'] == null ? null : (map['failure_code'] as String),
    failureMessage: map['failure_message'] == null
        ? null
        : (map['failure_message'] as String),
    processPaymentIntent: map['process_payment_intent'] == null
        ? null
        : TerminalReaderReaderResourceProcessPaymentIntentAction.fromJson(
            map['process_payment_intent']),
    processSetupIntent: map['process_setup_intent'] == null
        ? null
        : TerminalReaderReaderResourceProcessSetupIntentAction.fromJson(
            map['process_setup_intent']),
    refundPayment: map['refund_payment'] == null
        ? null
        : TerminalReaderReaderResourceRefundPaymentAction.fromJson(
            map['refund_payment']),
    setReaderDisplay: map['set_reader_display'] == null
        ? null
        : TerminalReaderReaderResourceSetReaderDisplayAction.fromJson(
            map['set_reader_display']),
    status: TerminalReaderActionStatus.fromJson(map['status']),
    type: TerminalReaderActionType.fromJson(map['type']),
  );
}