[POS 플러그인] order.addMenu 추가 항목 범위 및 기존 주문 항목 수정 API 문의
-
사용하는 제품
- 제품: POS 플러그인
- SDK 버전: @tossplace/pos-plugin-sdk 0.0.27 (0.0.28 선언도 확인)
- 환경: 운영 연동 준비
질문
안녕하세요. POS 플러그인 주문 연동 중 문의드립니다.
order.addMenu(orderId, dto)의dto.lineItems에는 추가분만 넣나요, 기존 항목까지 모두 넣나요? 공식 문서는 전체 주문, SDK 0.0.27/0.0.28 주석은 추가 메뉴만 안내합니다.기존 A×2 주문에 B×1을 추가하는 정확한 DTO 예시와, 이미 저장된 주문 항목의 수량 변경/삭제 API를 부탁드립니다.
공식 문서: https://docs.tossplace.com/reference/plugin-sdk/pos/order.html
감사합니다.
-
안녕하세요,
order.addMenu()의 dto.lineItems에는 새로 추가하는 항목만 넣어 주세요. 이미 저장된 항목까지 포함하면 그 항목이 한 번 더 반영됩니다. 기존 항목과 같으면 수량이 합산되고, 다르면 lineItem이 추가로 생성됩니다.
요청하신 예시 상황에서는 A를 다시 넣지 않고 B만 전달합니다.
await sdk.order.addMenu(orderId, { discounts: [], lineItems: [ { ... item: { id: 2, title: 'B', ... }, ... }, ], });이미 저장된 주문 항목의 수량을 변경하거나 삭제하는 API는 현재 제공하지 않습니다.
감사합니다.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
등록 로그인