encode<V> static method

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

Implementation

static V encode<V>(
  PaymentFlowsInstallmentOptions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  if (instance.plan != null) {
    PaymentMethodDetailsCardInstallmentsPlan.encode(
      instance.plan!,
      container.nestedSingleValueContainer('plan').encoder,
    );
  }
  return container.value;
}