Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShopperOrders

Finish the shopper checkout experience resulting in an order.

Example with shopper auth

import { Checkout, ClientConfig, Customer, slasHelpers } from "commerce-sdk";
// or
const { Checkout, ClientConfig, Customer, slasHelpers } = require("commerce-sdk");

const clientConfig: ClientConfig = {
  parameters: {
    clientId: "XXXXXX",
    organizationId: "XXXX",
    shortCode: "XXX",
    siteId: "XX"
  }
};

// must be registered in SLAS. On server, redirectURI is never called
const redirectURI = "http://localhost:3000/callback";
const slasClient = new Customer.ShopperLogin(clientConfig);
token = await slasHelpers.loginGuestUser(slasClient, { redirectURI });

clientConfig.headers['authorization'] = `Bearer ${token.access_token}`;
const shopperOrdersClient = new Checkout.ShopperOrders(clientConfig);
API Version: 0.3.5
Last Updated:

Hierarchy

  • BaseClient
    • ShopperOrders

Index

Type aliases

Constructors

Properties

Methods

Type aliases

Static AsyncCreated

AsyncCreated: {}

Type declaration

Static AttributeDefinition

AttributeDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean }

Type declaration

  • Optional defaultValue?: PropertyValueDefinition
  • description: L10nString
  • Optional id?: string
  • Optional key?: boolean
  • Optional localizable?: boolean
  • Optional mandatory?: boolean
  • Optional max?: number
  • Optional min?: number
  • Optional minLength?: number
  • Optional multiValueType?: boolean
  • name: L10nString
  • Optional possibleValues?: Array<PropertyValueDefinition>
  • Optional regularExpression?: string
  • Optional scale?: number
  • Optional searchable?: boolean
  • Optional siteSpecific?: boolean
  • Optional system?: boolean
  • type: string
  • Optional unit?: L10nString
  • Optional visible?: boolean

Static Basket

Basket: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; agentBasket?: boolean; basketId?: string; billingAddress?: OrderAddress; bonusDiscountLineItems?: Array<BonusDiscountLineItem>; channelType?: string; couponItems?: Array<CouponItem>; creationDate?: any; currency?: string; customerInfo?: CustomerInfo; giftCertificateItems?: Array<GiftCertificateItem>; inventoryReservationExpiry?: any; lastModified?: any; merchandizeTotalTax?: number; notes?: SimpleLink; orderPriceAdjustments?: Array<PriceAdjustment>; orderTotal?: number; paymentInstruments?: Array<OrderPaymentInstrument>; productItems?: Array<ProductItem>; productSubTotal?: number; productTotal?: number; shipments?: Array<Shipment>; shippingItems?: Array<ShippingItem>; shippingTotal?: number; shippingTotalTax?: number; sourceCode?: string; taxTotal?: number; taxation?: string } & {}

Static BasketPaymentInstrumentRequest

BasketPaymentInstrumentRequest: { amount?: number; bankRoutingNumber?: string; giftCertificateCode?: string; paymentCard?: OrderPaymentCardRequest; paymentMethodId?: string } & {}

Static BasketsResult

BasketsResult: { baskets: Array<Basket>; total: number } & {}

Static BonusDiscountLineItem

BonusDiscountLineItem: { bonusProducts?: Array<ProductDetailsLink>; couponCode?: string; id?: string; maxBonusItems?: number; promotionId?: string } & {}

Static BoolFilter

BoolFilter: { filters?: Array<Filter>; operator: string } & {}

Static BoolQuery

BoolQuery: { must?: Array<Query>; mustNot?: Array<Query>; should?: Array<Query> } & {}

Static ChangeControlled

ChangeControlled: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ChangeControlledDataType

ChangeControlledDataType: { createdBy?: string; creationDate?: any; lastModifiedBy?: string; modificationDate?: any } & {}

Static ClosedObject

ClosedObject: {} & {}

Static CouponItem

CouponItem: { code: string; couponItemId?: string; statusCode?: string; valid?: boolean } & {}

Static CustomerInfo

CustomerInfo: { customerId?: string; customerName?: string; customerNo?: string; email: string } & {}

Static DateConditionalRequest

DateConditionalRequest: {}

Type declaration

Static DateRangeFilter

DateRangeFilter: {}

Type declaration

Static DatetimeRangeFilter

DatetimeRangeFilter: {}

Type declaration

Static Discount

Discount: { amount?: number; percentage?: number; priceBookId?: string; type: string } & {}

Static DiscountRequest

DiscountRequest: { type: string; value: number }

Type declaration

  • type: string
  • value: number

Static Error

Error: { detail?: string; instance?: string; title?: string; type: string } & {}

Static ErrorResponse

ErrorResponse: { detail?: string; instance?: string; title?: string; type: string } & {}

Static EtagConditionalRequest

EtagConditionalRequest: {}

Type declaration

Static EtagResponse

EtagResponse: {}

Type declaration

Static Filter

Filter: { boolFilter?: BoolFilter; queryFilter?: QueryFilter; range2Filter?: Range2Filter; rangeFilter?: RangeFilter; termFilter?: TermFilter } & {}

Static FilteredQuery

FilteredQuery: { filter: Filter; query: Query } & {}

Static GiftCertificateItem

GiftCertificateItem: { amount: number; giftCertificateItemId?: string; message?: string; recipientEmail: string; recipientName?: string; senderName?: string; shipmentId?: string } & {}

Static IntegerRangeFilter

IntegerRangeFilter: {}

Type declaration

Static L10nString

L10nString: {} & {}

Static LocaleSpecific

LocaleSpecific: {}

Type declaration

Static LocalizedString

LocalizedString: {} & {}

Static MatchAllQuery

MatchAllQuery: {} & {}

Static Money

Money: { currencyMnemonic?: string; value?: number } & {}

Static MoneyMnemonic

MoneyMnemonic: { currencyMnemonic?: string; value?: number } & {}

Static NestedQuery

NestedQuery: { path: string; query: Query; scoreMode?: string } & {}

Static NoPropertiesAllowed

NoPropertiesAllowed: {}

Type declaration

Static Note

Note: { createdBy?: string; creationDate?: any; id?: string; subject?: string; text?: string }

Type declaration

  • Optional createdBy?: string
  • Optional creationDate?: any
  • Optional id?: string
  • Optional subject?: string
  • Optional text?: string

Static NotesResult

NotesResult: { notes?: Array<Note> } & {}

Static NumericRangeFilter

NumericRangeFilter: {}

Type declaration

Static OffsetPaginated

OffsetPaginated: {}

Type declaration

Static OpenObject

OpenObject: {} & {}

Static OptionItem

OptionItem: { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array<ProductItem>; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionId: string; optionItems?: Array<OptionItem>; optionValueId: string; price?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number } & {}

Static Order

Order: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; billingAddress?: OrderAddress; bonusDiscountLineItems?: Array<BonusDiscountLineItem>; channelType?: string; confirmationStatus?: string; couponItems?: Array<CouponItem>; createdBy?: string; creationDate?: any; currency?: string; customerInfo?: CustomerInfo; customerName?: string; exportStatus?: string; externalOrderStatus?: string; giftCertificateItems?: Array<GiftCertificateItem>; globalPartyId?: string; lastModified?: any; merchandizeTotalTax?: number; notes?: SimpleLink; orderNo?: string; orderPriceAdjustments?: Array<PriceAdjustment>; orderToken?: string; orderTotal?: number; paymentInstruments?: Array<OrderPaymentInstrument>; paymentStatus?: string; productItems?: Array<ProductItem>; productSubTotal?: number; productTotal?: number; shipments?: Array<Shipment>; shippingItems?: Array<ShippingItem>; shippingStatus?: string; shippingTotal?: number; shippingTotalTax?: number; siteId?: string; sourceCode?: string; status?: string; taxTotal?: number; taxation?: string } & {}

Static OrderAddress

OrderAddress: { address1?: string; address2?: string; city?: string; companyName?: string; countryCode?: string; firstName?: string; fullName?: string; id?: string; jobTitle?: string; lastName?: string; phone?: string; postBox?: string; postalCode?: string; salutation?: string; secondName?: string; stateCode?: string; suffix?: string; suite?: string; title?: string } & {}

Static OrderPaymentCardRequest

OrderPaymentCardRequest: { cardType?: string; creditCardToken?: string; expirationMonth?: number; expirationYear?: number; holder?: string; issueNumber?: string; maskedNumber?: string; validFromMonth?: number; validFromYear?: number }

Type declaration

  • Optional cardType?: string
  • Optional creditCardToken?: string
  • Optional expirationMonth?: number
  • Optional expirationYear?: number
  • Optional holder?: string
  • Optional issueNumber?: string
  • Optional maskedNumber?: string
  • Optional validFromMonth?: number
  • Optional validFromYear?: number

Static OrderPaymentInstrument

OrderPaymentInstrument: { amount?: number; authorizationStatus?: Status; bankRoutingNumber?: string; maskedGiftCertificateCode?: string; paymentCard?: PaymentCard; paymentInstrumentId?: string; paymentMethodId?: string } & {}

Static OrderPaymentInstrumentRequest

OrderPaymentInstrumentRequest: { amount?: number; bankRoutingNumber?: string; giftCertificateCode?: string; paymentCard?: OrderPaymentCardRequest; paymentMethodId?: string } & {}

Static PaginatedSearchResult

PaginatedSearchResult: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PaginatedSearchResultBase

PaginatedSearchResultBase: { hits?: Array<object>; limit: number; offset: any; query: Query; sorts?: Array<Sort>; total: any } & {}

Static PaymentCard

PaymentCard: { cardType?: string; creditCardExpired?: boolean; creditCardToken?: string; expirationMonth?: number; expirationYear?: number; holder?: string; issueNumber?: string; maskedNumber?: string; numberLastDigits?: string; validFromMonth?: number; validFromYear?: number }

Type declaration

  • Optional cardType?: string
  • Optional creditCardExpired?: boolean
  • Optional creditCardToken?: string
  • Optional expirationMonth?: number
  • Optional expirationYear?: number
  • Optional holder?: string
  • Optional issueNumber?: string
  • Optional maskedNumber?: string
  • Optional numberLastDigits?: string
  • Optional validFromMonth?: number
  • Optional validFromYear?: number

Static PaymentCardSpec

PaymentCardSpec: { cardType?: string; checksumVerificationEnabled?: boolean; description?: string; image?: string; name?: string; numberLengths?: Array<string>; numberPrefixes?: Array<string> } & {}

Static PaymentMethod

PaymentMethod: { cards?: Array<PaymentCardSpec>; description?: string; id: string; image?: string; name?: string; paymentProcessorId?: string } & {}

Static PaymentMethodResult

PaymentMethodResult: { applicablePaymentMethods?: Array<PaymentMethod> } & {}

Static PriceAdjustment

PriceAdjustment: { appliedDiscount?: Discount; couponCode?: string; createdBy?: string; creationDate?: any; custom?: boolean; itemText?: string; lastModified?: any; manual?: boolean; price?: number; priceAdjustmentId?: string; promotionId?: string; promotionLink?: string; reasonCode?: string } & {}

Static PriceAdjustmentRequest

PriceAdjustmentRequest: { discount?: DiscountRequest; itemId?: string; itemText?: string; level: string; promotionId?: string; reasonCode?: string } & {}

Static PriceBookIds

PriceBookIds: Array<string>

Static ProductDetailsLink

ProductDetailsLink: { productDescription?: string; productId: string; productName?: string; title?: string }

Type declaration

  • Optional productDescription?: string
  • productId: string
  • Optional productName?: string
  • Optional title?: string

Static ProductItem

ProductItem: { adjustedTax?: number; basePrice?: number; bonusDiscountLineItemId?: string; bonusProductLineItem?: boolean; bundledProductItems?: Array<ProductItem>; gift?: boolean; giftMessage?: string; inventoryId?: string; itemId?: string; itemText?: string; optionItems?: Array<OptionItem>; price?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; priceAfterOrderDiscount?: number; productId?: string; productListItem?: ProductListItemReference; productName?: string; quantity?: number; shipmentId?: string; shippingItemId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number } & {}

Static ProductListItemReference

ProductListItemReference: { id: string; priority?: number; productDetailsLink?: ProductDetailsLink; productList?: ProductListLink; public?: boolean; purchasedQuantity?: number; quantity?: number; type?: string }

Type declaration

  • id: string
  • Optional priority?: number
  • Optional productDetailsLink?: ProductDetailsLink
  • Optional productList?: ProductListLink
  • Optional public?: boolean
  • Optional purchasedQuantity?: number
  • Optional quantity?: number
  • Optional type?: string

Static ProductListLink

ProductListLink: { description?: string; name?: string; public?: boolean; title?: string; type?: string } & {}

Static PromotionLink

PromotionLink: { calloutMsg?: string; name?: string; promotionId?: string; title?: string }

Type declaration

  • Optional calloutMsg?: string
  • Optional name?: string
  • Optional promotionId?: string
  • Optional title?: string

Static PropertyDefinition

PropertyDefinition: { defaultValue?: PropertyValueDefinition; description: L10nString; id?: string; key?: boolean; localizable?: boolean; mandatory?: boolean; max?: number; min?: number; minLength?: number; multiValueType?: boolean; name: L10nString; possibleValues?: Array<PropertyValueDefinition>; regularExpression?: string; scale?: number; searchable?: boolean; siteSpecific?: boolean; system?: boolean; type: string; unit?: L10nString; visible?: boolean } & {}

Static PropertyValueDefinition

PropertyValueDefinition: { description: L10nString; displayValue: L10nString; id: string; position?: number; value: string }

Type declaration

  • description: L10nString
  • displayValue: L10nString
  • id: string
  • Optional position?: number
  • value: string

Static Query

Query: { boolQuery?: BoolQuery; filteredQuery?: FilteredQuery; matchAllQuery?: MatchAllQuery; nestedQuery?: NestedQuery; termQuery?: TermQuery; textQuery?: TextQuery } & {}

Static QueryFilter

QueryFilter: { query: Query } & {}

Static QueryParamsLimit

QueryParamsLimit: {}

Type declaration

Static QueryParamsOffset

QueryParamsOffset: {}

Type declaration

Static Range2Filter

Range2Filter: { filterMode?: string; fromField: string; fromInclusive?: boolean; fromValue?: any; toField: string; toInclusive?: boolean; toValue?: any } & {}

Static RangeFilter

RangeFilter: { field: string; from?: any; fromInclusive?: boolean; to?: any; toInclusive?: boolean } & {}

Static RateLimited

RateLimited: {}

Type declaration

Static RateLimited2

RateLimited2: {}

Type declaration

Static RateLimited3

RateLimited3: {}

Type declaration

Static RateLimited4

RateLimited4: {}

Type declaration

Static RateLimited5

RateLimited5: {}

Type declaration

Static SearchRequest

SearchRequest: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static SearchRequestBase

SearchRequestBase: { limit?: number; offset?: any; query: Query; sorts?: Array<Sort> } & {}

Static Shipment

Shipment: { adjustedMerchandizeTotalTax?: number; adjustedShippingTotalTax?: number; gift?: boolean; giftMessage?: string; merchandizeTotalTax?: number; productSubTotal?: number; productTotal?: number; shipmentId?: string; shipmentNo?: string; shipmentTotal?: number; shippingAddress?: OrderAddress; shippingMethod?: ShippingMethod; shippingStatus?: string; shippingTotal?: number; shippingTotalTax?: number; taxTotal?: number; trackingNumber?: string } & {}

Static ShippingItem

ShippingItem: { adjustedTax?: number; basePrice?: number; itemId?: string; itemText?: string; price?: number; priceAdjustments?: Array<PriceAdjustment>; priceAfterItemDiscount?: number; shipmentId?: string; tax?: number; taxBasis?: number; taxClassId?: string; taxRate?: number } & {}

Static ShippingMethod

ShippingMethod: { description?: string; externalShippingMethod?: string; id: string; name?: string; price?: number; shippingPromotions?: Array<ShippingPromotion> } & {}

Static ShippingMethodResult

ShippingMethodResult: { applicableShippingMethods?: Array<ShippingMethod>; defaultShippingMethodId?: string } & {}

Static ShippingPromotion

ShippingPromotion: { calloutMsg?: string; promotionId?: string; promotionName?: string } & {}

Static SimpleLink

SimpleLink: {}

Type declaration

Static SimpleSearchResult

SimpleSearchResult: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SimpleSearchResultBase

SimpleSearchResultBase: { hits?: Array<object>; limit: number; offset: any; total: any } & {}

Static SiteSpecific

SiteSpecific: {}

Type declaration

Static Sort

Sort: { field: string; sortOrder?: string } & {}

Static SpecifiedPropertiesAllowed

SpecifiedPropertiesAllowed: {} & {}

Static Status

Status: { code?: string; message?: string; status?: number }

Type declaration

  • Optional code?: string
  • Optional message?: string
  • Optional status?: number

Static SyncCreated

SyncCreated: {}

Type declaration

Static TaxItem

TaxItem: { id: string; rate: number; value?: number }

Type declaration

  • id: string
  • rate: number
  • Optional value?: number

Static TaxItems

TaxItems: { taxItems?: Array<TaxItem> } & {}

Static Taxes

Taxes: { taxes: {} & {} }

Type declaration

  • taxes: {} & {}

Static TermFilter

TermFilter: { field: string; operator: string; values?: Array<any> } & {}

Static TermQuery

TermQuery: { fields: Array<string>; operator: string; values?: Array<any> } & {}

Static TextQuery

TextQuery: { fields: Array<string>; searchPhrase: string } & {}

Constructors

constructor

  • Parameters

    • config: ClientConfig

    Returns ShopperOrders

Properties

clientConfig

clientConfig: ClientConfig

Methods

createOrder

  • createOrder(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • createOrder<T>(options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Order>
  • Submits an order based on a prepared basket. The only considered value from the request body is basketId.

    If you would like to get a raw Response object use the other createOrder function.

    Parameters

    • options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type ShopperOrders.Order.

  • Submits an order based on a prepared basket. The only considered value from the request body is basketId.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: Basket; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: Basket
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Order>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Order otherwise.

createPaymentInstrumentForOrder

  • createPaymentInstrumentForOrder(options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • createPaymentInstrumentForOrder<T>(options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Order>
  • Adds a payment instrument to an order.

    Details:

    The payment instrument is added with the provided details. The payment method must be applicable for the order see GET /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request.

    If you would like to get a raw Response object use the other createPaymentInstrumentForOrder function.

    Parameters

    • options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrumentRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type ShopperOrders.Order.

  • Adds a payment instrument to an order.

    Details:

    The payment instrument is added with the provided details. The payment method must be applicable for the order see GET /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrumentRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Order>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Order otherwise.

getOrder

  • getOrder(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • getOrder<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Order>
  • Gets information for an order.

    If you would like to get a raw Response object use the other getOrder function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type ShopperOrders.Order.

  • Gets information for an order.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Order>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Order otherwise.

getPaymentMethodsForOrder

  • getPaymentMethodsForOrder(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<PaymentMethodResult>
  • getPaymentMethodsForOrder<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.PaymentMethodResult>
  • Gets the applicable payment methods for an existing order considering the open payment amount only.

    If you would like to get a raw Response object use the other getPaymentMethodsForOrder function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<PaymentMethodResult>

    A promise of type ShopperOrders.PaymentMethodResult.

  • Gets the applicable payment methods for an existing order considering the open payment amount only.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.PaymentMethodResult>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.PaymentMethodResult otherwise.

getTaxesFromOrder

  • getTaxesFromOrder(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Taxes>
  • getTaxesFromOrder<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Taxes>
  • This method gives you the external taxation data of the order transferred from the basket during order creation. This endpoint can be called only if external taxation was used. See POST /baskets for more information.

    If you would like to get a raw Response object use the other getTaxesFromOrder function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Taxes>

    A promise of type ShopperOrders.Taxes.

  • This method gives you the external taxation data of the order transferred from the basket during order creation. This endpoint can be called only if external taxation was used. See POST /baskets for more information.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { orderNo: string; organizationId?: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Taxes>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Taxes otherwise.

removePaymentInstrumentFromOrder

  • removePaymentInstrumentFromOrder(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • removePaymentInstrumentFromOrder<T>(options?: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Order>
  • Removes a payment instrument of an order.

    If you would like to get a raw Response object use the other removePaymentInstrumentFromOrder function.

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type ShopperOrders.Order.

  • Removes a payment instrument of an order.

    Type parameters

    • T: boolean

    Parameters

    • Optional options: { fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Order>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Order otherwise.

updatePaymentInstrumentForOrder

  • updatePaymentInstrumentForOrder(options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }): Promise<Order>
  • updatePaymentInstrumentForOrder<T>(options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }, rawResponse?: T): Promise<T extends true ? Response : ShopperOrders.Order>
  • Updates a payment instrument of an order.

    Details:

    The payment instrument is updated with the provided details. The payment method must be applicable for the order see GET /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request.

    If you would like to get a raw Response object use the other updatePaymentInstrumentForOrder function.

    Parameters

    • options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrumentRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions

    Returns Promise<Order>

    A promise of type ShopperOrders.Order.

  • Updates a payment instrument of an order.

    Details:

    The payment instrument is updated with the provided details. The payment method must be applicable for the order see GET /baskets/{basketId}/payment-methods, if the payment method is 'CREDIT_CARD' a paymentCard must be specified in the request.

    Type parameters

    • T: boolean

    Parameters

    • options: { body: OrderPaymentInstrumentRequest; fetchOptions?: RequestInit; headers?: {}; parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}; retrySettings?: OperationOptions }

      An object containing the options for this method.

      • body: OrderPaymentInstrumentRequest
      • Optional fetchOptions?: RequestInit
      • Optional headers?: {}
        • [key: string]: string
      • Optional parameters?: { locale?: string; orderNo: string; organizationId?: string; paymentInstrumentId: string; siteId?: string } & {}
      • Optional retrySettings?: OperationOptions
    • Optional rawResponse: T

      Set to true to return entire Response object instead of DTO.

    Returns Promise<T extends true ? Response : ShopperOrders.Order>

    A promise of type Response if rawResponse is true, a promise of type ShopperOrders.Order otherwise.

Generated using TypeDoc