encode<V> static method

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

Implementation

static V encode<V>(
  BalanceAmountBySourceType instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.bankAccount != null) {
    container.encodeInt(
      'bank_account',
      instance.bankAccount!,
    );
  }
  if (instance.card != null) {
    container.encodeInt(
      'card',
      instance.card!,
    );
  }
  if (instance.fpx != null) {
    container.encodeInt(
      'fpx',
      instance.fpx!,
    );
  }
  return container.value;
}