encode<V> static method

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

Implementation

static V encode<V>(
  FundingInstructionsBankTransfer instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'country',
    instance.country,
  );
  container.encodeList(
    'financial_addresses',
    (container) => instance.financialAddresses.forEach(
        (el) => FundingInstructionsBankTransferFinancialAddress.encode(
              el,
              container.nestedSingleValueContainer().encoder,
            )),
  );
  container.encodeString(
    'type',
    instance.type,
  );
  return container.value;
}