encode<V> static method

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

Implementation

static V encode<V>(
  SourceTransactionSepaCreditTransferData instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.reference != null) {
    container.encodeString(
      'reference',
      instance.reference!,
    );
  }
  if (instance.senderIban != null) {
    container.encodeString(
      'sender_iban',
      instance.senderIban!,
    );
  }
  if (instance.senderName != null) {
    container.encodeString(
      'sender_name',
      instance.senderName!,
    );
  }
  return container.value;
}