@wix/auto_sdk_ecom_draft-orders 1.0.66 → 1.0.67
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 +57 -1
- package/build/cjs/index.typings.js +212 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +44 -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 +57 -1
- package/build/es/index.typings.mjs +211 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +44 -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 +87 -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 +44 -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 +87 -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 +44 -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,29 @@ 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
|
+
/** Price summary with deposit. */
|
|
1827
|
+
priceSummary?: PriceSummary;
|
|
1828
|
+
}
|
|
1829
|
+
/** @oneof */
|
|
1830
|
+
interface DepositDetailsDepositOneOf {
|
|
1831
|
+
/** Deposit value as a monetary amount. */
|
|
1832
|
+
amount?: Price;
|
|
1833
|
+
/**
|
|
1834
|
+
* Deposit amount defined as a percentage of the total order value.
|
|
1835
|
+
* @format DECIMAL_VALUE
|
|
1836
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
1837
|
+
*/
|
|
1838
|
+
percentage?: string | null;
|
|
1839
|
+
}
|
|
1812
1840
|
interface CreateDraftOrderRequest {
|
|
1813
1841
|
/**
|
|
1814
1842
|
* ID of the order to create a draft for.
|
|
@@ -2274,6 +2302,22 @@ interface UpdateLineItemsResponse {
|
|
|
2274
2302
|
/** Draft order calculated with the latest changes. */
|
|
2275
2303
|
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2276
2304
|
}
|
|
2305
|
+
interface SetDepositRequest {
|
|
2306
|
+
/**
|
|
2307
|
+
* Draft order ID.
|
|
2308
|
+
* @format GUID
|
|
2309
|
+
*/
|
|
2310
|
+
draftOrderId: string;
|
|
2311
|
+
/**
|
|
2312
|
+
* Deposit to set on the draft order.
|
|
2313
|
+
* Leave it as empty to remove deposit settings.
|
|
2314
|
+
*/
|
|
2315
|
+
depositDetails?: DepositDetails;
|
|
2316
|
+
}
|
|
2317
|
+
interface SetDepositResponse {
|
|
2318
|
+
/** Draft order calculated with the latest changes. */
|
|
2319
|
+
calculatedDraftOrder?: CalculatedDraftOrder;
|
|
2320
|
+
}
|
|
2277
2321
|
interface SetDiscountsRequest {
|
|
2278
2322
|
/**
|
|
2279
2323
|
* Draft order ID.
|
|
@@ -2826,6 +2870,12 @@ interface Order {
|
|
|
2826
2870
|
* @readonly
|
|
2827
2871
|
*/
|
|
2828
2872
|
payAfterFreeTrial?: PriceSummary;
|
|
2873
|
+
/**
|
|
2874
|
+
* Deposit price summary. Part of price_summary that must be payed at checkout
|
|
2875
|
+
* @internal
|
|
2876
|
+
* @readonly
|
|
2877
|
+
*/
|
|
2878
|
+
deposit?: PriceSummary;
|
|
2829
2879
|
}
|
|
2830
2880
|
declare enum PaymentStatus {
|
|
2831
2881
|
UNSPECIFIED = "UNSPECIFIED",
|
|
@@ -4424,6 +4474,16 @@ type UpdateLineItemsApplicationErrors = {
|
|
|
4424
4474
|
data?: Record<string, any>;
|
|
4425
4475
|
};
|
|
4426
4476
|
/** @docsIgnore */
|
|
4477
|
+
type SetDepositApplicationErrors = {
|
|
4478
|
+
code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
|
|
4479
|
+
description?: string;
|
|
4480
|
+
data?: Record<string, any>;
|
|
4481
|
+
} | {
|
|
4482
|
+
code?: 'DEPOSIT_AMOUNT_EXCEEDS_ORDER_TOTALS';
|
|
4483
|
+
description?: string;
|
|
4484
|
+
data?: Record<string, any>;
|
|
4485
|
+
};
|
|
4486
|
+
/** @docsIgnore */
|
|
4427
4487
|
type SetDiscountsApplicationErrors = {
|
|
4428
4488
|
code?: 'DRAFT_ORDER_DOES_NOT_EXIST';
|
|
4429
4489
|
description?: string;
|
|
@@ -4774,6 +4834,32 @@ interface AddLineItemsToDraftOrderOptions {
|
|
|
4774
4834
|
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
4835
|
__applicationErrorsType?: UpdateLineItemsApplicationErrors;
|
|
4776
4836
|
}>;
|
|
4837
|
+
/**
|
|
4838
|
+
* Sets deposit requirements on a draft order.
|
|
4839
|
+
*
|
|
4840
|
+
* Use this method to configure partial payment options where customers pay a portion upfront
|
|
4841
|
+
* and the remainder at a later time. Deposits can be specified as a fixed amount or percentage.
|
|
4842
|
+
* Feature supported only in create order flow and not in edit order flow.
|
|
4843
|
+
*
|
|
4844
|
+
* When applied, prevents order from becoming APPROVED until required amount is PAID.
|
|
4845
|
+
* When unapplied, deposits will be cleared from draft order.
|
|
4846
|
+
* @param draftOrderId - Draft order ID.
|
|
4847
|
+
* @internal
|
|
4848
|
+
* @documentationMaturity preview
|
|
4849
|
+
* @requiredField draftOrderId
|
|
4850
|
+
* @permissionId ECOM.DRAFT_ORDERS_SET_DEPOSIT
|
|
4851
|
+
* @fqn com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit
|
|
4852
|
+
*/
|
|
4853
|
+
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> & {
|
|
4854
|
+
__applicationErrorsType?: SetDepositApplicationErrors;
|
|
4855
|
+
}>;
|
|
4856
|
+
interface SetDepositOptions {
|
|
4857
|
+
/**
|
|
4858
|
+
* Deposit to set on the draft order.
|
|
4859
|
+
* Leave it as empty to remove deposit settings.
|
|
4860
|
+
*/
|
|
4861
|
+
depositDetails?: DepositDetails;
|
|
4862
|
+
}
|
|
4777
4863
|
/**
|
|
4778
4864
|
* Applies or unapplies discounts on a draft order.
|
|
4779
4865
|
*
|
|
@@ -5258,4 +5344,4 @@ interface SetBusinessLocationOptions {
|
|
|
5258
5344
|
businessLocation?: Location;
|
|
5259
5345
|
}
|
|
5260
5346
|
|
|
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 };
|
|
5347
|
+
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 };
|
|
@@ -602,6 +602,143 @@ function updateLineItems(payload) {
|
|
|
602
602
|
}
|
|
603
603
|
return __updateLineItems;
|
|
604
604
|
}
|
|
605
|
+
function setDeposit(payload) {
|
|
606
|
+
function __setDeposit({ host }) {
|
|
607
|
+
const metadata = {
|
|
608
|
+
entityFqdn: "wix.ecom.v1.draft_order",
|
|
609
|
+
method: "POST",
|
|
610
|
+
methodFqn: "com.wix.ecom.orders.draft.v1.DraftOrders.SetDeposit",
|
|
611
|
+
packageName: PACKAGE_NAME,
|
|
612
|
+
migrationOptions: {
|
|
613
|
+
optInTransformResponse: true
|
|
614
|
+
},
|
|
615
|
+
url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
|
|
616
|
+
protoPath: "/v1/draft-orders/{draftOrderId}/set-deposit",
|
|
617
|
+
data: payload,
|
|
618
|
+
host
|
|
619
|
+
}),
|
|
620
|
+
data: payload,
|
|
621
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
622
|
+
{
|
|
623
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
624
|
+
paths: [
|
|
625
|
+
{ path: "calculatedDraftOrder.draftOrder.createdDate" },
|
|
626
|
+
{ path: "calculatedDraftOrder.draftOrder.updatedDate" },
|
|
627
|
+
{
|
|
628
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.urlExpirationDate"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.digitalFile.expirationDate"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.subscriptionInfo.subscriptionSettings.startDate"
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliverByDate"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.from"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.deliveryTimeSlot.to"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliverByDate"
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.from"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.deliveryTimeSlot.to"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.from"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.deliveryTimeSlot.to"
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
664
|
+
paths: [
|
|
665
|
+
{
|
|
666
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.x"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image.focalPoint.y"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.physicalProperties.weight"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.latitude"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address.geocode.longitude"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.latitude"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address.geocode.longitude"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.latitude"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address.geocode.longitude"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.latitude"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address.geocode.longitude"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.latitude"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
path: "calculatedDraftOrder.draftOrder.billingInfo.address.geocode.longitude"
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.latitude"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address.geocode.longitude"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.latitude"
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address.geocode.longitude"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.latitude"
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address.geocode.longitude"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.latitude"
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address.geocode.longitude"
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.latitude"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address.geocode.longitude"
|
|
733
|
+
}
|
|
734
|
+
]
|
|
735
|
+
}
|
|
736
|
+
])
|
|
737
|
+
};
|
|
738
|
+
return metadata;
|
|
739
|
+
}
|
|
740
|
+
return __setDeposit;
|
|
741
|
+
}
|
|
605
742
|
function setDiscounts(payload) {
|
|
606
743
|
function __setDiscounts({ host }) {
|
|
607
744
|
const metadata = {
|
|
@@ -3606,6 +3743,79 @@ async function updateLineItems2(draftOrderId, lineItemChanges) {
|
|
|
3606
3743
|
throw transformedError;
|
|
3607
3744
|
}
|
|
3608
3745
|
}
|
|
3746
|
+
async function setDeposit2(draftOrderId, options) {
|
|
3747
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3748
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
3749
|
+
draftOrderId,
|
|
3750
|
+
depositDetails: options?.depositDetails
|
|
3751
|
+
});
|
|
3752
|
+
const reqOpts = setDeposit(payload);
|
|
3753
|
+
sideEffects?.onSiteCall?.();
|
|
3754
|
+
try {
|
|
3755
|
+
const result = await httpClient.request(reqOpts);
|
|
3756
|
+
sideEffects?.onSuccess?.(result);
|
|
3757
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3758
|
+
transformPaths2(result.data, [
|
|
3759
|
+
{
|
|
3760
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3761
|
+
paths: [
|
|
3762
|
+
{
|
|
3763
|
+
path: "calculatedDraftOrder.draftOrder.lineItems.lineItem.image"
|
|
3764
|
+
}
|
|
3765
|
+
]
|
|
3766
|
+
},
|
|
3767
|
+
{
|
|
3768
|
+
transformFn: transformRESTAddressToSDKAddress,
|
|
3769
|
+
paths: [
|
|
3770
|
+
{
|
|
3771
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.shippingDestination.address"
|
|
3772
|
+
},
|
|
3773
|
+
{
|
|
3774
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.changedDetails.shippingInfoBeforeChange.logistics.pickupDetails.address"
|
|
3775
|
+
},
|
|
3776
|
+
{
|
|
3777
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.shippingDestination.address"
|
|
3778
|
+
},
|
|
3779
|
+
{
|
|
3780
|
+
path: "calculatedDraftOrder.draftOrder.shippingInfo.shippingInfo.logistics.pickupDetails.address"
|
|
3781
|
+
},
|
|
3782
|
+
{ path: "calculatedDraftOrder.draftOrder.billingInfo.address" },
|
|
3783
|
+
{
|
|
3784
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.changedDetails.recipientInfoBeforeChange.address"
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
path: "calculatedDraftOrder.draftOrder.recipientInfo.recipientInfo.address"
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.changedDetails.billingInfoBeforeChange.address"
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
path: "calculatedDraftOrder.draftOrder.billingDetails.billingInfo.address"
|
|
3794
|
+
},
|
|
3795
|
+
{
|
|
3796
|
+
path: "calculatedDraftOrder.shippingOptions.logistics.pickupDetails.address"
|
|
3797
|
+
}
|
|
3798
|
+
]
|
|
3799
|
+
}
|
|
3800
|
+
])
|
|
3801
|
+
);
|
|
3802
|
+
} catch (err) {
|
|
3803
|
+
const transformedError = sdkTransformError(
|
|
3804
|
+
err,
|
|
3805
|
+
{
|
|
3806
|
+
spreadPathsToArguments: {},
|
|
3807
|
+
explicitPathsToArguments: {
|
|
3808
|
+
draftOrderId: "$[0]",
|
|
3809
|
+
depositDetails: "$[1].depositDetails"
|
|
3810
|
+
},
|
|
3811
|
+
singleArgumentUnchanged: false
|
|
3812
|
+
},
|
|
3813
|
+
["draftOrderId", "options"]
|
|
3814
|
+
);
|
|
3815
|
+
sideEffects?.onError?.(err);
|
|
3816
|
+
throw transformedError;
|
|
3817
|
+
}
|
|
3818
|
+
}
|
|
3609
3819
|
async function setDiscounts2(draftOrderId, discounts) {
|
|
3610
3820
|
const { httpClient, sideEffects } = arguments[2];
|
|
3611
3821
|
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
@@ -4956,6 +5166,7 @@ export {
|
|
|
4956
5166
|
setBillingInfo2 as setBillingInfo,
|
|
4957
5167
|
setBusinessLocation2 as setBusinessLocation,
|
|
4958
5168
|
setBuyerInfo2 as setBuyerInfo,
|
|
5169
|
+
setDeposit2 as setDeposit,
|
|
4959
5170
|
setDiscounts2 as setDiscounts,
|
|
4960
5171
|
setRecipientInfo2 as setRecipientInfo,
|
|
4961
5172
|
setShippingInfo2 as setShippingInfo,
|