encode<V> static method
Implementation
static V encode<V>(
TerminalConfiguration instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.bbposWiseposE != null) {
TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.encode(
instance.bbposWiseposE!,
container.nestedSingleValueContainer('bbpos_wisepos_e').encoder,
);
}
container.encodeString(
'id',
instance.id,
);
if (instance.isAccountDefault != null) {
container.encodeBool(
'is_account_default',
instance.isAccountDefault!,
);
}
container.encodeBool(
'livemode',
instance.livemode,
);
if (instance.name != null) {
container.encodeString(
'name',
instance.name!,
);
}
container.encodeString(
'object',
'terminal.configuration',
);
if (instance.offline != null) {
TerminalConfigurationConfigurationResourceOfflineConfig.encode(
instance.offline!,
container.nestedSingleValueContainer('offline').encoder,
);
}
if (instance.tipping != null) {
TerminalConfigurationConfigurationResourceTipping.encode(
instance.tipping!,
container.nestedSingleValueContainer('tipping').encoder,
);
}
if (instance.verifoneP400 != null) {
TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig.encode(
instance.verifoneP400!,
container.nestedSingleValueContainer('verifone_p400').encoder,
);
}
return container.value;
}