encode<V> static method

V encode<V>(
  1. PaymentIntentNetworks instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  PaymentIntentNetworks instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.requested != null) {
    container.encodeList(
      'requested',
      (container) => instance.requested!.forEach((el) =>
          OutboundPaymentsPaymentMethodDetailsUsBankAccountNetwork.encode(
            el,
            container.nestedSingleValueContainer().encoder,
          )),
    );
  }
  return container.value;
}