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,7 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# The people you message, and their channel identities.
|
|
6
|
+
#
|
|
7
|
+
# A contact holds one identity per channel — a phone number, a WhatsApp number —
|
|
8
|
+
# so routing can choose between them for the same person. Opt-out is recorded
|
|
9
|
+
# against the contact and honoured on every send, whichever channel it came
|
|
10
|
+
# through.
|
|
11
|
+
#
|
|
12
|
+
# `GET /v3/contacts/{id}/message-summary` is the per-contact view of what you have
|
|
13
|
+
# sent and what happened to it.
|
|
6
14
|
class Contacts
|
|
7
15
|
# Some parameter documentations has been truncated, see
|
|
8
16
|
# {Sentdm::Models::ContactCreateParams} for more details.
|
|
@@ -22,7 +30,7 @@ module Sentdm
|
|
|
22
30
|
#
|
|
23
31
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
24
32
|
#
|
|
25
|
-
# @return [Sentdm::Models::
|
|
33
|
+
# @return [Sentdm::Models::ContactCreateResponse]
|
|
26
34
|
#
|
|
27
35
|
# @see Sentdm::Models::ContactCreateParams
|
|
28
36
|
def create(params)
|
|
@@ -33,7 +41,7 @@ module Sentdm
|
|
|
33
41
|
path: "v3/contacts",
|
|
34
42
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
35
43
|
body: parsed.except(*header_params.keys),
|
|
36
|
-
model: Sentdm::
|
|
44
|
+
model: Sentdm::Models::ContactCreateResponse,
|
|
37
45
|
options: options
|
|
38
46
|
)
|
|
39
47
|
end
|
|
@@ -53,7 +61,7 @@ module Sentdm
|
|
|
53
61
|
#
|
|
54
62
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
55
63
|
#
|
|
56
|
-
# @return [Sentdm::Models::
|
|
64
|
+
# @return [Sentdm::Models::ContactRetrieveResponse]
|
|
57
65
|
#
|
|
58
66
|
# @see Sentdm::Models::ContactRetrieveParams
|
|
59
67
|
def retrieve(id, params = {})
|
|
@@ -62,7 +70,7 @@ module Sentdm
|
|
|
62
70
|
method: :get,
|
|
63
71
|
path: ["v3/contacts/%1$s", id],
|
|
64
72
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
65
|
-
model: Sentdm::
|
|
73
|
+
model: Sentdm::Models::ContactRetrieveResponse,
|
|
66
74
|
options: options
|
|
67
75
|
)
|
|
68
76
|
end
|
|
@@ -70,8 +78,7 @@ module Sentdm
|
|
|
70
78
|
# Some parameter documentations has been truncated, see
|
|
71
79
|
# {Sentdm::Models::ContactUpdateParams} for more details.
|
|
72
80
|
#
|
|
73
|
-
# Updates a contact's default channel and/or opt-out status.
|
|
74
|
-
# cannot be updated.
|
|
81
|
+
# Updates a contact's default channel and/or opt-out status.
|
|
75
82
|
#
|
|
76
83
|
# @overload update(id, default_channel: nil, opt_out: nil, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
77
84
|
#
|
|
@@ -89,7 +96,7 @@ module Sentdm
|
|
|
89
96
|
#
|
|
90
97
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
91
98
|
#
|
|
92
|
-
# @return [Sentdm::Models::
|
|
99
|
+
# @return [Sentdm::Models::ContactUpdateResponse]
|
|
93
100
|
#
|
|
94
101
|
# @see Sentdm::Models::ContactUpdateParams
|
|
95
102
|
def update(id, params = {})
|
|
@@ -100,7 +107,7 @@ module Sentdm
|
|
|
100
107
|
path: ["v3/contacts/%1$s", id],
|
|
101
108
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
102
109
|
body: parsed.except(*header_params.keys),
|
|
103
|
-
model: Sentdm::
|
|
110
|
+
model: Sentdm::Models::ContactUpdateResponse,
|
|
104
111
|
options: options
|
|
105
112
|
)
|
|
106
113
|
end
|
|
@@ -144,11 +151,21 @@ module Sentdm
|
|
|
144
151
|
)
|
|
145
152
|
end
|
|
146
153
|
|
|
154
|
+
# @deprecated
|
|
155
|
+
#
|
|
147
156
|
# Some parameter documentations has been truncated, see
|
|
148
157
|
# {Sentdm::Models::ContactDeleteParams} for more details.
|
|
149
158
|
#
|
|
150
|
-
#
|
|
151
|
-
# be
|
|
159
|
+
# **Deprecated.** Use `PATCH /v3/contacts/{id}` with `{"opt_out": true}` instead,
|
|
160
|
+
# and expect this to be removed in a future release. It still behaves exactly as
|
|
161
|
+
# before, so nothing needs to change today.
|
|
162
|
+
#
|
|
163
|
+
# Opting a contact out stops every send to them, which is what deleting one was
|
|
164
|
+
# mostly used for — and it keeps the record of who they were and that they asked.
|
|
165
|
+
# A delete discards the consent history along with the contact, which is the part
|
|
166
|
+
# you need if anyone ever asks why you stopped, or why you started again.
|
|
167
|
+
#
|
|
168
|
+
# Dissociates a contact from the authenticated customer.
|
|
152
169
|
#
|
|
153
170
|
# @overload delete(id, sandbox: nil, x_profile_id: nil, request_options: {})
|
|
154
171
|
#
|
|
@@ -192,7 +209,7 @@ module Sentdm
|
|
|
192
209
|
#
|
|
193
210
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
194
211
|
#
|
|
195
|
-
# @return [Sentdm::Models::
|
|
212
|
+
# @return [Sentdm::Models::ContactRetrieveMessageSummaryResponse]
|
|
196
213
|
#
|
|
197
214
|
# @see Sentdm::Models::ContactRetrieveMessageSummaryParams
|
|
198
215
|
def retrieve_message_summary(contact_id, params = {})
|
|
@@ -201,7 +218,7 @@ module Sentdm
|
|
|
201
218
|
method: :get,
|
|
202
219
|
path: ["v3/contacts/%1$s/message-summary", contact_id],
|
|
203
220
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
204
|
-
model: Sentdm::
|
|
221
|
+
model: Sentdm::Models::ContactRetrieveMessageSummaryResponse,
|
|
205
222
|
options: options
|
|
206
223
|
)
|
|
207
224
|
end
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
+
# Inbound and outbound messages, grouped by the person they are with.
|
|
6
|
+
#
|
|
7
|
+
# A conversation is the thread for one contact across every channel — a reply by
|
|
8
|
+
# SMS and one by WhatsApp belong to the same conversation, because they are the
|
|
9
|
+
# same person talking to you.
|
|
10
|
+
#
|
|
11
|
+
# Read-only. Sending is **Messages**; a reply arrives here and through your
|
|
12
|
+
# webhooks.
|
|
5
13
|
class Conversations
|
|
6
14
|
# Some parameter documentations has been truncated, see
|
|
7
15
|
# {Sentdm::Models::ConversationListParams} for more details.
|
|
@@ -19,7 +27,7 @@ module Sentdm
|
|
|
19
27
|
#
|
|
20
28
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
21
29
|
#
|
|
22
|
-
# @return [Sentdm::Models::
|
|
30
|
+
# @return [Sentdm::Models::ConversationListResponse]
|
|
23
31
|
#
|
|
24
32
|
# @see Sentdm::Models::ConversationListParams
|
|
25
33
|
def list(params)
|
|
@@ -31,7 +39,7 @@ module Sentdm
|
|
|
31
39
|
path: "v3/conversations",
|
|
32
40
|
query: query,
|
|
33
41
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
34
|
-
model: Sentdm::
|
|
42
|
+
model: Sentdm::Models::ConversationListResponse,
|
|
35
43
|
options: options
|
|
36
44
|
)
|
|
37
45
|
end
|
|
@@ -54,7 +62,7 @@ module Sentdm
|
|
|
54
62
|
#
|
|
55
63
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
56
64
|
#
|
|
57
|
-
# @return [Sentdm::Models::
|
|
65
|
+
# @return [Sentdm::Models::ConversationListMessagesResponse]
|
|
58
66
|
#
|
|
59
67
|
# @see Sentdm::Models::ConversationListMessagesParams
|
|
60
68
|
def list_messages(id, params)
|
|
@@ -66,7 +74,7 @@ module Sentdm
|
|
|
66
74
|
path: ["v3/conversations/%1$s", id],
|
|
67
75
|
query: query,
|
|
68
76
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
69
|
-
model: Sentdm::
|
|
77
|
+
model: Sentdm::Models::ConversationListMessagesResponse,
|
|
70
78
|
options: options
|
|
71
79
|
)
|
|
72
80
|
end
|
data/lib/sentdm/resources/me.rb
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# Who the current key is.
|
|
6
|
+
#
|
|
7
|
+
# `GET /v3/me` answers with the account the key authenticates as, which is the
|
|
8
|
+
# quickest way to tell a live key from a test one, an organization key from a
|
|
9
|
+
# sender profile's, and to confirm `x-profile-id` resolved to the profile you
|
|
10
|
+
# meant.
|
|
6
11
|
class Me
|
|
7
12
|
# Some parameter documentations has been truncated, see
|
|
8
13
|
# {Sentdm::Models::MeRetrieveParams} for more details.
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
# Send and
|
|
5
|
+
# Send a message and follow what happened to it.
|
|
6
|
+
#
|
|
7
|
+
# One endpoint sends on any channel: pass `channel: "sent"` and we pick between
|
|
8
|
+
# SMS, WhatsApp and RCS per recipient using your routing rules, or name a channel
|
|
9
|
+
# to pin it. A send is accepted asynchronously — `POST /v3/messages` returns an
|
|
10
|
+
# id, and delivery is reported through `GET /v3/messages/{id}`, its activities, or
|
|
11
|
+
# a webhook.
|
|
12
|
+
#
|
|
13
|
+
# **A message needs a sender.** What you can send, where, and at what cost is
|
|
14
|
+
# decided by the markets under **Channels** — so a recipient in a country you hold
|
|
15
|
+
# no sender for is refused here rather than queued.
|
|
6
16
|
class Messages
|
|
7
17
|
# Some parameter documentations has been truncated, see
|
|
8
18
|
# {Sentdm::Models::MessageRetrieveActivitiesParams} for more details.
|
|
@@ -67,10 +77,12 @@ module Sentdm
|
|
|
67
77
|
# multi-channel broadcast — when multiple channels are specified (e.g. ["sms",
|
|
68
78
|
# "whatsapp"]), a separate message is created for each (recipient, channel) pair.
|
|
69
79
|
# Returns immediately with per-recipient message IDs for async tracking via
|
|
70
|
-
# webhooks or the GET /messages/{id} endpoint.
|
|
71
|
-
#
|
|
72
|
-
#
|
|
73
|
-
#
|
|
80
|
+
# webhooks or the GET /messages/{id} endpoint. Sends gated before any delivery
|
|
81
|
+
# attempt do not reject the request — an account-level precondition such as
|
|
82
|
+
# insufficient balance, a template not approved for sending, or free-form content
|
|
83
|
+
# with no open conversation with the contact. The send is accepted with 202 and
|
|
84
|
+
# the affected messages are reported as BLOCKED on GET /messages/{id} and the
|
|
85
|
+
# message.blocked webhook.
|
|
74
86
|
#
|
|
75
87
|
# @overload send_(channel: nil, sandbox: nil, template: nil, text: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
76
88
|
#
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
-
#
|
|
5
|
+
# What a phone number actually is, before you send to it.
|
|
6
|
+
#
|
|
7
|
+
# A lookup returns the number's country, line type and carrier, which is what
|
|
8
|
+
# decides whether it is reachable on a channel and what it costs. Worth doing on
|
|
9
|
+
# import rather than on send: a landline in a contact list is a message that can
|
|
10
|
+
# never be delivered.
|
|
6
11
|
class Numbers
|
|
7
12
|
# Some parameter documentations has been truncated, see
|
|
8
13
|
# {Sentdm::Models::NumberLookupParams} for more details.
|
|
@@ -3,11 +3,25 @@
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
5
|
class Profiles
|
|
6
|
-
#
|
|
6
|
+
# **Deprecated — use Sender Profiles.**
|
|
7
|
+
#
|
|
8
|
+
# The original profile resource, kept because it has live callers. It still works,
|
|
9
|
+
# and its replacement is `/v3/sender-profiles`, which takes the identity and the
|
|
10
|
+
# campaign in one call instead of across three.
|
|
11
|
+
#
|
|
12
|
+
# New integrations should not start here.
|
|
7
13
|
class Campaigns
|
|
14
|
+
# @deprecated
|
|
15
|
+
#
|
|
8
16
|
# Some parameter documentations has been truncated, see
|
|
9
17
|
# {Sentdm::Models::Profiles::CampaignCreateParams} for more details.
|
|
10
18
|
#
|
|
19
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
20
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
21
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
22
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
23
|
+
# explicitly.
|
|
24
|
+
#
|
|
11
25
|
# Creates a new campaign scoped under the brand of the specified profile. Each
|
|
12
26
|
# campaign must include at least one use case with sample messages.
|
|
13
27
|
#
|
|
@@ -15,7 +29,7 @@ module Sentdm
|
|
|
15
29
|
#
|
|
16
30
|
# @param profile_id [String] Path param: Profile ID from route
|
|
17
31
|
#
|
|
18
|
-
# @param campaign [Sentdm::Models::Profiles::
|
|
32
|
+
# @param campaign [Sentdm::Models::Profiles::CampaignCreateParams::Campaign] Body param: Campaign data for create or update operation
|
|
19
33
|
#
|
|
20
34
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
21
35
|
#
|
|
@@ -25,7 +39,7 @@ module Sentdm
|
|
|
25
39
|
#
|
|
26
40
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
41
|
#
|
|
28
|
-
# @return [Sentdm::Models::Profiles::
|
|
42
|
+
# @return [Sentdm::Models::Profiles::CampaignCreateResponse]
|
|
29
43
|
#
|
|
30
44
|
# @see Sentdm::Models::Profiles::CampaignCreateParams
|
|
31
45
|
def create(profile_id, params)
|
|
@@ -36,14 +50,22 @@ module Sentdm
|
|
|
36
50
|
path: ["v3/profiles/%1$s/campaigns", profile_id],
|
|
37
51
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
38
52
|
body: parsed.except(*header_params.keys),
|
|
39
|
-
model: Sentdm::Profiles::
|
|
53
|
+
model: Sentdm::Models::Profiles::CampaignCreateResponse,
|
|
40
54
|
options: options
|
|
41
55
|
)
|
|
42
56
|
end
|
|
43
57
|
|
|
58
|
+
# @deprecated
|
|
59
|
+
#
|
|
44
60
|
# Some parameter documentations has been truncated, see
|
|
45
61
|
# {Sentdm::Models::Profiles::CampaignUpdateParams} for more details.
|
|
46
62
|
#
|
|
63
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
64
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
65
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
66
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
67
|
+
# explicitly.
|
|
68
|
+
#
|
|
47
69
|
# Updates an existing campaign under the brand of the specified profile. Cannot
|
|
48
70
|
# update campaigns that have already been submitted to TCR.
|
|
49
71
|
#
|
|
@@ -53,7 +75,7 @@ module Sentdm
|
|
|
53
75
|
#
|
|
54
76
|
# @param profile_id [String] Path param: Profile ID from route
|
|
55
77
|
#
|
|
56
|
-
# @param campaign [Sentdm::Models::Profiles::
|
|
78
|
+
# @param campaign [Sentdm::Models::Profiles::CampaignUpdateParams::Campaign] Body param: Campaign data for create or update operation
|
|
57
79
|
#
|
|
58
80
|
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
59
81
|
#
|
|
@@ -63,7 +85,7 @@ module Sentdm
|
|
|
63
85
|
#
|
|
64
86
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
65
87
|
#
|
|
66
|
-
# @return [Sentdm::Models::Profiles::
|
|
88
|
+
# @return [Sentdm::Models::Profiles::CampaignUpdateResponse]
|
|
67
89
|
#
|
|
68
90
|
# @see Sentdm::Models::Profiles::CampaignUpdateParams
|
|
69
91
|
def update(campaign_id, params)
|
|
@@ -78,14 +100,22 @@ module Sentdm
|
|
|
78
100
|
path: ["v3/profiles/%1$s/campaigns/%2$s", profile_id, campaign_id],
|
|
79
101
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
80
102
|
body: parsed.except(*header_params.keys),
|
|
81
|
-
model: Sentdm::Profiles::
|
|
103
|
+
model: Sentdm::Models::Profiles::CampaignUpdateResponse,
|
|
82
104
|
options: options
|
|
83
105
|
)
|
|
84
106
|
end
|
|
85
107
|
|
|
108
|
+
# @deprecated
|
|
109
|
+
#
|
|
86
110
|
# Some parameter documentations has been truncated, see
|
|
87
111
|
# {Sentdm::Models::Profiles::CampaignListParams} for more details.
|
|
88
112
|
#
|
|
113
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
114
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
115
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
116
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
117
|
+
# explicitly.
|
|
118
|
+
#
|
|
89
119
|
# Retrieves all campaigns linked to the profile's brand, including use cases and
|
|
90
120
|
# sample messages. Returns inherited campaigns if inherit_tcr_campaign=true.
|
|
91
121
|
#
|
|
@@ -97,7 +127,7 @@ module Sentdm
|
|
|
97
127
|
#
|
|
98
128
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
99
129
|
#
|
|
100
|
-
# @return [Sentdm::Models::Profiles::
|
|
130
|
+
# @return [Sentdm::Models::Profiles::CampaignListResponse]
|
|
101
131
|
#
|
|
102
132
|
# @see Sentdm::Models::Profiles::CampaignListParams
|
|
103
133
|
def list(profile_id, params = {})
|
|
@@ -106,14 +136,22 @@ module Sentdm
|
|
|
106
136
|
method: :get,
|
|
107
137
|
path: ["v3/profiles/%1$s/campaigns", profile_id],
|
|
108
138
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
109
|
-
model: Sentdm::Profiles::
|
|
139
|
+
model: Sentdm::Models::Profiles::CampaignListResponse,
|
|
110
140
|
options: options
|
|
111
141
|
)
|
|
112
142
|
end
|
|
113
143
|
|
|
144
|
+
# @deprecated
|
|
145
|
+
#
|
|
114
146
|
# Some parameter documentations has been truncated, see
|
|
115
147
|
# {Sentdm::Models::Profiles::CampaignDeleteParams} for more details.
|
|
116
148
|
#
|
|
149
|
+
# **Deprecated.** This endpoint is replaced by `/v3/sender-profiles` and will be
|
|
150
|
+
# removed in a future release. It still behaves exactly as before, so nothing
|
|
151
|
+
# needs to change today — but new integrations should use `/v3/sender-profiles`,
|
|
152
|
+
# which models a profile's markets, compliance, brand, campaigns and billing
|
|
153
|
+
# explicitly.
|
|
154
|
+
#
|
|
117
155
|
# Deletes a campaign by ID from the brand of the specified profile. The profile
|
|
118
156
|
# must belong to the authenticated organization.
|
|
119
157
|
#
|