encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodOptionsPix instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.expiresAfterSeconds != null) {
    container.encodeInt(
      'expires_after_seconds',
      instance.expiresAfterSeconds!,
    );
  }
  if (instance.expiresAt != null) {
    container.encodeInt(
      'expires_at',
      instance.expiresAt!,
    );
  }
  if (instance.setupFutureUsage != null) {
    container.encodeString(
      'setup_future_usage',
      'none',
    );
  }
  return container.value;
}