sentdm 0.18.0 → 0.19.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 +13 -0
- data/README.md +1 -31
- data/lib/sentdm/internal/transport/base_client.rb +2 -0
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/internal/type/enum.rb +0 -25
- data/lib/sentdm/models/contact_create_response.rb +236 -0
- data/lib/sentdm/models/contact_delete_params.rb +16 -2
- data/lib/sentdm/models/contact_list_response.rb +278 -12
- data/lib/sentdm/models/contact_retrieve_response.rb +236 -0
- data/lib/sentdm/models/contact_update_params.rb +4 -16
- data/lib/sentdm/models/contact_update_response.rb +236 -0
- data/lib/sentdm/models/me_retrieve_response.rb +204 -12
- data/lib/sentdm/models/message_retrieve_activities_response.rb +74 -6
- data/lib/sentdm/models/message_retrieve_status_response.rb +87 -7
- data/lib/sentdm/models/message_send_params.rb +2 -2
- data/lib/sentdm/models/message_send_response.rb +74 -6
- 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 +423 -9
- data/lib/sentdm/models/profile_create_response.rb +781 -0
- data/lib/sentdm/models/profile_delete_params.rb +16 -2
- data/lib/sentdm/models/profile_list_response.rb +753 -9
- data/lib/sentdm/models/profile_retrieve_response.rb +783 -0
- data/lib/sentdm/models/profile_update_params.rb +423 -9
- data/lib/sentdm/models/profile_update_response.rb +781 -0
- data/lib/sentdm/models/profiles/campaign_create_params.rb +165 -3
- data/lib/sentdm/models/profiles/campaign_create_response.rb +459 -0
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +17 -2
- data/lib/sentdm/models/profiles/campaign_list_response.rb +420 -9
- data/lib/sentdm/models/profiles/campaign_update_params.rb +165 -3
- data/lib/sentdm/models/profiles/campaign_update_response.rb +459 -0
- data/lib/sentdm/models/template_create_params.rb +889 -3
- data/lib/sentdm/models/template_create_response.rb +197 -0
- data/lib/sentdm/models/template_list_response.rb +242 -12
- data/lib/sentdm/models/template_retrieve_response.rb +197 -0
- data/lib/sentdm/models/template_update_params.rb +889 -3
- data/lib/sentdm/models/template_update_response.rb +197 -0
- data/lib/sentdm/models/user_invite_response.rb +189 -0
- data/lib/sentdm/models/user_list_response.rb +154 -9
- data/lib/sentdm/models/user_remove_params.rb +16 -2
- data/lib/sentdm/models/user_retrieve_response.rb +189 -0
- data/lib/sentdm/models/user_update_role_response.rb +189 -0
- data/lib/sentdm/models/webhook_create_response.rb +204 -0
- data/lib/sentdm/models/webhook_list_event_types_response.rb +118 -9
- data/lib/sentdm/models/webhook_list_events_response.rb +153 -9
- data/lib/sentdm/models/webhook_list_response.rb +247 -12
- data/lib/sentdm/models/webhook_retrieve_response.rb +204 -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 +204 -0
- data/lib/sentdm/models/webhook_update_response.rb +204 -0
- data/lib/sentdm/models.rb +0 -77
- data/lib/sentdm/resources/contacts.rb +8 -10
- data/lib/sentdm/resources/profiles/campaigns.rb +6 -6
- data/lib/sentdm/resources/profiles.rb +12 -12
- data/lib/sentdm/resources/templates.rb +8 -8
- data/lib/sentdm/resources/users.rb +6 -6
- data/lib/sentdm/resources/webhooks.rb +8 -8
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +18 -40
- data/rbi/sentdm/models/contact_create_response.rbi +390 -0
- data/rbi/sentdm/models/contact_delete_params.rbi +19 -2
- data/rbi/sentdm/models/contact_list_response.rbi +505 -16
- data/rbi/sentdm/models/contact_retrieve_response.rbi +392 -0
- data/rbi/sentdm/models/contact_update_params.rbi +4 -20
- data/rbi/sentdm/models/contact_update_response.rbi +390 -0
- data/rbi/sentdm/models/me_retrieve_response.rbi +335 -16
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +154 -8
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +171 -11
- data/rbi/sentdm/models/message_send_params.rbi +4 -4
- data/rbi/sentdm/models/message_send_response.rbi +135 -8
- 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 +810 -12
- data/rbi/sentdm/models/profile_create_response.rbi +1439 -0
- data/rbi/sentdm/models/profile_delete_params.rbi +19 -2
- data/rbi/sentdm/models/profile_list_response.rbi +1400 -14
- data/rbi/sentdm/models/profile_retrieve_response.rbi +1443 -0
- data/rbi/sentdm/models/profile_update_params.rbi +810 -12
- data/rbi/sentdm/models/profile_update_response.rbi +1439 -0
- data/rbi/sentdm/models/profiles/campaign_create_params.rbi +289 -4
- data/rbi/sentdm/models/profiles/campaign_create_response.rbi +814 -0
- data/rbi/sentdm/models/profiles/campaign_delete_params.rbi +14 -1
- data/rbi/sentdm/models/profiles/campaign_list_response.rbi +733 -11
- data/rbi/sentdm/models/profiles/campaign_update_params.rbi +289 -4
- data/rbi/sentdm/models/profiles/campaign_update_response.rbi +814 -0
- data/rbi/sentdm/models/template_create_params.rbi +1701 -4
- data/rbi/sentdm/models/template_create_response.rbi +339 -0
- data/rbi/sentdm/models/template_list_response.rbi +454 -16
- data/rbi/sentdm/models/template_retrieve_response.rbi +345 -0
- data/rbi/sentdm/models/template_update_params.rbi +1701 -4
- data/rbi/sentdm/models/template_update_response.rbi +339 -0
- data/rbi/sentdm/models/user_invite_response.rbi +323 -0
- data/rbi/sentdm/models/user_list_response.rbi +271 -14
- data/rbi/sentdm/models/user_remove_params.rbi +19 -2
- data/rbi/sentdm/models/user_retrieve_response.rbi +323 -0
- data/rbi/sentdm/models/user_update_role_response.rbi +328 -0
- data/rbi/sentdm/models/webhook_create_response.rbi +348 -0
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +247 -12
- data/rbi/sentdm/models/webhook_list_events_response.rbi +314 -12
- data/rbi/sentdm/models/webhook_list_response.rbi +462 -16
- data/rbi/sentdm/models/webhook_retrieve_response.rbi +350 -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 +366 -0
- data/rbi/sentdm/models/webhook_update_response.rbi +348 -0
- data/rbi/sentdm/models.rbi +0 -77
- data/rbi/sentdm/resources/contacts.rbi +5 -12
- data/rbi/sentdm/resources/messages.rbi +2 -2
- data/rbi/sentdm/resources/profiles/campaigns.rbi +4 -4
- data/rbi/sentdm/resources/profiles.rbi +13 -9
- data/rbi/sentdm/resources/templates.rbi +6 -5
- data/rbi/sentdm/resources/users.rbi +3 -3
- data/rbi/sentdm/resources/webhooks.rbi +4 -4
- data/sig/sentdm/models/contact_create_response.rbs +209 -0
- data/sig/sentdm/models/contact_delete_params.rbs +10 -6
- data/sig/sentdm/models/contact_list_response.rbs +256 -20
- data/sig/sentdm/models/contact_retrieve_response.rbs +209 -0
- data/sig/sentdm/models/contact_update_params.rbs +0 -5
- data/sig/sentdm/models/contact_update_response.rbs +209 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +176 -18
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +71 -9
- data/sig/sentdm/models/message_retrieve_status_response.rbs +95 -13
- 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 +363 -12
- data/sig/sentdm/models/profile_create_response.rbs +662 -0
- data/sig/sentdm/models/profile_delete_params.rbs +10 -6
- data/sig/sentdm/models/profile_list_response.rbs +645 -15
- data/sig/sentdm/models/profile_retrieve_response.rbs +662 -0
- data/sig/sentdm/models/profile_update_params.rbs +363 -12
- data/sig/sentdm/models/profile_update_response.rbs +662 -0
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +138 -4
- data/sig/sentdm/models/profiles/campaign_create_response.rbs +424 -0
- data/sig/sentdm/models/profiles/campaign_delete_params.rbs +15 -8
- data/sig/sentdm/models/profiles/campaign_list_response.rbs +396 -13
- data/sig/sentdm/models/profiles/campaign_update_params.rbs +138 -4
- data/sig/sentdm/models/profiles/campaign_update_response.rbs +424 -0
- data/sig/sentdm/models/template_create_params.rbs +853 -6
- data/sig/sentdm/models/template_create_response.rbs +177 -0
- data/sig/sentdm/models/template_list_response.rbs +225 -19
- data/sig/sentdm/models/template_retrieve_response.rbs +177 -0
- data/sig/sentdm/models/template_update_params.rbs +851 -4
- data/sig/sentdm/models/template_update_response.rbs +177 -0
- data/sig/sentdm/models/user_invite_response.rbs +170 -0
- data/sig/sentdm/models/user_list_response.rbs +151 -15
- data/sig/sentdm/models/user_remove_params.rbs +10 -6
- data/sig/sentdm/models/user_retrieve_response.rbs +170 -0
- data/sig/sentdm/models/user_update_role_response.rbs +170 -0
- data/sig/sentdm/models/webhook_create_response.rbs +201 -0
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +130 -15
- data/sig/sentdm/models/webhook_list_events_response.rbs +142 -14
- data/sig/sentdm/models/webhook_list_response.rbs +248 -20
- data/sig/sentdm/models/webhook_retrieve_response.rbs +201 -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 +201 -0
- data/sig/sentdm/models/webhook_update_response.rbs +201 -0
- data/sig/sentdm/models.rbs +0 -68
- data/sig/sentdm/resources/contacts.rbs +3 -4
- data/sig/sentdm/resources/profiles/campaigns.rbs +4 -4
- data/sig/sentdm/resources/profiles.rbs +9 -9
- data/sig/sentdm/resources/templates.rbs +5 -5
- data/sig/sentdm/resources/users.rbs +3 -3
- data/sig/sentdm/resources/webhooks.rbs +4 -4
- metadata +56 -122
- 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_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/brands_brand_data.rb +0 -38
- data/lib/sentdm/models/contact_response.rb +0 -136
- data/lib/sentdm/models/destination_country.rb +0 -21
- 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 -605
- data/lib/sentdm/models/profile_settings.rb +0 -66
- data/lib/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rb +0 -45
- data/lib/sentdm/models/profiles/base_dto.rb +0 -32
- data/lib/sentdm/models/profiles/campaign_data.rb +0 -123
- data/lib/sentdm/models/profiles/messaging_use_case_us.rb +0 -28
- data/lib/sentdm/models/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +0 -29
- data/lib/sentdm/models/profiles/tcr_campaign_with_use_cases.rb +0 -236
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rb +0 -34
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rb +0 -40
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rb +0 -38
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rb +0 -81
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rb +0 -34
- data/lib/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rb +0 -39
- data/lib/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rb +0 -116
- data/lib/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rb +0 -75
- data/lib/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rb +0 -58
- data/lib/sentdm/models/tcr_brand_relationship.rb +0 -18
- data/lib/sentdm/models/tcr_vertical.rb +0 -36
- data/lib/sentdm/models/template.rb +0 -90
- data/lib/sentdm/models/template_body_content.rb +0 -27
- data/lib/sentdm/models/template_definition.rb +0 -66
- data/lib/sentdm/models/template_variable.rb +0 -80
- 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_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/brands_brand_data.rbi +0 -104
- data/rbi/sentdm/models/contact_response.rbi +0 -195
- data/rbi/sentdm/models/destination_country.rbi +0 -32
- 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 -874
- data/rbi/sentdm/models/profile_settings.rbi +0 -86
- data/rbi/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rbi +0 -83
- data/rbi/sentdm/models/profiles/base_dto.rbi +0 -53
- data/rbi/sentdm/models/profiles/campaign_data.rbi +0 -148
- data/rbi/sentdm/models/profiles/messaging_use_case_us.rbi +0 -73
- data/rbi/sentdm/models/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +0 -51
- data/rbi/sentdm/models/profiles/tcr_campaign_with_use_cases.rbi +0 -410
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbi +0 -56
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbi +0 -76
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbi +0 -72
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbi +0 -104
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbi +0 -57
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +0 -59
- data/rbi/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbi +0 -180
- data/rbi/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbi +0 -95
- data/rbi/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbi +0 -81
- data/rbi/sentdm/models/tcr_brand_relationship.rbi +0 -30
- data/rbi/sentdm/models/tcr_vertical.rbi +0 -41
- data/rbi/sentdm/models/template.rbi +0 -129
- data/rbi/sentdm/models/template_body_content.rbi +0 -43
- data/rbi/sentdm/models/template_definition.rbi +0 -164
- data/rbi/sentdm/models/template_variable.rbi +0 -120
- 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_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/brands_brand_data.rbs +0 -30
- data/sig/sentdm/models/contact_response.rbs +0 -116
- data/sig/sentdm/models/destination_country.rbs +0 -19
- 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 -474
- data/sig/sentdm/models/profile_settings.rbs +0 -50
- data/sig/sentdm/models/profiles/api_response_of_tcr_campaign_with_use_cases.rbs +0 -41
- data/sig/sentdm/models/profiles/base_dto.rbs +0 -27
- data/sig/sentdm/models/profiles/campaign_data.rbs +0 -82
- data/sig/sentdm/models/profiles/messaging_use_case_us.rbs +0 -40
- data/sig/sentdm/models/profiles/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/profiles/tcr_campaign_with_use_cases.rbs +0 -285
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_authentication_config.rbs +0 -24
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_body.rbs +0 -30
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button.rbs +0 -32
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_button_props.rbs +0 -75
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_footer.rbs +0 -30
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +0 -30
- data/sig/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_business_info.rbs +0 -89
- data/sig/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_compliance_info.rbs +0 -55
- data/sig/sentdm/models/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_brands_brand_contact_info.rbs +0 -45
- data/sig/sentdm/models/tcr_brand_relationship.rbs +0 -22
- data/sig/sentdm/models/tcr_vertical.rbs +0 -58
- data/sig/sentdm/models/template.rbs +0 -79
- data/sig/sentdm/models/template_body_content.rbs +0 -30
- data/sig/sentdm/models/template_definition.rbs +0 -45
- data/sig/sentdm/models/template_variable.rbs +0 -84
- 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
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class ContactRetrieveResponse < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Sentdm::Models::ContactRetrieveResponse,
|
|
10
|
+
Sentdm::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
15
|
+
sig { returns(T.nilable(Sentdm::Models::ContactRetrieveResponse::Data)) }
|
|
16
|
+
attr_reader :data
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
params(
|
|
20
|
+
data: T.nilable(Sentdm::Models::ContactRetrieveResponse::Data::OrHash)
|
|
21
|
+
).void
|
|
22
|
+
end
|
|
23
|
+
attr_writer :data
|
|
24
|
+
|
|
25
|
+
# Error information
|
|
26
|
+
sig { returns(T.nilable(Sentdm::Models::ContactRetrieveResponse::Error)) }
|
|
27
|
+
attr_reader :error
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
params(
|
|
31
|
+
error:
|
|
32
|
+
T.nilable(Sentdm::Models::ContactRetrieveResponse::Error::OrHash)
|
|
33
|
+
).void
|
|
34
|
+
end
|
|
35
|
+
attr_writer :error
|
|
36
|
+
|
|
37
|
+
# Request and response metadata
|
|
38
|
+
sig { returns(T.nilable(Sentdm::Models::ContactRetrieveResponse::Meta)) }
|
|
39
|
+
attr_reader :meta
|
|
40
|
+
|
|
41
|
+
sig do
|
|
42
|
+
params(meta: Sentdm::Models::ContactRetrieveResponse::Meta::OrHash).void
|
|
43
|
+
end
|
|
44
|
+
attr_writer :meta
|
|
45
|
+
|
|
46
|
+
# Indicates whether the request was successful
|
|
47
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
48
|
+
attr_reader :success
|
|
49
|
+
|
|
50
|
+
sig { params(success: T::Boolean).void }
|
|
51
|
+
attr_writer :success
|
|
52
|
+
|
|
53
|
+
# Standard API response envelope for all v3 endpoints
|
|
54
|
+
sig do
|
|
55
|
+
params(
|
|
56
|
+
data:
|
|
57
|
+
T.nilable(Sentdm::Models::ContactRetrieveResponse::Data::OrHash),
|
|
58
|
+
error:
|
|
59
|
+
T.nilable(Sentdm::Models::ContactRetrieveResponse::Error::OrHash),
|
|
60
|
+
meta: Sentdm::Models::ContactRetrieveResponse::Meta::OrHash,
|
|
61
|
+
success: T::Boolean
|
|
62
|
+
).returns(T.attached_class)
|
|
63
|
+
end
|
|
64
|
+
def self.new(
|
|
65
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
66
|
+
data: nil,
|
|
67
|
+
# Error information
|
|
68
|
+
error: nil,
|
|
69
|
+
# Request and response metadata
|
|
70
|
+
meta: nil,
|
|
71
|
+
# Indicates whether the request was successful
|
|
72
|
+
success: nil
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
data: T.nilable(Sentdm::Models::ContactRetrieveResponse::Data),
|
|
80
|
+
error: T.nilable(Sentdm::Models::ContactRetrieveResponse::Error),
|
|
81
|
+
meta: Sentdm::Models::ContactRetrieveResponse::Meta,
|
|
82
|
+
success: T::Boolean
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
def to_hash
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
90
|
+
OrHash =
|
|
91
|
+
T.type_alias do
|
|
92
|
+
T.any(
|
|
93
|
+
Sentdm::Models::ContactRetrieveResponse::Data,
|
|
94
|
+
Sentdm::Internal::AnyHash
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Unique identifier for the contact
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_reader :id
|
|
101
|
+
|
|
102
|
+
sig { params(id: String).void }
|
|
103
|
+
attr_writer :id
|
|
104
|
+
|
|
105
|
+
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
106
|
+
sig { returns(T.nilable(String)) }
|
|
107
|
+
attr_reader :available_channels
|
|
108
|
+
|
|
109
|
+
sig { params(available_channels: String).void }
|
|
110
|
+
attr_writer :available_channels
|
|
111
|
+
|
|
112
|
+
# Country calling code (e.g., 1 for US/Canada)
|
|
113
|
+
sig { returns(T.nilable(String)) }
|
|
114
|
+
attr_reader :country_code
|
|
115
|
+
|
|
116
|
+
sig { params(country_code: String).void }
|
|
117
|
+
attr_writer :country_code
|
|
118
|
+
|
|
119
|
+
# When the contact was created
|
|
120
|
+
sig { returns(T.nilable(Time)) }
|
|
121
|
+
attr_reader :created_at
|
|
122
|
+
|
|
123
|
+
sig { params(created_at: Time).void }
|
|
124
|
+
attr_writer :created_at
|
|
125
|
+
|
|
126
|
+
# Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
127
|
+
sig { returns(T.nilable(String)) }
|
|
128
|
+
attr_reader :default_channel
|
|
129
|
+
|
|
130
|
+
sig { params(default_channel: String).void }
|
|
131
|
+
attr_writer :default_channel
|
|
132
|
+
|
|
133
|
+
# Phone number in E.164 format (e.g., +1234567890)
|
|
134
|
+
sig { returns(T.nilable(String)) }
|
|
135
|
+
attr_reader :format_e164
|
|
136
|
+
|
|
137
|
+
sig { params(format_e164: String).void }
|
|
138
|
+
attr_writer :format_e164
|
|
139
|
+
|
|
140
|
+
# Phone number in international format (e.g., +1 234-567-890)
|
|
141
|
+
sig { returns(T.nilable(String)) }
|
|
142
|
+
attr_reader :format_international
|
|
143
|
+
|
|
144
|
+
sig { params(format_international: String).void }
|
|
145
|
+
attr_writer :format_international
|
|
146
|
+
|
|
147
|
+
# Phone number in national format (e.g., (234) 567-890)
|
|
148
|
+
sig { returns(T.nilable(String)) }
|
|
149
|
+
attr_reader :format_national
|
|
150
|
+
|
|
151
|
+
sig { params(format_national: String).void }
|
|
152
|
+
attr_writer :format_national
|
|
153
|
+
|
|
154
|
+
# Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
155
|
+
sig { returns(T.nilable(String)) }
|
|
156
|
+
attr_reader :format_rfc
|
|
157
|
+
|
|
158
|
+
sig { params(format_rfc: String).void }
|
|
159
|
+
attr_writer :format_rfc
|
|
160
|
+
|
|
161
|
+
# Whether this is an inherited contact (read-only)
|
|
162
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
163
|
+
attr_reader :is_inherited
|
|
164
|
+
|
|
165
|
+
sig { params(is_inherited: T::Boolean).void }
|
|
166
|
+
attr_writer :is_inherited
|
|
167
|
+
|
|
168
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
169
|
+
# is per-contact, not per-channel.
|
|
170
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
171
|
+
attr_reader :opt_out
|
|
172
|
+
|
|
173
|
+
sig { params(opt_out: T::Boolean).void }
|
|
174
|
+
attr_writer :opt_out
|
|
175
|
+
|
|
176
|
+
# Phone number in original format
|
|
177
|
+
sig { returns(T.nilable(String)) }
|
|
178
|
+
attr_reader :phone_number
|
|
179
|
+
|
|
180
|
+
sig { params(phone_number: String).void }
|
|
181
|
+
attr_writer :phone_number
|
|
182
|
+
|
|
183
|
+
# ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
184
|
+
sig { returns(T.nilable(String)) }
|
|
185
|
+
attr_reader :region_code
|
|
186
|
+
|
|
187
|
+
sig { params(region_code: String).void }
|
|
188
|
+
attr_writer :region_code
|
|
189
|
+
|
|
190
|
+
# When the contact was last updated
|
|
191
|
+
sig { returns(T.nilable(Time)) }
|
|
192
|
+
attr_accessor :updated_at
|
|
193
|
+
|
|
194
|
+
# Contact response for v3 API Uses snake_case for JSON property names
|
|
195
|
+
sig do
|
|
196
|
+
params(
|
|
197
|
+
id: String,
|
|
198
|
+
available_channels: String,
|
|
199
|
+
country_code: String,
|
|
200
|
+
created_at: Time,
|
|
201
|
+
default_channel: String,
|
|
202
|
+
format_e164: String,
|
|
203
|
+
format_international: String,
|
|
204
|
+
format_national: String,
|
|
205
|
+
format_rfc: String,
|
|
206
|
+
is_inherited: T::Boolean,
|
|
207
|
+
opt_out: T::Boolean,
|
|
208
|
+
phone_number: String,
|
|
209
|
+
region_code: String,
|
|
210
|
+
updated_at: T.nilable(Time)
|
|
211
|
+
).returns(T.attached_class)
|
|
212
|
+
end
|
|
213
|
+
def self.new(
|
|
214
|
+
# Unique identifier for the contact
|
|
215
|
+
id: nil,
|
|
216
|
+
# Comma-separated list of available messaging channels (e.g., "sms,whatsapp")
|
|
217
|
+
available_channels: nil,
|
|
218
|
+
# Country calling code (e.g., 1 for US/Canada)
|
|
219
|
+
country_code: nil,
|
|
220
|
+
# When the contact was created
|
|
221
|
+
created_at: nil,
|
|
222
|
+
# Default messaging channel to use (e.g., "sms" or "whatsapp")
|
|
223
|
+
default_channel: nil,
|
|
224
|
+
# Phone number in E.164 format (e.g., +1234567890)
|
|
225
|
+
format_e164: nil,
|
|
226
|
+
# Phone number in international format (e.g., +1 234-567-890)
|
|
227
|
+
format_international: nil,
|
|
228
|
+
# Phone number in national format (e.g., (234) 567-890)
|
|
229
|
+
format_national: nil,
|
|
230
|
+
# Phone number in RFC 3966 format (e.g., tel:+1-234-567-890)
|
|
231
|
+
format_rfc: nil,
|
|
232
|
+
# Whether this is an inherited contact (read-only)
|
|
233
|
+
is_inherited: nil,
|
|
234
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
235
|
+
# is per-contact, not per-channel.
|
|
236
|
+
opt_out: nil,
|
|
237
|
+
# Phone number in original format
|
|
238
|
+
phone_number: nil,
|
|
239
|
+
# ISO 3166-1 alpha-2 country code (e.g., US, CA, GB)
|
|
240
|
+
region_code: nil,
|
|
241
|
+
# When the contact was last updated
|
|
242
|
+
updated_at: nil
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
sig do
|
|
247
|
+
override.returns(
|
|
248
|
+
{
|
|
249
|
+
id: String,
|
|
250
|
+
available_channels: String,
|
|
251
|
+
country_code: String,
|
|
252
|
+
created_at: Time,
|
|
253
|
+
default_channel: String,
|
|
254
|
+
format_e164: String,
|
|
255
|
+
format_international: String,
|
|
256
|
+
format_national: String,
|
|
257
|
+
format_rfc: String,
|
|
258
|
+
is_inherited: T::Boolean,
|
|
259
|
+
opt_out: T::Boolean,
|
|
260
|
+
phone_number: String,
|
|
261
|
+
region_code: String,
|
|
262
|
+
updated_at: T.nilable(Time)
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
end
|
|
266
|
+
def to_hash
|
|
267
|
+
end
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
class Error < Sentdm::Internal::Type::BaseModel
|
|
271
|
+
OrHash =
|
|
272
|
+
T.type_alias do
|
|
273
|
+
T.any(
|
|
274
|
+
Sentdm::Models::ContactRetrieveResponse::Error,
|
|
275
|
+
Sentdm::Internal::AnyHash
|
|
276
|
+
)
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
# Machine-readable error code (e.g., "RESOURCE_001")
|
|
280
|
+
sig { returns(T.nilable(String)) }
|
|
281
|
+
attr_reader :code
|
|
282
|
+
|
|
283
|
+
sig { params(code: String).void }
|
|
284
|
+
attr_writer :code
|
|
285
|
+
|
|
286
|
+
# Additional validation error details (field-level errors)
|
|
287
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
|
|
288
|
+
attr_accessor :details
|
|
289
|
+
|
|
290
|
+
# URL to documentation about this error
|
|
291
|
+
sig { returns(T.nilable(String)) }
|
|
292
|
+
attr_accessor :doc_url
|
|
293
|
+
|
|
294
|
+
# Human-readable error message
|
|
295
|
+
sig { returns(T.nilable(String)) }
|
|
296
|
+
attr_reader :message
|
|
297
|
+
|
|
298
|
+
sig { params(message: String).void }
|
|
299
|
+
attr_writer :message
|
|
300
|
+
|
|
301
|
+
# Error information
|
|
302
|
+
sig do
|
|
303
|
+
params(
|
|
304
|
+
code: String,
|
|
305
|
+
details: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
306
|
+
doc_url: T.nilable(String),
|
|
307
|
+
message: String
|
|
308
|
+
).returns(T.attached_class)
|
|
309
|
+
end
|
|
310
|
+
def self.new(
|
|
311
|
+
# Machine-readable error code (e.g., "RESOURCE_001")
|
|
312
|
+
code: nil,
|
|
313
|
+
# Additional validation error details (field-level errors)
|
|
314
|
+
details: nil,
|
|
315
|
+
# URL to documentation about this error
|
|
316
|
+
doc_url: nil,
|
|
317
|
+
# Human-readable error message
|
|
318
|
+
message: nil
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
sig do
|
|
323
|
+
override.returns(
|
|
324
|
+
{
|
|
325
|
+
code: String,
|
|
326
|
+
details: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
327
|
+
doc_url: T.nilable(String),
|
|
328
|
+
message: String
|
|
329
|
+
}
|
|
330
|
+
)
|
|
331
|
+
end
|
|
332
|
+
def to_hash
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
class Meta < Sentdm::Internal::Type::BaseModel
|
|
337
|
+
OrHash =
|
|
338
|
+
T.type_alias do
|
|
339
|
+
T.any(
|
|
340
|
+
Sentdm::Models::ContactRetrieveResponse::Meta,
|
|
341
|
+
Sentdm::Internal::AnyHash
|
|
342
|
+
)
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
# Unique identifier for this request (for tracing and support)
|
|
346
|
+
sig { returns(T.nilable(String)) }
|
|
347
|
+
attr_reader :request_id
|
|
348
|
+
|
|
349
|
+
sig { params(request_id: String).void }
|
|
350
|
+
attr_writer :request_id
|
|
351
|
+
|
|
352
|
+
# Server timestamp when the response was generated
|
|
353
|
+
sig { returns(T.nilable(Time)) }
|
|
354
|
+
attr_reader :timestamp
|
|
355
|
+
|
|
356
|
+
sig { params(timestamp: Time).void }
|
|
357
|
+
attr_writer :timestamp
|
|
358
|
+
|
|
359
|
+
# API version used for this request
|
|
360
|
+
sig { returns(T.nilable(String)) }
|
|
361
|
+
attr_reader :version
|
|
362
|
+
|
|
363
|
+
sig { params(version: String).void }
|
|
364
|
+
attr_writer :version
|
|
365
|
+
|
|
366
|
+
# Request and response metadata
|
|
367
|
+
sig do
|
|
368
|
+
params(request_id: String, timestamp: Time, version: String).returns(
|
|
369
|
+
T.attached_class
|
|
370
|
+
)
|
|
371
|
+
end
|
|
372
|
+
def self.new(
|
|
373
|
+
# Unique identifier for this request (for tracing and support)
|
|
374
|
+
request_id: nil,
|
|
375
|
+
# Server timestamp when the response was generated
|
|
376
|
+
timestamp: nil,
|
|
377
|
+
# API version used for this request
|
|
378
|
+
version: nil
|
|
379
|
+
)
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
sig do
|
|
383
|
+
override.returns(
|
|
384
|
+
{ request_id: String, timestamp: Time, version: String }
|
|
385
|
+
)
|
|
386
|
+
end
|
|
387
|
+
def to_hash
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
end
|
|
391
|
+
end
|
|
392
|
+
end
|
|
@@ -14,20 +14,12 @@ module Sentdm
|
|
|
14
14
|
sig { returns(String) }
|
|
15
15
|
attr_accessor :id
|
|
16
16
|
|
|
17
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
18
|
-
# "opted_out". All entries must have the same status — mixed values (e.g., sms:
|
|
19
|
-
# opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
|
|
20
|
-
# applied to ALL channels regardless of which keys are specified, because consent
|
|
21
|
-
# is global across channels. When provided, takes precedence over the opt_out
|
|
22
|
-
# field.
|
|
23
|
-
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
24
|
-
attr_accessor :channel_consent
|
|
25
|
-
|
|
26
17
|
# Default messaging channel: "sms" or "whatsapp"
|
|
27
18
|
sig { returns(T.nilable(String)) }
|
|
28
19
|
attr_accessor :default_channel
|
|
29
20
|
|
|
30
|
-
# Whether the contact has opted out of messaging
|
|
21
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
22
|
+
# is per-contact, not per-channel.
|
|
31
23
|
sig { returns(T.nilable(T::Boolean)) }
|
|
32
24
|
attr_accessor :opt_out
|
|
33
25
|
|
|
@@ -54,7 +46,6 @@ module Sentdm
|
|
|
54
46
|
sig do
|
|
55
47
|
params(
|
|
56
48
|
id: String,
|
|
57
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
58
49
|
default_channel: T.nilable(String),
|
|
59
50
|
opt_out: T.nilable(T::Boolean),
|
|
60
51
|
sandbox: T::Boolean,
|
|
@@ -65,16 +56,10 @@ module Sentdm
|
|
|
65
56
|
end
|
|
66
57
|
def self.new(
|
|
67
58
|
id:,
|
|
68
|
-
# Consent status by channel. Keys: "sms", "whatsapp". Values: "opted_in",
|
|
69
|
-
# "opted_out". All entries must have the same status — mixed values (e.g., sms:
|
|
70
|
-
# opted_out + whatsapp: opted_in) are rejected with 400. The provided status is
|
|
71
|
-
# applied to ALL channels regardless of which keys are specified, because consent
|
|
72
|
-
# is global across channels. When provided, takes precedence over the opt_out
|
|
73
|
-
# field.
|
|
74
|
-
channel_consent: nil,
|
|
75
59
|
# Default messaging channel: "sms" or "whatsapp"
|
|
76
60
|
default_channel: nil,
|
|
77
|
-
# Whether the contact has opted out of messaging
|
|
61
|
+
# Whether the contact has opted out of messaging. Single source of truth — opt-out
|
|
62
|
+
# is per-contact, not per-channel.
|
|
78
63
|
opt_out: nil,
|
|
79
64
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
80
65
|
# for testing integrations without actual execution
|
|
@@ -89,7 +74,6 @@ module Sentdm
|
|
|
89
74
|
override.returns(
|
|
90
75
|
{
|
|
91
76
|
id: String,
|
|
92
|
-
channel_consent: T.nilable(T::Hash[Symbol, String]),
|
|
93
77
|
default_channel: T.nilable(String),
|
|
94
78
|
opt_out: T.nilable(T::Boolean),
|
|
95
79
|
sandbox: T::Boolean,
|