encode<V> static method
Implementation
static V encode<V>(
ClimateSupplier instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeString(
'id',
instance.id,
);
container.encodeString(
'info_url',
instance.infoUrl,
);
container.encodeBool(
'livemode',
instance.livemode,
);
container.encodeList(
'locations',
(container) =>
instance.locations.forEach((el) => ClimateRemovalsLocation.encode(
el,
container.nestedSingleValueContainer().encoder,
)),
);
container.encodeString(
'name',
instance.name,
);
container.encodeString(
'object',
'climate.supplier',
);
container.encodeString(
'removal_pathway',
instance.removalPathway,
);
return container.value;
}