@wix/ditto-codegen-public 1.0.170 → 1.0.172
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/dist/docs-output/api-docs/ecom-cart-addToCart-doc.txt +255 -345
- package/dist/docs-output/api-docs/ecom-cart-createCart-doc.txt +298 -387
- package/dist/docs-output/api-docs/ecom-cart-createCheckout-doc.txt +24 -30
- package/dist/docs-output/api-docs/ecom-cart-getCart-doc.txt +174 -266
- package/dist/docs-output/api-docs/ecom-cart-removeLineItemsFromCart-doc.txt +175 -204
- package/dist/docs-output/api-docs/ecom-cart-updateCart-doc.txt +301 -398
- package/dist/docs-output/api-docs/ecom-checkout-addToCheckout-doc.txt +433 -816
- package/dist/docs-output/api-docs/ecom-checkout-createCheckout-doc.txt +519 -1282
- package/dist/docs-output/api-docs/ecom-checkout-getCheckout-doc.txt +353 -886
- package/dist/docs-output/api-docs/ecom-checkout-removeLineItemsFromCheckout-doc.txt +354 -734
- package/dist/docs-output/api-docs/ecom-checkout-updateCheckout-doc.txt +513 -794
- package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +174 -301
- package/dist/docs-output/api-docs/ecom-currentCart-updateCurrentCart-doc.txt +301 -398
- package/dist/docs-output/api-docs/ecom-orders-bulkUpdateOrders-doc.txt +589 -641
- package/dist/docs-output/api-docs/ecom-orders-getOrder-doc.txt +425 -726
- package/dist/examples-apps/custom-element/src/widgets/custom-elements/countdown-timer/widget.tsx +370 -209
- package/package.json +2 -2
|
@@ -29,7 +29,7 @@ undefined
|
|
|
29
29
|
|
|
30
30
|
# Method Code Examples:
|
|
31
31
|
|
|
32
|
-
## Create a checkout from a cart
|
|
32
|
+
## Create a checkout from a cart
|
|
33
33
|
|
|
34
34
|
```javascript
|
|
35
35
|
/**************************************
|
|
@@ -87,12 +87,6 @@ myCreateCheckoutFunction(cartId, options)
|
|
|
87
87
|
console.error(error);
|
|
88
88
|
// Handle the error
|
|
89
89
|
});
|
|
90
|
-
|
|
91
|
-
/* Promise resolves to:
|
|
92
|
-
*
|
|
93
|
-
* {"checkoutId": "a43420aa-986b-456a-a2f7-7ea5c80e9007"}
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
90
|
```
|
|
97
91
|
|
|
98
92
|
|
|
@@ -103,22 +97,22 @@ Method: ecom.cart.createCheckout(_id, options)
|
|
|
103
97
|
Description: Creates a checkout from a cart. If a checkout for the specified cart already exists, that checkout is updated with any new information from the cart. > **Note:** `channelType` is a required field.
|
|
104
98
|
Method parameters:
|
|
105
99
|
param name: _id | type: string | description: Cart GUID. | required: true
|
|
106
|
-
param name: options | type: CreateCheckoutOptions | description: Checkout creation options.
|
|
107
|
-
- name: billingAddress | type: Address | description: Billing address. Used for calculating tax if all the items in the cart are not shippable.
|
|
108
|
-
- name: addressLine1 | type: string | description: Main address line (usually street name and number).
|
|
109
|
-
- name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
110
|
-
- name: city | type: string | description: City name.
|
|
111
|
-
- name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
112
|
-
- name: location | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates.
|
|
113
|
-
- name: latitude | type: number | description: Address latitude.
|
|
114
|
-
- name: longitude | type: number | description: Address longitude.
|
|
115
|
-
- name: postalCode | type: string | description: Postal or zip code.
|
|
116
|
-
- name: streetAddress | type: StreetAddress | description: Street address.
|
|
117
|
-
- name: name | type: string | description: Street name.
|
|
118
|
-
- name: number | type: string | description: Street number.
|
|
119
|
-
- name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
120
|
-
- name: channelType | type: ChannelType | description: __Required.__ Sales channel type.
|
|
121
|
-
enum:
|
|
100
|
+
param name: options | type: CreateCheckoutOptions | description: Checkout creation options.
|
|
101
|
+
- name: billingAddress | type: Address | description: Billing address. Used for calculating tax if all the items in the cart are not shippable.
|
|
102
|
+
- name: addressLine1 | type: string | description: Main address line (usually street name and number).
|
|
103
|
+
- name: addressLine2 | type: string | description: Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
104
|
+
- name: city | type: string | description: City name.
|
|
105
|
+
- name: country | type: string | description: Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
106
|
+
- name: location | type: AddressLocation | description: Geocode object containing latitude and longitude coordinates.
|
|
107
|
+
- name: latitude | type: number | description: Address latitude.
|
|
108
|
+
- name: longitude | type: number | description: Address longitude.
|
|
109
|
+
- name: postalCode | type: string | description: Postal or zip code.
|
|
110
|
+
- name: streetAddress | type: StreetAddress | description: Street address.
|
|
111
|
+
- name: name | type: string | description: Street name.
|
|
112
|
+
- name: number | type: string | description: Street number.
|
|
113
|
+
- name: subdivision | type: string | description: Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
114
|
+
- name: channelType | type: ChannelType | description: __Required.__ Sales channel type.
|
|
115
|
+
enum:
|
|
122
116
|
AMAZON: [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop).
|
|
123
117
|
BACKOFFICE_MERCHANT: Wix merchant backoffice.
|
|
124
118
|
CLASS_PASS: [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass).
|
|
@@ -136,13 +130,13 @@ Method parameters:
|
|
|
136
130
|
WISH: Wish sales channel.
|
|
137
131
|
WIX_APP_STORE: [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview).
|
|
138
132
|
WIX_INVOICES: Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings)
|
|
139
|
-
- name: email | type: string | description: Required when setting a billing or shipping address if the site visitor isn't logged in.
|
|
140
|
-
- name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option.
|
|
141
|
-
- name: carrierId | type: string | description: Carrier GUID.
|
|
142
|
-
- name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight".
|
|
143
|
-
- name: shippingAddress | type: Address | description: Shipping address. Used for calculating tax and shipping (when applicable).
|
|
133
|
+
- name: email | type: string | description: Required when setting a billing or shipping address if the site visitor isn't logged in.
|
|
134
|
+
- name: selectedShippingOption | type: SelectedShippingOption | description: Selected shipping option.
|
|
135
|
+
- name: carrierId | type: string | description: Carrier GUID.
|
|
136
|
+
- name: code | type: string | description: Selected shipping option code. For example, "usps_std_overnight".
|
|
137
|
+
- name: shippingAddress | type: Address | description: Shipping address. Used for calculating tax and shipping (when applicable).
|
|
144
138
|
Return type: PROMISE<CreateCheckoutResponse>
|
|
145
|
-
- name: checkoutId | type: string | description: The newly created checkout's GUID.
|
|
139
|
+
- name: checkoutId | type: string | description: The newly created checkout's GUID.
|
|
146
140
|
Possible Errors:
|
|
147
141
|
HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CUSTOM_LINE_ITEM_MUST_HAVE_EXACTLY_ONE_PROPERTIES_TYPE
|
|
148
142
|
HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: CUSTOM_LINE_ITEM_ONLY_ACCEPTS_PAYMENTS_ONLINE_AND_OFFLINE
|
|
@@ -152,4 +146,4 @@ Possible Errors:
|
|
|
152
146
|
|
|
153
147
|
```
|
|
154
148
|
</type_definition>
|
|
155
|
-
</ecom_cart_createCheckout>
|
|
149
|
+
</ecom_cart_createCheckout>
|