getFieldDeserializers method

  1. @override
Map<String, void Function(ParseNode)> getFieldDeserializers()
override

The deserialization information for the current model

Implementation

@override
Map<String, void Function(ParseNode)> getFieldDeserializers() {
  var deserializerMap = <String, void Function(ParseNode)>{};
  deserializerMap['capture_method'] = (node) => captureMethod =
      node.getEnumValue<CheckoutMobilepayPaymentMethodOptionsCaptureMethod>(
          (stringValue) => CheckoutMobilepayPaymentMethodOptionsCaptureMethod
              .values
              .where((enumVal) => enumVal.value == stringValue)
              .firstOrNull);
  deserializerMap['setup_future_usage'] = (node) => setupFutureUsage = node
      .getEnumValue<CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage>(
          (stringValue) =>
              CheckoutMobilepayPaymentMethodOptionsSetupFutureUsage.values
                  .where((enumVal) => enumVal.value == stringValue)
                  .firstOrNull);
  return deserializerMap;
}