encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodIdeal instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bank != null) {
    PaymentMethodDetailsIdealBank.encode(
      instance.bank!,
      container.nestedSingleValueContainer('bank').encoder,
    );
  }
  if (instance.bic != null) {
    PaymentMethodDetailsIdealBic.encode(
      instance.bic!,
      container.nestedSingleValueContainer('bic').encoder,
    );
  }
  return container.value;
}