IntentMethods.fromJson constructor

IntentMethods.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory IntentMethods.fromJson(Map<String, dynamic> json) {
  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(),
  );
}