encode<V> static method
Implementation
static V encode<V>(
TaxProductResourcePostalAddress instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
if (instance.city != null) {
container.encodeString(
'city',
instance.city!,
);
}
container.encodeString(
'country',
instance.country,
);
if (instance.line1 != null) {
container.encodeString(
'line1',
instance.line1!,
);
}
if (instance.line2 != null) {
container.encodeString(
'line2',
instance.line2!,
);
}
if (instance.postalCode != null) {
container.encodeString(
'postal_code',
instance.postalCode!,
);
}
if (instance.state != null) {
container.encodeString(
'state',
instance.state!,
);
}
return container.value;
}