encode<V> static method
Implementation
static V encode<V>(
TaxRegistration instance,
Encoder<V> encoder,
) {
final container = encoder.container<String>();
container.encodeDateTime(
'active_from',
instance.activeFrom,
);
container.encodeString(
'country',
instance.country,
);
TaxProductRegistrationsResourceCountryOptions.encode(
instance.countryOptions,
container.nestedSingleValueContainer('country_options').encoder,
);
container.encodeDateTime(
'created',
instance.created,
);
if (instance.expiresAt != null) {
container.encodeDateTime(
'expires_at',
instance.expiresAt!,
);
}
container.encodeString(
'id',
instance.id,
);
container.encodeBool(
'livemode',
instance.livemode,
);
container.encodeString(
'object',
'tax.registration',
);
container.encodeString(
'status',
instance.status,
);
return container.value;
}