encode<V> static method
V
encode<V>(
- TerminalConfigurationConfigurationResourceCurrencySpecificConfig instance,
- Encoder<
V> encoder
Implementation
static V encode<V>(
TerminalConfigurationConfigurationResourceCurrencySpecificConfig instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.fixedAmounts != null) {
container.encodeList(
'fixed_amounts',
(container) =>
instance.fixedAmounts!.forEach((el) => container.encodeInt(el)),
);
}
if (instance.percentages != null) {
container.encodeList(
'percentages',
(container) =>
instance.percentages!.forEach((el) => container.encodeInt(el)),
);
}
if (instance.smartTipThreshold != null) {
container.encodeInt(
'smart_tip_threshold',
instance.smartTipThreshold!,
);
}
return container.value;
}