encode<V> static method
Implementation
static V encode<V>(
TaxProductResourceLineItemTaxBreakdown instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount',
instance.amount,
);
TaxProductResourceJurisdiction.encode(
instance.jurisdiction,
container.nestedSingleValueContainer('jurisdiction').encoder,
);
container.encodeString(
'sourcing',
instance.sourcing,
);
if (instance.taxRateDetails != null) {
TaxProductResourceLineItemTaxBreakdownTaxRateDetails.encode(
instance.taxRateDetails!,
container.nestedSingleValueContainer('tax_rate_details').encoder,
);
}
container.encodeString(
'taxability_reason',
instance.taxabilityReason,
);
container.encodeInt(
'taxable_amount',
instance.taxableAmount,
);
return container.value;
}