encode<V> static method
Implementation
static V encode<V>(
SourceOrderItem instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.amount != null) {
container.encodeInt(
'amount',
instance.amount!,
);
}
if (instance.currency != null) {
container.encodeString(
'currency',
instance.currency!,
);
}
if (instance.description != null) {
container.encodeString(
'description',
instance.description!,
);
}
if (instance.parent != null) {
container.encodeString(
'parent',
instance.parent!,
);
}
if (instance.quantity != null) {
container.encodeInt(
'quantity',
instance.quantity!,
);
}
if (instance.type != null) {
container.encodeString(
'type',
instance.type!,
);
}
return container.value;
}