encode<V> static method

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

Implementation

static V encode<V>(
  InvoiceBankTransfer instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.euBankTransfer != null) {
    SessionEuBankTransfer.encode(
      instance.euBankTransfer!,
      container.nestedSingleValueContainer('eu_bank_transfer').encoder,
    );
  }
  if (instance.type != null) {
    container.encodeString(
      'type',
      instance.type!,
    );
  }
  return container.value;
}