encode<V> static method

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

Implementation

static V encode<V>(
  InvoiceCustomerBalance instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bankTransfer != null) {
    InvoiceBankTransfer.encode(
      instance.bankTransfer!,
      container.nestedSingleValueContainer('bank_transfer').encoder,
    );
  }
  if (instance.fundingType != null) {
    container.encodeString(
      'funding_type',
      instance.fundingType!,
    );
  }
  return container.value;
}