encode<V> static method
V
encode<
V>( - TaxSettings instance,
- Encoder<V> encoder
)
Implementation
static V encode<V>(
TaxSettings instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
TaxProductResourceTaxSettingsDefaults.encode(
instance.defaults,
container.nestedSingleValueContainer('defaults').encoder,
);
if (instance.headOffice != null) {
IssuingCardholderAddress.encode(
instance.headOffice!,
container.nestedSingleValueContainer('head_office').encoder,
);
}
container.encodeBool(
'livemode',
instance.livemode,
);
container.encodeString(
'object',
'tax.settings',
);
container.encodeString(
'status',
instance.status,
);
TaxProductResourceTaxSettingsStatusDetails.encode(
instance.statusDetails,
container.nestedSingleValueContainer('status_details').encoder,
);
return container.value;
}