encode<V> static method

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

Implementation

static V encode<V>(
  QuotesResourceStatusTransitions instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.acceptedAt != null) {
    container.encodeDateTime(
      'accepted_at',
      instance.acceptedAt!,
    );
  }
  if (instance.canceledAt != null) {
    container.encodeDateTime(
      'canceled_at',
      instance.canceledAt!,
    );
  }
  if (instance.finalizedAt != null) {
    container.encodeDateTime(
      'finalized_at',
      instance.finalizedAt!,
    );
  }
  return container.value;
}