TerminalReaderAction.fromJson constructor
TerminalReaderAction.fromJson(
- Object? json
Implementation
factory TerminalReaderAction.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TerminalReaderAction(
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']),
);
}