sentdm 0.29.0 → 0.31.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 +24 -0
- data/README.md +55 -1
- data/lib/sentdm/internal/contacts_page.rb +115 -0
- data/lib/sentdm/internal/conversations_page.rb +115 -0
- data/lib/sentdm/internal/templates_page.rb +115 -0
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/internal/webhook_events_page.rb +115 -0
- data/lib/sentdm/internal/webhooks_page.rb +115 -0
- data/lib/sentdm/models/api_meta.rb +34 -0
- data/lib/sentdm/models/api_response_of_contact.rb +46 -0
- data/lib/sentdm/models/api_response_of_contact_message_summary.rb +43 -0
- data/lib/sentdm/models/api_response_of_conversation_messages_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_profile_detail.rb +43 -0
- data/lib/sentdm/models/api_response_of_user.rb +43 -0
- data/lib/sentdm/models/api_response_template.rb +43 -0
- data/lib/sentdm/models/api_response_webhook.rb +43 -0
- data/lib/sentdm/models/billing_contact_info.rb +47 -0
- data/lib/sentdm/models/brand_business_info.rb +114 -0
- data/lib/sentdm/models/brand_compliance_info.rb +59 -0
- data/lib/sentdm/models/brand_contact_info.rb +58 -0
- data/lib/sentdm/models/brands_brand_data.rb +34 -0
- data/lib/sentdm/models/contact_delete_params.rb +2 -16
- data/lib/sentdm/models/contact_list_params.rb +13 -13
- data/lib/sentdm/models/contact_message_summary.rb +76 -0
- data/lib/sentdm/models/contact_response.rb +140 -0
- data/lib/sentdm/models/conversation_list_messages_params.rb +5 -5
- data/lib/sentdm/models/conversation_list_params.rb +5 -5
- data/lib/sentdm/models/conversation_messages_list.rb +245 -0
- data/lib/sentdm/models/error_detail.rb +42 -0
- data/lib/sentdm/models/me_retrieve_response.rb +12 -242
- data/lib/sentdm/models/message_retrieve_activities_response.rb +9 -159
- data/lib/sentdm/models/message_retrieve_status_response.rb +6 -74
- data/lib/sentdm/models/message_send_response.rb +6 -74
- data/lib/sentdm/models/mutation_request.rb +20 -0
- data/lib/sentdm/models/number_lookup_response.rb +6 -74
- data/lib/sentdm/models/pagination_meta.rb +84 -0
- data/lib/sentdm/models/payment_details.rb +40 -0
- data/lib/sentdm/models/profile_complete_response.rb +6 -74
- data/lib/sentdm/models/profile_create_params.rb +9 -345
- data/lib/sentdm/models/profile_delete_params.rb +2 -16
- data/lib/sentdm/models/profile_detail.rb +650 -0
- data/lib/sentdm/models/profile_list_response.rb +12 -815
- data/lib/sentdm/models/profile_settings.rb +85 -0
- data/lib/sentdm/models/profile_update_params.rb +9 -345
- data/lib/sentdm/models/profiles/api_response_of_brand_campaign.rb +45 -0
- data/lib/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rb +45 -0
- data/lib/sentdm/models/profiles/brand_campaign.rb +247 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +3 -156
- data/lib/sentdm/models/profiles/campaign_data.rb +136 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +2 -17
- data/lib/sentdm/models/profiles/campaign_update_params.rb +3 -156
- data/lib/sentdm/models/profiles/campaign_use_case.rb +71 -0
- data/lib/sentdm/models/profiles/campaign_use_case_data.rb +29 -0
- data/lib/sentdm/models/template.rb +103 -0
- data/lib/sentdm/models/template_list_params.rb +17 -17
- data/lib/sentdm/models/user_list_response.rb +12 -249
- data/lib/sentdm/models/user_remove_params.rb +2 -16
- data/lib/sentdm/models/user_response.rb +94 -0
- data/lib/sentdm/models/webhook_event_type.rb +45 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +12 -203
- data/lib/sentdm/models/webhook_list_events_params.rb +5 -5
- data/lib/sentdm/models/webhook_list_events_response.rb +87 -295
- data/lib/sentdm/models/webhook_list_params.rb +11 -11
- data/lib/sentdm/models/webhook_response.rb +121 -0
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +2 -17
- data/lib/sentdm/models/webhook_rotate_secret_response.rb +6 -74
- data/lib/sentdm/models/webhook_test_response.rb +6 -74
- data/lib/sentdm/models.rb +52 -0
- data/lib/sentdm/resources/contacts.rb +16 -15
- data/lib/sentdm/resources/conversations.rb +10 -8
- data/lib/sentdm/resources/profiles/campaigns.rb +8 -8
- data/lib/sentdm/resources/profiles.rb +12 -12
- data/lib/sentdm/resources/templates.rb +16 -15
- data/lib/sentdm/resources/users.rb +6 -6
- data/lib/sentdm/resources/webhooks.rb +20 -18
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +37 -25
- data/rbi/sentdm/internal/contacts_page.rbi +71 -0
- data/rbi/sentdm/internal/conversations_page.rbi +71 -0
- data/rbi/sentdm/internal/templates_page.rbi +71 -0
- data/rbi/sentdm/internal/webhook_events_page.rbi +71 -0
- data/rbi/sentdm/internal/webhooks_page.rbi +71 -0
- data/rbi/sentdm/models/api_meta.rbi +55 -0
- data/rbi/sentdm/models/api_response_of_contact.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_contact_message_summary.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_conversation_messages_list.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_profile_detail.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_user.rbi +74 -0
- data/rbi/sentdm/models/api_response_template.rbi +74 -0
- data/rbi/sentdm/models/api_response_webhook.rbi +74 -0
- data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
- data/rbi/sentdm/models/brand_business_info.rbi +162 -0
- data/rbi/sentdm/models/brand_compliance_info.rbi +76 -0
- data/rbi/sentdm/models/brand_contact_info.rbi +78 -0
- data/rbi/sentdm/models/brands_brand_data.rbi +65 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +2 -19
- data/rbi/sentdm/models/contact_list_params.rbi +19 -13
- data/rbi/sentdm/models/contact_message_summary.rbi +144 -0
- data/rbi/sentdm/models/contact_response.rbi +200 -0
- data/rbi/sentdm/models/conversation_list_messages_params.rbi +12 -6
- data/rbi/sentdm/models/conversation_list_params.rbi +16 -5
- data/rbi/sentdm/models/conversation_messages_list.rbi +419 -0
- data/rbi/sentdm/models/error_detail.rbi +66 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +16 -367
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +12 -325
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +8 -148
- data/rbi/sentdm/models/message_send_response.rbi +8 -135
- data/rbi/sentdm/models/mutation_request.rbi +32 -0
- data/rbi/sentdm/models/number_lookup_response.rbi +8 -135
- data/rbi/sentdm/models/pagination_meta.rbi +135 -0
- data/rbi/sentdm/models/payment_details.rbi +56 -0
- data/rbi/sentdm/models/profile_complete_response.rbi +8 -137
- data/rbi/sentdm/models/profile_create_params.rbi +12 -546
- data/rbi/sentdm/models/profile_delete_params.rbi +2 -19
- data/rbi/sentdm/models/profile_detail.rbi +918 -0
- data/rbi/sentdm/models/profile_list_response.rbi +16 -1347
- data/rbi/sentdm/models/profile_settings.rbi +102 -0
- data/rbi/sentdm/models/profile_update_params.rbi +12 -546
- data/rbi/sentdm/models/profiles/api_response_of_brand_campaign.rbi +81 -0
- data/rbi/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbi +76 -0
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +299 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +4 -218
- data/rbi/sentdm/models/profiles/campaign_data.rbi +158 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +1 -14
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +4 -218
- data/rbi/sentdm/models/profiles/campaign_use_case.rbi +110 -0
- data/rbi/sentdm/models/profiles/campaign_use_case_data.rbi +51 -0
- data/rbi/sentdm/models/template.rbi +139 -0
- data/rbi/sentdm/models/template_list_params.rbi +22 -16
- data/rbi/sentdm/models/user_list_response.rbi +16 -444
- data/rbi/sentdm/models/user_remove_params.rbi +2 -19
- data/rbi/sentdm/models/user_response.rbi +131 -0
- data/rbi/sentdm/models/webhook_event_type.rbi +74 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +16 -414
- data/rbi/sentdm/models/webhook_list_events_params.rbi +12 -6
- data/rbi/sentdm/models/webhook_list_events_response.rbi +113 -564
- data/rbi/sentdm/models/webhook_list_params.rbi +16 -10
- data/rbi/sentdm/models/webhook_response.rbi +153 -0
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +1 -14
- data/rbi/sentdm/models/webhook_rotate_secret_response.rbi +8 -148
- data/rbi/sentdm/models/webhook_test_response.rbi +8 -135
- data/rbi/sentdm/models.rbi +54 -0
- data/rbi/sentdm/resources/contacts.rbi +10 -10
- data/rbi/sentdm/resources/conversations.rbi +14 -6
- data/rbi/sentdm/resources/profiles/campaigns.rbi +5 -5
- data/rbi/sentdm/resources/profiles.rbi +9 -13
- data/rbi/sentdm/resources/templates.rbi +10 -10
- data/rbi/sentdm/resources/users.rbi +3 -3
- data/rbi/sentdm/resources/webhooks.rbi +16 -12
- data/sig/sentdm/internal/contacts_page.rbs +41 -0
- data/sig/sentdm/internal/conversations_page.rbs +41 -0
- data/sig/sentdm/internal/templates_page.rbs +44 -0
- data/sig/sentdm/internal/webhook_events_page.rbs +41 -0
- data/sig/sentdm/internal/webhooks_page.rbs +41 -0
- data/sig/sentdm/models/api_meta.rbs +27 -0
- data/sig/sentdm/models/api_response_of_contact.rbs +39 -0
- data/sig/sentdm/models/api_response_of_contact_message_summary.rbs +39 -0
- data/sig/sentdm/models/api_response_of_conversation_messages_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_detail.rbs +39 -0
- data/sig/sentdm/models/api_response_of_user.rbs +39 -0
- data/sig/sentdm/models/api_response_template.rbs +39 -0
- data/sig/sentdm/models/api_response_webhook.rbs +39 -0
- data/sig/sentdm/models/billing_contact_info.rbs +30 -0
- data/sig/sentdm/models/brand_business_info.rbs +89 -0
- data/sig/sentdm/models/brand_compliance_info.rbs +45 -0
- data/sig/sentdm/models/brand_contact_info.rbs +45 -0
- data/sig/sentdm/models/brands_brand_data.rbs +30 -0
- data/sig/sentdm/models/contact_delete_params.rbs +6 -10
- data/sig/sentdm/models/contact_list_params.rbs +11 -7
- data/sig/sentdm/models/contact_message_summary.rbs +84 -0
- data/sig/sentdm/models/contact_response.rbs +118 -0
- data/sig/sentdm/models/conversation_list_messages_params.rbs +8 -4
- data/sig/sentdm/models/conversation_list_params.rbs +8 -4
- data/sig/sentdm/models/conversation_messages_list.rbs +240 -0
- data/sig/sentdm/models/error_detail.rbs +39 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +18 -176
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +14 -142
- data/sig/sentdm/models/message_retrieve_status_response.rbs +9 -71
- data/sig/sentdm/models/message_send_response.rbs +9 -71
- data/sig/sentdm/models/mutation_request.rbs +15 -0
- data/sig/sentdm/models/number_lookup_response.rbs +9 -71
- data/sig/sentdm/models/pagination_meta.rbs +67 -0
- data/sig/sentdm/models/payment_details.rbs +30 -0
- data/sig/sentdm/models/profile_complete_response.rbs +9 -71
- data/sig/sentdm/models/profile_create_params.rbs +12 -263
- data/sig/sentdm/models/profile_delete_params.rbs +6 -10
- data/sig/sentdm/models/profile_detail.rbs +461 -0
- data/sig/sentdm/models/profile_list_response.rbs +20 -606
- data/sig/sentdm/models/profile_settings.rbs +50 -0
- data/sig/sentdm/models/profile_update_params.rbs +12 -263
- data/sig/sentdm/models/profiles/api_response_of_brand_campaign.rbs +41 -0
- data/sig/sentdm/models/profiles/api_response_of_list_of_brand_campaign.rbs +41 -0
- data/sig/sentdm/models/profiles/brand_campaign.rbs +194 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +4 -108
- data/sig/sentdm/models/profiles/campaign_data.rbs +87 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +8 -15
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +4 -108
- data/sig/sentdm/models/profiles/campaign_use_case.rbs +66 -0
- data/sig/sentdm/models/profiles/campaign_use_case_data.rbs +27 -0
- data/sig/sentdm/models/template.rbs +84 -0
- data/sig/sentdm/models/template_list_params.rbs +14 -10
- data/sig/sentdm/models/user_list_response.rbs +20 -224
- data/sig/sentdm/models/user_remove_params.rbs +6 -10
- data/sig/sentdm/models/user_response.rbs +79 -0
- data/sig/sentdm/models/webhook_event_type.rbs +51 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +20 -196
- data/sig/sentdm/models/webhook_list_events_params.rbs +8 -4
- data/sig/sentdm/models/webhook_list_events_response.rbs +63 -255
- data/sig/sentdm/models/webhook_list_params.rbs +11 -7
- data/sig/sentdm/models/webhook_response.rbs +110 -0
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +8 -17
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +9 -71
- data/sig/sentdm/models/webhook_test_response.rbs +9 -71
- data/sig/sentdm/models.rbs +52 -0
- data/sig/sentdm/resources/contacts.rbs +7 -7
- data/sig/sentdm/resources/conversations.rbs +6 -6
- data/sig/sentdm/resources/profiles/campaigns.rbs +5 -5
- data/sig/sentdm/resources/profiles.rbs +9 -9
- data/sig/sentdm/resources/templates.rbs +6 -6
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +10 -10
- metadata +113 -77
- data/lib/sentdm/models/contact_create_response.rb +0 -249
- data/lib/sentdm/models/contact_list_response.rb +0 -348
- data/lib/sentdm/models/contact_retrieve_message_summary_response.rb +0 -186
- data/lib/sentdm/models/contact_retrieve_response.rb +0 -249
- data/lib/sentdm/models/contact_update_response.rb +0 -249
- data/lib/sentdm/models/conversation_list_messages_response.rb +0 -436
- data/lib/sentdm/models/conversation_list_response.rb +0 -433
- data/lib/sentdm/models/profile_create_response.rb +0 -760
- data/lib/sentdm/models/profile_retrieve_response.rb +0 -762
- data/lib/sentdm/models/profile_update_response.rb +0 -760
- data/lib/sentdm/models/profiles/campaign_create_response.rb +0 -420
- data/lib/sentdm/models/profiles/campaign_list_response.rb +0 -421
- data/lib/sentdm/models/profiles/campaign_update_response.rb +0 -420
- data/lib/sentdm/models/template_create_response.rb +0 -209
- data/lib/sentdm/models/template_list_response.rb +0 -311
- data/lib/sentdm/models/template_retrieve_response.rb +0 -209
- data/lib/sentdm/models/template_update_response.rb +0 -209
- data/lib/sentdm/models/user_invite_response.rb +0 -201
- data/lib/sentdm/models/user_retrieve_response.rb +0 -201
- data/lib/sentdm/models/user_update_role_response.rb +0 -201
- data/lib/sentdm/models/webhook_create_response.rb +0 -229
- data/lib/sentdm/models/webhook_list_response.rb +0 -329
- data/lib/sentdm/models/webhook_retrieve_response.rb +0 -229
- data/lib/sentdm/models/webhook_toggle_status_response.rb +0 -229
- data/lib/sentdm/models/webhook_update_response.rb +0 -229
- data/rbi/sentdm/models/contact_create_response.rbi +0 -407
- data/rbi/sentdm/models/contact_list_response.rbi +0 -634
- data/rbi/sentdm/models/contact_retrieve_message_summary_response.rbi +0 -397
- data/rbi/sentdm/models/contact_retrieve_response.rbi +0 -409
- data/rbi/sentdm/models/contact_update_response.rbi +0 -407
- data/rbi/sentdm/models/conversation_list_messages_response.rbi +0 -843
- data/rbi/sentdm/models/conversation_list_response.rbi +0 -819
- data/rbi/sentdm/models/profile_create_response.rbi +0 -1226
- data/rbi/sentdm/models/profile_retrieve_response.rbi +0 -1230
- data/rbi/sentdm/models/profile_update_response.rbi +0 -1226
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +0 -674
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +0 -667
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +0 -674
- data/rbi/sentdm/models/template_create_response.rbi +0 -349
- data/rbi/sentdm/models/template_list_response.rbi +0 -576
- data/rbi/sentdm/models/template_retrieve_response.rbi +0 -355
- data/rbi/sentdm/models/template_update_response.rbi +0 -349
- data/rbi/sentdm/models/user_invite_response.rbi +0 -336
- data/rbi/sentdm/models/user_retrieve_response.rbi +0 -336
- data/rbi/sentdm/models/user_update_role_response.rbi +0 -341
- data/rbi/sentdm/models/webhook_create_response.rbi +0 -361
- data/rbi/sentdm/models/webhook_list_response.rbi +0 -587
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +0 -363
- data/rbi/sentdm/models/webhook_toggle_status_response.rbi +0 -379
- data/rbi/sentdm/models/webhook_update_response.rbi +0 -361
- data/sig/sentdm/models/contact_create_response.rbs +0 -216
- data/sig/sentdm/models/contact_list_response.rbs +0 -310
- data/sig/sentdm/models/contact_retrieve_message_summary_response.rbs +0 -182
- data/sig/sentdm/models/contact_retrieve_response.rbs +0 -216
- data/sig/sentdm/models/contact_update_response.rbs +0 -216
- data/sig/sentdm/models/conversation_list_messages_response.rbs +0 -404
- data/sig/sentdm/models/conversation_list_response.rbs +0 -404
- data/sig/sentdm/models/profile_create_response.rbs +0 -559
- data/sig/sentdm/models/profile_retrieve_response.rbs +0 -559
- data/sig/sentdm/models/profile_update_response.rbs +0 -559
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +0 -357
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +0 -357
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +0 -357
- data/sig/sentdm/models/template_create_response.rbs +0 -182
- data/sig/sentdm/models/template_list_response.rbs +0 -276
- data/sig/sentdm/models/template_retrieve_response.rbs +0 -182
- data/sig/sentdm/models/template_update_response.rbs +0 -182
- data/sig/sentdm/models/user_invite_response.rbs +0 -177
- data/sig/sentdm/models/user_retrieve_response.rbs +0 -177
- data/sig/sentdm/models/user_update_role_response.rbs +0 -177
- data/sig/sentdm/models/webhook_create_response.rbs +0 -208
- data/sig/sentdm/models/webhook_list_response.rbs +0 -302
- data/sig/sentdm/models/webhook_retrieve_response.rbs +0 -208
- data/sig/sentdm/models/webhook_toggle_status_response.rbs +0 -208
- data/sig/sentdm/models/webhook_update_response.rbs +0 -208
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BrandComplianceInfo < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::BrandComplianceInfo, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig { returns(Sentdm::TcrBrandRelationship::OrSymbol) }
|
|
12
|
+
attr_accessor :brand_relationship
|
|
13
|
+
|
|
14
|
+
sig { returns(Sentdm::TcrVertical::OrSymbol) }
|
|
15
|
+
attr_accessor :vertical
|
|
16
|
+
|
|
17
|
+
# List of destination countries for messaging
|
|
18
|
+
sig { returns(T.nilable(T::Array[Sentdm::DestinationCountry])) }
|
|
19
|
+
attr_accessor :destination_countries
|
|
20
|
+
|
|
21
|
+
# Whether this is a TCR (Campaign Registry) application
|
|
22
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
23
|
+
attr_accessor :is_tcr_application
|
|
24
|
+
|
|
25
|
+
# Additional notes about the business or use case
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_accessor :notes
|
|
28
|
+
|
|
29
|
+
# Phone number prefix for messaging (e.g., "+1")
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_accessor :phone_number_prefix
|
|
32
|
+
|
|
33
|
+
# Compliance and TCR information for brand registration
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
brand_relationship: Sentdm::TcrBrandRelationship::OrSymbol,
|
|
37
|
+
vertical: Sentdm::TcrVertical::OrSymbol,
|
|
38
|
+
destination_countries:
|
|
39
|
+
T.nilable(T::Array[Sentdm::DestinationCountry::OrHash]),
|
|
40
|
+
is_tcr_application: T.nilable(T::Boolean),
|
|
41
|
+
notes: T.nilable(String),
|
|
42
|
+
phone_number_prefix: T.nilable(String)
|
|
43
|
+
).returns(T.attached_class)
|
|
44
|
+
end
|
|
45
|
+
def self.new(
|
|
46
|
+
brand_relationship:,
|
|
47
|
+
vertical:,
|
|
48
|
+
# List of destination countries for messaging
|
|
49
|
+
destination_countries: nil,
|
|
50
|
+
# Whether this is a TCR (Campaign Registry) application
|
|
51
|
+
is_tcr_application: nil,
|
|
52
|
+
# Additional notes about the business or use case
|
|
53
|
+
notes: nil,
|
|
54
|
+
# Phone number prefix for messaging (e.g., "+1")
|
|
55
|
+
phone_number_prefix: nil
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig do
|
|
60
|
+
override.returns(
|
|
61
|
+
{
|
|
62
|
+
brand_relationship: Sentdm::TcrBrandRelationship::OrSymbol,
|
|
63
|
+
vertical: Sentdm::TcrVertical::OrSymbol,
|
|
64
|
+
destination_countries:
|
|
65
|
+
T.nilable(T::Array[Sentdm::DestinationCountry]),
|
|
66
|
+
is_tcr_application: T.nilable(T::Boolean),
|
|
67
|
+
notes: T.nilable(String),
|
|
68
|
+
phone_number_prefix: T.nilable(String)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def to_hash
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BrandContactInfo < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::BrandContactInfo, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Primary contact name (required)
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :name
|
|
14
|
+
|
|
15
|
+
# Business/brand name
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_accessor :business_name
|
|
18
|
+
|
|
19
|
+
# Contact email address
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_accessor :email
|
|
22
|
+
|
|
23
|
+
# Contact phone number in E.164 format
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_accessor :phone
|
|
26
|
+
|
|
27
|
+
# Contact phone country code (e.g., "1" for US)
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_accessor :phone_country_code
|
|
30
|
+
|
|
31
|
+
# Contact's role in the business
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_accessor :role
|
|
34
|
+
|
|
35
|
+
# Contact information for brand KYC
|
|
36
|
+
sig do
|
|
37
|
+
params(
|
|
38
|
+
name: String,
|
|
39
|
+
business_name: T.nilable(String),
|
|
40
|
+
email: T.nilable(String),
|
|
41
|
+
phone: T.nilable(String),
|
|
42
|
+
phone_country_code: T.nilable(String),
|
|
43
|
+
role: T.nilable(String)
|
|
44
|
+
).returns(T.attached_class)
|
|
45
|
+
end
|
|
46
|
+
def self.new(
|
|
47
|
+
# Primary contact name (required)
|
|
48
|
+
name:,
|
|
49
|
+
# Business/brand name
|
|
50
|
+
business_name: nil,
|
|
51
|
+
# Contact email address
|
|
52
|
+
email: nil,
|
|
53
|
+
# Contact phone number in E.164 format
|
|
54
|
+
phone: nil,
|
|
55
|
+
# Contact phone country code (e.g., "1" for US)
|
|
56
|
+
phone_country_code: nil,
|
|
57
|
+
# Contact's role in the business
|
|
58
|
+
role: nil
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
override.returns(
|
|
64
|
+
{
|
|
65
|
+
name: String,
|
|
66
|
+
business_name: T.nilable(String),
|
|
67
|
+
email: T.nilable(String),
|
|
68
|
+
phone: T.nilable(String),
|
|
69
|
+
phone_country_code: T.nilable(String),
|
|
70
|
+
role: T.nilable(String)
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
def to_hash
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class BrandsBrandData < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::BrandsBrandData, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Compliance and TCR information for brand registration
|
|
12
|
+
sig { returns(Sentdm::BrandComplianceInfo) }
|
|
13
|
+
attr_reader :compliance
|
|
14
|
+
|
|
15
|
+
sig { params(compliance: Sentdm::BrandComplianceInfo::OrHash).void }
|
|
16
|
+
attr_writer :compliance
|
|
17
|
+
|
|
18
|
+
# Contact information for brand KYC
|
|
19
|
+
sig { returns(Sentdm::BrandContactInfo) }
|
|
20
|
+
attr_reader :contact
|
|
21
|
+
|
|
22
|
+
sig { params(contact: Sentdm::BrandContactInfo::OrHash).void }
|
|
23
|
+
attr_writer :contact
|
|
24
|
+
|
|
25
|
+
# Business details and address for brand KYC
|
|
26
|
+
sig { returns(T.nilable(Sentdm::BrandBusinessInfo)) }
|
|
27
|
+
attr_reader :business
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(business: T.nilable(Sentdm::BrandBusinessInfo::OrHash)).void
|
|
31
|
+
end
|
|
32
|
+
attr_writer :business
|
|
33
|
+
|
|
34
|
+
# Brand and KYC data grouped into contact, business, and compliance sections
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
compliance: Sentdm::BrandComplianceInfo::OrHash,
|
|
38
|
+
contact: Sentdm::BrandContactInfo::OrHash,
|
|
39
|
+
business: T.nilable(Sentdm::BrandBusinessInfo::OrHash)
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
# Compliance and TCR information for brand registration
|
|
44
|
+
compliance:,
|
|
45
|
+
# Contact information for brand KYC
|
|
46
|
+
contact:,
|
|
47
|
+
# Business details and address for brand KYC
|
|
48
|
+
business: nil
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
sig do
|
|
53
|
+
override.returns(
|
|
54
|
+
{
|
|
55
|
+
compliance: Sentdm::BrandComplianceInfo,
|
|
56
|
+
contact: Sentdm::BrandContactInfo,
|
|
57
|
+
business: T.nilable(Sentdm::BrandBusinessInfo)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Models
|
|
5
|
-
class ContactDeleteParams < Sentdm::
|
|
5
|
+
class ContactDeleteParams < Sentdm::Models::MutationRequest
|
|
6
6
|
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
7
7
|
include Sentdm::Internal::Type::RequestParameters
|
|
8
8
|
|
|
@@ -14,14 +14,6 @@ module Sentdm
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
|
-
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
18
|
-
# for testing integrations without actual execution
|
|
19
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
20
|
-
attr_reader :sandbox
|
|
21
|
-
|
|
22
|
-
sig { params(sandbox: T::Boolean).void }
|
|
23
|
-
attr_writer :sandbox
|
|
24
|
-
|
|
25
17
|
sig { returns(T.nilable(String)) }
|
|
26
18
|
attr_reader :x_profile_id
|
|
27
19
|
|
|
@@ -31,26 +23,17 @@ module Sentdm
|
|
|
31
23
|
sig do
|
|
32
24
|
params(
|
|
33
25
|
id: String,
|
|
34
|
-
sandbox: T::Boolean,
|
|
35
26
|
x_profile_id: String,
|
|
36
27
|
request_options: Sentdm::RequestOptions::OrHash
|
|
37
28
|
).returns(T.attached_class)
|
|
38
29
|
end
|
|
39
|
-
def self.new(
|
|
40
|
-
id:,
|
|
41
|
-
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
42
|
-
# for testing integrations without actual execution
|
|
43
|
-
sandbox: nil,
|
|
44
|
-
x_profile_id: nil,
|
|
45
|
-
request_options: {}
|
|
46
|
-
)
|
|
30
|
+
def self.new(id:, x_profile_id: nil, request_options: {})
|
|
47
31
|
end
|
|
48
32
|
|
|
49
33
|
sig do
|
|
50
34
|
override.returns(
|
|
51
35
|
{
|
|
52
36
|
id: String,
|
|
53
|
-
sandbox: T::Boolean,
|
|
54
37
|
x_profile_id: String,
|
|
55
38
|
request_options: Sentdm::RequestOptions
|
|
56
39
|
}
|
|
@@ -11,17 +11,23 @@ module Sentdm
|
|
|
11
11
|
T.any(Sentdm::ContactListParams, Sentdm::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# Optional channel filter (sms, whatsapp)
|
|
15
|
+
sig { returns(T.nilable(String)) }
|
|
16
|
+
attr_accessor :channel
|
|
17
|
+
|
|
14
18
|
# Page number (1-indexed)
|
|
15
|
-
sig { returns(Integer) }
|
|
16
|
-
|
|
19
|
+
sig { returns(T.nilable(Integer)) }
|
|
20
|
+
attr_reader :page
|
|
21
|
+
|
|
22
|
+
sig { params(page: Integer).void }
|
|
23
|
+
attr_writer :page
|
|
17
24
|
|
|
18
25
|
# Number of items per page
|
|
19
|
-
sig { returns(Integer) }
|
|
20
|
-
|
|
26
|
+
sig { returns(T.nilable(Integer)) }
|
|
27
|
+
attr_reader :page_size
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
attr_accessor :channel
|
|
29
|
+
sig { params(page_size: Integer).void }
|
|
30
|
+
attr_writer :page_size
|
|
25
31
|
|
|
26
32
|
# Optional phone number filter (alternative to list view)
|
|
27
33
|
sig { returns(T.nilable(String)) }
|
|
@@ -39,9 +45,9 @@ module Sentdm
|
|
|
39
45
|
|
|
40
46
|
sig do
|
|
41
47
|
params(
|
|
48
|
+
channel: T.nilable(String),
|
|
42
49
|
page: Integer,
|
|
43
50
|
page_size: Integer,
|
|
44
|
-
channel: T.nilable(String),
|
|
45
51
|
phone: T.nilable(String),
|
|
46
52
|
search: T.nilable(String),
|
|
47
53
|
x_profile_id: String,
|
|
@@ -49,12 +55,12 @@ module Sentdm
|
|
|
49
55
|
).returns(T.attached_class)
|
|
50
56
|
end
|
|
51
57
|
def self.new(
|
|
52
|
-
# Page number (1-indexed)
|
|
53
|
-
page:,
|
|
54
|
-
# Number of items per page
|
|
55
|
-
page_size:,
|
|
56
58
|
# Optional channel filter (sms, whatsapp)
|
|
57
59
|
channel: nil,
|
|
60
|
+
# Page number (1-indexed)
|
|
61
|
+
page: nil,
|
|
62
|
+
# Number of items per page
|
|
63
|
+
page_size: nil,
|
|
58
64
|
# Optional phone number filter (alternative to list view)
|
|
59
65
|
phone: nil,
|
|
60
66
|
# Optional search term for filtering contacts
|
|
@@ -67,9 +73,9 @@ module Sentdm
|
|
|
67
73
|
sig do
|
|
68
74
|
override.returns(
|
|
69
75
|
{
|
|
76
|
+
channel: T.nilable(String),
|
|
70
77
|
page: Integer,
|
|
71
78
|
page_size: Integer,
|
|
72
|
-
channel: T.nilable(String),
|
|
73
79
|
phone: T.nilable(String),
|
|
74
80
|
search: T.nilable(String),
|
|
75
81
|
x_profile_id: String,
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class ContactMessageSummary < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::ContactMessageSummary, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
sig do
|
|
12
|
+
returns(
|
|
13
|
+
T.nilable(T::Array[Sentdm::ContactMessageSummary::ChannelScore])
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
attr_reader :channel_scores
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
channel_scores:
|
|
21
|
+
T::Array[Sentdm::ContactMessageSummary::ChannelScore::OrHash]
|
|
22
|
+
).void
|
|
23
|
+
end
|
|
24
|
+
attr_writer :channel_scores
|
|
25
|
+
|
|
26
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
27
|
+
attr_reader :channels_used
|
|
28
|
+
|
|
29
|
+
sig { params(channels_used: T::Array[String]).void }
|
|
30
|
+
attr_writer :channels_used
|
|
31
|
+
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_reader :contact_id
|
|
34
|
+
|
|
35
|
+
sig { params(contact_id: String).void }
|
|
36
|
+
attr_writer :contact_id
|
|
37
|
+
|
|
38
|
+
sig { returns(T.nilable(Time)) }
|
|
39
|
+
attr_accessor :first_message_at
|
|
40
|
+
|
|
41
|
+
sig { returns(T.nilable(Time)) }
|
|
42
|
+
attr_accessor :last_message_at
|
|
43
|
+
|
|
44
|
+
sig { returns(T.nilable(Integer)) }
|
|
45
|
+
attr_reader :message_count
|
|
46
|
+
|
|
47
|
+
sig { params(message_count: Integer).void }
|
|
48
|
+
attr_writer :message_count
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
channel_scores:
|
|
53
|
+
T::Array[Sentdm::ContactMessageSummary::ChannelScore::OrHash],
|
|
54
|
+
channels_used: T::Array[String],
|
|
55
|
+
contact_id: String,
|
|
56
|
+
first_message_at: T.nilable(Time),
|
|
57
|
+
last_message_at: T.nilable(Time),
|
|
58
|
+
message_count: Integer
|
|
59
|
+
).returns(T.attached_class)
|
|
60
|
+
end
|
|
61
|
+
def self.new(
|
|
62
|
+
channel_scores: nil,
|
|
63
|
+
channels_used: nil,
|
|
64
|
+
contact_id: nil,
|
|
65
|
+
first_message_at: nil,
|
|
66
|
+
last_message_at: nil,
|
|
67
|
+
message_count: nil
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
sig do
|
|
72
|
+
override.returns(
|
|
73
|
+
{
|
|
74
|
+
channel_scores:
|
|
75
|
+
T::Array[Sentdm::ContactMessageSummary::ChannelScore],
|
|
76
|
+
channels_used: T::Array[String],
|
|
77
|
+
contact_id: String,
|
|
78
|
+
first_message_at: T.nilable(Time),
|
|
79
|
+
last_message_at: T.nilable(Time),
|
|
80
|
+
message_count: Integer
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
def to_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
class ChannelScore < Sentdm::Internal::Type::BaseModel
|
|
88
|
+
OrHash =
|
|
89
|
+
T.type_alias do
|
|
90
|
+
T.any(
|
|
91
|
+
Sentdm::ContactMessageSummary::ChannelScore,
|
|
92
|
+
Sentdm::Internal::AnyHash
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
sig { returns(T.nilable(String)) }
|
|
97
|
+
attr_reader :channel
|
|
98
|
+
|
|
99
|
+
sig { params(channel: String).void }
|
|
100
|
+
attr_writer :channel
|
|
101
|
+
|
|
102
|
+
# Percentage (0-100) of messages on this channel that ended in FAILED.
|
|
103
|
+
sig { returns(T.nilable(Integer)) }
|
|
104
|
+
attr_reader :fail_score
|
|
105
|
+
|
|
106
|
+
sig { params(fail_score: Integer).void }
|
|
107
|
+
attr_writer :fail_score
|
|
108
|
+
|
|
109
|
+
# Percentage (0-100) of messages on this channel that reached a successful
|
|
110
|
+
# terminal state: SENT/DELIVERED/READ for outbound, RECEIVED for inbound.
|
|
111
|
+
sig { returns(T.nilable(Integer)) }
|
|
112
|
+
attr_reader :success_score
|
|
113
|
+
|
|
114
|
+
sig { params(success_score: Integer).void }
|
|
115
|
+
attr_writer :success_score
|
|
116
|
+
|
|
117
|
+
sig do
|
|
118
|
+
params(
|
|
119
|
+
channel: String,
|
|
120
|
+
fail_score: Integer,
|
|
121
|
+
success_score: Integer
|
|
122
|
+
).returns(T.attached_class)
|
|
123
|
+
end
|
|
124
|
+
def self.new(
|
|
125
|
+
channel: nil,
|
|
126
|
+
# Percentage (0-100) of messages on this channel that ended in FAILED.
|
|
127
|
+
fail_score: nil,
|
|
128
|
+
# Percentage (0-100) of messages on this channel that reached a successful
|
|
129
|
+
# terminal state: SENT/DELIVERED/READ for outbound, RECEIVED for inbound.
|
|
130
|
+
success_score: nil
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
sig do
|
|
135
|
+
override.returns(
|
|
136
|
+
{ channel: String, fail_score: Integer, success_score: Integer }
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
def to_hash
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class ContactResponse < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::ContactResponse, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Unique identifier for the contact
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :id
|
|
14
|
+
|
|
15
|
+
sig { params(id: String).void }
|
|
16
|
+
attr_writer :id
|
|
17
|
+
|
|
18
|
+
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_reader :available_channels
|
|
21
|
+
|
|
22
|
+
sig { params(available_channels: String).void }
|
|
23
|
+
attr_writer :available_channels
|
|
24
|
+
|
|
25
|
+
# Country calling code (e.g., 1 for US/Canada)
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :country_code
|
|
28
|
+
|
|
29
|
+
sig { params(country_code: String).void }
|
|
30
|
+
attr_writer :country_code
|
|
31
|
+
|
|
32
|
+
# When the contact was created
|
|
33
|
+
sig { returns(T.nilable(Time)) }
|
|
34
|
+
attr_reader :created_at
|
|
35
|
+
|
|
36
|
+
sig { params(created_at: Time).void }
|
|
37
|
+
attr_writer :created_at
|
|
38
|
+
|
|
39
|
+
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
40
|
+
# Says whose resource this is, which the resource's own id does not.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_reader :customer_id
|
|
43
|
+
|
|
44
|
+
sig { params(customer_id: String).void }
|
|
45
|
+
attr_writer :customer_id
|
|
46
|
+
|
|
47
|
+
# Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
48
|
+
sig { returns(T.nilable(String)) }
|
|
49
|
+
attr_reader :default_channel
|
|
50
|
+
|
|
51
|
+
sig { params(default_channel: String).void }
|
|
52
|
+
attr_writer :default_channel
|
|
53
|
+
|
|
54
|
+
# Phone number in E.164 format (e.g., +1234567890)
|
|
55
|
+
sig { returns(T.nilable(String)) }
|
|
56
|
+
attr_reader :format_e164
|
|
57
|
+
|
|
58
|
+
sig { params(format_e164: String).void }
|
|
59
|
+
attr_writer :format_e164
|
|
60
|
+
|
|
61
|
+
# Phone number in international format (e.g., +1 234-567-890)
|
|
62
|
+
sig { returns(T.nilable(String)) }
|
|
63
|
+
attr_reader :format_international
|
|
64
|
+
|
|
65
|
+
sig { params(format_international: String).void }
|
|
66
|
+
attr_writer :format_international
|
|
67
|
+
|
|
68
|
+
# Phone number in national format (e.g., (234) 567-890)
|
|
69
|
+
sig { returns(T.nilable(String)) }
|
|
70
|
+
attr_reader :format_national
|
|
71
|
+
|
|
72
|
+
sig { params(format_national: String).void }
|
|
73
|
+
attr_writer :format_national
|
|
74
|
+
|
|
75
|
+
# Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
76
|
+
sig { returns(T.nilable(String)) }
|
|
77
|
+
attr_reader :format_rfc
|
|
78
|
+
|
|
79
|
+
sig { params(format_rfc: String).void }
|
|
80
|
+
attr_writer :format_rfc
|
|
81
|
+
|
|
82
|
+
# Always false. Contacts are no longer shared or inherited between sender profiles
|
|
83
|
+
# — a profile sees only the contacts it owns. Retained so existing v3 clients
|
|
84
|
+
# reading is_inherited keep deserializing; it carries no information.
|
|
85
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
86
|
+
attr_reader :is_inherited
|
|
87
|
+
|
|
88
|
+
sig { params(is_inherited: T::Boolean).void }
|
|
89
|
+
attr_writer :is_inherited
|
|
90
|
+
|
|
91
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
92
|
+
# is per-contact, not per-channel.
|
|
93
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
94
|
+
attr_reader :opt_out
|
|
95
|
+
|
|
96
|
+
sig { params(opt_out: T::Boolean).void }
|
|
97
|
+
attr_writer :opt_out
|
|
98
|
+
|
|
99
|
+
# Phone number in original format
|
|
100
|
+
sig { returns(T.nilable(String)) }
|
|
101
|
+
attr_reader :phone_number
|
|
102
|
+
|
|
103
|
+
sig { params(phone_number: String).void }
|
|
104
|
+
attr_writer :phone_number
|
|
105
|
+
|
|
106
|
+
# ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
107
|
+
sig { returns(T.nilable(String)) }
|
|
108
|
+
attr_reader :region_code
|
|
109
|
+
|
|
110
|
+
sig { params(region_code: String).void }
|
|
111
|
+
attr_writer :region_code
|
|
112
|
+
|
|
113
|
+
# When the contact was last updated
|
|
114
|
+
sig { returns(T.nilable(Time)) }
|
|
115
|
+
attr_accessor :updated_at
|
|
116
|
+
|
|
117
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
118
|
+
sig do
|
|
119
|
+
params(
|
|
120
|
+
id: String,
|
|
121
|
+
available_channels: String,
|
|
122
|
+
country_code: String,
|
|
123
|
+
created_at: Time,
|
|
124
|
+
customer_id: String,
|
|
125
|
+
default_channel: String,
|
|
126
|
+
format_e164: String,
|
|
127
|
+
format_international: String,
|
|
128
|
+
format_national: String,
|
|
129
|
+
format_rfc: String,
|
|
130
|
+
is_inherited: T::Boolean,
|
|
131
|
+
opt_out: T::Boolean,
|
|
132
|
+
phone_number: String,
|
|
133
|
+
region_code: String,
|
|
134
|
+
updated_at: T.nilable(Time)
|
|
135
|
+
).returns(T.attached_class)
|
|
136
|
+
end
|
|
137
|
+
def self.new(
|
|
138
|
+
# Unique identifier for the contact
|
|
139
|
+
id: nil,
|
|
140
|
+
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
141
|
+
available_channels: nil,
|
|
142
|
+
# Country calling code (e.g., 1 for US/Canada)
|
|
143
|
+
country_code: nil,
|
|
144
|
+
# When the contact was created
|
|
145
|
+
created_at: nil,
|
|
146
|
+
# Which customer owns this — the key's own, or the profile named in x-profile-id.
|
|
147
|
+
# Says whose resource this is, which the resource's own id does not.
|
|
148
|
+
customer_id: nil,
|
|
149
|
+
# Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
150
|
+
default_channel: nil,
|
|
151
|
+
# Phone number in E.164 format (e.g., +1234567890)
|
|
152
|
+
format_e164: nil,
|
|
153
|
+
# Phone number in international format (e.g., +1 234-567-890)
|
|
154
|
+
format_international: nil,
|
|
155
|
+
# Phone number in national format (e.g., (234) 567-890)
|
|
156
|
+
format_national: nil,
|
|
157
|
+
# Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
158
|
+
format_rfc: nil,
|
|
159
|
+
# Always false. Contacts are no longer shared or inherited between sender profiles
|
|
160
|
+
# — a profile sees only the contacts it owns. Retained so existing v3 clients
|
|
161
|
+
# reading is_inherited keep deserializing; it carries no information.
|
|
162
|
+
is_inherited: nil,
|
|
163
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
164
|
+
# is per-contact, not per-channel.
|
|
165
|
+
opt_out: nil,
|
|
166
|
+
# Phone number in original format
|
|
167
|
+
phone_number: nil,
|
|
168
|
+
# ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
169
|
+
region_code: nil,
|
|
170
|
+
# When the contact was last updated
|
|
171
|
+
updated_at: nil
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
sig do
|
|
176
|
+
override.returns(
|
|
177
|
+
{
|
|
178
|
+
id: String,
|
|
179
|
+
available_channels: String,
|
|
180
|
+
country_code: String,
|
|
181
|
+
created_at: Time,
|
|
182
|
+
customer_id: String,
|
|
183
|
+
default_channel: String,
|
|
184
|
+
format_e164: String,
|
|
185
|
+
format_international: String,
|
|
186
|
+
format_national: String,
|
|
187
|
+
format_rfc: String,
|
|
188
|
+
is_inherited: T::Boolean,
|
|
189
|
+
opt_out: T::Boolean,
|
|
190
|
+
phone_number: String,
|
|
191
|
+
region_code: String,
|
|
192
|
+
updated_at: T.nilable(Time)
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
def to_hash
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|