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['allowed_categories'] = (node) => allowedCategories =
      node.getCollectionOfEnumValues<
              IssuingCardAuthorizationControlsAllowedCategories>(
          (stringValue) => IssuingCardAuthorizationControlsAllowedCategories
              .values
              .where((enumVal) => enumVal.value == stringValue)
              .firstOrNull);
  deserializerMap['allowed_merchant_countries'] = (node) =>
      allowedMerchantCountries =
          node.getCollectionOfPrimitiveValues<String>();
  deserializerMap['blocked_categories'] = (node) => blockedCategories =
      node.getCollectionOfEnumValues<
              IssuingCardAuthorizationControlsBlockedCategories>(
          (stringValue) => IssuingCardAuthorizationControlsBlockedCategories
              .values
              .where((enumVal) => enumVal.value == stringValue)
              .firstOrNull);
  deserializerMap['blocked_merchant_countries'] = (node) =>
      blockedMerchantCountries =
          node.getCollectionOfPrimitiveValues<String>();
  deserializerMap['spending_limits'] = (node) => spendingLimits =
      node.getCollectionOfObjectValues<IssuingCardSpendingLimit>(
          IssuingCardSpendingLimit.createFromDiscriminatorValue);
  deserializerMap['spending_limits_currency'] =
      (node) => spendingLimitsCurrency = node.getStringValue();
  return deserializerMap;
}