Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace BuyerKiosk\ComebackCash\Services; |
| 4 | |
| 5 | use BuyerKiosk\ComebackCash\Models\Event; |
| 6 | |
| 7 | /** |
| 8 | * Interface for SMS queue operations in Comeback Cash system |
| 9 | * |
| 10 | * This interface defines the contract for queueing SMS notifications |
| 11 | * when coupons are issued. The actual implementation will use the |
| 12 | * existing Redis/worker queue system. |
| 13 | */ |
| 14 | interface SmsQueueInterface |
| 15 | { |
| 16 | /** |
| 17 | * Queue an SMS notification for a newly issued coupon |
| 18 | * |
| 19 | * The SMS message should include: |
| 20 | * - Coupon code (formatted with hyphen for readability) |
| 21 | * - Coupon value |
| 22 | * - Expiration date |
| 23 | * - Event name |
| 24 | * - Opt-out instructions |
| 25 | * |
| 26 | * @param string $phone Customer phone number (10 digits) |
| 27 | * @param array $couponData Coupon information array with keys: |
| 28 | * - code: string |
| 29 | * - value: float |
| 30 | * - expires_at: string |
| 31 | * - display_code: string (formatted XXXX-XXXX) |
| 32 | * @param Event $event The associated event for SMS template customization |
| 33 | * @return bool Whether queueing was successful |
| 34 | */ |
| 35 | public function queueCouponNotification(string $phone, array $couponData, Event $event): bool; |
| 36 | } |