getFieldDeserializers method
The deserialization information for the current model
Implementation
@override
Map<String, void Function(ParseNode)> getFieldDeserializers() {
var deserializerMap = <String, void Function(ParseNode)>{};
deserializerMap['amount'] = (node) => amount = node.getIntValue();
deserializerMap['amount_type'] = (node) => amountType =
node.getEnumValue<PaymentMethodOptionsCardMandateOptionsAmountType>(
(stringValue) => PaymentMethodOptionsCardMandateOptionsAmountType
.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['description'] =
(node) => description = node.getStringValue();
deserializerMap['end_date'] = (node) => endDate = node.getIntValue();
deserializerMap['interval'] = (node) => interval =
node.getEnumValue<PaymentMethodOptionsCardMandateOptionsInterval>(
(stringValue) => PaymentMethodOptionsCardMandateOptionsInterval
.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['interval_count'] =
(node) => intervalCount = node.getIntValue();
deserializerMap['reference'] = (node) => reference = node.getStringValue();
deserializerMap['start_date'] = (node) => startDate = node.getIntValue();
deserializerMap['supported_types'] = (node) => supportedTypes =
node.getCollectionOfEnumValues<
PaymentMethodOptionsCardMandateOptionsSupportedTypes>(
(stringValue) =>
PaymentMethodOptionsCardMandateOptionsSupportedTypes.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
return deserializerMap;
}