-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YEL-170 [modify] slack webhook request body 값 수정
YEL-170 [modify] slack webhook request body 값 수정
- Loading branch information
Showing
5 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...va/com/yello/server/infrastructure/slack/dto/response/SlackAppleNotificationResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.yello.server.infrastructure.slack.dto.response; | ||
|
||
import com.yello.server.domain.purchase.dto.apple.AppleNotificationPayloadVO; | ||
import com.yello.server.domain.purchase.entity.Purchase; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record SlackAppleNotificationResponse( | ||
String notificationType, | ||
String subtype, | ||
String transactionId, | ||
Long userId, | ||
String userName, | ||
String yelloId | ||
|
||
) { | ||
|
||
public static SlackAppleNotificationResponse of(AppleNotificationPayloadVO payloadVO, | ||
Purchase purchase) { | ||
return SlackAppleNotificationResponse.builder() | ||
.notificationType(payloadVO.notificationType()) | ||
.subtype(payloadVO.subtype()) | ||
.transactionId(purchase.getTransactionId()) | ||
.userId(purchase.getUser().getId()) | ||
.userName(purchase.getUser().getName()) | ||
.yelloId(purchase.getUser().getYelloId()) | ||
.build(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters