Subversion Repositories SmartDukaan

Rev

Rev 36064 | Rev 37508 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36064 Rev 37409
Line 1... Line 1...
1
package com.spice.profitmandi.service;
1
package com.spice.profitmandi.service;
2
 
2
 
3
import com.spice.profitmandi.common.enumuration.MessageType;
3
import com.spice.profitmandi.common.enumuration.MessageType;
4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
5
import com.spice.profitmandi.common.model.SendNotificationModel;
5
import com.spice.profitmandi.common.model.SendNotificationModel;
6
import com.spice.profitmandi.service.whatsapp.WhatsappMessageType;
-
 
-
 
6
 
7
import org.apache.http.conn.HttpHostConnectException;
7
import java.util.List;
8
import org.springframework.stereotype.Service;
8
import org.springframework.stereotype.Service;
9
 
9
 
10
@Service
10
@Service
11
public interface NotificationService {
11
public interface NotificationService {
12
	void sendNotification(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException;
12
	void sendNotification(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException;
Line 17... Line 17...
17
 
17
 
18
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message) throws ProfitMandiBusinessException;
18
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message) throws ProfitMandiBusinessException;
19
 
19
 
20
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message, String Url) throws ProfitMandiBusinessException;
20
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message, String Url) throws ProfitMandiBusinessException;
21
 
21
 
-
 
22
	// ── WhatsApp ──────────────────────────────────────────────────────────────
-
 
23
	// One method per business event, each taking the template's variables rather than a rendered
-
 
24
	// message. The gateway is template-first: Meta needs the variables separately, and rejects any
-
 
25
	// parameter containing a newline — so a formatted string cannot be passed through here at all.
22
	boolean sendWhatsappMessage(String message, String title, String mobile) throws HttpHostConnectException, ProfitMandiBusinessException, Exception;
26
	// The message wording itself lives in the approved Meta template, not in the caller.
23
 
27
 
24
	boolean sendWhatsappMediaMessage(String message, String mobile, String mediaUrl, String fileName, WhatsappMessageType whatsappMessageType) throws HttpHostConnectException, ProfitMandiBusinessException, Exception;
28
	boolean shouldSendWhatsappMessage(String mobile);
25
 
29
 
26
	void optIn(String phoneNumber) throws Exception;
30
	boolean sendWhatsappInvoice(int customerId, int fofoId, String invoiceNumber, String whatsAppNo) throws Exception;
27
 
31
 
28
	boolean shouldSendWhatsappMessage(String mobile);
32
	boolean sendPaymentLink(String mobile, String paymentLink) throws Exception;
29
 
33
 
-
 
34
	boolean sendOfferAnnouncement(String mobile, String offerName, String schemeType, String startDate,
30
    void sendPaymentWhatsappMessage(String mobile, String message) throws Exception;
35
								  String endDate, String imageUrl) throws Exception;
31
 
36
 
-
 
37
	/**
-
 
38
	 * One line per lot. The approved template has three variables, so at most three lots go out per
-
 
39
	 * send; anything beyond that is dropped and logged rather than silently trimmed.
-
 
40
	 */
32
    void sendADLDWhatsappMessage(String mobile) throws Exception;
41
	boolean sendBiddingLive(String mobile, List<String> lots, String mediaUrl) throws Exception;
33
 
42
 
-
 
43
	/** Days in default and the penalty rate are fixed copy in the template, so only these two vary. */
-
 
44
	boolean sendLoanDefaultAlert(String mobile, String name, String outstandingAmount) throws Exception;
-
 
45
 
-
 
46
	boolean sendOrderDelivered(String mobile, String airwayBillNumber) throws Exception;
-
 
47
 
-
 
48
	/** Post-purchase protection upsell. The approved template attaches the invoice PDF and names it. */
34
	boolean sendWhatsappInvoice(int customerId, int fofoId, String invoiceNumber, String whatsAppNo) throws Exception;
49
	boolean sendADLDWhatsappMessage(String mobile, String invoiceNumber, String mediaUrl, String fileName)
-
 
50
			throws Exception;
35
 
51
 
36
}
52
}