Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

선물 가능한 쿠폰 리스트를 조회한다. #20

Conversation

this-is-spear
Copy link
Owner

Summary

  • 게시한 쿠폰한 쿠폰을 제외한 사용자가 가진 쿠폰을 반환합니다.

Description

선물가능한 쿠폰 조회 API는 다음과 같습니다.

sequenceDiagram
 actor Sender
 participant GiftCouponMessageController
 participant FindAvailableGiftCouponsUseCase

Sender ->> GiftCouponMessageController: findAvailableGiftCoupons(coupon id)
GiftCouponMessageController ->> FindAvailableGiftCouponsUseCase: findAvailableGiftCoupon(member id, coupon id)
FindAvailableGiftCouponsUseCase ->> MemberAdapter: findMember
MemberAdapter ->> FindAvailableGiftCouponsUseCase: 
FindAvailableGiftCouponsUseCase ->> CouponAdapter: findCoupon
CouponAdapter ->> FindAvailableGiftCouponsUseCase: 
FindAvailableGiftCouponsUseCase ->> FindAvailableGiftCouponsUseCase: isGiftAvailable

FindAvailableGiftCouponsUseCase ->> GiftCouponMessageController: return GiftCoupons
GiftCouponMessageController ->> Sender: return GiftCouponResponses

Loading

요청 응답은 다음과 같습니다.

Request:
      HTTP Method = GET
      Request URI = /gift-coupons
      Parameters = {}
      Headers = [Member-ID:"1"]
      Body = null
      Session Attrs = {}
Response:
    Status = 200
    Error message = null
    Headers = [Content-Type:"application/json"]
    Content type = application/json
    Body = {"coupons":[{"id":1,"name":"10% 할인 쿠폰","discountAmount":10,"discountType":"IS_HAND_OUT"}]}
    Forwarded URL = null
    Redirected URL = null
    Cookies = []

@this-is-spear this-is-spear merged commit 09b4cc7 into main May 19, 2024
3 checks passed
@this-is-spear this-is-spear deleted the 5-전화번호를-입력해-쿠폰을-나눠줄-수-있게-하고-싶음 branch June 4, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

전화번호를 입력해 쿠폰을 나눠줄 수 있게 하고 싶음!!
1 participant