encode<V> static method

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

Implementation

static V encode<V>(
  SessionDeliveryEstimate instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.maximum != null) {
    ShippingRateDeliveryEstimateBound.encode(
      instance.maximum!,
      container.nestedSingleValueContainer('maximum').encoder,
    );
  }
  if (instance.minimum != null) {
    ShippingRateDeliveryEstimateBound.encode(
      instance.minimum!,
      container.nestedSingleValueContainer('minimum').encoder,
    );
  }
  return container.value;
}