encode<V> static method
Implementation
static V encode<V>(
PromotionCodeUpdateOptionsRestrictions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.currencyOptions != null) {
container.encodeMap(
'currency_options',
(container) => instance.currencyOptions!.forEach((
key,
value,
) =>
PromotionCodeCurrencyOptionsValue.encode(
value,
container.nestedSingleValueContainer(key).encoder,
)),
);
}
return container.value;
}