@wix/auto_sdk_ecom_draft-orders 1.0.66 → 1.0.68
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/build/cjs/index.d.ts +1 -1
- package/build/cjs/index.js +221 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +60 -1
- package/build/cjs/index.typings.js +212 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +47 -2
- package/build/cjs/meta.js +157 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +220 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +60 -1
- package/build/es/index.typings.mjs +211 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +47 -2
- package/build/es/meta.mjs +156 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +23 -3
- package/build/internal/cjs/index.js +221 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +90 -1
- package/build/internal/cjs/index.typings.js +212 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +47 -2
- package/build/internal/cjs/meta.js +157 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +23 -3
- package/build/internal/es/index.mjs +220 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +90 -1
- package/build/internal/es/index.typings.mjs +211 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +47 -2
- package/build/internal/es/meta.mjs +156 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -150,6 +150,11 @@ interface DraftOrder {
|
|
|
150
150
|
* Includes details about changes when relevant.
|
|
151
151
|
*/
|
|
152
152
|
businessLocationDetails?: BusinessLocationDetails;
|
|
153
|
+
/**
|
|
154
|
+
* Deposit details
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
depositDetails?: DepositDetails;
|
|
153
158
|
}
|
|
154
159
|
interface ItemDetails extends ItemDetailsChangeTypeOneOf {
|
|
155
160
|
/** Whether the line item was added as part of the draft. */
|
|
@@ -1809,6 +1814,32 @@ interface BusinessLocationChangedDetails {
|
|
|
1809
1814
|
/** Business location before draft. */
|
|
1810
1815
|
businessLocationBeforeChange?: Location;
|
|
1811
1816
|
}
|
|
1817
|
+
interface DepositDetails extends DepositDetailsDepositOneOf {
|
|
1818
|
+
/** Deposit value as a monetary amount. */
|
|
1819
|
+
amount?: Price;
|
|
1820
|
+
/**
|
|
1821
|
+
* Deposit amount defined as a percentage of the total order value.
|
|
1822
|
+
* @format DECIMAL_VALUE
|
|
1823
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
1824
|
+
*/
|
|
1825
|
+
percentage?: string | null;
|
|
1826
|
+
/**
|
|
1827
|
+
* Price summary with deposit.
|
|
1828
|
+
* @readonly
|
|
1829
|
+
*/
|
|
1830
|
+
priceSummary?: PriceSummary;
|
|
1831
|
+
}
|
|
1832
|
+
/** @oneof */
|
|
1833
|
+
interface DepositDetailsDepositOneOf {
|
|
1834
|
+
/** Deposit value as a monetary amount. */
|
|
1835
|
+
amount?: Price;
|
|
1836
|
+
/**
|
|
1837
|
+
* Deposit amount defined as a percentage of the total order value.
|
|
1838
|
+
* @format DECIMAL_VALUE
|
|
1839
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
1840
|
+
*/
|
|
1841
|
+
percentage?: string | null;
|
|
1842
|
+
}
|
|
1812
1843
|
interface CreateDraftOrderRequest {
|
|
1813
1844
|
/**
|
|
1814
1845
|
* ID of the order to create a draft for.
|
|
@@ -2274,6 +2305,22 @@ interface UpdateLineItemsResponse {
|
|
|
2274
2305
|
/** Draft order calculated with the latest changes. */
|
|
2275
2306
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2276
2307
|
}
|
|
2308
|
+
interface SetDepositRequest {
|
|
2309
|
+
/**
|
|
2310
|
+
* Draft order ID.
|
|
2311
|
+
* @format GUID
|
|
2312
|
+
*/
|
|
2313
|
+
draftOrderId: string;
|
|
2314
|
+
/**
|
|
2315
|
+
* Deposit to set on the draft order.
|
|
2316
|
+
* Leave it as empty to remove deposit settings.
|
|
2317
|
+
*/
|
|
2318
|
+
depositDetails?: DepositDetails;
|
|
2319
|
+
}
|
|
2320
|
+
interface SetDepositResponse {
|
|
2321
|
+
/** Draft order calculated with the latest changes. */
|
|
2322
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2323
|
+
}
|
|
2277
2324
|
interface SetDiscountsRequest {
|
|
2278
2325
|
/**
|
|
2279
2326
|
* Draft order ID.
|
|
@@ -2826,6 +2873,12 @@ interface Order {
|
|
|
2826
2873
|
* @readonly
|
|
2827
2874
|
*/
|
|
2828
2875
|
payAfterFreeTrial?: PriceSummary;
|
|
2876
|
+
/**
|
|
2877
|
+
* Deposit price summary. Part of price_summary that must be payed at checkout
|
|
2878
|
+
* @internal
|
|
2879
|
+
* @readonly
|
|
2880
|
+
*/
|
|
2881
|
+
deposit?: PriceSummary;
|
|
2829
2882
|
}
|
|
2830
2883
|
declare enum PaymentStatus {
|
|
2831
2884
|
UNSPECIFIED = "UNSPECIFIED",
|
|
@@ -4424,6 +4477,16 @@ type UpdateLineItemsApplicationErrors = {
|
|
|
4424
4477
|
data?: Record<string, any>;
|
|
4425
4478
|
};
|
|
4426
4479
|
/** @docsIgnore */
|
|
4480
|
+
type SetDepositApplicationErrors = {
|
|
4481
|
+
code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
|
|
4482
|
+
description?: string;
|
|
4483
|
+
data?: Record<string, any>;
|
|
4484
|
+
} | {
|
|
4485
|
+
code?: 'DEPOSIT_AMOUNT_EXCEEDS_ORDER_TOTALS';
|
|
4486
|
+
description?: string;
|
|
4487
|
+
data?: Record<string, any>;
|
|
4488
|
+
};
|
|
4489
|
+
/** @docsIgnore */
|
|
4427
4490
|
type SetDiscountsApplicationErrors = {
|
|
4428
4491
|
code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
|
|
4429
4492
|
description?: string;
|
|
@@ -4774,6 +4837,32 @@ interface AddLineItemsToDraftOrderOptions {
|
|
|
4774
4837
|
declare function updateLineItems(draftOrderId: string, lineItemChanges: NonNullablePaths<LineItemChangeDetails, `lineItemId`, 2>[]): Promise<NonNullablePaths<UpdateLineItemsResponse, `calculatedDraftOrder.draftOrder.lineItems` | `calculatedDraftOrder.draftOrder.lineItems.${number}.added` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.amount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.removed` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem._id` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.productName.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.catalogItemId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.appId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.quantity` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.physicalProperties.shippable` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.preset` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.custom` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.paymentOption` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxDetails.taxRate` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.digitalFile.fileId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxableAddress.addressType` | `calculatedDraftOrder.draftOrder.shippingInfo.added` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.draftOrder.shippingInfo.removed` | `calculatedDraftOrder.draftOrder.buyerInfo.visitorId` | `calculatedDraftOrder.draftOrder.buyerInfo.memberId` | `calculatedDraftOrder.draftOrder.additionalFees` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee.name` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee._id` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.taxDetails.taxable` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.source` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.applied` | `calculatedDraftOrder.draftOrder.discounts` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.code` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.name` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.merchantDiscount.discountReason` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountRule._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountType` | `calculatedDraftOrder.draftOrder.discounts.${number}.source` | `calculatedDraftOrder.draftOrder.discounts.${number}.applied` | `calculatedDraftOrder.draftOrder.createdBy.userId` | `calculatedDraftOrder.draftOrder.createdBy.appId` | `calculatedDraftOrder.draftOrder.status` | `calculatedDraftOrder.draftOrder.weightUnit` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.amount` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.formattedAmount` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory.${number}.lineItemId` | `calculatedDraftOrder.draftOrder.recipientInfo.added` | `calculatedDraftOrder.draftOrder.recipientInfo.removed` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxName` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.rate` | `calculatedDraftOrder.draftOrder.buyerDetails.added` | `calculatedDraftOrder.draftOrder.buyerDetails.removed` | `calculatedDraftOrder.draftOrder.billingDetails.added` | `calculatedDraftOrder.draftOrder.billingDetails.removed` | `calculatedDraftOrder.draftOrder.businessLocationDetails.added` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `calculatedDraftOrder.draftOrder.businessLocationDetails.removed` | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`, 11> & {
|
|
4775
4838
|
__applicationErrorsType?: UpdateLineItemsApplicationErrors;
|
|
4776
4839
|
}>;
|
|
4840
|
+
/**
|
|
4841
|
+
* Sets deposit requirements on a draft order.
|
|
4842
|
+
*
|
|
4843
|
+
* Use this method to configure partial payment options where customers pay a portion upfront
|
|
4844
|
+
* and the remainder at a later time. Deposits can be specified as a fixed amount or percentage.
|
|
4845
|
+
* Feature supported only in create order flow and not in edit order flow.
|
|
4846
|
+
*
|
|
4847
|
+
* When applied, prevents order from becoming APPROVED until required amount is PAID.
|
|
4848
|
+
* When unapplied, deposits will be cleared from draft order.
|
|
4849
|
+
* @param draftOrderId - Draft order ID.
|
|
4850
|
+
* @internal
|
|
4851
|
+
* @documentationMaturity preview
|
|
4852
|
+
* @requiredField draftOrderId
|
|
4853
|
+
* @permissionId ECOM.DRAFT_ORDERS_SET_DEPOSIT
|
|
4854
|
+
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit
|
|
4855
|
+
*/
|
|
4856
|
+
declare function setDeposit(draftOrderId: string, options?: SetDepositOptions): Promise<NonNullablePaths<SetDepositResponse, `calculatedDraftOrder.draftOrder.lineItems` | `calculatedDraftOrder.draftOrder.lineItems.${number}.added` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.amount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceBeforeChange.formattedAmount` | `calculatedDraftOrder.draftOrder.lineItems.${number}.changedDetails.priceDescriptionBeforeChange.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.removed` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem._id` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.productName.original` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.catalogItemId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.catalogReference.appId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.quantity` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.physicalProperties.shippable` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.preset` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.itemType.custom` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.paymentOption` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxDetails.taxRate` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxInfo.taxIncludedInPrice` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.digitalFile.fileId` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.cycleNumber` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.subscriptionInfo.subscriptionOptionTitle` | `calculatedDraftOrder.draftOrder.lineItems.${number}.lineItem.taxableAddress.addressType` | `calculatedDraftOrder.draftOrder.shippingInfo.added` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.title` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.number` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.streetAddress.name` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId._id` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.contactDetails.vatId.type` | `calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.draftOrder.shippingInfo.removed` | `calculatedDraftOrder.draftOrder.buyerInfo.visitorId` | `calculatedDraftOrder.draftOrder.buyerInfo.memberId` | `calculatedDraftOrder.draftOrder.additionalFees` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee.name` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.additionalFee._id` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.taxDetails.taxable` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.source` | `calculatedDraftOrder.draftOrder.additionalFees.${number}.applied` | `calculatedDraftOrder.draftOrder.discounts` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.code` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.coupon.name` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.merchantDiscount.discountReason` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountRule._id` | `calculatedDraftOrder.draftOrder.discounts.${number}.discount.discountType` | `calculatedDraftOrder.draftOrder.discounts.${number}.source` | `calculatedDraftOrder.draftOrder.discounts.${number}.applied` | `calculatedDraftOrder.draftOrder.createdBy.userId` | `calculatedDraftOrder.draftOrder.createdBy.appId` | `calculatedDraftOrder.draftOrder.status` | `calculatedDraftOrder.draftOrder.weightUnit` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.amount` | `calculatedDraftOrder.draftOrder.balanceSummary.balance.formattedAmount` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory` | `calculatedDraftOrder.draftOrder.commitSettings.updateInventory.${number}.lineItemId` | `calculatedDraftOrder.draftOrder.recipientInfo.added` | `calculatedDraftOrder.draftOrder.recipientInfo.removed` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxName` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.taxType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdiction` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.jurisdictionType` | `calculatedDraftOrder.draftOrder.taxInfo.taxBreakdown.${number}.rate` | `calculatedDraftOrder.draftOrder.buyerDetails.added` | `calculatedDraftOrder.draftOrder.buyerDetails.removed` | `calculatedDraftOrder.draftOrder.billingDetails.added` | `calculatedDraftOrder.draftOrder.billingDetails.removed` | `calculatedDraftOrder.draftOrder.businessLocationDetails.added` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange._id` | `calculatedDraftOrder.draftOrder.businessLocationDetails.changedDetails.businessLocationBeforeChange.name` | `calculatedDraftOrder.draftOrder.businessLocationDetails.removed` | `calculatedDraftOrder.shippingOptions` | `calculatedDraftOrder.shippingOptions.${number}.code` | `calculatedDraftOrder.shippingOptions.${number}.title` | `calculatedDraftOrder.shippingOptions.${number}.logistics.pickupDetails.pickupMethod` | `calculatedDraftOrder.shippingOptions.${number}.cost.currency` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.code` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.applicationError.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.field` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.description` | `calculatedDraftOrder.calculationErrors.generalShippingCalculationError.validationError.fieldViolations.${number}.violatedRule` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors` | `calculatedDraftOrder.calculationErrors.carrierErrors.errors.${number}.carrierId` | `calculatedDraftOrder.calculationErrors.orderValidationErrors`, 11> & {
|
|
4857
|
+
__applicationErrorsType?: SetDepositApplicationErrors;
|
|
4858
|
+
}>;
|
|
4859
|
+
interface SetDepositOptions {
|
|
4860
|
+
/**
|
|
4861
|
+
* Deposit to set on the draft order.
|
|
4862
|
+
* Leave it as empty to remove deposit settings.
|
|
4863
|
+
*/
|
|
4864
|
+
depositDetails?: DepositDetails;
|
|
4865
|
+
}
|
|
4777
4866
|
/**
|
|
4778
4867
|
* Applies or unapplies discounts on a draft order.
|
|
4779
4868
|
*
|
|
@@ -5258,4 +5347,4 @@ interface SetBusinessLocationOptions {
|
|
|
5258
5347
|
businessLocation?: Location;
|
|
5259
5348
|
}
|
|
5260
5349
|
|
|
5261
|
-
export { type ActionEvent, type Activity, type ActivityContentOneOf, ActivityType, type ActivityTypeWithLiterals, type AddLineItemsToDraftOrderApplicationErrors, type AddLineItemsToDraftOrderOptions, type AddLineItemsToDraftOrderRequest, type AddLineItemsToDraftOrderResponse, type AdditionalFee, type AdditionalFeeDetails, type AdditionalFeeOption, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, AttributionSource, type AttributionSourceWithLiterals, type AuthorizedPaymentCaptured, type AuthorizedPaymentCreated, type AuthorizedPaymentVoided, type Balance, type BalanceSummary, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingChangedDetails, type BillingDetails, type BillingDetailsChangeTypeOneOf, type BusinessLocationChangedDetails, type BusinessLocationDetails, type BusinessLocationDetailsChangeTypeOneOf, type BuyerChangedDetails, type BuyerDetails, type BuyerDetailsChangeTypeOneOf, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedDraftOrder, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type CatalogReference, type CatalogReferenceLineItem, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type ChargebackCreated, type ChargebackReversed, type Color, type CommitDraftOrderApplicationErrors, type CommitDraftOrderOptions, type CommitDraftOrderRequest, type CommitDraftOrderResponse, type Coupon, type CreateCustomAdditionalFeesApplicationErrors, type CreateCustomAdditionalFeesOptions, type CreateCustomAdditionalFeesRequest, type CreateCustomAdditionalFeesResponse, type CreateCustomDiscountsApplicationErrors, type CreateCustomDiscountsOptions, type CreateCustomDiscountsRequest, type CreateCustomDiscountsResponse, type CreateDraftOrderApplicationErrors, type CreateDraftOrderRequest, type CreateDraftOrderResponse, type CreateEmptyDraftOrderApplicationErrors, type CreateEmptyDraftOrderRequest, type CreateEmptyDraftOrderResponse, type CreateOrderFromDraftApplicationErrors, type CreateOrderFromDraftOptions, type CreateOrderFromDraftRequest, type CreateOrderFromDraftResponse, type CreatedBy, type CreatedByStringOneOf, type CreditCardDetails, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomActivity, type CustomField, type CustomLineItem, type DeleteCustomAdditionalFeesApplicationErrors, type DeleteCustomAdditionalFeesRequest, type DeleteCustomAdditionalFeesResponse, type DeleteCustomDiscountsApplicationErrors, type DeleteCustomDiscountsRequest, type DeleteCustomDiscountsResponse, type DeleteDraftOrderApplicationErrors, type DeleteDraftOrderRequest, type DeleteDraftOrderResponse, type DeliveryLogistics, type DeliveryTimeSlot, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesOverride, type Details, type DetailsKindOneOf, type DigitalFile, type DiscountDetails, type DiscountOption, type DiscountOptionDiscountAmountOneOf, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DraftOrder, type DraftOrderChangesApplied, type DraftOrderCommitSettings, type DraftOrderCreatedEnvelope, type DraftOrderDeletedEnvelope, type DraftOrderUpdatedEnvelope, type DraftOrdersQueryBuilder, type DraftOrdersQueryResult, EditingStatus, type EditingStatusWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReceipt, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, FulfillmentStatus, type FulfillmentStatusWithLiterals, type FulfillmentStatusesAggregate, type FullAddressContactDetails, type GetDraftOrderApplicationErrors, type GetDraftOrderRequest, type GetDraftOrderResponse, type GetOrderDraftabilityStatusRequest, type GetOrderDraftabilityStatusResponse, type GiftCardPaymentRefund, type IdAndApplied, type IdentificationData, type IdentificationDataIdOneOf, type InventoryUpdate, type ItemChangedDetails, type ItemDetails, type ItemDetailsChangeTypeOneOf, type ItemModifier, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemAmount, type LineItemChangeDetails, type LineItemChanges, type LineItemDescriptionLineChange, type LineItemDiscount, type LineItemExchangeData, type LineItemModifiersChange, type LineItemPriceChange, type LineItemProductNameChange, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type ManagedAdditionalFee, type ManagedDiscount, type ManagedLineItem, type MembershipPaymentRefund, type MerchantComment, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifiersGroupsOverride, type NewExchangeOrderCreated, NonDraftableReason, type NonDraftableReasonWithLiterals, type Order, type OrderChange, type OrderChangeValueOneOf, type OrderCreateNotifications, type OrderCreateSettings, type OrderCreatedFromExchange, type OrderLineItem, type OrderRefunded, OrderStatus, type OrderStatusWithLiterals, type OrderTaxBreakdown, type OrderTaxInfo, type PaymentCanceled, type PaymentCanceledPaymentDetailsOneOf, type PaymentDeclined, type PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentPending, type PaymentPendingPaymentDetailsOneOf, type PaymentRefundFailed, type PaymentRefunded, PaymentStatus, type PaymentStatusWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupDetailsPickupMethod, type PickupDetailsPickupMethodWithLiterals, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QueryDraftOrdersRequest, type QueryDraftOrdersResponse, type ReceiptCreated, type ReceiptCreatedReceiptInfoOneOf, type ReceiptSent, type ReceiptSentReceiptInfoOneOf, type RecipientInfoChangedDetails, type RecipientInfoDetails, type RecipientInfoDetailsChangeTypeOneOf, type RefundInitiated, type RefundedAsStoreCredit, type RefundedPayment, type RefundedPaymentKindOneOf, type RegularPayment, type RegularPaymentPaymentMethodDetailsOneOf, type RegularPaymentRefund, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type SavedPaymentMethod, type SecuredMedia, type SetAdditionalFeesApplicationErrors, type SetAdditionalFeesRequest, type SetAdditionalFeesResponse, type SetBillingInfoApplicationErrors, type SetBillingInfoOptions, type SetBillingInfoRequest, type SetBillingInfoResponse, type SetBusinessLocationApplicationErrors, type SetBusinessLocationOptions, type SetBusinessLocationRequest, type SetBusinessLocationResponse, type SetBuyerInfoApplicationErrors, type SetBuyerInfoOptions, type SetBuyerInfoRequest, type SetBuyerInfoResponse, type SetDiscountsApplicationErrors, type SetDiscountsRequest, type SetDiscountsResponse, type SetRecipientInfoApplicationErrors, type SetRecipientInfoOptions, type SetRecipientInfoRequest, type SetRecipientInfoResponse, type SetShippingInfoApplicationErrors, type SetShippingInfoOptions, type SetShippingInfoRequest, type SetShippingInfoResponse, type SetTaxExemptionApplicationErrors, type SetTaxExemptionOptions, type SetTaxExemptionRequest, type SetTaxExemptionResponse, type ShippingChangedDetails, type ShippingDetails, type ShippingDetailsChangeTypeOneOf, type ShippingInformation, type ShippingInformationChange, type ShippingOption, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SourceType, type SourceTypeWithLiterals, type StreetAddress, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type SystemError, type TagList, type Tags, type TaxDetails, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateExtendedFieldsApplicationErrors, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type UpdateShippingInfoRequest, type UpdateShippingInfoResponse, type V1BalanceSummary, type V1CreatedBy, type V1CreatedByStringOneOf, type V1DeliveryLogistics, type V1DeliveryLogisticsAddressOneOf, type V1DeliveryTimeSlot, type V1PickupDetails, type V1ShippingInformation, type V1ShippingPrice, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, type WixReceipt, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
|
5350
|
+
export { type ActionEvent, type Activity, type ActivityContentOneOf, ActivityType, type ActivityTypeWithLiterals, type AddLineItemsToDraftOrderApplicationErrors, type AddLineItemsToDraftOrderOptions, type AddLineItemsToDraftOrderRequest, type AddLineItemsToDraftOrderResponse, type AdditionalFee, type AdditionalFeeDetails, type AdditionalFeeOption, type Address, type AddressLocation, type AddressWithContact, AdjustmentType, type AdjustmentTypeWithLiterals, type ApplicationError, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, AppliedDiscountDiscountType, type AppliedDiscountDiscountTypeWithLiterals, AttributionSource, type AttributionSourceWithLiterals, type AuthorizedPaymentCaptured, type AuthorizedPaymentCreated, type AuthorizedPaymentVoided, type Balance, type BalanceSummary, type BaseEventMetadata, type BillingAdjustment, type BillingAdjustmentPriceSummary, type BillingChangedDetails, type BillingDetails, type BillingDetailsChangeTypeOneOf, type BusinessLocationChangedDetails, type BusinessLocationDetails, type BusinessLocationDetailsChangeTypeOneOf, type BuyerChangedDetails, type BuyerDetails, type BuyerDetailsChangeTypeOneOf, type BuyerInfo, type BuyerInfoIdOneOf, type CalculatedDraftOrder, type CalculationErrors, type CalculationErrorsShippingCalculationErrorOneOf, type CarrierError, type CarrierErrors, type CatalogReference, type CatalogReferenceLineItem, type ChannelInfo, ChannelType, type ChannelTypeWithLiterals, type ChargebackCreated, type ChargebackReversed, type Color, type CommitDraftOrderApplicationErrors, type CommitDraftOrderOptions, type CommitDraftOrderRequest, type CommitDraftOrderResponse, type Coupon, type CreateCustomAdditionalFeesApplicationErrors, type CreateCustomAdditionalFeesOptions, type CreateCustomAdditionalFeesRequest, type CreateCustomAdditionalFeesResponse, type CreateCustomDiscountsApplicationErrors, type CreateCustomDiscountsOptions, type CreateCustomDiscountsRequest, type CreateCustomDiscountsResponse, type CreateDraftOrderApplicationErrors, type CreateDraftOrderRequest, type CreateDraftOrderResponse, type CreateEmptyDraftOrderApplicationErrors, type CreateEmptyDraftOrderRequest, type CreateEmptyDraftOrderResponse, type CreateOrderFromDraftApplicationErrors, type CreateOrderFromDraftOptions, type CreateOrderFromDraftRequest, type CreateOrderFromDraftResponse, type CreatedBy, type CreatedByStringOneOf, type CreditCardDetails, type CurrencyConversionDetails, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomActivity, type CustomField, type CustomLineItem, type DeleteCustomAdditionalFeesApplicationErrors, type DeleteCustomAdditionalFeesRequest, type DeleteCustomAdditionalFeesResponse, type DeleteCustomDiscountsApplicationErrors, type DeleteCustomDiscountsRequest, type DeleteCustomDiscountsResponse, type DeleteDraftOrderApplicationErrors, type DeleteDraftOrderRequest, type DeleteDraftOrderResponse, type DeliveryLogistics, type DeliveryTimeSlot, type DepositDetails, type DepositDetailsDepositOneOf, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineTypeWithLiterals, type DescriptionLineValueOneOf, type DescriptionLinesOverride, type Details, type DetailsKindOneOf, type DigitalFile, type DiscountDetails, type DiscountOption, type DiscountOptionDiscountAmountOneOf, DiscountReason, type DiscountReasonWithLiterals, type DiscountRule, type DiscountRuleName, DiscountType, type DiscountTypeWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type DraftOrder, type DraftOrderChangesApplied, type DraftOrderCommitSettings, type DraftOrderCreatedEnvelope, type DraftOrderDeletedEnvelope, type DraftOrderUpdatedEnvelope, type DraftOrdersQueryBuilder, type DraftOrdersQueryResult, EditingStatus, type EditingStatusWithLiterals, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type ExternalReceipt, type FieldViolation, FileType, type FileTypeWithLiterals, type FocalPoint, type FreeTrialPeriod, FulfillmentStatus, type FulfillmentStatusWithLiterals, type FulfillmentStatusesAggregate, type FullAddressContactDetails, type GetDraftOrderApplicationErrors, type GetDraftOrderRequest, type GetDraftOrderResponse, type GetOrderDraftabilityStatusRequest, type GetOrderDraftabilityStatusResponse, type GiftCardPaymentRefund, type IdAndApplied, type IdentificationData, type IdentificationDataIdOneOf, type InventoryUpdate, type ItemChangedDetails, type ItemDetails, type ItemDetailsChangeTypeOneOf, type ItemModifier, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ItemTypeItemTypeWithLiterals, JurisdictionType, type JurisdictionTypeWithLiterals, type LineItemAmount, type LineItemChangeDetails, type LineItemChanges, type LineItemDescriptionLineChange, type LineItemDiscount, type LineItemExchangeData, type LineItemModifiersChange, type LineItemPriceChange, type LineItemProductNameChange, type LineItemQuantityChange, LineItemQuantityChangeType, type LineItemQuantityChangeTypeWithLiterals, type LineItemTaxBreakdown, type LineItemTaxInfo, type Location, type LocationAndQuantity, type ManagedAdditionalFee, type ManagedDiscount, type ManagedLineItem, type MembershipPaymentRefund, type MerchantComment, type MerchantDiscount, type MerchantDiscountMerchantDiscountReasonOneOf, type MessageEnvelope, type ModifierGroup, type ModifiersGroupsOverride, type NewExchangeOrderCreated, NonDraftableReason, type NonDraftableReasonWithLiterals, type Order, type OrderChange, type OrderChangeValueOneOf, type OrderCreateNotifications, type OrderCreateSettings, type OrderCreatedFromExchange, type OrderLineItem, type OrderRefunded, OrderStatus, type OrderStatusWithLiterals, type OrderTaxBreakdown, type OrderTaxInfo, type PaymentCanceled, type PaymentCanceledPaymentDetailsOneOf, type PaymentDeclined, type PaymentDeclinedPaymentDetailsOneOf, PaymentOptionType, type PaymentOptionTypeWithLiterals, type PaymentPending, type PaymentPendingPaymentDetailsOneOf, type PaymentRefundFailed, type PaymentRefunded, PaymentStatus, type PaymentStatusWithLiterals, type PhysicalProperties, type PickupAddress, type PickupDetails, PickupDetailsPickupMethod, type PickupDetailsPickupMethodWithLiterals, PickupMethod, type PickupMethodWithLiterals, type PlainTextValue, type Price, type PriceDescription, type PriceSummary, type ProductName, type QueryDraftOrdersRequest, type QueryDraftOrdersResponse, type ReceiptCreated, type ReceiptCreatedReceiptInfoOneOf, type ReceiptSent, type ReceiptSentReceiptInfoOneOf, type RecipientInfoChangedDetails, type RecipientInfoDetails, type RecipientInfoDetailsChangeTypeOneOf, type RefundInitiated, type RefundedAsStoreCredit, type RefundedPayment, type RefundedPaymentKindOneOf, type RegularPayment, type RegularPaymentPaymentMethodDetailsOneOf, type RegularPaymentRefund, type RestoreInfo, RuleType, type RuleTypeWithLiterals, type SavedPaymentMethod, type SecuredMedia, type SetAdditionalFeesApplicationErrors, type SetAdditionalFeesRequest, type SetAdditionalFeesResponse, type SetBillingInfoApplicationErrors, type SetBillingInfoOptions, type SetBillingInfoRequest, type SetBillingInfoResponse, type SetBusinessLocationApplicationErrors, type SetBusinessLocationOptions, type SetBusinessLocationRequest, type SetBusinessLocationResponse, type SetBuyerInfoApplicationErrors, type SetBuyerInfoOptions, type SetBuyerInfoRequest, type SetBuyerInfoResponse, type SetDepositApplicationErrors, type SetDepositOptions, type SetDepositRequest, type SetDepositResponse, type SetDiscountsApplicationErrors, type SetDiscountsRequest, type SetDiscountsResponse, type SetRecipientInfoApplicationErrors, type SetRecipientInfoOptions, type SetRecipientInfoRequest, type SetRecipientInfoResponse, type SetShippingInfoApplicationErrors, type SetShippingInfoOptions, type SetShippingInfoRequest, type SetShippingInfoResponse, type SetTaxExemptionApplicationErrors, type SetTaxExemptionOptions, type SetTaxExemptionRequest, type SetTaxExemptionResponse, type ShippingChangedDetails, type ShippingDetails, type ShippingDetailsChangeTypeOneOf, type ShippingInformation, type ShippingInformationChange, type ShippingOption, type ShippingPrice, type ShippingRegion, SortOrder, type SortOrderWithLiterals, type Sorting, SourceType, type SourceTypeWithLiterals, type StreetAddress, type SubscriptionDescription, SubscriptionFrequency, type SubscriptionFrequencyWithLiterals, type SubscriptionInfo, type SubscriptionSettings, type SubscriptionTitle, type SystemError, type TagList, type Tags, type TaxDetails, type TaxSummary, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type TaxableAddressTypeWithLiterals, type TotalPriceChange, type TranslatableString, type TranslatedValue, type UpdateExtendedFieldsApplicationErrors, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UpdateLineItemsApplicationErrors, type UpdateLineItemsRequest, type UpdateLineItemsResponse, type UpdateShippingInfoRequest, type UpdateShippingInfoResponse, type V1BalanceSummary, type V1CreatedBy, type V1CreatedByStringOneOf, type V1DeliveryLogistics, type V1DeliveryLogisticsAddressOneOf, type V1DeliveryTimeSlot, type V1PickupDetails, type V1ShippingInformation, type V1ShippingPrice, type ValidationError, type VatId, VatType, type VatTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeightUnit, type WeightUnitWithLiterals, type WixReceipt, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, onDraftOrderCreated, onDraftOrderDeleted, onDraftOrderUpdated, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDeposit, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateExtendedFields, updateLineItems };
|
|
@@ -65,6 +65,7 @@ __export(index_typings_exports, {
|
|
|
65
65
|
setBillingInfo: () => setBillingInfo2,
|
|
66
66
|
setBusinessLocation: () => setBusinessLocation2,
|
|
67
67
|
setBuyerInfo: () => setBuyerInfo2,
|
|
68
|
+
setDeposit: () => setDeposit2,
|
|
68
69
|
setDiscounts: () => setDiscounts2,
|
|
69
70
|
setRecipientInfo: () => setRecipientInfo2,
|
|
70
71
|
setShippingInfo: () => setShippingInfo2,
|
|
@@ -675,6 +676,143 @@ function updateLineItems(payload) {
|
|
|
675
676
|
}
|
|
676
677
|
return __updateLineItems;
|
|
677
678
|
}
|
|
679
|
+
function setDeposit(payload) {
|
|
680
|
+
function __setDeposit({ host }) {
|
|
681
|
+
const metadata = {
|
|
682
|
+
entityFqdn: "wix.ecom.v1.draft_order",
|
|
683
|
+
method: "POST",
|
|
684
|
+
methodFqn: "com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit",
|
|
685
|
+
packageName: PACKAGE_NAME,
|
|
686
|
+
migrationOptions: {
|
|
687
|
+
optInTransformResponse: true
|
|
688
|
+
},
|
|
689
|
+
url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
|
|
690
|
+
protoPath: "/v1/draft-orders/{draftOrderId}/set-deposit",
|
|
691
|
+
data: payload,
|
|
692
|
+
host
|
|
693
|
+
}),
|
|
694
|
+
data: payload,
|
|
695
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
696
|
+
{
|
|
697
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
698
|
+
paths: [
|
|
699
|
+
{ path: "calculatedDraftOrder.draftOrder.createdDate" },
|
|
700
|
+
{ path: "calculatedDraftOrder.draftOrder.updatedDate" },
|
|
701
|
+
{
|
|
702
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.digitalFile.expirationDate"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliverByDate"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.from"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.to"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliverByDate"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
738
|
+
paths: [
|
|
739
|
+
{
|
|
740
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.x"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.y"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.physicalProperties.weight"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.latitude"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.longitude"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.latitude"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.longitude"
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.latitude"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.longitude"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.latitude"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.longitude"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.latitude"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.longitude"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.latitude"
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.longitude"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.latitude"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.longitude"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
807
|
+
}
|
|
808
|
+
]
|
|
809
|
+
}
|
|
810
|
+
])
|
|
811
|
+
};
|
|
812
|
+
return metadata;
|
|
813
|
+
}
|
|
814
|
+
return __setDeposit;
|
|
815
|
+
}
|
|
678
816
|
function setDiscounts(payload) {
|
|
679
817
|
function __setDiscounts({ host }) {
|
|
680
818
|
const metadata = {
|
|
@@ -3679,6 +3817,79 @@ async function updateLineItems2(draftOrderId, lineItemChanges) {
|
|
|
3679
3817
|
throw transformedError;
|
|
3680
3818
|
}
|
|
3681
3819
|
}
|
|
3820
|
+
async function setDeposit2(draftOrderId, options) {
|
|
3821
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3822
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
3823
|
+
draftOrderId,
|
|
3824
|
+
depositDetails: options?.depositDetails
|
|
3825
|
+
});
|
|
3826
|
+
const reqOpts = setDeposit(payload);
|
|
3827
|
+
sideEffects?.onSiteCall?.();
|
|
3828
|
+
try {
|
|
3829
|
+
const result = await httpClient.request(reqOpts);
|
|
3830
|
+
sideEffects?.onSuccess?.(result);
|
|
3831
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
3832
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
3833
|
+
{
|
|
3834
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
3835
|
+
paths: [
|
|
3836
|
+
{
|
|
3837
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image"
|
|
3838
|
+
}
|
|
3839
|
+
]
|
|
3840
|
+
},
|
|
3841
|
+
{
|
|
3842
|
+
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
3843
|
+
paths: [
|
|
3844
|
+
{
|
|
3845
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
|
|
3849
|
+
},
|
|
3850
|
+
{
|
|
3851
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address"
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address"
|
|
3855
|
+
},
|
|
3856
|
+
{ path: "calculatedDraftOrder.draftOrder.billingInfo.address" },
|
|
3857
|
+
{
|
|
3858
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address"
|
|
3862
|
+
},
|
|
3863
|
+
{
|
|
3864
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address"
|
|
3865
|
+
},
|
|
3866
|
+
{
|
|
3867
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address"
|
|
3868
|
+
},
|
|
3869
|
+
{
|
|
3870
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address"
|
|
3871
|
+
}
|
|
3872
|
+
]
|
|
3873
|
+
}
|
|
3874
|
+
])
|
|
3875
|
+
);
|
|
3876
|
+
} catch (err) {
|
|
3877
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
3878
|
+
err,
|
|
3879
|
+
{
|
|
3880
|
+
spreadPathsToArguments: {},
|
|
3881
|
+
explicitPathsToArguments: {
|
|
3882
|
+
draftOrderId: "$[0]",
|
|
3883
|
+
depositDetails: "$[1].depositDetails"
|
|
3884
|
+
},
|
|
3885
|
+
singleArgumentUnchanged: false
|
|
3886
|
+
},
|
|
3887
|
+
["draftOrderId", "options"]
|
|
3888
|
+
);
|
|
3889
|
+
sideEffects?.onError?.(err);
|
|
3890
|
+
throw transformedError;
|
|
3891
|
+
}
|
|
3892
|
+
}
|
|
3682
3893
|
async function setDiscounts2(draftOrderId, discounts) {
|
|
3683
3894
|
const { httpClient, sideEffects } = arguments[2];
|
|
3684
3895
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -5030,6 +5241,7 @@ async function setBusinessLocation2(draftOrderId, options) {
|
|
|
5030
5241
|
setBillingInfo,
|
|
5031
5242
|
setBusinessLocation,
|
|
5032
5243
|
setBuyerInfo,
|
|
5244
|
+
setDeposit,
|
|
5033
5245
|
setDiscounts,
|
|
5034
5246
|
setRecipientInfo,
|
|
5035
5247
|
setShippingInfo,
|