sentdm 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/README.md +1 -27
- data/lib/sentdm/client.rb +71 -8
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/models/contact_create_response.rb +249 -0
- data/lib/sentdm/models/contact_delete_params.rb +16 -2
- data/lib/sentdm/models/contact_list_response.rb +299 -16
- data/lib/sentdm/models/contact_retrieve_message_summary_response.rb +186 -0
- data/lib/sentdm/models/contact_retrieve_response.rb +249 -0
- data/lib/sentdm/models/contact_update_response.rb +249 -0
- data/lib/sentdm/models/conversation_list_messages_response.rb +436 -0
- data/lib/sentdm/models/conversation_list_response.rb +433 -0
- data/lib/sentdm/models/inbound_message_event.rb +52 -0
- data/lib/sentdm/models/inbound_message_event_payload.rb +81 -0
- data/lib/sentdm/models/me_retrieve_response.rb +242 -12
- data/lib/sentdm/models/message_event.rb +53 -0
- data/lib/sentdm/models/message_event_payload.rb +92 -0
- data/lib/sentdm/models/message_retrieve_activities_response.rb +165 -7
- data/lib/sentdm/models/message_retrieve_status_response.rb +74 -6
- data/lib/sentdm/models/message_send_response.rb +113 -28
- data/lib/sentdm/models/number_lookup_response.rb +74 -6
- data/lib/sentdm/models/profile_complete_response.rb +74 -6
- data/lib/sentdm/models/profile_create_params.rb +378 -26
- data/lib/sentdm/models/profile_create_response.rb +760 -0
- data/lib/sentdm/models/profile_delete_params.rb +16 -2
- data/lib/sentdm/models/profile_list_response.rb +825 -14
- data/lib/sentdm/models/profile_retrieve_response.rb +762 -0
- data/lib/sentdm/models/profile_update_params.rb +391 -24
- data/lib/sentdm/models/profile_update_response.rb +760 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_create_response.rb +420 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +17 -2
- data/lib/sentdm/models/profiles/campaign_list_response.rb +421 -0
- data/lib/sentdm/models/profiles/campaign_update_params.rb +156 -3
- data/lib/sentdm/models/profiles/campaign_update_response.rb +420 -0
- data/lib/sentdm/models/template_create_response.rb +209 -0
- data/lib/sentdm/models/template_event.rb +52 -0
- data/lib/sentdm/models/template_event_payload.rb +88 -0
- data/lib/sentdm/models/template_list_params.rb +9 -2
- data/lib/sentdm/models/template_list_response.rb +262 -16
- data/lib/sentdm/models/template_retrieve_response.rb +209 -0
- data/lib/sentdm/models/template_update_response.rb +209 -0
- data/lib/sentdm/models/user_invite_response.rb +201 -0
- data/lib/sentdm/models/user_list_response.rb +259 -14
- data/lib/sentdm/models/user_remove_params.rb +16 -2
- data/lib/sentdm/models/user_retrieve_response.rb +201 -0
- data/lib/sentdm/models/user_update_role_response.rb +201 -0
- data/lib/sentdm/models/webhook_create_response.rb +229 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +213 -13
- data/lib/sentdm/models/webhook_list_events_response.rb +207 -16
- data/lib/sentdm/models/webhook_list_response.rb +280 -15
- data/lib/sentdm/models/webhook_retrieve_response.rb +229 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +17 -2
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +74 -6
- data/lib/sentdm/models/webhook_test_response.rb +74 -6
- data/lib/sentdm/models/webhook_toggle_status_response.rb +229 -0
- data/lib/sentdm/models/webhook_update_response.rb +229 -0
- data/lib/sentdm/models.rb +11 -51
- data/lib/sentdm/resources/contacts.rb +30 -13
- data/lib/sentdm/resources/conversations.rb +12 -4
- data/lib/sentdm/resources/me.rb +6 -1
- data/lib/sentdm/resources/messages.rb +17 -5
- data/lib/sentdm/resources/numbers.rb +6 -1
- data/lib/sentdm/resources/profiles/campaigns.rb +47 -9
- data/lib/sentdm/resources/profiles.rb +137 -61
- data/lib/sentdm/resources/templates.rb +14 -8
- data/lib/sentdm/resources/users.rb +15 -10
- data/lib/sentdm/resources/webhooks.rb +19 -9
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +28 -32
- data/rbi/sentdm/client.rbi +71 -8
- data/rbi/sentdm/models/contact_create_response.rbi +407 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +19 -2
- data/rbi/sentdm/models/contact_list_response.rbi +527 -21
- data/rbi/sentdm/models/contact_retrieve_message_summary_response.rbi +397 -0
- data/rbi/sentdm/models/contact_retrieve_response.rbi +409 -0
- data/rbi/sentdm/models/contact_update_response.rbi +407 -0
- data/rbi/sentdm/models/conversation_list_messages_response.rbi +843 -0
- data/rbi/sentdm/models/conversation_list_response.rbi +819 -0
- data/rbi/sentdm/models/inbound_message_event.rbi +88 -0
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +122 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +367 -16
- data/rbi/sentdm/models/message_event.rbi +86 -0
- data/rbi/sentdm/models/message_event_payload.rbi +132 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +335 -11
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +148 -8
- data/rbi/sentdm/models/message_send_response.rbi +178 -32
- data/rbi/sentdm/models/number_lookup_response.rbi +135 -8
- data/rbi/sentdm/models/profile_complete_response.rbi +137 -8
- data/rbi/sentdm/models/profile_create_params.rbi +592 -42
- data/rbi/sentdm/models/profile_create_response.rbi +1226 -0
- data/rbi/sentdm/models/profile_delete_params.rbi +19 -2
- data/rbi/sentdm/models/profile_list_response.rbi +1366 -18
- data/rbi/sentdm/models/profile_retrieve_response.rbi +1230 -0
- data/rbi/sentdm/models/profile_update_params.rbi +610 -30
- data/rbi/sentdm/models/profile_update_response.rbi +1226 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +674 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +14 -1
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +667 -0
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +218 -4
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +674 -0
- data/rbi/sentdm/models/template_create_response.rbi +349 -0
- data/rbi/sentdm/models/template_event.rbi +84 -0
- data/rbi/sentdm/models/template_event_payload.rbi +131 -0
- data/rbi/sentdm/models/template_list_params.rbi +10 -2
- data/rbi/sentdm/models/template_list_response.rbi +469 -21
- data/rbi/sentdm/models/template_retrieve_response.rbi +355 -0
- data/rbi/sentdm/models/template_update_response.rbi +349 -0
- data/rbi/sentdm/models/user_invite_response.rbi +336 -0
- data/rbi/sentdm/models/user_list_response.rbi +463 -18
- data/rbi/sentdm/models/user_remove_params.rbi +19 -2
- data/rbi/sentdm/models/user_retrieve_response.rbi +336 -0
- data/rbi/sentdm/models/user_update_role_response.rbi +341 -0
- data/rbi/sentdm/models/webhook_create_response.rbi +361 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +433 -16
- data/rbi/sentdm/models/webhook_list_events_response.rbi +379 -19
- data/rbi/sentdm/models/webhook_list_response.rbi +480 -19
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +363 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +14 -1
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +148 -8
- data/rbi/sentdm/models/webhook_test_response.rbi +135 -8
- data/rbi/sentdm/models/webhook_toggle_status_response.rbi +379 -0
- data/rbi/sentdm/models/webhook_update_response.rbi +361 -0
- data/rbi/sentdm/models.rbi +11 -53
- data/rbi/sentdm/resources/contacts.rbi +24 -9
- data/rbi/sentdm/resources/conversations.rbi +10 -2
- data/rbi/sentdm/resources/me.rbi +6 -1
- data/rbi/sentdm/resources/messages.rbi +17 -5
- data/rbi/sentdm/resources/numbers.rbi +6 -1
- data/rbi/sentdm/resources/profiles/campaigns.rbi +36 -6
- data/rbi/sentdm/resources/profiles.rbi +177 -68
- data/rbi/sentdm/resources/templates.rbi +15 -5
- data/rbi/sentdm/resources/users.rbi +12 -6
- data/rbi/sentdm/resources/webhooks.rbi +15 -5
- data/sig/sentdm/models/contact_create_response.rbs +216 -0
- data/sig/sentdm/models/contact_delete_params.rbs +10 -6
- data/sig/sentdm/models/contact_list_response.rbs +263 -20
- data/sig/sentdm/models/contact_retrieve_message_summary_response.rbs +182 -0
- data/sig/sentdm/models/contact_retrieve_response.rbs +216 -0
- data/sig/sentdm/models/contact_update_response.rbs +216 -0
- data/sig/sentdm/models/conversation_list_messages_response.rbs +404 -0
- data/sig/sentdm/models/conversation_list_response.rbs +404 -0
- data/sig/sentdm/models/inbound_message_event.rbs +39 -0
- data/sig/sentdm/models/inbound_message_event_payload.rbs +69 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +176 -18
- data/sig/sentdm/models/message_event.rbs +39 -0
- data/sig/sentdm/models/message_event_payload.rbs +72 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +147 -12
- data/sig/sentdm/models/message_retrieve_status_response.rbs +71 -9
- data/sig/sentdm/models/message_send_response.rbs +71 -9
- data/sig/sentdm/models/number_lookup_response.rbs +71 -9
- data/sig/sentdm/models/profile_complete_response.rbs +71 -9
- data/sig/sentdm/models/profile_create_params.rbs +271 -24
- data/sig/sentdm/models/profile_create_response.rbs +559 -0
- data/sig/sentdm/models/profile_delete_params.rbs +10 -6
- data/sig/sentdm/models/profile_list_response.rbs +615 -15
- data/sig/sentdm/models/profile_retrieve_response.rbs +559 -0
- data/sig/sentdm/models/profile_update_params.rbs +263 -12
- data/sig/sentdm/models/profile_update_response.rbs +559 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +15 -8
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +357 -0
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +108 -4
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +357 -0
- data/sig/sentdm/models/template_create_response.rbs +182 -0
- data/sig/sentdm/models/template_event.rbs +39 -0
- data/sig/sentdm/models/template_event_payload.rbs +76 -0
- data/sig/sentdm/models/template_list_response.rbs +230 -19
- data/sig/sentdm/models/template_retrieve_response.rbs +182 -0
- data/sig/sentdm/models/template_update_response.rbs +182 -0
- data/sig/sentdm/models/user_invite_response.rbs +177 -0
- data/sig/sentdm/models/user_list_response.rbs +233 -15
- data/sig/sentdm/models/user_remove_params.rbs +10 -6
- data/sig/sentdm/models/user_retrieve_response.rbs +177 -0
- data/sig/sentdm/models/user_update_role_response.rbs +177 -0
- data/sig/sentdm/models/webhook_create_response.rbs +208 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +203 -15
- data/sig/sentdm/models/webhook_list_events_response.rbs +160 -19
- data/sig/sentdm/models/webhook_list_response.rbs +255 -20
- data/sig/sentdm/models/webhook_retrieve_response.rbs +208 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +17 -8
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +71 -9
- data/sig/sentdm/models/webhook_test_response.rbs +71 -9
- data/sig/sentdm/models/webhook_toggle_status_response.rbs +208 -0
- data/sig/sentdm/models/webhook_update_response.rbs +208 -0
- data/sig/sentdm/models.rbs +11 -51
- data/sig/sentdm/resources/contacts.rbs +4 -4
- data/sig/sentdm/resources/conversations.rbs +2 -2
- data/sig/sentdm/resources/profiles/campaigns.rbs +5 -5
- data/sig/sentdm/resources/profiles.rbs +11 -11
- data/sig/sentdm/resources/templates.rbs +3 -3
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +4 -4
- metadata +86 -98
- data/lib/sentdm/models/api_meta.rb +0 -34
- data/lib/sentdm/models/api_response_of_contact.rb +0 -46
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +0 -43
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +0 -43
- data/lib/sentdm/models/api_response_of_profile_detail.rb +0 -43
- data/lib/sentdm/models/api_response_of_user.rb +0 -43
- data/lib/sentdm/models/api_response_template.rb +0 -43
- data/lib/sentdm/models/api_response_webhook.rb +0 -43
- data/lib/sentdm/models/billing_contact_info.rb +0 -47
- data/lib/sentdm/models/brand_business_info.rb +0 -114
- data/lib/sentdm/models/brand_compliance_info.rb +0 -67
- data/lib/sentdm/models/brand_contact_info.rb +0 -58
- data/lib/sentdm/models/brands_brand_data.rb +0 -34
- data/lib/sentdm/models/contact_message_summary.rb +0 -76
- data/lib/sentdm/models/contact_response.rb +0 -126
- data/lib/sentdm/models/conversation_messages_list.rb +0 -245
- data/lib/sentdm/models/error_detail.rb +0 -42
- data/lib/sentdm/models/mutation_request.rb +0 -20
- data/lib/sentdm/models/pagination_meta.rb +0 -80
- data/lib/sentdm/models/payment_details.rb +0 -44
- data/lib/sentdm/models/profile_detail.rb +0 -597
- data/lib/sentdm/models/profile_settings.rb +0 -66
- data/lib/sentdm/models/profiles/api_response_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rb +0 -45
- data/lib/sentdm/models/profiles/brand_campaign.rb +0 -247
- data/lib/sentdm/models/profiles/campaign_data.rb +0 -130
- data/lib/sentdm/models/profiles/campaign_use_case.rb +0 -71
- data/lib/sentdm/models/profiles/campaign_use_case_data.rb +0 -29
- data/lib/sentdm/models/template.rb +0 -90
- data/lib/sentdm/models/user_response.rb +0 -82
- data/lib/sentdm/models/webhook_event_type.rb +0 -45
- data/lib/sentdm/models/webhook_response.rb +0 -95
- data/rbi/sentdm/models/api_meta.rbi +0 -55
- data/rbi/sentdm/models/api_response_of_contact.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +0 -79
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +0 -74
- data/rbi/sentdm/models/api_response_of_user.rbi +0 -74
- data/rbi/sentdm/models/api_response_template.rbi +0 -74
- data/rbi/sentdm/models/api_response_webhook.rbi +0 -74
- data/rbi/sentdm/models/billing_contact_info.rbi +0 -65
- data/rbi/sentdm/models/brand_business_info.rbi +0 -162
- data/rbi/sentdm/models/brand_compliance_info.rbi +0 -84
- data/rbi/sentdm/models/brand_contact_info.rbi +0 -78
- data/rbi/sentdm/models/brands_brand_data.rbi +0 -65
- data/rbi/sentdm/models/contact_message_summary.rbi +0 -144
- data/rbi/sentdm/models/contact_response.rbi +0 -183
- data/rbi/sentdm/models/conversation_messages_list.rbi +0 -419
- data/rbi/sentdm/models/error_detail.rbi +0 -66
- data/rbi/sentdm/models/mutation_request.rbi +0 -32
- data/rbi/sentdm/models/pagination_meta.rbi +0 -135
- data/rbi/sentdm/models/payment_details.rbi +0 -59
- data/rbi/sentdm/models/profile_detail.rbi +0 -866
- data/rbi/sentdm/models/profile_settings.rbi +0 -86
- data/rbi/sentdm/models/profiles/api_response_of_brand_campaign.rbi +0 -81
- data/rbi/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbi +0 -76
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +0 -299
- data/rbi/sentdm/models/profiles/campaign_data.rbi +0 -146
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +0 -110
- data/rbi/sentdm/models/profiles/campaign_use_case_data.rbi +0 -51
- data/rbi/sentdm/models/template.rbi +0 -129
- data/rbi/sentdm/models/user_response.rbi +0 -118
- data/rbi/sentdm/models/webhook_event_type.rbi +0 -74
- data/rbi/sentdm/models/webhook_response.rbi +0 -140
- data/sig/sentdm/models/api_meta.rbs +0 -27
- data/sig/sentdm/models/api_response_of_contact.rbs +0 -39
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +0 -39
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +0 -39
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +0 -39
- data/sig/sentdm/models/api_response_of_user.rbs +0 -39
- data/sig/sentdm/models/api_response_template.rbs +0 -39
- data/sig/sentdm/models/api_response_webhook.rbs +0 -39
- data/sig/sentdm/models/billing_contact_info.rbs +0 -30
- data/sig/sentdm/models/brand_business_info.rbs +0 -89
- data/sig/sentdm/models/brand_compliance_info.rbs +0 -50
- data/sig/sentdm/models/brand_contact_info.rbs +0 -45
- data/sig/sentdm/models/brands_brand_data.rbs +0 -30
- data/sig/sentdm/models/contact_message_summary.rbs +0 -84
- data/sig/sentdm/models/contact_response.rbs +0 -111
- data/sig/sentdm/models/conversation_messages_list.rbs +0 -240
- data/sig/sentdm/models/error_detail.rbs +0 -39
- data/sig/sentdm/models/mutation_request.rbs +0 -15
- data/sig/sentdm/models/pagination_meta.rbs +0 -67
- data/sig/sentdm/models/payment_details.rbs +0 -30
- data/sig/sentdm/models/profile_detail.rbs +0 -469
- data/sig/sentdm/models/profile_settings.rbs +0 -50
- data/sig/sentdm/models/profiles/api_response_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbs +0 -41
- data/sig/sentdm/models/profiles/brand_campaign.rbs +0 -194
- data/sig/sentdm/models/profiles/campaign_data.rbs +0 -87
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +0 -66
- data/sig/sentdm/models/profiles/campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/template.rbs +0 -79
- data/sig/sentdm/models/user_response.rbs +0 -72
- data/sig/sentdm/models/webhook_event_type.rbs +0 -51
- data/sig/sentdm/models/webhook_response.rbs +0 -103
|
@@ -2,38 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# **Deprecated — use Sender Profiles.**
|
|
6
|
+
#
|
|
7
|
+
# The original profile resource, kept because it has live callers. It still works,
|
|
8
|
+
# and its replacement is `/v3/sender-profiles`, which takes the identity and the
|
|
9
|
+
# campaign in one call instead of across three.
|
|
10
|
+
#
|
|
11
|
+
# New integrations should not start here.
|
|
6
12
|
class Profiles
|
|
7
|
-
#
|
|
13
|
+
# **Deprecated — use Sender Profiles.**
|
|
14
|
+
#
|
|
15
|
+
# The original profile resource, kept because it has live callers. It still works,
|
|
16
|
+
# and its replacement is `/v3/sender-profiles`, which takes the identity and the
|
|
17
|
+
# campaign in one call instead of across three.
|
|
18
|
+
#
|
|
19
|
+
# New integrations should not start here.
|
|
8
20
|
# @return [Sentdm::Resources::Profiles::Campaigns]
|
|
9
21
|
attr_reader :campaigns
|
|
10
22
|
|
|
23
|
+
# @deprecated
|
|
24
|
+
#
|
|
11
25
|
# Some parameter documentations has been truncated, see
|
|
12
26
|
# {Sentdm::Models::ProfileCreateParams} for more details.
|
|
13
27
|
#
|
|
28
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
29
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
30
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
31
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
32
|
+
# explicitly.
|
|
33
|
+
#
|
|
14
34
|
# Creates a new sender profile within an organization. Profiles represent
|
|
15
35
|
# different brands, departments, or use cases, each with their own messaging
|
|
16
36
|
# configuration and settings. Requires admin role in the organization.
|
|
17
37
|
#
|
|
18
38
|
# ## WhatsApp Business Account
|
|
19
39
|
#
|
|
20
|
-
# Every profile
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# `
|
|
25
|
-
#
|
|
26
|
-
# Signup. This is the recommended path for most use cases.
|
|
27
|
-
#
|
|
28
|
-
# **2. Direct credentials** — Provide a `whatsapp_business_account` object with
|
|
29
|
-
# `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
|
|
30
|
-
# needs its own independent WhatsApp Business Account. Obtain these from Meta
|
|
31
|
-
# Business Manager by creating a System User with `whatsapp_business_messaging`
|
|
32
|
-
# and `whatsapp_business_management` permissions.
|
|
40
|
+
# Every profile owns its own WhatsApp Business Account — accounts are never shared
|
|
41
|
+
# between profiles or inherited from the organization. Provide a
|
|
42
|
+
# `whatsapp_business_account` object with `waba_id`, `phone_number_id`, and
|
|
43
|
+
# `access_token`. Obtain these from Meta Business Manager by creating a System
|
|
44
|
+
# User with `whatsapp_business_messaging` and `whatsapp_business_management`
|
|
45
|
+
# permissions.
|
|
33
46
|
#
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
# HTTP 422.
|
|
47
|
+
# Omit the field and the profile is created without WhatsApp, staying incomplete
|
|
48
|
+
# until it has an account of its own.
|
|
37
49
|
#
|
|
38
50
|
# ## Brand
|
|
39
51
|
#
|
|
@@ -50,31 +62,31 @@ module Sentdm
|
|
|
50
62
|
#
|
|
51
63
|
# @overload create(allow_contact_sharing: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, short_name: nil, whatsapp_business_account: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
52
64
|
#
|
|
53
|
-
# @param allow_contact_sharing [Boolean] Body param:
|
|
65
|
+
# @param allow_contact_sharing [Boolean, nil] Body param: Deprecated. Accepted and ignored. Contact and template sharing betwe
|
|
54
66
|
#
|
|
55
|
-
# @param allow_template_sharing [Boolean] Body param
|
|
67
|
+
# @param allow_template_sharing [Boolean, nil] Body param
|
|
56
68
|
#
|
|
57
|
-
# @param billing_contact [Sentdm::Models::
|
|
69
|
+
# @param billing_contact [Sentdm::Models::ProfileCreateParams::BillingContact, nil] Body param: Billing contact information for a profile.
|
|
58
70
|
#
|
|
59
71
|
# @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (d
|
|
60
72
|
#
|
|
61
|
-
# @param brand [Sentdm::Models::
|
|
73
|
+
# @param brand [Sentdm::Models::ProfileCreateParams::Brand, nil] Body param: Brand and KYC data grouped into contact, business, and compliance se
|
|
62
74
|
#
|
|
63
75
|
# @param description [String, nil] Body param: Profile description (optional)
|
|
64
76
|
#
|
|
65
77
|
# @param icon [String, nil] Body param: Profile icon URL (optional)
|
|
66
78
|
#
|
|
67
|
-
# @param inherit_contacts [Boolean, nil] Body param
|
|
79
|
+
# @param inherit_contacts [Boolean, nil] Body param
|
|
68
80
|
#
|
|
69
81
|
# @param inherit_tcr_brand [Boolean, nil] Body param: Whether this profile inherits TCR brand from organization (default:
|
|
70
82
|
#
|
|
71
83
|
# @param inherit_tcr_campaign [Boolean, nil] Body param: Whether this profile inherits TCR campaign from organization (defaul
|
|
72
84
|
#
|
|
73
|
-
# @param inherit_templates [Boolean, nil] Body param
|
|
85
|
+
# @param inherit_templates [Boolean, nil] Body param
|
|
74
86
|
#
|
|
75
87
|
# @param name [String] Body param: Profile name (required)
|
|
76
88
|
#
|
|
77
|
-
# @param payment_details [Sentdm::Models::PaymentDetails, nil] Body param: Payment card details for
|
|
89
|
+
# @param payment_details [Sentdm::Models::ProfileCreateParams::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
|
|
78
90
|
#
|
|
79
91
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
80
92
|
#
|
|
@@ -88,7 +100,7 @@ module Sentdm
|
|
|
88
100
|
#
|
|
89
101
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
90
102
|
#
|
|
91
|
-
# @return [Sentdm::Models::
|
|
103
|
+
# @return [Sentdm::Models::ProfileCreateResponse]
|
|
92
104
|
#
|
|
93
105
|
# @see Sentdm::Models::ProfileCreateParams
|
|
94
106
|
def create(params = {})
|
|
@@ -99,27 +111,35 @@ module Sentdm
|
|
|
99
111
|
path: "v3/profiles",
|
|
100
112
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
101
113
|
body: parsed.except(*header_params.keys),
|
|
102
|
-
model: Sentdm::
|
|
114
|
+
model: Sentdm::Models::ProfileCreateResponse,
|
|
103
115
|
options: options
|
|
104
116
|
)
|
|
105
117
|
end
|
|
106
118
|
|
|
119
|
+
# @deprecated
|
|
120
|
+
#
|
|
107
121
|
# Some parameter documentations has been truncated, see
|
|
108
122
|
# {Sentdm::Models::ProfileRetrieveParams} for more details.
|
|
109
123
|
#
|
|
124
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
125
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
126
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
127
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
128
|
+
# explicitly.
|
|
129
|
+
#
|
|
110
130
|
# Retrieves detailed information about a specific sender profile within an
|
|
111
131
|
# organization, including brand and KYC information if a brand has been
|
|
112
132
|
# configured.
|
|
113
133
|
#
|
|
114
134
|
# @overload retrieve(profile_id, x_profile_id: nil, request_options: {})
|
|
115
135
|
#
|
|
116
|
-
# @param profile_id [String]
|
|
136
|
+
# @param profile_id [String] Profile ID from route parameter
|
|
117
137
|
#
|
|
118
138
|
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
119
139
|
#
|
|
120
140
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
121
141
|
#
|
|
122
|
-
# @return [Sentdm::Models::
|
|
142
|
+
# @return [Sentdm::Models::ProfileRetrieveResponse]
|
|
123
143
|
#
|
|
124
144
|
# @see Sentdm::Models::ProfileRetrieveParams
|
|
125
145
|
def retrieve(profile_id, params = {})
|
|
@@ -128,14 +148,22 @@ module Sentdm
|
|
|
128
148
|
method: :get,
|
|
129
149
|
path: ["v3/profiles/%1$s", profile_id],
|
|
130
150
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
131
|
-
model: Sentdm::
|
|
151
|
+
model: Sentdm::Models::ProfileRetrieveResponse,
|
|
132
152
|
options: options
|
|
133
153
|
)
|
|
134
154
|
end
|
|
135
155
|
|
|
156
|
+
# @deprecated
|
|
157
|
+
#
|
|
136
158
|
# Some parameter documentations has been truncated, see
|
|
137
159
|
# {Sentdm::Models::ProfileUpdateParams} for more details.
|
|
138
160
|
#
|
|
161
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
162
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
163
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
164
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
165
|
+
# explicitly.
|
|
166
|
+
#
|
|
139
167
|
# Updates a profile's configuration and settings. Requires admin role in the
|
|
140
168
|
# organization. Only provided fields will be updated (partial update).
|
|
141
169
|
#
|
|
@@ -155,45 +183,59 @@ module Sentdm
|
|
|
155
183
|
# and are forwarded directly to the payment processor. Providing `payment_details`
|
|
156
184
|
# when `billing_model` is `"organization"` is not allowed.
|
|
157
185
|
#
|
|
186
|
+
# ## Deprecated fields
|
|
187
|
+
#
|
|
188
|
+
# `sending_phone_number_profile_id` and `sending_whatsapp_number_profile_id` are
|
|
189
|
+
# **accepted and ignored**. Sender borrowing is gone: a profile cannot send from
|
|
190
|
+
# another profile's number, because two profiles behind one sender makes an
|
|
191
|
+
# inbound reply and a delivery receipt ambiguous about whose they are.
|
|
192
|
+
#
|
|
193
|
+
# Sending either **changes nothing and still returns `200`** — they are kept on
|
|
194
|
+
# the contract so an existing integration keeps working. Reads carry both keys too
|
|
195
|
+
# and always answer `null`, which is how you can confirm the value did not take.
|
|
196
|
+
#
|
|
197
|
+
# Give the profile a sender of its own instead — `POST /v3/channels/sms` or
|
|
198
|
+
# `POST /v3/channels/whatsapp`, sent with the `x-profile-id` header naming it.
|
|
199
|
+
#
|
|
158
200
|
# @overload update(profile_id, allow_contact_sharing: nil, allow_number_change_during_onboarding: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, sending_whatsapp_number_profile_id: nil, short_name: nil, whatsapp_phone_number: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
159
201
|
#
|
|
160
|
-
# @param profile_id [String] Path param
|
|
202
|
+
# @param profile_id [String] Path param: Profile ID from route parameter
|
|
161
203
|
#
|
|
162
|
-
# @param allow_contact_sharing [Boolean, nil] Body param:
|
|
204
|
+
# @param allow_contact_sharing [Boolean, nil] Body param: Deprecated. Accepted and ignored. Contact and template sharing betwe
|
|
163
205
|
#
|
|
164
206
|
# @param allow_number_change_during_onboarding [Boolean, nil] Body param: Whether number changes are allowed during onboarding (optional)
|
|
165
207
|
#
|
|
166
|
-
# @param allow_template_sharing [Boolean, nil] Body param
|
|
208
|
+
# @param allow_template_sharing [Boolean, nil] Body param
|
|
167
209
|
#
|
|
168
|
-
# @param billing_contact [Sentdm::Models::
|
|
210
|
+
# @param billing_contact [Sentdm::Models::ProfileUpdateParams::BillingContact, nil] Body param: Billing contact information for a profile.
|
|
169
211
|
#
|
|
170
212
|
# @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (o
|
|
171
213
|
#
|
|
172
|
-
# @param brand [Sentdm::Models::
|
|
214
|
+
# @param brand [Sentdm::Models::ProfileUpdateParams::Brand, nil] Body param: Brand and KYC data grouped into contact, business, and compliance se
|
|
173
215
|
#
|
|
174
216
|
# @param description [String, nil] Body param: Profile description (optional)
|
|
175
217
|
#
|
|
176
218
|
# @param icon [String, nil] Body param: Profile icon URL (optional)
|
|
177
219
|
#
|
|
178
|
-
# @param inherit_contacts [Boolean, nil] Body param
|
|
220
|
+
# @param inherit_contacts [Boolean, nil] Body param
|
|
179
221
|
#
|
|
180
222
|
# @param inherit_tcr_brand [Boolean, nil] Body param: Whether this profile inherits TCR brand from organization (optional)
|
|
181
223
|
#
|
|
182
224
|
# @param inherit_tcr_campaign [Boolean, nil] Body param: Whether this profile inherits TCR campaign from organization (option
|
|
183
225
|
#
|
|
184
|
-
# @param inherit_templates [Boolean, nil] Body param
|
|
226
|
+
# @param inherit_templates [Boolean, nil] Body param
|
|
185
227
|
#
|
|
186
228
|
# @param name [String, nil] Body param: Profile name (optional)
|
|
187
229
|
#
|
|
188
|
-
# @param payment_details [Sentdm::Models::PaymentDetails, nil] Body param: Payment card details for
|
|
230
|
+
# @param payment_details [Sentdm::Models::ProfileUpdateParams::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
|
|
189
231
|
#
|
|
190
232
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
191
233
|
#
|
|
192
234
|
# @param sending_phone_number [String, nil] Body param: Direct phone number for SMS sending (optional)
|
|
193
235
|
#
|
|
194
|
-
# @param sending_phone_number_profile_id [String, nil] Body param:
|
|
236
|
+
# @param sending_phone_number_profile_id [String, nil] Body param: Deprecated. Accepted and ignored. Sender borrowing is gone: a profil
|
|
195
237
|
#
|
|
196
|
-
# @param sending_whatsapp_number_profile_id [String, nil] Body param
|
|
238
|
+
# @param sending_whatsapp_number_profile_id [String, nil] Body param
|
|
197
239
|
#
|
|
198
240
|
# @param short_name [String, nil] Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
199
241
|
#
|
|
@@ -205,7 +247,7 @@ module Sentdm
|
|
|
205
247
|
#
|
|
206
248
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
207
249
|
#
|
|
208
|
-
# @return [Sentdm::Models::
|
|
250
|
+
# @return [Sentdm::Models::ProfileUpdateResponse]
|
|
209
251
|
#
|
|
210
252
|
# @see Sentdm::Models::ProfileUpdateParams
|
|
211
253
|
def update(profile_id, params = {})
|
|
@@ -216,14 +258,22 @@ module Sentdm
|
|
|
216
258
|
path: ["v3/profiles/%1$s", profile_id],
|
|
217
259
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
218
260
|
body: parsed.except(*header_params.keys),
|
|
219
|
-
model: Sentdm::
|
|
261
|
+
model: Sentdm::Models::ProfileUpdateResponse,
|
|
220
262
|
options: options
|
|
221
263
|
)
|
|
222
264
|
end
|
|
223
265
|
|
|
266
|
+
# @deprecated
|
|
267
|
+
#
|
|
224
268
|
# Some parameter documentations has been truncated, see
|
|
225
269
|
# {Sentdm::Models::ProfileListParams} for more details.
|
|
226
270
|
#
|
|
271
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
272
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
273
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
274
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
275
|
+
# explicitly.
|
|
276
|
+
#
|
|
227
277
|
# Retrieves all sender profiles within an organization, including brand
|
|
228
278
|
# information for each profile. Profiles represent different brands, departments,
|
|
229
279
|
# or use cases within an organization, each with their own messaging
|
|
@@ -249,15 +299,26 @@ module Sentdm
|
|
|
249
299
|
)
|
|
250
300
|
end
|
|
251
301
|
|
|
302
|
+
# @deprecated
|
|
303
|
+
#
|
|
252
304
|
# Some parameter documentations has been truncated, see
|
|
253
305
|
# {Sentdm::Models::ProfileDeleteParams} for more details.
|
|
254
306
|
#
|
|
307
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
308
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
309
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
310
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
311
|
+
# explicitly.
|
|
312
|
+
#
|
|
255
313
|
# Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
256
|
-
# retained.
|
|
314
|
+
# retained. Anything it still held is released first: phone numbers return to our
|
|
315
|
+
# inventory and can go to whoever asks next, its own WhatsApp account is
|
|
316
|
+
# deregistered, and its routing rules stop being used. Requires admin role in the
|
|
317
|
+
# organization.
|
|
257
318
|
#
|
|
258
319
|
# @overload delete(profile_id, sandbox: nil, x_profile_id: nil, request_options: {})
|
|
259
320
|
#
|
|
260
|
-
# @param profile_id [String] Path param
|
|
321
|
+
# @param profile_id [String] Path param: Profile ID from route parameter
|
|
261
322
|
#
|
|
262
323
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
263
324
|
#
|
|
@@ -281,18 +342,32 @@ module Sentdm
|
|
|
281
342
|
)
|
|
282
343
|
end
|
|
283
344
|
|
|
345
|
+
# @deprecated
|
|
346
|
+
#
|
|
284
347
|
# Some parameter documentations has been truncated, see
|
|
285
348
|
# {Sentdm::Models::ProfileCompleteParams} for more details.
|
|
286
349
|
#
|
|
350
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
351
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
352
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
353
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
354
|
+
# explicitly.
|
|
355
|
+
#
|
|
287
356
|
# Final step in the profile compliance workflow. Validates all prerequisites (KYC,
|
|
288
357
|
# brand, campaigns, required documents), connects the profile to the SMS and
|
|
289
|
-
# WhatsApp channels, and
|
|
290
|
-
#
|
|
291
|
-
# profile is already
|
|
292
|
-
# it returns 202 and calls the provided webhook URL
|
|
293
|
-
# finishes.
|
|
358
|
+
# WhatsApp channels, and marks it onboarded. Prerequisites are always validated
|
|
359
|
+
# first: if any fail the call returns 400 naming every unmet one, and nothing is
|
|
360
|
+
# started. If they pass and the profile is already onboarded, the call returns 200
|
|
361
|
+
# and does nothing. Otherwise it returns 202 and calls the provided webhook URL
|
|
362
|
+
# when background processing finishes.
|
|
363
|
+
#
|
|
364
|
+
# Callable with the organization's API key or the profile's own key. The key's
|
|
365
|
+
# user must be an admin or owner of the profile, or of the organization it belongs
|
|
366
|
+
# to.
|
|
294
367
|
#
|
|
295
|
-
# Prerequisites
|
|
368
|
+
# Prerequisites (all but the last are checked before the already-onboarded
|
|
369
|
+
# short-circuit, matching the previous contract; the last is checked after it, so
|
|
370
|
+
# a profile that is already onboarded is never rejected by it):
|
|
296
371
|
#
|
|
297
372
|
# - Profile must have a name, short name, and description (short name max 50
|
|
298
373
|
# characters, description max 5000)
|
|
@@ -303,17 +378,18 @@ module Sentdm
|
|
|
303
378
|
# - TCR applications must have at least one campaign, own or inherited
|
|
304
379
|
# - Destination countries marked as main must have their required compliance
|
|
305
380
|
# documents uploaded
|
|
306
|
-
#
|
|
307
|
-
#
|
|
308
|
-
#
|
|
309
|
-
#
|
|
310
|
-
#
|
|
311
|
-
# -
|
|
312
|
-
#
|
|
313
|
-
# -
|
|
314
|
-
#
|
|
315
|
-
#
|
|
316
|
-
#
|
|
381
|
+
# - TCR applications must state whether they inherit the organization's TCR brand
|
|
382
|
+
# and campaign
|
|
383
|
+
#
|
|
384
|
+
# Outcome:
|
|
385
|
+
#
|
|
386
|
+
# - Once the prerequisites pass and background processing succeeds, the profile's
|
|
387
|
+
# conversionFlowStatus becomes ONBOARDED and its public status reads `approved`
|
|
388
|
+
# - A profile with no WhatsApp channel, or one still awaiting TCR registration or
|
|
389
|
+
# country documents, is onboarded like any other. Those are answered by the
|
|
390
|
+
# brand and campaign records, not by a status on the profile
|
|
391
|
+
# - If background processing fails, the profile keeps the status it already had
|
|
392
|
+
# and the webhook reports the reason
|
|
317
393
|
#
|
|
318
394
|
# @overload complete(profile_id, web_hook_url:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
319
395
|
#
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# Reusable message bodies with named variables.
|
|
6
|
+
#
|
|
7
|
+
# A template is substituted at send time from the values you pass, so the copy
|
|
8
|
+
# lives here rather than in your application. WhatsApp templates additionally need
|
|
9
|
+
# Meta's approval before they can be sent, and a template's channel status reports
|
|
10
|
+
# where that stands — an approved SMS template and an unapproved WhatsApp one are
|
|
11
|
+
# the same template in two states.
|
|
6
12
|
class Templates
|
|
7
13
|
# Some parameter documentations has been truncated, see
|
|
8
14
|
# {Sentdm::Models::TemplateCreateParams} for more details.
|
|
@@ -31,7 +37,7 @@ module Sentdm
|
|
|
31
37
|
#
|
|
32
38
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
33
39
|
#
|
|
34
|
-
# @return [Sentdm::Models::
|
|
40
|
+
# @return [Sentdm::Models::TemplateCreateResponse]
|
|
35
41
|
#
|
|
36
42
|
# @see Sentdm::Models::TemplateCreateParams
|
|
37
43
|
def create(params = {})
|
|
@@ -42,7 +48,7 @@ module Sentdm
|
|
|
42
48
|
path: "v3/templates",
|
|
43
49
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
44
50
|
body: parsed.except(*header_params.keys),
|
|
45
|
-
model: Sentdm::
|
|
51
|
+
model: Sentdm::Models::TemplateCreateResponse,
|
|
46
52
|
options: options
|
|
47
53
|
)
|
|
48
54
|
end
|
|
@@ -61,7 +67,7 @@ module Sentdm
|
|
|
61
67
|
#
|
|
62
68
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
63
69
|
#
|
|
64
|
-
# @return [Sentdm::Models::
|
|
70
|
+
# @return [Sentdm::Models::TemplateRetrieveResponse]
|
|
65
71
|
#
|
|
66
72
|
# @see Sentdm::Models::TemplateRetrieveParams
|
|
67
73
|
def retrieve(id, params = {})
|
|
@@ -70,7 +76,7 @@ module Sentdm
|
|
|
70
76
|
method: :get,
|
|
71
77
|
path: ["v3/templates/%1$s", id],
|
|
72
78
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
73
|
-
model: Sentdm::
|
|
79
|
+
model: Sentdm::Models::TemplateRetrieveResponse,
|
|
74
80
|
options: options
|
|
75
81
|
)
|
|
76
82
|
end
|
|
@@ -103,7 +109,7 @@ module Sentdm
|
|
|
103
109
|
#
|
|
104
110
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
105
111
|
#
|
|
106
|
-
# @return [Sentdm::Models::
|
|
112
|
+
# @return [Sentdm::Models::TemplateUpdateResponse]
|
|
107
113
|
#
|
|
108
114
|
# @see Sentdm::Models::TemplateUpdateParams
|
|
109
115
|
def update(id, params = {})
|
|
@@ -114,7 +120,7 @@ module Sentdm
|
|
|
114
120
|
path: ["v3/templates/%1$s", id],
|
|
115
121
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
116
122
|
body: parsed.except(*header_params.keys),
|
|
117
|
-
model: Sentdm::
|
|
123
|
+
model: Sentdm::Models::TemplateUpdateResponse,
|
|
118
124
|
options: options
|
|
119
125
|
)
|
|
120
126
|
end
|
|
@@ -133,7 +139,7 @@ module Sentdm
|
|
|
133
139
|
#
|
|
134
140
|
# @param category [String, nil] Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
135
141
|
#
|
|
136
|
-
# @param is_welcome_playground [Boolean, nil] Query param:
|
|
142
|
+
# @param is_welcome_playground [Boolean, nil] Query param: Accepted and ignored. It used to filter on the welcome-playground m
|
|
137
143
|
#
|
|
138
144
|
# @param search [String, nil] Query param: Optional search term for filtering templates
|
|
139
145
|
#
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# The people who can sign in to your organization, and what each may do.
|
|
6
|
+
#
|
|
7
|
+
# Users are dashboard access and nothing else — they do not send, and removing one
|
|
8
|
+
# does not affect traffic. An API key is not a user: it belongs to the
|
|
9
|
+
# organization or to a sender profile, so revoking a person's access leaves your
|
|
10
|
+
# integration running.
|
|
6
11
|
class Users
|
|
7
12
|
# Some parameter documentations has been truncated, see
|
|
8
13
|
# {Sentdm::Models::UserRetrieveParams} for more details.
|
|
@@ -12,13 +17,13 @@ module Sentdm
|
|
|
12
17
|
#
|
|
13
18
|
# @overload retrieve(user_id, x_profile_id: nil, request_options: {})
|
|
14
19
|
#
|
|
15
|
-
# @param user_id [String]
|
|
20
|
+
# @param user_id [String] User ID from route parameter
|
|
16
21
|
#
|
|
17
22
|
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
18
23
|
#
|
|
19
24
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
25
|
#
|
|
21
|
-
# @return [Sentdm::Models::
|
|
26
|
+
# @return [Sentdm::Models::UserRetrieveResponse]
|
|
22
27
|
#
|
|
23
28
|
# @see Sentdm::Models::UserRetrieveParams
|
|
24
29
|
def retrieve(user_id, params = {})
|
|
@@ -27,7 +32,7 @@ module Sentdm
|
|
|
27
32
|
method: :get,
|
|
28
33
|
path: ["v3/users/%1$s", user_id],
|
|
29
34
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
30
|
-
model: Sentdm::
|
|
35
|
+
model: Sentdm::Models::UserRetrieveResponse,
|
|
31
36
|
options: options
|
|
32
37
|
)
|
|
33
38
|
end
|
|
@@ -82,7 +87,7 @@ module Sentdm
|
|
|
82
87
|
#
|
|
83
88
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
84
89
|
#
|
|
85
|
-
# @return [Sentdm::Models::
|
|
90
|
+
# @return [Sentdm::Models::UserInviteResponse]
|
|
86
91
|
#
|
|
87
92
|
# @see Sentdm::Models::UserInviteParams
|
|
88
93
|
def invite(params = {})
|
|
@@ -93,7 +98,7 @@ module Sentdm
|
|
|
93
98
|
path: "v3/users",
|
|
94
99
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
95
100
|
body: parsed.except(*header_params.keys),
|
|
96
|
-
model: Sentdm::
|
|
101
|
+
model: Sentdm::Models::UserInviteResponse,
|
|
97
102
|
options: options
|
|
98
103
|
)
|
|
99
104
|
end
|
|
@@ -106,7 +111,7 @@ module Sentdm
|
|
|
106
111
|
#
|
|
107
112
|
# @overload remove(user_id, sandbox: nil, x_profile_id: nil, request_options: {})
|
|
108
113
|
#
|
|
109
|
-
# @param user_id [String] Path param
|
|
114
|
+
# @param user_id [String] Path param: User ID from route parameter
|
|
110
115
|
#
|
|
111
116
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
112
117
|
#
|
|
@@ -138,7 +143,7 @@ module Sentdm
|
|
|
138
143
|
#
|
|
139
144
|
# @overload update_role(user_id, role: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
140
145
|
#
|
|
141
|
-
# @param user_id [String] Path param
|
|
146
|
+
# @param user_id [String] Path param: User ID from route parameter
|
|
142
147
|
#
|
|
143
148
|
# @param role [String] Body param: User role: admin, billing, or developer (required)
|
|
144
149
|
#
|
|
@@ -150,7 +155,7 @@ module Sentdm
|
|
|
150
155
|
#
|
|
151
156
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
152
157
|
#
|
|
153
|
-
# @return [Sentdm::Models::
|
|
158
|
+
# @return [Sentdm::Models::UserUpdateRoleResponse]
|
|
154
159
|
#
|
|
155
160
|
# @see Sentdm::Models::UserUpdateRoleParams
|
|
156
161
|
def update_role(user_id, params = {})
|
|
@@ -161,7 +166,7 @@ module Sentdm
|
|
|
161
166
|
path: ["v3/users/%1$s", user_id],
|
|
162
167
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
163
168
|
body: parsed.except(*header_params.keys),
|
|
164
|
-
model: Sentdm::
|
|
169
|
+
model: Sentdm::Models::UserUpdateRoleResponse,
|
|
165
170
|
options: options
|
|
166
171
|
)
|
|
167
172
|
end
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# Delivery reports and inbound messages, pushed to you.
|
|
6
|
+
#
|
|
7
|
+
# Subscribe an endpoint to the event types you care about —
|
|
8
|
+
# `GET /v3/webhooks/event-types` lists them — and we POST each one as it happens,
|
|
9
|
+
# retrying on failure. Polling `GET /v3/messages/{id}` works and does not scale.
|
|
10
|
+
#
|
|
11
|
+
# **Verify the signature.** Every delivery is signed with your endpoint's secret;
|
|
12
|
+
# an unverified endpoint is one anybody can post to. `rotate-secret` replaces it,
|
|
13
|
+
# `test` sends a specimen event, and `GET /v3/webhooks/{id}/events` shows what we
|
|
14
|
+
# tried to deliver and what your endpoint answered — which is the first place to
|
|
15
|
+
# look when something appears to be missing.
|
|
6
16
|
class Webhooks
|
|
7
17
|
# Some parameter documentations has been truncated, see
|
|
8
18
|
# {Sentdm::Models::WebhookCreateParams} for more details.
|
|
@@ -31,7 +41,7 @@ module Sentdm
|
|
|
31
41
|
#
|
|
32
42
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
33
43
|
#
|
|
34
|
-
# @return [Sentdm::Models::
|
|
44
|
+
# @return [Sentdm::Models::WebhookCreateResponse]
|
|
35
45
|
#
|
|
36
46
|
# @see Sentdm::Models::WebhookCreateParams
|
|
37
47
|
def create(params = {})
|
|
@@ -42,7 +52,7 @@ module Sentdm
|
|
|
42
52
|
path: "v3/webhooks",
|
|
43
53
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
44
54
|
body: parsed.except(*header_params.keys),
|
|
45
|
-
model: Sentdm::
|
|
55
|
+
model: Sentdm::Models::WebhookCreateResponse,
|
|
46
56
|
options: options
|
|
47
57
|
)
|
|
48
58
|
end
|
|
@@ -60,7 +70,7 @@ module Sentdm
|
|
|
60
70
|
#
|
|
61
71
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
62
72
|
#
|
|
63
|
-
# @return [Sentdm::Models::
|
|
73
|
+
# @return [Sentdm::Models::WebhookRetrieveResponse]
|
|
64
74
|
#
|
|
65
75
|
# @see Sentdm::Models::WebhookRetrieveParams
|
|
66
76
|
def retrieve(id, params = {})
|
|
@@ -69,7 +79,7 @@ module Sentdm
|
|
|
69
79
|
method: :get,
|
|
70
80
|
path: ["v3/webhooks/%1$s", id],
|
|
71
81
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
72
|
-
model: Sentdm::
|
|
82
|
+
model: Sentdm::Models::WebhookRetrieveResponse,
|
|
73
83
|
options: options
|
|
74
84
|
)
|
|
75
85
|
end
|
|
@@ -103,7 +113,7 @@ module Sentdm
|
|
|
103
113
|
#
|
|
104
114
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
105
115
|
#
|
|
106
|
-
# @return [Sentdm::Models::
|
|
116
|
+
# @return [Sentdm::Models::WebhookUpdateResponse]
|
|
107
117
|
#
|
|
108
118
|
# @see Sentdm::Models::WebhookUpdateParams
|
|
109
119
|
def update(id, params = {})
|
|
@@ -114,7 +124,7 @@ module Sentdm
|
|
|
114
124
|
path: ["v3/webhooks/%1$s", id],
|
|
115
125
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
116
126
|
body: parsed.except(*header_params.keys),
|
|
117
|
-
model: Sentdm::
|
|
127
|
+
model: Sentdm::Models::WebhookUpdateResponse,
|
|
118
128
|
options: options
|
|
119
129
|
)
|
|
120
130
|
end
|
|
@@ -331,7 +341,7 @@ module Sentdm
|
|
|
331
341
|
#
|
|
332
342
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
333
343
|
#
|
|
334
|
-
# @return [Sentdm::Models::
|
|
344
|
+
# @return [Sentdm::Models::WebhookToggleStatusResponse]
|
|
335
345
|
#
|
|
336
346
|
# @see Sentdm::Models::WebhookToggleStatusParams
|
|
337
347
|
def toggle_status(id, params = {})
|
|
@@ -342,7 +352,7 @@ module Sentdm
|
|
|
342
352
|
path: ["v3/webhooks/%1$s/toggle-status", id],
|
|
343
353
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
344
354
|
body: parsed.except(*header_params.keys),
|
|
345
|
-
model: Sentdm::
|
|
355
|
+
model: Sentdm::Models::WebhookToggleStatusResponse,
|
|
346
356
|
options: options
|
|
347
357
|
)
|
|
348
358
|
end
|
data/lib/sentdm/version.rb
CHANGED