encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodDetailsSwish instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.fingerprint != null) {
    container.encodeString(
      'fingerprint',
      instance.fingerprint!,
    );
  }
  if (instance.paymentReference != null) {
    container.encodeString(
      'payment_reference',
      instance.paymentReference!,
    );
  }
  if (instance.verifiedPhoneLast4 != null) {
    container.encodeString(
      'verified_phone_last4',
      instance.verifiedPhoneLast4!,
    );
  }
  return container.value;
}