encode<V> static method

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

Implementation

static V encode<V>(
  MandateBacsDebit instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'network_status',
    instance.networkStatus,
  );
  container.encodeString(
    'reference',
    instance.reference,
  );
  if (instance.revocationReason != null) {
    container.encodeString(
      'revocation_reason',
      instance.revocationReason!,
    );
  }
  container.encodeString(
    'url',
    instance.url,
  );
  return container.value;
}