IntentMethods.fromJson constructor

IntentMethods.fromJson(
  1. dynamic data
)

Implementation

factory IntentMethods.fromJson(dynamic data) {
  var json = DynamicJsonExtension.getJsonMap(data);
  return IntentMethods(
    customerBalances: ((json['customer_balances'] ?? json["customerBalances"])
            as List<dynamic>?)
        ?.map((e) => CustomerBalance.fromJson(e as Map<String, dynamic>))
        .toList(),
    paymentMethods: ((json['payment_methods'] ?? json["paymentMethods"])
            as List<dynamic>?)
        ?.map((e) => PaymentMethod.fromJson(e as Map<String, dynamic>))
        .toList(),
    expressMethods: ((json['express_methods'] ?? json["expressMethods"])
            as List<dynamic>?)
        ?.map((e) => ExpressMethod.fromJson(e as Map<String, dynamic>))
        .toList(),
    savedCards:
        ((json['saved_cards'] ?? json["savedCards"]) as List<dynamic>?)
            ?.map((e) => SavedCard.fromJson(e as Map<String, dynamic>))
            .toList(),
    payoutMethods:
        ((json['payout_methods'] ?? json["payoutMethods"]) as List<dynamic>?)
            ?.map((e) => PayoutMethod.fromJson(e as Map<String, dynamic>))
            .toList(),
  );
}