10.9.0 • Published 8 months ago

@commercetools-test-data/platform-limits v10.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@commercetools-test-data/platform-limits

This package provides the data model for the commercetools platform Limits type

https://docs.commercetools.com/api/limits

Install

$ pnpm add -D @commercetools-test-data/platform-limits

Usage

BusinessUnitLimitsProjection

import {
  BusinessUnitLimitsProjection,
  type TBusinessUnitLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const businessUnitLimitsProjection =
  BusinessUnitLimitsProjection.random().build<TBusinessUnitLimitsProjection>();

// Presets
const BusinessUnitWithLimit = businessUnitLimitsProjection.presets
  .withLimit()
  .build<TBusinessUnitLimitsProjection>();

CartDiscountLimitsProjection

import {
  CartDiscountLimitsProjection,
  type TCartDiscountLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const cartDiscountLimitsProjection =
  CartDiscountLimitsProjection.random().build<TCartDiscountLimitsProjection>();

// Presets
const cartDiscountLimitsProjectionWithLimitAndCurrent =
  CartDiscountLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCartDiscountLimitsProjection>();

CartLimitsProjection

import {
  CartLimitsProjection,
  type TCartLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const cartLimitsProjection =
  CartLimitsProjection.random().build<TCartLimitsProjection>();

// Presets
const cartLimitsProjectionWithLimitAndCurrent = CartLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TCartLimitsProjection>();

CustomerLimitsProjection

import {
  CustomerLimitsProjection,
  type TCustomerLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const customerLimitsProjection =
  CustomerLimitsProjection.random().build<TCustomerLimitsProjection>();

// Presets
const customerLimitsProjectionWithLimitAndCurrent =
  CustomerLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCustomerLimitsProjection>();

CustomerGroupLimitsProjection

import {
  CustomerGroupLimitsProjection,
  type TCustomerGroupLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const customerGroupLimitsProjection =
  CustomerGroupLimitsProjection.random().build<TCustomerGroupLimitsProjection>();

// Presets
const customerGroupLimitsProjectionWithLimitAndCurrent =
  CustomerGroupLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TCustomerGroupLimitsProjection>();

PlatformLimits

import {
  PlatformLimits,
  type TPlatformLimits,
} from '@commercetools-test-data/platform-limits';

const PlatformLimits = PlatformLimits.random().build<TPlatformLimits>();

// Presets
const PlatformLimitsWithLimitAndCurrent = PlatformLimits.presets
  .withAllPlatformLimits()
  .build<TPlatformLimits>();

LimitWithCurrent

import {
  LimitWithCurrent,
  type TLimitWithCurrent,
} from '@commercetools-test-data/platform-limits';

const limitWithCurrent = LimitWithCurrent.random().build<TLimitWithCurrent>();

// Presets
const limitWithCurrentWithExceeded = LimitWithCurrent.presets
  .withExceeded()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithNonExceeded = LimitWithCurrent.presets
  .withNonExceeded()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithUndefined = LimitWithCurrent.presets
  .withUndefined()
  .build<TLimitWithCurrent>();
const limitWithCurrentWithWarningExceeded = LimitWithCurrent.presets
  .withWarningExceeded()
  .build<TLimitWithCurrent>();

ProductDiscountLimitsProjection

import {
  ProductDiscountLimitsProjection,
  type TProductDiscountLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const productDiscountLimitsProjection =
  ProductDiscountLimitsProjection.random().build<TProductDiscountLimitsProjection>();

// Presets
const productDiscountLimitsProjectionWithLimitAndCurrent =
  ProductDiscountLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TProductDiscountLimitsProjection>();

ShippingMethodLimitsProjection

import {
  ShippingMethodLimitsProjection,
  type TShippingMethodLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const shippingMethodLimitsProjection =
  ShippingMethodLimitsProjection.random().build<TShippingMethodLimitsProjection>();

// Presets
const shippingMethodLimitsProjectionWithLimitAndCurrent =
  ShippingMethodLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TShippingMethodLimitsProjection>();

ShoppingListLimitsProjection

import {
  ShoppingListLimitsProjection,
  type TShoppingListLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const ShoppingListLimitsProjection =
  ShoppingListLimitsProjection.random().build<TShoppingListLimitsProjection>();

// Presets
const ShoppingListLimitsProjectionWithLimitAndCurrent =
  ShoppingListLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TShoppingListLimitsProjection>();

StoreLimitsProjection

import {
  StoreLimitsProjection,
  type TStoreLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const StoreLimitsProjection =
  StoreLimitsProjection.random().build<TStoreLimitsProjection>();

// Presets
const StoreLimitsProjectionWithLimitAndCurrent = StoreLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TStoreLimitsProjection>();

TaxCategoryLimitsProjection

import {
  TaxCategoryLimitsProjection,
  type TTaxCategoryLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const taxCategoryLimitsProjection =
  TaxCategoryLimitsProjection.random().build<TTaxCategoryLimitsProjection>();

// Presets
const taxCategoryLimitsProjectionWithLimitAndCurrent =
  TaxCategoryLimitsProjection.presets
    .withLimitAndCurrent()
    .build<TTaxCategoryLimitsProjection>();

ZoneLimitsProjection

import {
  ZoneLimitsProjection,
  type TZoneLimitsProjection,
} from '@commercetools-test-data/platform-limits';

const zoneLimitsProjection =
  ZoneLimitsProjection.random().build<TZoneLimitsProjection>();

// Presets
const zoneLimitsProjectionWithLimitAndCurrent = ZoneLimitsProjection.presets
  .withLimitAndCurrent()
  .build<TZoneLimitsProjection>();