Skip to content

Commit 576c91c

Browse files
committed
docs(products): get clients shopping cart
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
1 parent fea1069 commit 576c91c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

source/includes/_products.md.erb

+18-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,24 @@ curl 'https://<%= config[:api_endpoint] %>/products/cart?did=DEVICE_ID&shop_id=S
486486
```
487487

488488
```jsx
489-
// Not implemented yet.
489+
cart() {
490+
return new Promise((resolve, reject) => {
491+
this.push((() => {
492+
try {
493+
request('products/cart', {
494+
params: {
495+
shop_id: this.shop_id,
496+
},
497+
}).then( res => {
498+
resolve(res)
499+
});
500+
} catch (error) {
501+
reject(error)
502+
}
503+
}));
504+
})
505+
}
506+
490507
```
491508

492509
### HTTP Request

0 commit comments

Comments
 (0)