Skip to content

Commit 32c01a2

Browse files
committed
docs(products): get product from cart swift
Signed-off-by: Aleksandr_Zavadkin <[email protected]>
1 parent fea1069 commit 32c01a2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

source/includes/_products.md.erb

+9-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,14 @@ curl 'https://<%= config[:api_endpoint] %>/products/cart?did=DEVICE_ID&shop_id=S
482482
```
483483

484484
```swift
485-
// Not implemented yet.
485+
sdk.getProductsFromCart { result in
486+
switch result {
487+
case .success(let items):
488+
print("cart items: \n \(items)")
489+
case .failure(let error):
490+
print("error: \(error)")
491+
}
492+
}
486493
```
487494

488495
```jsx
@@ -505,7 +512,7 @@ curl 'https://<%= config[:api_endpoint] %>/products/cart?did=DEVICE_ID&shop_id=S
505512

506513
Returns `{"status": "success", "data": { "items": [ {"uniqid": "SKU_1", "quantity": 1}, {"uniqid": "SKU_2", "quantity": 3} ] }}` JSON object.
507514

508-
515+
##
509516

510517

511518
## Clear client's shopping cart

0 commit comments

Comments
 (0)