encode<V> static method
Implementation
static V encode<V>(
LinkedAccountOptionsUsBankAccount instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.permissions != null) {
container.encodeList(
'permissions',
(container) => instance.permissions!
.forEach((el) => FinancialConnectionsAccountPermissionsItem.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
if (instance.prefetch != null) {
container.encodeList(
'prefetch',
(container) => instance.prefetch!.forEach((el) =>
InvoicePaymentMethodOptionsUsBankAccountLinkedAccountOptionsPrefetchItem
.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
if (instance.returnUrl != null) {
container.encodeString(
'return_url',
instance.returnUrl!,
);
}
return container.value;
}