Skip to content

Commit 422d5b2

Browse files
committed
Add new enums.
1 parent 3897666 commit 422d5b2

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

src/Enums/MessageTag.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
namespace NotificationChannels\Facebook\Enums;
4+
5+
/**
6+
* Class MessageTag.
7+
*/
8+
class MessageTag
9+
{
10+
/**
11+
* Send the user reminders or updates for an event they have registered for (e.g., RSVP'ed, purchased tickets).
12+
* This tag may be used for upcoming events and events in progress.
13+
*
14+
* ALLOWED:
15+
* - Reminder of upcoming classes, appointments, or events that the user has scheduled.
16+
* - Confirmation of user's reservation or attendance to an accepted event or appointment.
17+
* - Notification of user's transportation or trip scheduled, such as arrival, cancellation, baggage delay, or
18+
* other status changes.
19+
*
20+
* DISALLOWED:
21+
* - Promotional content, including but not limited to deals, offers, coupons, and discounts.
22+
* - Content related to an event the user has not signed up for (e.g., reminders to purchase event tickets,
23+
* cross-sell of other events, tour schedules, etc).
24+
* - Messages related to past events.
25+
* - Prompts to any survey, poll, or reviews.
26+
*/
27+
public const CONFIRMED_EVENT_UPDATE = 'CONFIRMED_EVENT_UPDATE';
28+
29+
/**
30+
* Notify the user of an update on a recent purchase.
31+
*
32+
* ALLOWED:
33+
* - Confirmation of transaction, such as invoices or receipts.
34+
* - Notifications of shipment status, such as product in-transit, shipped, delivered, or delayed.
35+
* - Changes related to an order that the user placed, such credit card has declined, backorder items, or other
36+
* order updates that require user action.
37+
*
38+
* DISALLOWED:
39+
* - Promotional content, including but not limited to deals, promotions, coupons, and discounts.
40+
* - Messages that cross-sell or upsell products or services.
41+
* - Prompts to any survey, poll, or reviews.
42+
*/
43+
public const POST_PURCHASE_UPDATE = 'POST_PURCHASE_UPDATE';
44+
45+
/**
46+
* Notify the user of a non-recurring change to their application or account.
47+
*
48+
* ALLOWED:
49+
* - A change in application status (e.g., credit card, job).
50+
* - Notification of suspicious activity, such as fraud alerts.
51+
*
52+
* DISALLOWED:
53+
* - Promotional content, including but not limited to deals, promotions, coupons, and discounts.
54+
* - Recurring content (e.g., statement is ready, bill is due, new job listings).
55+
* - Prompts to any survey, poll, or reviews.
56+
*/
57+
public const ACCOUNT_UPDATE = 'ACCOUNT_UPDATE';
58+
59+
/**
60+
* Allows human agents to respond to user inquiries. Messages can be sent within 7 days after a user message.
61+
*
62+
* ALLOWED:
63+
* - Human agent support for issues that cannot be resolved within the standard messaging window (e.g., business is
64+
* closed for the weekend, issue requires >24 hours to resolve).
65+
*
66+
* DISALLOWED:
67+
* - Automated messages.
68+
* - Content unrelated to user inquiry.
69+
*/
70+
public const HUMAN_AGENT = 'HUMAN_AGENT';
71+
}

src/Enums/MessagingType.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace NotificationChannels\Facebook\Enums;
4+
5+
/**
6+
* Class MessagingType.
7+
*/
8+
class MessagingType
9+
{
10+
/**
11+
* Message is in response to a received message. This includes promotional and non-promotional messages sent inside
12+
* the 24-hour standard messaging window or under the 24+1 policy.
13+
*
14+
* For example, use this tag to respond if a person
15+
* asks for a reservation confirmation or an status update.
16+
*/
17+
public const RESPONSE = 'RESPONSE';
18+
19+
/**
20+
* Message is being sent proactively and is not in response to a received message.
21+
* This includes promotional and non-promotional messages sent inside the the 24-hour standard messaging window or
22+
* under the 24+1 policy.
23+
*/
24+
public const UPDATE = 'UPDATE';
25+
26+
/**
27+
* Message is non-promotional and is being sent outside the 24-hour standard messaging window with a message tag.
28+
* The message must match the allowed use case for the tag.
29+
*/
30+
public const MESSAGE_TAG = 'MESSAGE_TAG';
31+
}

src/Enums/RecipientType.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace NotificationChannels\Facebook\Enums;
4+
5+
/**
6+
* Class RecipientType.
7+
*/
8+
class RecipientType
9+
{
10+
public const ID = 'id';
11+
public const PHONE_NUMBER = 'phone_number';
12+
public const USER_REF = 'user_ref';
13+
public const POST_ID = 'post_id';
14+
public const COMMENT_ID = 'comment_id';
15+
}

0 commit comments

Comments
 (0)