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['account'] = (node) => account =
      node.getObjectValue<ApplicationFeeAccount>(
          ApplicationFeeAccount.createFromDiscriminatorValue);
  deserializerMap['amount'] = (node) => amount = node.getIntValue();
  deserializerMap['amount_refunded'] =
      (node) => amountRefunded = node.getIntValue();
  deserializerMap['application'] = (node) => application =
      node.getObjectValue<ApplicationFeeApplication>(
          ApplicationFeeApplication.createFromDiscriminatorValue);
  deserializerMap['balance_transaction'] = (node) => balanceTransaction =
      node.getObjectValue<ApplicationFeeBalanceTransaction>(
          ApplicationFeeBalanceTransaction.createFromDiscriminatorValue);
  deserializerMap['charge'] = (node) => charge =
      node.getObjectValue<ApplicationFeeCharge>(
          ApplicationFeeCharge.createFromDiscriminatorValue);
  deserializerMap['created'] = (node) => created = node.getIntValue();
  deserializerMap['currency'] = (node) => currency = node.getStringValue();
  deserializerMap['fee_source'] = (node) => feeSource =
      node.getObjectValue<PlatformEarningFeeSource>(
          PlatformEarningFeeSource.createFromDiscriminatorValue);
  deserializerMap['id'] = (node) => id = node.getStringValue();
  deserializerMap['livemode'] = (node) => livemode = node.getBoolValue();
  deserializerMap['object'] = (node) => object =
      node.getEnumValue<ApplicationFeeObject>((stringValue) =>
          ApplicationFeeObject.values
              .where((enumVal) => enumVal.value == stringValue)
              .firstOrNull);
  deserializerMap['originating_transaction'] = (node) =>
      originatingTransaction = node.getObjectValue<
              ApplicationFeeOriginatingTransaction>(
          ApplicationFeeOriginatingTransaction.createFromDiscriminatorValue);
  deserializerMap['refunded'] = (node) => refunded = node.getBoolValue();
  deserializerMap['refunds'] = (node) => refunds =
      node.getObjectValue<ApplicationFeeRefunds>(
          ApplicationFeeRefunds.createFromDiscriminatorValue);
  return deserializerMap;
}