encode<V> static method
Implementation
static V encode<V>(
PaymentPagesCheckoutSessionTotalDetails instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount_discount',
instance.amountDiscount,
);
if (instance.amountShipping != null) {
container.encodeInt(
'amount_shipping',
instance.amountShipping!,
);
}
container.encodeInt(
'amount_tax',
instance.amountTax,
);
if (instance.breakdown != null) {
PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown.encode(
instance.breakdown!,
container.nestedSingleValueContainer('breakdown').encoder,
);
}
return container.value;
}