encode<V> static method

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

Implementation

static V encode<V>(
  PaymentPagesCheckoutSessionAutomaticTax 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,
    );
  }
  if (instance.status != null) {
    AutomaticTaxStatus.encode(
      instance.status!,
      container.nestedSingleValueContainer('status').encoder,
    );
  }
  return container.value;
}