encode<V> static method
Implementation
static V encode<V>(
AccountLinkCreateOptions instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeString(
'account',
instance.account,
);
if (instance.collect != null) {
container.encodeString(
'collect',
instance.collect!,
);
}
if (instance.collectionOptions != null) {
AccountLinkCollectionOptions.encode(
instance.collectionOptions!,
container.nestedSingleValueContainer('collection_options').encoder,
);
}
if (instance.expand != null) {
container.encodeList(
'expand',
(container) =>
instance.expand!.forEach((el) => container.encodeString(el)),
);
}
if (instance.refreshUrl != null) {
container.encodeString(
'refresh_url',
instance.refreshUrl!,
);
}
if (instance.returnUrl != null) {
container.encodeString(
'return_url',
instance.returnUrl!,
);
}
container.encodeString(
'type',
instance.type,
);
return container.value;
}