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['currency'] = (node) => currency =
      node.getEnumValue<CheckoutAcssDebitPaymentMethodOptionsCurrency>(
          (stringValue) => CheckoutAcssDebitPaymentMethodOptionsCurrency
              .values
              .where((enumVal) => enumVal.value == stringValue)
              .firstOrNull);
  deserializerMap['mandate_options'] = (node) => mandateOptions =
      node.getObjectValue<CheckoutAcssDebitMandateOptions>(
          CheckoutAcssDebitMandateOptions.createFromDiscriminatorValue);
  deserializerMap['setup_future_usage'] = (node) => setupFutureUsage = node
      .getEnumValue<CheckoutAcssDebitPaymentMethodOptionsSetupFutureUsage>(
          (stringValue) =>
              CheckoutAcssDebitPaymentMethodOptionsSetupFutureUsage.values
                  .where((enumVal) => enumVal.value == stringValue)
                  .firstOrNull);
  deserializerMap['target_date'] =
      (node) => targetDate = node.getStringValue();
  deserializerMap['verification_method'] = (node) => verificationMethod = node
      .getEnumValue<CheckoutAcssDebitPaymentMethodOptionsVerificationMethod>(
          (stringValue) =>
              CheckoutAcssDebitPaymentMethodOptionsVerificationMethod.values
                  .where((enumVal) => enumVal.value == stringValue)
                  .firstOrNull);
  return deserializerMap;
}