encode<V> static method

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

Implementation

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