encode<V> static method

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

Implementation

static V encode<V>(
  TransferSchedule instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeInt(
    'delay_days',
    instance.delayDays,
  );
  container.encodeString(
    'interval',
    instance.interval,
  );
  if (instance.monthlyAnchor != null) {
    container.encodeInt(
      'monthly_anchor',
      instance.monthlyAnchor!,
    );
  }
  if (instance.weeklyAnchor != null) {
    container.encodeString(
      'weekly_anchor',
      instance.weeklyAnchor!,
    );
  }
  return container.value;
}