encode<V> static method

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

Implementation

static V encode<V>(
  PaymentPagesCheckoutSessionConsent instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  if (instance.promotions != null) {
    CheckoutSessionConsentPromotions.encode(
      instance.promotions!,
      container.nestedSingleValueContainer('promotions').encoder,
    );
  }
  container.encodeString(
    'terms_of_service',
    'accepted',
  );
  return container.value;
}