encode<V> static method
Implementation
static V encode<V>(
TreasuryFinancialAccountUpdateOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
if (instance.features != null) {
FinancialAccountFeatures.encode(
instance.features!,
container.nestedSingleValueContainer('features').encoder,
);
}
if (instance.metadata != null) {
container.encodeMap(
'metadata',
(container) => instance.metadata!.forEach((
key,
value,
) =>
container.encodeString(
key,
value,
)),
);
}
if (instance.platformRestrictions != null) {
FinancialAccountPlatformRestrictions.encode(
instance.platformRestrictions!,
container.nestedSingleValueContainer('platform_restrictions').encoder,
);
}
return container.value;
}