encode<V> static method

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

Implementation

static V encode<V>(
  SourceMandateNotificationSepaDebitData instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.creditorIdentifier != null) {
    container.encodeString(
      'creditor_identifier',
      instance.creditorIdentifier!,
    );
  }
  if (instance.last4 != null) {
    container.encodeString(
      'last4',
      instance.last4!,
    );
  }
  if (instance.mandateReference != null) {
    container.encodeString(
      'mandate_reference',
      instance.mandateReference!,
    );
  }
  return container.value;
}