encode<V> static method

V encode<V>(
  1. SubscriptionAutomaticTax instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  SubscriptionAutomaticTax instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  if (instance.liability != null) {
    ConnectAccountReference.encode(
      instance.liability!,
      container.nestedSingleValueContainer('liability').encoder,
    );
  }
  return container.value;
}