encode<V> static method
Implementation
static V encode<V>(
SessionShippingOptionsItem instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.shippingRate != null) {
container.encodeString(
'shipping_rate',
instance.shippingRate!,
);
}
if (instance.shippingRateData != null) {
SessionShippingRateData.encode(
instance.shippingRateData!,
container.nestedSingleValueContainer('shipping_rate_data').encoder,
);
}
return container.value;
}