TBasketDTO
TBasketDTO object¶
TBasketDTO is an object that represents a data type object of a Basket model and consists of the following fields:
- _links:
TBasketActionsDTO - id:
string - comment:
string - countries:
TCountryV2DTO[] - isVatEu:
boolean - hasPromoCode:
boolean - promoCode:
TPromotionCodeDTO | null - delivery:
TDeliveryDTO | null - discounts:
{ list: TDiscountDTO[]; sum: TFullPriceDTO; } - additionalFields:
{ selectFields: TSelectFieldDTO[]; descriptionFields: TDescriptionFieldDTO[]; inputFields: TInputFieldDTO[]; fileFields: TFileFieldDTO[]; hiddenFields: THiddenFieldDTO[]; checkboxFields: TCheckboxFieldDTO[]; } - taxes:
{ list: TTaxDTO[]; sum: TSimplePriceDTO; } - payments:
TBasketPaymentDTO[] - shippings:
TBasketShippingDTO[] - billingAddress:
TOrderAddressDTO | null - shippingAddress:
TOrderAddressDTO | null - sum:
TFullPriceDTO - sumWithoutPaymentAndShipping:
TFullPriceDTO - loyaltyPointsAwarded:
TLoyaltyPointsDTO | null - hasItemsExchangedWithLoyaltyPoints:
boolean - loyaltyPointsCost:
TLoyaltyPointsDTO | null - loyaltyPointsExchangePrice:
TFullPriceDTO | null - items:
{ list: TProductBasketDTO[]; count: number; positions: number; sum: TFullPriceDTO; discountedSum: TFullPriceDTO; } - invalidSections:
TBasketInvalidSections
TBasketActionsDTO¶
Represents the following type:
TCountryV2DTO¶
Represents the following type:
TPromotionCodeDTO¶
Represents the following type:
TDeliveryDTO¶
Represents the following type:
Where TDeliveryDurationDTO represents the following type:
type TDeliveryDurationDTO = {
valueFormatted: string;
timeInSeconds: number;
timeInHours: number;
timeInDays: number;
};
TDiscountDTO¶
Represents the following type:
Where TFullPriceDTO represents the following type:
type TFullPriceDTO = {
currency: string;
grossValue: number;
grossValueFormatted: string;
netValue: number;
netValueFormatted: string;
taxValue: number;
taxValueFormatted: string;
tax: number;
taxFormatted: string;
};
TSelectFieldDTO¶
Represents the following type:
type TSelectFieldDTO = {
fieldId: string;
order: number;
isRequired: boolean;
options: TSelectOption[];
label: string;
description: string;
};
Where TSelectOption represents the following type:
TDescriptionFieldDTO¶
Represents the following type:
type TDescriptionFieldDTO = {
fieldId: string;
order: number;
label: string;
description: string;
};
TInputFieldDTO¶
Represents the following type:
type TInputFieldDTO = {
fieldId: string;
order: number;
isRequired: boolean;
value: string;
label: string;
description: string;
};
TFileFieldDTO¶
Represents the following type:
type TFileFieldDTO = {
fieldId: string;
order: number;
isRequired: boolean;
fileKey: string;
fileName: string;
label: string;
description: string;
_links: TBasketActionsDTO;
};
THiddenFieldDTO¶
Represents the following type:
type THiddenFieldDTO = {
fieldId: string;
order: number;
value: string;
label: string;
description: string;
};
TCheckboxFieldDTO¶
Represents the following type:
type TCheckboxFieldDTO = {
fieldId: string;
order: number;
isRequired: boolean;
isChecked: boolean;
label: string;
description: string;
};
TTaxDTO¶
Represents the following type:
Where TSimplePriceDTO represents the following type:
TBasketPaymentDTO¶
Represents the following type:
type TBasketPaymentDTO = {
_links: TBasketActionsDTO;
channelId: string;
paymentId: number;
name: string;
isSelected: boolean;
description: string;
channelKey: string;
image: string;
isFeatured: boolean;
subChannels: string[];
additionalInfoLabel?: string;
integrationData: unknown;
};
TBasketShippingDTO¶
Represents the following type:
type TBasketShippingDTO = {
_links: TBasketActionsDTO;
shippingId: number;
name: string;
isSelected: boolean;
isPersonalCollect: boolean;
isToAddressDelivery: boolean;
isPickupPointDelivery: boolean;
pickupPoint: TPickupPointDTO | null;
description: string;
shippingKey: string;
image: string;
price: TFullPriceDTO;
isDiscounted: boolean;
basePrice: TFullPriceDTO;
discount: TFullPriceDTO | null;
requiredBasketValueForFreeShipping: TSimplePriceDTO | null;
remainingBasketValueForFreeShipping: TSimplePriceDTO | null;
countries: TShippingCountryDTO[];
availablePayments: TShippingPaymentDTO[];
integrationData: unknown;
};
Where TPickupPointDTO represents the following type:
type TPickupPointDTO = {
code: string;
isCollectOnDeliveryAvailable: boolean;
supplier: {
code: string;
name: string;
};
address: {
description: string;
street: string;
houseNumber: string;
city: string;
postalCode: string;
latitude: string;
longitude: string;
};
};
And TFullPriceDTO represents the following type:
type TFullPriceDTO = {
currency: string;
grossValue: number;
grossValueFormatted: string;
netValue: number;
netValueFormatted: string;
taxValue: number;
taxValueFormatted: string;
tax: number;
taxFormatted: string;
};
And TShippingCountryDTO represents the following type:
type TShippingCountryDTO = {
_links: TBasketActionsDTO;
isSelected: boolean;
country: TCountryV2DTO;
cost: TFullPriceDTO;
};
And TShippingPaymentDTO represents the following type:
TOrderAddressDTO¶
Represents the following type:
type TOrderAddressDTO = {
email?: string;
isCompany: boolean;
companyName: string;
firstName: string;
lastName: string;
personalIdNumber: string;
taxId: string;
countryId: number;
city: string;
postalCode: string;
street: string;
street2: string;
phone: string;
state: string;
};
TLoyaltyPointsDTO¶
Represents the following type:
TProductBasketDTO¶
Represents the following type:
type TProductBasketDTO = {
_links: TBasketActionsDTO;
itemId: string;
variantId: number;
productId: number;
quantity: number;
name: string;
isExchangedWithLoyaltyPoints: boolean;
image: {
title: string;
paths: {
webp?: string;
webp2x?: string;
'webp1.5x'?: string;
jpg?: string;
jpg2x?: string;
'jpg1.5x'?: string;
original?: string;
original2x?: string;
'original1.5x'?: string;
};
};
hasOptions: boolean;
options: {
name: string;
value: string;
}[];
delivery: TDeliveryDTO | null;
unit: TUnitV2DTO;
isBundle: boolean;
bundledItems?: TBundleItemDTO[];
isDigital: boolean;
sum: TFullPriceDTO;
price: TFullPriceDTO;
hasDifferentCurrency: boolean;
isSpecialOffer: boolean;
basePrice: TFullPriceDTO;
lowestHistoricalPriceInLast30Days: TFullPriceDTO;
loyaltyPointsAwarded: TLoyaltyPointsDTO | null;
sumLoyaltyPointsCost: TLoyaltyPointsDTO | null;
sumLoyaltyPointsExchangePrice: TFullPriceDTO | null;
loyaltyPointsCost: TLoyaltyPointsDTO | null;
loyaltyPointsExchangePrice: TFullPriceDTO | null;
package: number;
};
Where TUnitV2DTO represents the following type:
And TBundleItemDTO represents the following type:
TBasketInvalidSections¶
Represents the following type: