encode<V> static method
Implementation
static V encode<V>(
ExternalAccountRequirements instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.currentlyDue != null) {
container.encodeList(
'currently_due',
(container) =>
instance.currentlyDue!.forEach((el) => container.encodeString(el)),
);
}
if (instance.errors != null) {
container.encodeList(
'errors',
(container) =>
instance.errors!.forEach((el) => AccountRequirementsError.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
}
if (instance.pastDue != null) {
container.encodeList(
'past_due',
(container) =>
instance.pastDue!.forEach((el) => container.encodeString(el)),
);
}
if (instance.pendingVerification != null) {
container.encodeList(
'pending_verification',
(container) => instance.pendingVerification!
.forEach((el) => container.encodeString(el)),
);
}
return container.value;
}