paymentInitiationConsentScopeListToJson function

List<String> paymentInitiationConsentScopeListToJson(
  1. List<PaymentInitiationConsentScope>? paymentInitiationConsentScope
)

Implementation

List<String> paymentInitiationConsentScopeListToJson(
    List<enums.PaymentInitiationConsentScope>? paymentInitiationConsentScope) {
  if (paymentInitiationConsentScope == null) {
    return [];
  }

  return paymentInitiationConsentScope
      .map((e) => enums.$PaymentInitiationConsentScopeMap[e]!)
      .toList();
}