encode<V> static method
Implementation
static V encode<V>(
IssuingCardholderSpendingLimit instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeInt(
'amount',
instance.amount,
);
if (instance.categories != null) {
container.encodeList(
'categories',
(container) => instance.categories!.forEach((el) =>
IssuingCardholderSpendingControlsAllowedCategoriesItem.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
IssuingCardSpendingLimitInterval.encode(
instance.interval,
container.nestedSingleValueContainer('interval').encoder,
);
return container.value;
}