encode<V> static method

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

Implementation

static V encode<V>(
  PaymentMethodLink instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.email != null) {
    container.encodeString(
      'email',
      instance.email!,
    );
  }
  if (instance.persistentToken != null) {
    container.encodeString(
      'persistent_token',
      instance.persistentToken!,
    );
  }
  return container.value;
}