encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodDetailsKlarna instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.paymentMethodCategory != null) {
    container.encodeString(
      'payment_method_category',
      instance.paymentMethodCategory!,
    );
  }
  if (instance.preferredLocale != null) {
    container.encodeString(
      'preferred_locale',
      instance.preferredLocale!,
    );
  }
  return container.value;
}