encode<V> static method

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

Implementation

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