encode<V> static method

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

Implementation

static V encode<V>(
  InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.permissions != null) {
    container.encodeList(
      'permissions',
      (container) =>
          instance.permissions!.forEach((el) => container.encodeString(el)),
    );
  }
  if (instance.prefetch != null) {
    container.encodeList(
      'prefetch',
      (container) =>
          instance.prefetch!.forEach((el) => container.encodeString(el)),
    );
  }
  return container.value;
}