encode<V> static method
Implementation
static V encode<V>(
TerminalConfigurationCreateOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.bbposWiseposE != null) {
ConfigurationBbposWiseposE.encode(
instance.bbposWiseposE!,
container.nestedSingleValueContainer('bbpos_wisepos_e').encoder,
);
}
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
if (instance.offline != null) {
PortalSubscriptionPause.encode(
instance.offline!,
container.nestedSingleValueContainer('offline').encoder,
);
}
if (instance.tipping != null) {
ConfigurationTipping.encode(
instance.tipping!,
container.nestedSingleValueContainer('tipping').encoder,
);
}
if (instance.verifoneP400 != null) {
ConfigurationBbposWiseposE.encode(
instance.verifoneP400!,
container.nestedSingleValueContainer('verifone_p400').encoder,
);
}
return container.value;
}