encode<V> static method

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

Implementation

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