@salesforce/b2c-tooling-sdk 1.15.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/content-schemas/regiondefinition.json +1 -0
- package/data/job-steps/CatalogDeltaExport.md +31 -0
- package/data/job-steps/CreateSitemap.md +22 -0
- package/data/job-steps/CustomerListsDeltaExport.md +30 -0
- package/data/job-steps/DownloadActiveDataFromStorage.md +24 -0
- package/data/job-steps/ExecuteCategorizationRules.md +25 -0
- package/data/job-steps/ExecuteDataReplication.md +24 -0
- package/data/job-steps/ExecutePipeline.md +24 -0
- package/data/job-steps/ExecutePreconfiguredCodeReplicationProcess.md +24 -0
- package/data/job-steps/ExecutePreconfiguredDataReplicationProcess.md +24 -0
- package/data/job-steps/ExecuteScriptModule.md +27 -0
- package/data/job-steps/ExportABTests.md +30 -0
- package/data/job-steps/ExportAssignments.md +30 -0
- package/data/job-steps/ExportCatalog.md +37 -0
- package/data/job-steps/ExportContent.md +31 -0
- package/data/job-steps/ExportContentSlots.md +30 -0
- package/data/job-steps/ExportCouponCodes.md +33 -0
- package/data/job-steps/ExportCoupons.md +30 -0
- package/data/job-steps/ExportCustomObjects.md +31 -0
- package/data/job-steps/ExportCustomerGroups.md +30 -0
- package/data/job-steps/ExportCustomerList.md +31 -0
- package/data/job-steps/ExportCustomers.md +30 -0
- package/data/job-steps/ExportFacebookFeed.md +26 -0
- package/data/job-steps/ExportGiftCertificates.md +30 -0
- package/data/job-steps/ExportInventoryLists.md +31 -0
- package/data/job-steps/ExportMetaData.md +32 -0
- package/data/job-steps/ExportOrders.md +42 -0
- package/data/job-steps/ExportPageLocalization.md +34 -0
- package/data/job-steps/ExportPriceBook.md +31 -0
- package/data/job-steps/ExportProductLists.md +34 -0
- package/data/job-steps/ExportPromotions.md +30 -0
- package/data/job-steps/ExportShippingMethods.md +30 -0
- package/data/job-steps/ExportSourceCodeGroups.md +30 -0
- package/data/job-steps/ExportStores.md +31 -0
- package/data/job-steps/ExportTaxTable.md +30 -0
- package/data/job-steps/ImportABTests.md +34 -0
- package/data/job-steps/ImportActiveData.md +33 -0
- package/data/job-steps/ImportAssignments.md +34 -0
- package/data/job-steps/ImportCatalog.md +34 -0
- package/data/job-steps/ImportContent.md +34 -0
- package/data/job-steps/ImportContentSlots.md +34 -0
- package/data/job-steps/ImportCouponCodeRedemptions.md +34 -0
- package/data/job-steps/ImportCoupons.md +34 -0
- package/data/job-steps/ImportCustomObjects.md +34 -0
- package/data/job-steps/ImportCustomerGroups.md +34 -0
- package/data/job-steps/ImportCustomerList.md +34 -0
- package/data/job-steps/ImportCustomerLists.md +34 -0
- package/data/job-steps/ImportCustomers.md +34 -0
- package/data/job-steps/ImportGiftCertificates.md +34 -0
- package/data/job-steps/ImportInventoryLists.md +35 -0
- package/data/job-steps/ImportKeyValueMapping.md +35 -0
- package/data/job-steps/ImportPageLocalization.md +34 -0
- package/data/job-steps/ImportPriceBook.md +34 -0
- package/data/job-steps/ImportProductLists.md +34 -0
- package/data/job-steps/ImportPromotions.md +34 -0
- package/data/job-steps/ImportShippingMethods.md +34 -0
- package/data/job-steps/ImportSiteArchive.md +30 -0
- package/data/job-steps/ImportSourceCodeGroups.md +34 -0
- package/data/job-steps/ImportStores.md +34 -0
- package/data/job-steps/ImportTaxTable.md +34 -0
- package/data/job-steps/IncludeStepsFromJob.md +24 -0
- package/data/job-steps/InvalidateCache.md +26 -0
- package/data/job-steps/LibraryDeltaExport.md +30 -0
- package/data/job-steps/SearchReindex.md +27 -0
- package/data/job-steps/SiteExport.md +32 -0
- package/data/job-steps/UndoPreconfiguredCodeReplicationProcess.md +24 -0
- package/data/job-steps/UndoPreconfiguredDataReplicationProcess.md +24 -0
- package/data/job-steps/UpdateStorefrontURLs.md +22 -0
- package/data/job-steps/UploadActiveDataBackupToStorage.md +22 -0
- package/data/job-steps/UploadActiveDataToStorage.md +24 -0
- package/data/job-steps/index.json +426 -0
- package/data/job-steps/job-steps.json +2910 -0
- package/data/job-steps/job-steps.md +96 -0
- package/data/script-api/TopLevel.APIException.md +1 -1
- package/data/script-api/dw.catalog.CatalogMgr.md +8 -2
- package/data/script-api/dw.crypto.Cipher.md +5 -1
- package/data/script-api/dw.customer.Profile.md +45 -0
- package/data/script-api/dw.customer.consent.ConsentStatusEntry.md +92 -0
- package/data/script-api/dw.customer.consent.MarketingConsentSubscription.md +247 -0
- package/data/script-api/dw.customer.consent.ShopperConsentErrorCodes.md +74 -0
- package/data/script-api/dw.customer.consent.ShopperConsentException.md +63 -0
- package/data/script-api/dw.customer.consent.ShopperConsentMgr.md +152 -0
- package/data/script-api/dw.customer.consent.md +10 -0
- package/data/script-api/dw.extensions.payments.SalesforcePaymentsHooks.md +24 -0
- package/data/script-api/dw.extensions.payments.SalesforcePaymentsSiteConfiguration.md +76 -0
- package/data/script-api/dw.object.CustomAttributes.md +72 -29
- package/data/script-api/dw.object.md +1 -1
- package/data/script-api/dw.order.Basket.md +3 -2
- package/data/script-api/dw.order.GiftCertificateLineItem.md +1 -1
- package/data/script-api/dw.order.LineItem.md +88 -0
- package/data/script-api/dw.order.LineItemCtnr.md +41 -11
- package/data/script-api/dw.order.LineItemTax.md +142 -0
- package/data/script-api/dw.order.OrderMgr.md +8 -0
- package/data/script-api/dw.order.PriceAdjustment.md +1 -1
- package/data/script-api/dw.order.ProductLineItem.md +1 -1
- package/data/script-api/dw.order.ProductShippingLineItem.md +1 -1
- package/data/script-api/dw.order.Shipment.md +12 -4
- package/data/script-api/dw.order.ShippingLineItem.md +1 -1
- package/data/script-api/dw.order.TaxMgr.md +54 -0
- package/data/script-api/dw.order.hooks.TaxHooks.md +495 -0
- package/data/script-api/dw.order.hooks.md +1 -0
- package/data/script-api/dw.order.md +1 -0
- package/data/script-api/dw.sitemap.SitemapFile.md +1 -1
- package/data/script-api/dw.sitemap.SitemapMgr.md +23 -0
- package/data/script-api/dw.system.Request.md +0 -1
- package/data/script-api/dw.util.Assert.md +29 -0
- package/data/script-api/dw.util.Locale.md +5 -2
- package/data/script-api/dw.web.Cookie.md +0 -6
- package/data/script-api/dw.web.PageMetaTag.md +25 -1
- package/data/script-api/dw.ws.WSUtil.md +2 -2
- package/data/script-api/index.json +49 -2
- package/data/script-api/index.md +2 -1
- package/data/xsd/commercefeaturestate.xsd +1 -0
- package/data/xsd/customer.xsd +11 -0
- package/data/xsd/eventrouting.xsd +257 -0
- package/data/xsd/index.json +6 -2
- package/data/xsd/order.xsd +53 -0
- package/data/xsd/store.xsd +8 -0
- package/data/xsd/storefronts.xsd +57 -1
- package/dist/esm/auth/dispatch-fetch.js +9 -2
- package/dist/esm/auth/dispatch-fetch.js.map +1 -1
- package/dist/esm/auth/oauth-jwt.js +9 -1
- package/dist/esm/auth/oauth-jwt.js.map +1 -1
- package/dist/esm/auth/oauth.js +9 -1
- package/dist/esm/auth/oauth.js.map +1 -1
- package/dist/esm/auth/stateful-oauth-strategy.js +26 -3
- package/dist/esm/auth/stateful-oauth-strategy.js.map +1 -1
- package/dist/esm/clients/am-api.js +9 -1
- package/dist/esm/clients/am-api.js.map +1 -1
- package/dist/esm/clients/middleware.js +9 -1
- package/dist/esm/clients/middleware.js.map +1 -1
- package/dist/esm/clients/webdav.js +14 -6
- package/dist/esm/clients/webdav.js.map +1 -1
- package/dist/esm/docs/search.d.ts +6 -3
- package/dist/esm/docs/search.js +39 -8
- package/dist/esm/docs/search.js.map +1 -1
- package/dist/esm/docs/types.d.ts +1 -0
- package/dist/esm/docs/types.js +1 -0
- package/dist/esm/docs/types.js.map +1 -1
- package/dist/esm/errors/index.d.ts +1 -0
- package/dist/esm/errors/index.js +1 -0
- package/dist/esm/errors/index.js.map +1 -1
- package/dist/esm/errors/network-error.d.ts +104 -0
- package/dist/esm/errors/network-error.js +301 -0
- package/dist/esm/errors/network-error.js.map +1 -0
- package/dist/esm/operations/cap/pull.js +4 -1
- package/dist/esm/operations/cap/pull.js.map +1 -1
- package/dist/esm/operations/code/constants.d.ts +17 -0
- package/dist/esm/operations/code/constants.js +23 -0
- package/dist/esm/operations/code/constants.js.map +1 -0
- package/dist/esm/operations/code/deploy.js +31 -2
- package/dist/esm/operations/code/deploy.js.map +1 -1
- package/dist/esm/operations/code/download.js +1 -2
- package/dist/esm/operations/code/download.js.map +1 -1
- package/dist/esm/operations/debug/dap-adapter.d.ts +9 -0
- package/dist/esm/operations/debug/dap-adapter.js +17 -0
- package/dist/esm/operations/debug/dap-adapter.js.map +1 -1
- package/dist/esm/operations/debug/debug-session.d.ts +8 -0
- package/dist/esm/operations/debug/debug-session.js +18 -0
- package/dist/esm/operations/debug/debug-session.js.map +1 -1
- package/dist/esm/operations/debug/sdapi-client.d.ts +30 -0
- package/dist/esm/operations/debug/sdapi-client.js +80 -6
- package/dist/esm/operations/debug/sdapi-client.js.map +1 -1
- package/dist/esm/skills/github.js +77 -24
- package/dist/esm/skills/github.js.map +1 -1
- package/dist/esm/slas/token.js +9 -1
- package/dist/esm/slas/token.js.map +1 -1
- package/package.json +4 -2
|
@@ -26,6 +26,7 @@ Common line item base class.
|
|
|
26
26
|
| [taxBasis](#taxbasis): [Money](dw.value.Money.md) `(read-only)` | Get the price used to calculate the tax for this line item. |
|
|
27
27
|
| [taxClassID](#taxclassid): [String](TopLevel.String.md) | Returns the tax class ID for the line item or null if no tax class ID is associated with the line item. |
|
|
28
28
|
| [taxRate](#taxrate): [Number](TopLevel.Number.md) | Returns the tax rate, which is the decimal tax rate to be applied to the product represented by this line item. |
|
|
29
|
+
| [taxes](#taxes): [Collection](dw.util.Collection.md) | Returns the tax items for this line item. |
|
|
29
30
|
|
|
30
31
|
## Constructor Summary
|
|
31
32
|
|
|
@@ -45,6 +46,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
45
46
|
| [getTaxBasis](dw.order.LineItem.md#gettaxbasis)() | Get the price used to calculate the tax for this line item. |
|
|
46
47
|
| [getTaxClassID](dw.order.LineItem.md#gettaxclassid)() | Returns the tax class ID for the line item or null if no tax class ID is associated with the line item. |
|
|
47
48
|
| [getTaxRate](dw.order.LineItem.md#gettaxrate)() | Returns the tax rate, which is the decimal tax rate to be applied to the product represented by this line item. |
|
|
49
|
+
| [getTaxes](dw.order.LineItem.md#gettaxes)() | Returns the tax items for this line item. |
|
|
48
50
|
| ~~[setBasePrice](dw.order.LineItem.md#setbasepricemoney)([Money](dw.value.Money.md))~~ | Sets the base price for the line item, which is the price of the unit before applying adjustments, in the purchase currency. |
|
|
49
51
|
| ~~[setGrossPrice](dw.order.LineItem.md#setgrosspricemoney)([Money](dw.value.Money.md))~~ | Sets the gross price for the line item, which is the Price of the unit before applying adjustments, in the purchase currency, including tax. |
|
|
50
52
|
| [setLineItemText](dw.order.LineItem.md#setlineitemtextstring)([String](TopLevel.String.md)) | Sets the display text for the line item. |
|
|
@@ -53,6 +55,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
53
55
|
| [setTax](dw.order.LineItem.md#settaxmoney)([Money](dw.value.Money.md)) | Sets the value for the tax of the line item, which is the the tax of the unit before applying adjustments, in the purchase currency. |
|
|
54
56
|
| [setTaxClassID](dw.order.LineItem.md#settaxclassidstring)([String](TopLevel.String.md)) | Sets the tax class ID for the line item. |
|
|
55
57
|
| [setTaxRate](dw.order.LineItem.md#settaxratenumber)([Number](TopLevel.Number.md)) | Sets the tax rate, which is the decimal tax rate to be applied to the product represented by this line item. |
|
|
58
|
+
| [setTaxes](dw.order.LineItem.md#settaxescollection)([Collection](dw.util.Collection.md)) | Sets the tax items for this line item. |
|
|
56
59
|
| ~~[updatePrice](dw.order.LineItem.md#updatepricemoney)([Money](dw.value.Money.md))~~ | Updates the price attributes of the line item based on the specified price. |
|
|
57
60
|
| [updateTax](dw.order.LineItem.md#updatetaxnumber)([Number](TopLevel.Number.md)) | Updates the tax-related attributes of the line item based on the specified tax rate, a tax basis determined by the system and the "Tax Rounding Mode" order preference. |
|
|
58
61
|
| [updateTax](dw.order.LineItem.md#updatetaxnumber-money)([Number](TopLevel.Number.md), [Money](dw.value.Money.md)) | Updates the tax-related attributes of the line item based on the specified tax rate, the passed tax basis and the "Tax Rounding Mode" order preference. |
|
|
@@ -161,6 +164,23 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
161
164
|
|
|
162
165
|
|
|
163
166
|
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### taxes
|
|
170
|
+
- taxes: [Collection](dw.util.Collection.md)
|
|
171
|
+
- : Returns the tax items for this line item. When taxes are set via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection), the line item's
|
|
172
|
+
tax amount and tax rate are updated as the sum and combined rate of all tax items. The tax items are preserved
|
|
173
|
+
after order creation and can be retrieved on both baskets and orders.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
**See Also:**
|
|
180
|
+
- [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)
|
|
181
|
+
- [LineItemTax](dw.order.LineItemTax.md)
|
|
182
|
+
|
|
183
|
+
|
|
164
184
|
---
|
|
165
185
|
|
|
166
186
|
## Method Details
|
|
@@ -292,6 +312,26 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
292
312
|
- the value of the tax rate.
|
|
293
313
|
|
|
294
314
|
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
### getTaxes()
|
|
318
|
+
- getTaxes(): [Collection](dw.util.Collection.md)
|
|
319
|
+
- : Returns the tax items for this line item. When taxes are set via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection), the line item's
|
|
320
|
+
tax amount and tax rate are updated as the sum and combined rate of all tax items. The tax items are preserved
|
|
321
|
+
after order creation and can be retrieved on both baskets and orders.
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
**Returns:**
|
|
328
|
+
- collection of [LineItemTax](dw.order.LineItemTax.md); empty when no tax items are set
|
|
329
|
+
|
|
330
|
+
**See Also:**
|
|
331
|
+
- [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)
|
|
332
|
+
- [LineItemTax](dw.order.LineItemTax.md)
|
|
333
|
+
|
|
334
|
+
|
|
295
335
|
---
|
|
296
336
|
|
|
297
337
|
### setBasePrice(Money)
|
|
@@ -377,6 +417,9 @@ Use [updatePrice(Money)](dw.order.LineItem.md#updatepricemoney) which sets the b
|
|
|
377
417
|
- setTax(aValue: [Money](dw.value.Money.md)): void
|
|
378
418
|
- : Sets the value for the tax of the line item, which is the the tax of the unit before applying adjustments, in the
|
|
379
419
|
purchase currency.
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
If tax items are already set (e.g. via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)), calling this will clear them.
|
|
380
423
|
|
|
381
424
|
|
|
382
425
|
**Parameters:**
|
|
@@ -399,12 +442,51 @@ Use [updatePrice(Money)](dw.order.LineItem.md#updatepricemoney) which sets the b
|
|
|
399
442
|
- setTaxRate(taxRate: [Number](TopLevel.Number.md)): void
|
|
400
443
|
- : Sets the tax rate, which is the decimal tax rate to be applied to the product represented by this line item. A
|
|
401
444
|
value of 0.175 represents a percentage of 17.5%.
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
If tax items are already set (e.g. via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)), calling this will clear them.
|
|
402
448
|
|
|
403
449
|
|
|
404
450
|
**Parameters:**
|
|
405
451
|
- taxRate - the new value for the tax rate.
|
|
406
452
|
|
|
407
453
|
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
### setTaxes(Collection)
|
|
457
|
+
- setTaxes(taxItems: [Collection](dw.util.Collection.md)): void
|
|
458
|
+
- : Sets the tax items for this line item. The container must be a basket. Persists the given items, then aggregates
|
|
459
|
+
them (sum of tax values, combined tax rate) and updates this line item's tax amount and tax rate accordingly.
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
Each element in the collection must be a [LineItemTax](dw.order.LineItemTax.md), for example created via
|
|
463
|
+
[new LineItemTax(taxId, taxRate, taxValue)](dw.order.LineItemTax.md#lineitemtaxstring-number-money).
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
Use either multilevel tax items via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection) or
|
|
467
|
+
[setTax(Money)](dw.order.LineItem.md#settaxmoney)/[setTaxRate(Number)](dw.order.LineItem.md#settaxratenumber)/[updateTax(Number, Money)](dw.order.LineItem.md#updatetaxnumber-money)/[updateTaxAmount(Money)](dw.order.LineItem.md#updatetaxamountmoney),
|
|
468
|
+
not both.
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
The maximum number of tax items allowed per line item is 10.
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
**Parameters:**
|
|
480
|
+
- taxItems - the tax items to set; each element must be a [LineItemTax](dw.order.LineItemTax.md). Maximum 10 items allowed.
|
|
481
|
+
|
|
482
|
+
**Throws:**
|
|
483
|
+
- IllegalArgumentException - if the container is not a basket, or if more than 10 tax items are provided
|
|
484
|
+
|
|
485
|
+
**See Also:**
|
|
486
|
+
- [getTaxes()](dw.order.LineItem.md#gettaxes)
|
|
487
|
+
- [LineItemTax](dw.order.LineItemTax.md)
|
|
488
|
+
|
|
489
|
+
|
|
408
490
|
---
|
|
409
491
|
|
|
410
492
|
### updatePrice(Money)
|
|
@@ -457,6 +539,9 @@ Use [setPriceValue(Number)](dw.order.LineItem.md#setpricevaluenumber) instead.
|
|
|
457
539
|
- : Updates the tax-related attributes of the line item based on the specified tax rate, the passed tax basis and the
|
|
458
540
|
"Tax Rounding Mode" order preference. If null is passed as tax rate or tax basis, tax-related attribute fields
|
|
459
541
|
are set to N/A.
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
If tax items are already set (e.g. via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)), calling this will clear them.
|
|
460
545
|
|
|
461
546
|
|
|
462
547
|
**Parameters:**
|
|
@@ -478,6 +563,9 @@ Use [setPriceValue(Number)](dw.order.LineItem.md#setpricevaluenumber) instead.
|
|
|
478
563
|
|
|
479
564
|
|
|
480
565
|
Note that tax rate is not calculated and it is not updated.
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
If tax items are already set (e.g. via [setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)), calling this will clear them.
|
|
481
569
|
|
|
482
570
|
|
|
483
571
|
**Parameters:**
|
|
@@ -45,9 +45,11 @@ certificates are not considered merchandise as they do not represent a product.
|
|
|
45
45
|
| [BUSINESS_TYPE_B2B](#business_type_b2b): [Number](TopLevel.Number.md) = 2 | constant for Business Type B2B |
|
|
46
46
|
| [BUSINESS_TYPE_B2C](#business_type_b2c): [Number](TopLevel.Number.md) = 1 | constant for Business Type B2C |
|
|
47
47
|
| [CHANNEL_TYPE_CALLCENTER](#channel_type_callcenter): [Number](TopLevel.Number.md) = 2 | constant for Channel Type CallCenter |
|
|
48
|
+
| [CHANNEL_TYPE_CHATGPT](#channel_type_chatgpt): [Number](TopLevel.Number.md) = 18 | constant for Channel Type ChatGPT |
|
|
48
49
|
| [CHANNEL_TYPE_CUSTOMERSERVICECENTER](#channel_type_customerservicecenter): [Number](TopLevel.Number.md) = 11 | constant for Channel Type Customer Service Center |
|
|
49
50
|
| [CHANNEL_TYPE_DSS](#channel_type_dss): [Number](TopLevel.Number.md) = 4 | constant for Channel Type DSS |
|
|
50
51
|
| [CHANNEL_TYPE_FACEBOOKADS](#channel_type_facebookads): [Number](TopLevel.Number.md) = 8 | constant for Channel Type Facebook Ads |
|
|
52
|
+
| [CHANNEL_TYPE_GEMINI](#channel_type_gemini): [Number](TopLevel.Number.md) = 19 | constant for Channel Type Gemini |
|
|
51
53
|
| [CHANNEL_TYPE_GOOGLE](#channel_type_google): [Number](TopLevel.Number.md) = 13 | constant for Channel Type Google |
|
|
52
54
|
| [CHANNEL_TYPE_INSTAGRAMCOMMERCE](#channel_type_instagramcommerce): [Number](TopLevel.Number.md) = 12 | constant for Channel Type Instagram Commerce |
|
|
53
55
|
| [CHANNEL_TYPE_MARKETPLACE](#channel_type_marketplace): [Number](TopLevel.Number.md) = 3 | constant for Channel Type Marketplace |
|
|
@@ -261,6 +263,14 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
261
263
|
- : constant for Channel Type CallCenter
|
|
262
264
|
|
|
263
265
|
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### CHANNEL_TYPE_CHATGPT
|
|
269
|
+
|
|
270
|
+
- CHANNEL_TYPE_CHATGPT: [Number](TopLevel.Number.md) = 18
|
|
271
|
+
- : constant for Channel Type ChatGPT
|
|
272
|
+
|
|
273
|
+
|
|
264
274
|
---
|
|
265
275
|
|
|
266
276
|
### CHANNEL_TYPE_CUSTOMERSERVICECENTER
|
|
@@ -285,6 +295,14 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
285
295
|
- : constant for Channel Type Facebook Ads
|
|
286
296
|
|
|
287
297
|
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### CHANNEL_TYPE_GEMINI
|
|
301
|
+
|
|
302
|
+
- CHANNEL_TYPE_GEMINI: [Number](TopLevel.Number.md) = 19
|
|
303
|
+
- : constant for Channel Type Gemini
|
|
304
|
+
|
|
305
|
+
|
|
288
306
|
---
|
|
289
307
|
|
|
290
308
|
### CHANNEL_TYPE_GOOGLE
|
|
@@ -568,7 +586,8 @@ Use [getGiftCertificateLineItems()](dw.order.LineItemCtnr.md#getgiftcertificatel
|
|
|
568
586
|
[CHANNEL_TYPE_SUBSCRIPTIONS](dw.order.LineItemCtnr.md#channel_type_subscriptions), [CHANNEL_TYPE_ONLINERESERVATION](dw.order.LineItemCtnr.md#channel_type_onlinereservation),
|
|
569
587
|
[CHANNEL_TYPE_CUSTOMERSERVICECENTER](dw.order.LineItemCtnr.md#channel_type_customerservicecenter), [CHANNEL_TYPE_INSTAGRAMCOMMERCE](dw.order.LineItemCtnr.md#channel_type_instagramcommerce),
|
|
570
588
|
[CHANNEL_TYPE_GOOGLE](dw.order.LineItemCtnr.md#channel_type_google), [CHANNEL_TYPE_YOUTUBE](dw.order.LineItemCtnr.md#channel_type_youtube), [CHANNEL_TYPE_TIKTOK](dw.order.LineItemCtnr.md#channel_type_tiktok),
|
|
571
|
-
[CHANNEL_TYPE_SNAPCHAT](dw.order.LineItemCtnr.md#channel_type_snapchat), [CHANNEL_TYPE_WHATSAPP](dw.order.LineItemCtnr.md#channel_type_whatsapp)
|
|
589
|
+
[CHANNEL_TYPE_SNAPCHAT](dw.order.LineItemCtnr.md#channel_type_snapchat), [CHANNEL_TYPE_WHATSAPP](dw.order.LineItemCtnr.md#channel_type_whatsapp), [CHANNEL_TYPE_CHATGPT](dw.order.LineItemCtnr.md#channel_type_chatgpt),
|
|
590
|
+
[CHANNEL_TYPE_GEMINI](dw.order.LineItemCtnr.md#channel_type_gemini)
|
|
572
591
|
|
|
573
592
|
|
|
574
593
|
|
|
@@ -623,10 +642,15 @@ Use [getGiftCertificateLineItems()](dw.order.LineItemCtnr.md#getgiftcertificatel
|
|
|
623
642
|
|
|
624
643
|
### defaultShipment
|
|
625
644
|
- defaultShipment: [Shipment](dw.order.Shipment.md) `(read-only)`
|
|
626
|
-
- : Returns the default shipment of the line item container.
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
645
|
+
- : Returns the default shipment of the line item container. Baskets always have a default shipment with ID "me".
|
|
646
|
+
For orders, this can differ, for example: [OrderMgr.createOrder(Basket)](dw.order.OrderMgr.md#createorderbasket) removes empty
|
|
647
|
+
shipments, so if the basket's "me" shipment was empty at order creation, the order has no "me" shipment. In
|
|
648
|
+
that case, the shipment with the lowest ID is returned as the fallback, or `null` if the order has
|
|
649
|
+
no shipments. See [Shipment.isDefault()](dw.order.Shipment.md#isdefault) for the matching logic.
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
Processes that access a shipment use the default shipment when none is specified. The default shipment can't be
|
|
653
|
+
removed. Calling [removeShipment(Shipment)](dw.order.LineItemCtnr.md#removeshipmentshipment) on it throws an exception.
|
|
630
654
|
|
|
631
655
|
|
|
632
656
|
|
|
@@ -1574,7 +1598,8 @@ Use [getGiftCertificateLineItems()](dw.order.LineItemCtnr.md#getgiftcertificatel
|
|
|
1574
1598
|
[CHANNEL_TYPE_SUBSCRIPTIONS](dw.order.LineItemCtnr.md#channel_type_subscriptions), [CHANNEL_TYPE_ONLINERESERVATION](dw.order.LineItemCtnr.md#channel_type_onlinereservation),
|
|
1575
1599
|
[CHANNEL_TYPE_CUSTOMERSERVICECENTER](dw.order.LineItemCtnr.md#channel_type_customerservicecenter), [CHANNEL_TYPE_INSTAGRAMCOMMERCE](dw.order.LineItemCtnr.md#channel_type_instagramcommerce),
|
|
1576
1600
|
[CHANNEL_TYPE_GOOGLE](dw.order.LineItemCtnr.md#channel_type_google), [CHANNEL_TYPE_YOUTUBE](dw.order.LineItemCtnr.md#channel_type_youtube), [CHANNEL_TYPE_TIKTOK](dw.order.LineItemCtnr.md#channel_type_tiktok),
|
|
1577
|
-
[CHANNEL_TYPE_SNAPCHAT](dw.order.LineItemCtnr.md#channel_type_snapchat), [CHANNEL_TYPE_WHATSAPP](dw.order.LineItemCtnr.md#channel_type_whatsapp)
|
|
1601
|
+
[CHANNEL_TYPE_SNAPCHAT](dw.order.LineItemCtnr.md#channel_type_snapchat), [CHANNEL_TYPE_WHATSAPP](dw.order.LineItemCtnr.md#channel_type_whatsapp), [CHANNEL_TYPE_CHATGPT](dw.order.LineItemCtnr.md#channel_type_chatgpt),
|
|
1602
|
+
[CHANNEL_TYPE_GEMINI](dw.order.LineItemCtnr.md#channel_type_gemini)
|
|
1578
1603
|
|
|
1579
1604
|
|
|
1580
1605
|
**Returns:**
|
|
@@ -1663,14 +1688,19 @@ Use [getGiftCertificateLineItems()](dw.order.LineItemCtnr.md#getgiftcertificatel
|
|
|
1663
1688
|
|
|
1664
1689
|
### getDefaultShipment()
|
|
1665
1690
|
- getDefaultShipment(): [Shipment](dw.order.Shipment.md)
|
|
1666
|
-
- : Returns the default shipment of the line item container.
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1691
|
+
- : Returns the default shipment of the line item container. Baskets always have a default shipment with ID "me".
|
|
1692
|
+
For orders, this can differ, for example: [OrderMgr.createOrder(Basket)](dw.order.OrderMgr.md#createorderbasket) removes empty
|
|
1693
|
+
shipments, so if the basket's "me" shipment was empty at order creation, the order has no "me" shipment. In
|
|
1694
|
+
that case, the shipment with the lowest ID is returned as the fallback, or `null` if the order has
|
|
1695
|
+
no shipments. See [Shipment.isDefault()](dw.order.Shipment.md#isdefault) for the matching logic.
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
Processes that access a shipment use the default shipment when none is specified. The default shipment can't be
|
|
1699
|
+
removed. Calling [removeShipment(Shipment)](dw.order.LineItemCtnr.md#removeshipmentshipment) on it throws an exception.
|
|
1670
1700
|
|
|
1671
1701
|
|
|
1672
1702
|
**Returns:**
|
|
1673
|
-
- the default shipment of the container
|
|
1703
|
+
- the default shipment of the container, or `null` if the order has no shipments
|
|
1674
1704
|
|
|
1675
1705
|
|
|
1676
1706
|
---
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
<!-- prettier-ignore-start -->
|
|
2
|
+
# Class LineItemTax
|
|
3
|
+
|
|
4
|
+
- [TopLevel.Object](TopLevel.Object.md)
|
|
5
|
+
- [dw.order.LineItemTax](dw.order.LineItemTax.md)
|
|
6
|
+
|
|
7
|
+
A tax on a line item: tax identifier, rate, and optional amount. Use with [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)
|
|
8
|
+
and [LineItem.getTaxes()](dw.order.LineItem.md#gettaxes).
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Create instances via [new LineItemTax(taxId, taxRate)](dw.order.LineItemTax.md#lineitemtaxstring-number) to have the
|
|
12
|
+
server compute the tax value, or via
|
|
13
|
+
[new LineItemTax(taxId, taxRate, taxValue)](dw.order.LineItemTax.md#lineitemtaxstring-number-money) to provide a
|
|
14
|
+
pre-computed tax value.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
**See Also:**
|
|
23
|
+
- [LineItem.getTaxes()](dw.order.LineItem.md#gettaxes)
|
|
24
|
+
- [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Property Summary
|
|
28
|
+
|
|
29
|
+
| Property | Description |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| [taxId](#taxid): [String](TopLevel.String.md) `(read-only)` | Gets the tax identifier (e.g. |
|
|
32
|
+
| [taxRate](#taxrate): [Number](TopLevel.Number.md) `(read-only)` | Gets the tax rate as a decimal (e.g. |
|
|
33
|
+
| [taxValue](#taxvalue): [Money](dw.value.Money.md) `(read-only)` | Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis. |
|
|
34
|
+
|
|
35
|
+
## Constructor Summary
|
|
36
|
+
|
|
37
|
+
| Constructor | Description |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| [LineItemTax](#lineitemtaxstring-number)([String](TopLevel.String.md), [Number](TopLevel.Number.md)) | Creates a tax item for use with [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection). |
|
|
40
|
+
| [LineItemTax](#lineitemtaxstring-number-money)([String](TopLevel.String.md), [Number](TopLevel.Number.md), [Money](dw.value.Money.md)) | Creates a tax item for use with [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection). |
|
|
41
|
+
|
|
42
|
+
## Method Summary
|
|
43
|
+
|
|
44
|
+
| Method | Description |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| [getTaxId](dw.order.LineItemTax.md#gettaxid)() | Gets the tax identifier (e.g. |
|
|
47
|
+
| [getTaxRate](dw.order.LineItemTax.md#gettaxrate)() | Gets the tax rate as a decimal (e.g. |
|
|
48
|
+
| [getTaxValue](dw.order.LineItemTax.md#gettaxvalue)() | Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis. |
|
|
49
|
+
|
|
50
|
+
### Methods inherited from class Object
|
|
51
|
+
|
|
52
|
+
[assign](TopLevel.Object.md#assignobject-object), [create](TopLevel.Object.md#createobject), [create](TopLevel.Object.md#createobject-object), [defineProperties](TopLevel.Object.md#definepropertiesobject-object), [defineProperty](TopLevel.Object.md#definepropertyobject-object-object), [entries](TopLevel.Object.md#entriesobject), [freeze](TopLevel.Object.md#freezeobject), [fromEntries](TopLevel.Object.md#fromentriesiterable), [getOwnPropertyDescriptor](TopLevel.Object.md#getownpropertydescriptorobject-object), [getOwnPropertyNames](TopLevel.Object.md#getownpropertynamesobject), [getOwnPropertySymbols](TopLevel.Object.md#getownpropertysymbolsobject), [getPrototypeOf](TopLevel.Object.md#getprototypeofobject), [hasOwnProperty](TopLevel.Object.md#hasownpropertystring), [is](TopLevel.Object.md#isobject-object), [isExtensible](TopLevel.Object.md#isextensibleobject), [isFrozen](TopLevel.Object.md#isfrozenobject), [isPrototypeOf](TopLevel.Object.md#isprototypeofobject), [isSealed](TopLevel.Object.md#issealedobject), [keys](TopLevel.Object.md#keysobject), [preventExtensions](TopLevel.Object.md#preventextensionsobject), [propertyIsEnumerable](TopLevel.Object.md#propertyisenumerablestring), [seal](TopLevel.Object.md#sealobject), [setPrototypeOf](TopLevel.Object.md#setprototypeofobject-object), [toLocaleString](TopLevel.Object.md#tolocalestring), [toString](TopLevel.Object.md#tostring), [valueOf](TopLevel.Object.md#valueof), [values](TopLevel.Object.md#valuesobject)
|
|
53
|
+
## Property Details
|
|
54
|
+
|
|
55
|
+
### taxId
|
|
56
|
+
- taxId: [String](TopLevel.String.md) `(read-only)`
|
|
57
|
+
- : Gets the tax identifier (e.g. "DE\_7").
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### taxRate
|
|
63
|
+
- taxRate: [Number](TopLevel.Number.md) `(read-only)`
|
|
64
|
+
- : Gets the tax rate as a decimal (e.g. 0.07 for 7%).
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### taxValue
|
|
70
|
+
- taxValue: [Money](dw.value.Money.md) `(read-only)`
|
|
71
|
+
- : Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Constructor Details
|
|
77
|
+
|
|
78
|
+
### LineItemTax(String, Number)
|
|
79
|
+
- LineItemTax(taxId: [String](TopLevel.String.md), taxRate: [Number](TopLevel.Number.md))
|
|
80
|
+
- : Creates a tax item for use with [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection).
|
|
81
|
+
The tax value will be computed server-side from the tax rate and the line item's tax basis.
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
**Parameters:**
|
|
88
|
+
- taxId - tax identifier (e.g. "DE\_7"), must not be null or blank
|
|
89
|
+
- taxRate - tax rate as decimal (e.g. 0.07 for 7%), must not be null
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### LineItemTax(String, Number, Money)
|
|
95
|
+
- LineItemTax(taxId: [String](TopLevel.String.md), taxRate: [Number](TopLevel.Number.md), taxValue: [Money](dw.value.Money.md))
|
|
96
|
+
- : Creates a tax item for use with [LineItem.setTaxes(Collection)](dw.order.LineItem.md#settaxescollection).
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Access is currently restricted to select pilot customers and controlled via feature toggle.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
**Parameters:**
|
|
103
|
+
- taxId - tax identifier (e.g. "DE\_7"), must not be null or blank
|
|
104
|
+
- taxRate - tax rate as decimal (e.g. 0.07 for 7%), must not be null
|
|
105
|
+
- taxValue - tax amount in purchase currency, or null to compute from rate and tax basis
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Method Details
|
|
111
|
+
|
|
112
|
+
### getTaxId()
|
|
113
|
+
- getTaxId(): [String](TopLevel.String.md)
|
|
114
|
+
- : Gets the tax identifier (e.g. "DE\_7").
|
|
115
|
+
|
|
116
|
+
**Returns:**
|
|
117
|
+
- the tax id
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### getTaxRate()
|
|
123
|
+
- getTaxRate(): [Number](TopLevel.Number.md)
|
|
124
|
+
- : Gets the tax rate as a decimal (e.g. 0.07 for 7%).
|
|
125
|
+
|
|
126
|
+
**Returns:**
|
|
127
|
+
- the tax rate
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### getTaxValue()
|
|
133
|
+
- getTaxValue(): [Money](dw.value.Money.md)
|
|
134
|
+
- : Gets the tax value (amount) in purchase currency, or null if computed from rate and tax basis.
|
|
135
|
+
|
|
136
|
+
**Returns:**
|
|
137
|
+
- the tax value as Money, or null
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
<!-- prettier-ignore-end -->
|
|
@@ -468,6 +468,14 @@ Please use [failOrder(Order, Boolean)](dw.order.OrderMgr.md#failorderorder-boole
|
|
|
468
468
|
|
|
469
469
|
|
|
470
470
|
|
|
471
|
+
This method does not alter shipments. Note that [createOrder(Basket)](dw.order.OrderMgr.md#createorderbasket) removes empty shipments
|
|
472
|
+
before creating the order, so a reopened basket might be missing shipments that existed before. If the removed
|
|
473
|
+
shipment was the default ("me"), the fallback default is the shipment with the lowest ID. See
|
|
474
|
+
[LineItemCtnr.getDefaultShipment()](dw.order.LineItemCtnr.md#getdefaultshipment) and [Shipment.isDefault()](dw.order.Shipment.md#isdefault).
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
471
479
|
A basket can only be reopened if no other basket for the customer exists at the moment of the call to
|
|
472
480
|
`failOrder`, since a customer is limited to 1 storefront basket at a time. If, after order creation, a
|
|
473
481
|
call was made to [BasketMgr.getCurrentOrNewBasket()](dw.order.BasketMgr.md#getcurrentornewbasket) or pipelet GetBasket with parameter Create=true, then
|
|
@@ -74,7 +74,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
74
74
|
|
|
75
75
|
### Methods inherited from class LineItem
|
|
76
76
|
|
|
77
|
-
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
77
|
+
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [getTaxes](dw.order.LineItem.md#gettaxes), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [setTaxes](dw.order.LineItem.md#settaxescollection), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
78
78
|
### Methods inherited from class ExtensibleObject
|
|
79
79
|
|
|
80
80
|
[describe](dw.object.ExtensibleObject.md#describe), [getCustom](dw.object.ExtensibleObject.md#getcustom)
|
|
@@ -146,7 +146,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
146
146
|
|
|
147
147
|
### Methods inherited from class LineItem
|
|
148
148
|
|
|
149
|
-
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
149
|
+
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [getTaxes](dw.order.LineItem.md#gettaxes), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [setTaxes](dw.order.LineItem.md#settaxescollection), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
150
150
|
### Methods inherited from class ExtensibleObject
|
|
151
151
|
|
|
152
152
|
[describe](dw.object.ExtensibleObject.md#describe), [getCustom](dw.object.ExtensibleObject.md#getcustom)
|
|
@@ -54,7 +54,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
54
54
|
|
|
55
55
|
### Methods inherited from class LineItem
|
|
56
56
|
|
|
57
|
-
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
57
|
+
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [getTaxes](dw.order.LineItem.md#gettaxes), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [setTaxes](dw.order.LineItem.md#settaxescollection), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
58
58
|
### Methods inherited from class ExtensibleObject
|
|
59
59
|
|
|
60
60
|
[describe](dw.object.ExtensibleObject.md#describe), [getCustom](dw.object.ExtensibleObject.md#getcustom)
|
|
@@ -32,7 +32,7 @@ Represents an order shipment.
|
|
|
32
32
|
| [adjustedShippingTotalPrice](#adjustedshippingtotalprice): [Money](dw.value.Money.md) `(read-only)` | Returns the adjusted shipping total price. |
|
|
33
33
|
| [adjustedShippingTotalTax](#adjustedshippingtotaltax): [Money](dw.value.Money.md) `(read-only)` | Returns the tax of all shipping line items of the shipment , including shipping adjustments. |
|
|
34
34
|
| [allLineItems](#alllineitems): [Collection](dw.util.Collection.md) `(read-only)` | Returns all line items related to the shipment. |
|
|
35
|
-
| [default](#default): [Boolean](TopLevel.Boolean.md) `(read-only)` |
|
|
35
|
+
| [default](#default): [Boolean](TopLevel.Boolean.md) `(read-only)` | Returns true if this is the default shipment. |
|
|
36
36
|
| [gift](#gift): [Boolean](TopLevel.Boolean.md) | Returns true if this line item represents a gift, false otherwise. |
|
|
37
37
|
| [giftCertificateLineItems](#giftcertificatelineitems): [Collection](dw.util.Collection.md) `(read-only)` | Returns all gift certificate line items of the shipment. |
|
|
38
38
|
| [giftMessage](#giftmessage): [String](TopLevel.String.md) | Returns the value set for gift message or null if no value set. |
|
|
@@ -108,7 +108,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
108
108
|
| [getTotalNetPrice](dw.order.Shipment.md#gettotalnetprice)() | Returns the total net price of the shipment in the purchase currency. |
|
|
109
109
|
| [getTotalTax](dw.order.Shipment.md#gettotaltax)() | Returns the total tax for the shipment in the purchase currency. |
|
|
110
110
|
| [getTrackingNumber](dw.order.Shipment.md#gettrackingnumber)() | Returns the tracking number of this shipment. |
|
|
111
|
-
| [isDefault](dw.order.Shipment.md#isdefault)() |
|
|
111
|
+
| [isDefault](dw.order.Shipment.md#isdefault)() | Returns true if this is the default shipment. |
|
|
112
112
|
| [isGift](dw.order.Shipment.md#isgift)() | Returns true if this line item represents a gift, false otherwise. |
|
|
113
113
|
| [removeShippingLineItem](dw.order.Shipment.md#removeshippinglineitemshippinglineitem)([ShippingLineItem](dw.order.ShippingLineItem.md)) | Removes the specified shipping line item and any of its dependent shipping price adjustments. |
|
|
114
114
|
| ~~[removeShippingPriceAdjustment](dw.order.Shipment.md#removeshippingpriceadjustmentpriceadjustment)([PriceAdjustment](dw.order.PriceAdjustment.md))~~ | Removes the specified shipping price adjustment from the shipment. |
|
|
@@ -270,7 +270,11 @@ Use [SHIPPING_STATUS_SHIPPED](dw.order.Shipment.md#shipping_status_shipped) inst
|
|
|
270
270
|
|
|
271
271
|
### default
|
|
272
272
|
- default: [Boolean](TopLevel.Boolean.md) `(read-only)`
|
|
273
|
-
- :
|
|
273
|
+
- : Returns true if this is the default shipment. The default is the shipment with ID "me". If no shipment with
|
|
274
|
+
ID "me" exists, the shipment with the lowest ID is used as the default. A "me" shipment can be absent if
|
|
275
|
+
[OrderMgr.createOrder(Basket)](dw.order.OrderMgr.md#createorderbasket) removed it for being empty, in which case another
|
|
276
|
+
shipment becomes the default.
|
|
277
|
+
|
|
274
278
|
|
|
275
279
|
|
|
276
280
|
---
|
|
@@ -1023,7 +1027,11 @@ Shipments cannot have product price adjustments, therefore this method will alwa
|
|
|
1023
1027
|
|
|
1024
1028
|
### isDefault()
|
|
1025
1029
|
- isDefault(): [Boolean](TopLevel.Boolean.md)
|
|
1026
|
-
- :
|
|
1030
|
+
- : Returns true if this is the default shipment. The default is the shipment with ID "me". If no shipment with
|
|
1031
|
+
ID "me" exists, the shipment with the lowest ID is used as the default. A "me" shipment can be absent if
|
|
1032
|
+
[OrderMgr.createOrder(Basket)](dw.order.OrderMgr.md#createorderbasket) removed it for being empty, in which case another
|
|
1033
|
+
shipment becomes the default.
|
|
1034
|
+
|
|
1027
1035
|
|
|
1028
1036
|
**Returns:**
|
|
1029
1037
|
- `true` if this shipment is the default shipment
|
|
@@ -50,7 +50,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
50
50
|
|
|
51
51
|
### Methods inherited from class LineItem
|
|
52
52
|
|
|
53
|
-
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
53
|
+
[getBasePrice](dw.order.LineItem.md#getbaseprice), [getGrossPrice](dw.order.LineItem.md#getgrossprice), [getLineItemCtnr](dw.order.LineItem.md#getlineitemctnr), [getLineItemText](dw.order.LineItem.md#getlineitemtext), [getNetPrice](dw.order.LineItem.md#getnetprice), [getPrice](dw.order.LineItem.md#getprice), [getPriceValue](dw.order.LineItem.md#getpricevalue), [getTax](dw.order.LineItem.md#gettax), [getTaxBasis](dw.order.LineItem.md#gettaxbasis), [getTaxClassID](dw.order.LineItem.md#gettaxclassid), [getTaxRate](dw.order.LineItem.md#gettaxrate), [getTaxes](dw.order.LineItem.md#gettaxes), [setBasePrice](dw.order.LineItem.md#setbasepricemoney), [setGrossPrice](dw.order.LineItem.md#setgrosspricemoney), [setLineItemText](dw.order.LineItem.md#setlineitemtextstring), [setNetPrice](dw.order.LineItem.md#setnetpricemoney), [setPriceValue](dw.order.LineItem.md#setpricevaluenumber), [setTax](dw.order.LineItem.md#settaxmoney), [setTaxClassID](dw.order.LineItem.md#settaxclassidstring), [setTaxRate](dw.order.LineItem.md#settaxratenumber), [setTaxes](dw.order.LineItem.md#settaxescollection), [updatePrice](dw.order.LineItem.md#updatepricemoney), [updateTax](dw.order.LineItem.md#updatetaxnumber), [updateTax](dw.order.LineItem.md#updatetaxnumber-money), [updateTaxAmount](dw.order.LineItem.md#updatetaxamountmoney)
|
|
54
54
|
### Methods inherited from class ExtensibleObject
|
|
55
55
|
|
|
56
56
|
[describe](dw.object.ExtensibleObject.md#describe), [getCustom](dw.object.ExtensibleObject.md#getcustom)
|
|
@@ -32,6 +32,7 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
32
32
|
| Method | Description |
|
|
33
33
|
| --- | --- |
|
|
34
34
|
| static [applyExternalTax](dw.order.TaxMgr.md#applyexternaltaxbasket)([Basket](dw.order.Basket.md)) | Applies externally set tax rates to the given [Basket](dw.order.Basket.md). |
|
|
35
|
+
| static [applyTax](dw.order.TaxMgr.md#applytaxbasket)([Basket](dw.order.Basket.md)) | Applies tax to the given [Basket](dw.order.Basket.md) using the platform's tax hook dispatch logic. |
|
|
35
36
|
| static [getCustomRateTaxClassID](dw.order.TaxMgr.md#getcustomratetaxclassid)() | Returns the ID of the tax class that represents items with a custom tax rate. |
|
|
36
37
|
| static [getDefaultTaxClassID](dw.order.TaxMgr.md#getdefaulttaxclassid)() | Returns the ID of the default tax class defined for the site. |
|
|
37
38
|
| static [getDefaultTaxJurisdictionID](dw.order.TaxMgr.md#getdefaulttaxjurisdictionid)() | Returns the ID of the default tax jurisdiction defined for the site. |
|
|
@@ -154,6 +155,59 @@ This class does not have a constructor, so you cannot create it directly.
|
|
|
154
155
|
- basket - apply external taxation to this basket
|
|
155
156
|
|
|
156
157
|
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### applyTax(Basket)
|
|
161
|
+
- static applyTax(basket: [Basket](dw.order.Basket.md)): void
|
|
162
|
+
- : Applies tax to the given [Basket](dw.order.Basket.md) using the platform's tax hook dispatch logic.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
This method is intended for use in custom {@code dw.order.calculate} hook implementations (e.g., in SFRA or
|
|
166
|
+
SiteGenesis) that override the default basket calculation. Calling this method instead of directly invoking
|
|
167
|
+
{@code dw.order.calculateTax} ensures that Commerce App tax providers registered via
|
|
168
|
+
{@code sfcc.app.tax.calculate} are invoked when available, with automatic fallback to the legacy
|
|
169
|
+
{@code dw.order.calculateTax} hook or the platform default tax calculation.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
**WARNING:** Do NOT call this method from within a {@code dw.order.calculateTax} hook
|
|
175
|
+
implementation, as this will cause infinite recursion. This method is designed to be called from
|
|
176
|
+
{@code dw.order.calculate} hooks only.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
The dispatch precedence is:
|
|
182
|
+
|
|
183
|
+
1. {@code sfcc.app.tax.calculate}— if a Commerce App tax provider is installed and the feature is enabled.
|
|
184
|
+
2. {@code dw.order.calculateTax}— if registered by the storefront.
|
|
185
|
+
3. Platform default tax calculation — using the site's tax tables.
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
**Typical usage in a custom {@code dw.order.calculate} hook:**
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
var TaxMgr = require('dw/order/TaxMgr');
|
|
198
|
+
|
|
199
|
+
exports.calculate = function (basket) {
|
|
200
|
+
// ... product prices, promotions, shipping ...
|
|
201
|
+
TaxMgr.applyTax(basket);
|
|
202
|
+
basket.updateTotals();
|
|
203
|
+
};
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
**Parameters:**
|
|
208
|
+
- basket - the basket for which tax should be calculated.
|
|
209
|
+
|
|
210
|
+
|
|
157
211
|
---
|
|
158
212
|
|
|
159
213
|
### getCustomRateTaxClassID()
|