encode<V> static method
Implementation
static V encode<V>(
CustomerAcceptance instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.acceptedAt != null) {
container.encodeDateTime(
'accepted_at',
instance.acceptedAt!,
);
}
if (instance.offline != null) {
OfflineAcceptance.encode(
instance.offline!,
container.nestedSingleValueContainer('offline').encoder,
);
}
if (instance.online != null) {
OnlineAcceptance.encode(
instance.online!,
container.nestedSingleValueContainer('online').encoder,
);
}
container.encodeString(
'type',
instance.type,
);
return container.value;
}