Subversion Repositories SmartDukaan

Rev

Rev 36064 | Rev 37508 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25822 amit.gupta 1
package com.spice.profitmandi.service;
2
 
30066 amit.gupta 3
import com.spice.profitmandi.common.enumuration.MessageType;
29198 manish 4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
25822 amit.gupta 5
import com.spice.profitmandi.common.model.SendNotificationModel;
37409 vikas 6
 
7
import java.util.List;
29927 amit.gupta 8
import org.springframework.stereotype.Service;
25822 amit.gupta 9
 
10
@Service
11
public interface NotificationService {
29198 manish 12
	void sendNotification(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException;
29927 amit.gupta 13
 
14
	void sendNotificationToAll(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException;
30025 amit.gupta 15
 
34550 vikas.jang 16
	void sendNotificationToSystemUsers(SendNotificationModel sendNotificationModel) throws ProfitMandiBusinessException;
17
 
34468 vikas.jang 18
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message) throws ProfitMandiBusinessException;
30859 tejbeer 19
 
34468 vikas.jang 20
	void sendNotification(int fofoId, String campaignName, MessageType messageType, String title, String message, String Url) throws ProfitMandiBusinessException;
30989 tejbeer 21
 
37409 vikas 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.
26
	// The message wording itself lives in the approved Meta template, not in the caller.
32253 amit.gupta 27
 
37409 vikas 28
	boolean shouldSendWhatsappMessage(String mobile);
32253 amit.gupta 29
 
37409 vikas 30
	boolean sendWhatsappInvoice(int customerId, int fofoId, String invoiceNumber, String whatsAppNo) throws Exception;
32405 jai.hind 31
 
37409 vikas 32
	boolean sendPaymentLink(String mobile, String paymentLink) throws Exception;
34468 vikas.jang 33
 
37409 vikas 34
	boolean sendOfferAnnouncement(String mobile, String offerName, String schemeType, String startDate,
35
								  String endDate, String imageUrl) throws Exception;
33715 ranu 36
 
37409 vikas 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
	 */
41
	boolean sendBiddingLive(String mobile, List<String> lots, String mediaUrl) throws Exception;
35504 vikas 42
 
37409 vikas 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;
36064 aman 45
 
37409 vikas 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. */
49
	boolean sendADLDWhatsappMessage(String mobile, String invoiceNumber, String mediaUrl, String fileName)
50
			throws Exception;
51
 
25822 amit.gupta 52
}