encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodDetailsCardInstallmentsPlan instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.count != null) {
    container.encodeInt(
      'count',
      instance.count!,
    );
  }
  container.encodeString(
    'interval',
    'month',
  );
  container.encodeString(
    'type',
    'fixed_count',
  );
  return container.value;
}