encode<V> static method

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

Implementation

static V encode<V>(
  PaymentPagesCheckoutSessionAfterExpirationRecovery instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeBool(
    'allow_promotion_codes',
    instance.allowPromotionCodes,
  );
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  if (instance.expiresAt != null) {
    container.encodeDateTime(
      'expires_at',
      instance.expiresAt!,
    );
  }
  if (instance.url != null) {
    container.encodeString(
      'url',
      instance.url!,
    );
  }
  return container.value;
}