encode<V> static method

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

Implementation

static V encode<V>(
  SourceTypeSepaDebit instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bankCode != null) {
    container.encodeString(
      'bank_code',
      instance.bankCode!,
    );
  }
  if (instance.branchCode != null) {
    container.encodeString(
      'branch_code',
      instance.branchCode!,
    );
  }
  if (instance.country != null) {
    container.encodeString(
      'country',
      instance.country!,
    );
  }
  if (instance.fingerprint != null) {
    container.encodeString(
      'fingerprint',
      instance.fingerprint!,
    );
  }
  if (instance.last4 != null) {
    container.encodeString(
      'last4',
      instance.last4!,
    );
  }
  if (instance.mandateReference != null) {
    container.encodeString(
      'mandate_reference',
      instance.mandateReference!,
    );
  }
  if (instance.mandateUrl != null) {
    container.encodeString(
      'mandate_url',
      instance.mandateUrl!,
    );
  }
  return container.value;
}