encode<V> static method
Implementation
static V encode<V>(
Level3LineItems instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.discountAmount != null) {
container.encodeInt(
'discount_amount',
instance.discountAmount!,
);
}
container.encodeString(
'product_code',
instance.productCode,
);
container.encodeString(
'product_description',
instance.productDescription,
);
if (instance.quantity != null) {
container.encodeInt(
'quantity',
instance.quantity!,
);
}
if (instance.taxAmount != null) {
container.encodeInt(
'tax_amount',
instance.taxAmount!,
);
}
if (instance.unitCost != null) {
container.encodeInt(
'unit_cost',
instance.unitCost!,
);
}
return container.value;
}