encode<V> static method

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

Implementation

static V encode<V>(
  AccountPayouts instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.debitNegativeBalances != null) {
    container.encodeBool(
      'debit_negative_balances',
      instance.debitNegativeBalances!,
    );
  }
  if (instance.schedule != null) {
    AccountSchedule.encode(
      instance.schedule!,
      container.nestedSingleValueContainer('schedule').encoder,
    );
  }
  if (instance.statementDescriptor != null) {
    container.encodeString(
      'statement_descriptor',
      instance.statementDescriptor!,
    );
  }
  return container.value;
}