sentdm 0.3.1 → 0.5.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 +16 -0
- data/README.md +1 -27
- data/lib/sentdm/client.rb +5 -9
- data/lib/sentdm/internal/type/base_model.rb +5 -5
- data/lib/sentdm/models/api_meta.rb +1 -9
- data/lib/sentdm/models/{api_response_contact.rb → api_response_of_contact.rb} +4 -4
- data/lib/sentdm/models/base_dto.rb +30 -0
- data/lib/sentdm/models/billing_contact_info.rb +47 -0
- data/lib/sentdm/models/brands_brand_data.rb +274 -0
- data/lib/sentdm/models/contact_create_params.rb +13 -6
- data/lib/sentdm/models/contact_delete_params.rb +9 -2
- data/lib/sentdm/models/contact_list_params.rb +10 -2
- data/lib/sentdm/models/contact_list_response.rb +3 -3
- data/lib/sentdm/models/{contact.rb → contact_response.rb} +1 -1
- data/lib/sentdm/models/contact_retrieve_params.rb +7 -1
- data/lib/sentdm/models/contact_update_params.rb +13 -6
- data/lib/sentdm/models/me_retrieve_params.rb +7 -1
- data/lib/sentdm/models/me_retrieve_response.rb +152 -7
- data/lib/sentdm/models/message_retrieve_activities_params.rb +7 -1
- data/lib/sentdm/models/message_retrieve_activities_response.rb +19 -5
- data/lib/sentdm/models/message_retrieve_status_params.rb +7 -1
- data/lib/sentdm/models/message_retrieve_status_response.rb +8 -1
- data/lib/sentdm/models/message_send_params.rb +17 -10
- data/lib/sentdm/models/mutation_request_base.rb +20 -0
- data/lib/sentdm/models/{lookup_retrieve_phone_info_params.rb → number_lookup_params.rb} +9 -3
- data/lib/sentdm/models/{lookup_retrieve_phone_info_response.rb → number_lookup_response.rb} +21 -21
- data/lib/sentdm/models/payment_details.rb +44 -0
- data/lib/sentdm/models/{profile_complete_params.rb → profile_complete_setup_params.rb} +16 -9
- data/lib/sentdm/models/{profile_complete_response.rb → profile_complete_setup_response.rb} +1 -1
- data/lib/sentdm/models/profile_create_params.rb +111 -11
- data/lib/sentdm/models/profile_delete_params.rb +18 -18
- data/lib/sentdm/models/profile_detail.rb +483 -68
- data/lib/sentdm/models/profile_list_params.rb +7 -1
- data/lib/sentdm/models/profile_retrieve_params.rb +7 -1
- data/lib/sentdm/models/profile_update_params.rb +60 -22
- data/lib/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rb → profiles/api_response_of_tcr_campaign_with_use_cases.rb} +6 -6
- data/lib/sentdm/models/profiles/campaign_create_params.rb +57 -0
- data/lib/sentdm/models/{brands → profiles}/campaign_data.rb +28 -7
- data/lib/sentdm/models/profiles/campaign_delete_params.rb +50 -0
- data/lib/sentdm/models/profiles/campaign_list_params.rb +28 -0
- data/lib/sentdm/models/{brands → profiles}/campaign_list_response.rb +5 -5
- data/lib/sentdm/models/profiles/campaign_update_params.rb +64 -0
- data/lib/sentdm/models/{brands → profiles}/messaging_use_case_us.rb +1 -1
- data/lib/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rb +15 -15
- data/lib/sentdm/models/template_create_params.rb +17 -10
- data/lib/sentdm/models/template_definition.rb +255 -15
- data/lib/sentdm/models/template_delete_params.rb +13 -6
- data/lib/sentdm/models/template_list_params.rb +18 -2
- data/lib/sentdm/models/template_retrieve_params.rb +7 -1
- data/lib/sentdm/models/template_update_params.rb +17 -10
- data/lib/sentdm/models/template_variable.rb +7 -1
- data/lib/sentdm/models/user_invite_params.rb +13 -6
- data/lib/sentdm/models/user_list_params.rb +7 -1
- data/lib/sentdm/models/user_remove_params.rb +17 -17
- data/lib/sentdm/models/user_retrieve_params.rb +7 -1
- data/lib/sentdm/models/user_update_role_params.rb +15 -16
- data/lib/sentdm/models/webhook_create_params.rb +13 -6
- data/lib/sentdm/models/webhook_delete_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_event_types_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_events_params.rb +7 -1
- data/lib/sentdm/models/webhook_list_params.rb +7 -1
- data/lib/sentdm/models/webhook_retrieve_params.rb +7 -1
- data/lib/sentdm/models/webhook_rotate_secret_params.rb +8 -2
- data/lib/sentdm/models/webhook_test_params.rb +13 -6
- data/lib/sentdm/models/webhook_toggle_status_params.rb +13 -6
- data/lib/sentdm/models/webhook_update_params.rb +13 -6
- data/lib/sentdm/models.rb +14 -38
- data/lib/sentdm/resources/contacts.rb +49 -26
- data/lib/sentdm/resources/me.rb +24 -5
- data/lib/sentdm/resources/messages.rb +24 -8
- data/lib/sentdm/resources/numbers.rb +44 -0
- data/lib/sentdm/resources/profiles/campaigns.rb +160 -0
- data/lib/sentdm/resources/profiles.rb +125 -36
- data/lib/sentdm/resources/templates.rb +47 -24
- data/lib/sentdm/resources/users.rb +40 -23
- data/lib/sentdm/resources/webhooks.rb +92 -34
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +22 -35
- data/rbi/sentdm/client.rbi +4 -7
- data/rbi/sentdm/models/api_meta.rbi +4 -18
- data/rbi/sentdm/models/{api_response_brand_with_kyc.rbi → api_response_of_contact.rbi} +6 -6
- data/rbi/sentdm/models/base_dto.rbi +49 -0
- data/rbi/sentdm/models/billing_contact_info.rbi +65 -0
- data/rbi/sentdm/models/brands_brand_data.rbi +406 -0
- data/rbi/sentdm/models/contact_create_params.rbi +19 -10
- data/rbi/sentdm/models/contact_delete_params.rbi +10 -1
- data/rbi/sentdm/models/contact_list_params.rbi +11 -0
- data/rbi/sentdm/models/contact_list_response.rbi +4 -4
- data/rbi/sentdm/models/{contact.rbi → contact_response.rbi} +4 -2
- data/rbi/sentdm/models/contact_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/contact_update_params.rbi +19 -10
- data/rbi/sentdm/models/me_retrieve_params.rbi +16 -5
- data/rbi/sentdm/models/me_retrieve_response.rbi +316 -16
- data/rbi/sentdm/models/message_retrieve_activities_params.rbi +13 -2
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +18 -6
- data/rbi/sentdm/models/message_retrieve_status_params.rbi +13 -2
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +6 -0
- data/rbi/sentdm/models/message_send_params.rbi +22 -13
- data/rbi/sentdm/models/mutation_request_base.rbi +32 -0
- data/rbi/sentdm/models/{lookup_retrieve_phone_info_params.rbi → number_lookup_params.rbi} +15 -7
- data/rbi/sentdm/models/{lookup_retrieve_phone_info_response.rbi → number_lookup_response.rbi} +16 -33
- data/rbi/sentdm/models/payment_details.rbi +59 -0
- data/rbi/sentdm/models/{profile_complete_params.rbi → profile_complete_setup_params.rbi} +21 -12
- data/rbi/sentdm/models/{profile_complete_response.rbi → profile_complete_setup_response.rbi} +1 -1
- data/rbi/sentdm/models/profile_create_params.rbi +189 -15
- data/rbi/sentdm/models/profile_delete_params.rbi +36 -24
- data/rbi/sentdm/models/profile_detail.rbi +725 -111
- data/rbi/sentdm/models/profile_list_params.rbi +16 -5
- data/rbi/sentdm/models/profile_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/profile_update_params.rbi +97 -30
- data/rbi/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbi → profiles/api_response_of_tcr_campaign_with_use_cases.rbi} +7 -7
- data/rbi/sentdm/models/{brands → profiles}/campaign_create_params.rbi +29 -20
- data/rbi/sentdm/models/{brands → profiles}/campaign_data.rbi +51 -16
- data/rbi/sentdm/models/{brands → profiles}/campaign_delete_params.rbi +23 -12
- data/rbi/sentdm/models/profiles/campaign_list_params.rbi +51 -0
- data/rbi/sentdm/models/{brands → profiles}/campaign_list_response.rbi +7 -5
- data/rbi/sentdm/models/{brands → profiles}/campaign_update_params.rbi +29 -20
- data/rbi/sentdm/models/{brands → profiles}/messaging_use_case_us.rbi +20 -16
- data/rbi/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbi +35 -29
- data/rbi/sentdm/models/template_create_params.rbi +22 -13
- data/rbi/sentdm/models/template_definition.rbi +405 -74
- data/rbi/sentdm/models/template_delete_params.rbi +19 -10
- data/rbi/sentdm/models/template_list_params.rbi +19 -0
- data/rbi/sentdm/models/template_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/template_update_params.rbi +22 -13
- data/rbi/sentdm/models/template_variable.rbi +6 -0
- data/rbi/sentdm/models/user_invite_params.rbi +19 -10
- data/rbi/sentdm/models/user_list_params.rbi +16 -5
- data/rbi/sentdm/models/user_remove_params.rbi +35 -23
- data/rbi/sentdm/models/user_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/user_update_role_params.rbi +23 -25
- data/rbi/sentdm/models/webhook_create_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_delete_params.rbi +13 -2
- data/rbi/sentdm/models/webhook_list_event_types_params.rbi +16 -5
- data/rbi/sentdm/models/webhook_list_events_params.rbi +16 -1
- data/rbi/sentdm/models/webhook_list_params.rbi +9 -0
- data/rbi/sentdm/models/webhook_retrieve_params.rbi +13 -2
- data/rbi/sentdm/models/webhook_rotate_secret_params.rbi +16 -2
- data/rbi/sentdm/models/webhook_test_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_toggle_status_params.rbi +19 -10
- data/rbi/sentdm/models/webhook_update_params.rbi +19 -10
- data/rbi/sentdm/models.rbi +14 -38
- data/rbi/sentdm/resources/contacts.rbi +40 -15
- data/rbi/sentdm/resources/me.rbi +25 -7
- data/rbi/sentdm/resources/messages.rbi +17 -4
- data/rbi/sentdm/resources/numbers.rbi +32 -0
- data/rbi/sentdm/resources/profiles/campaigns.rbi +127 -0
- data/rbi/sentdm/resources/profiles.rbi +179 -39
- data/rbi/sentdm/resources/templates.rbi +47 -19
- data/rbi/sentdm/resources/users.rbi +47 -25
- data/rbi/sentdm/resources/webhooks.rbi +92 -20
- data/sig/sentdm/client.rbs +2 -4
- data/sig/sentdm/models/api_meta.rbs +2 -16
- data/sig/sentdm/models/{api_response_contact.rbs → api_response_of_contact.rbs} +6 -6
- data/sig/sentdm/models/base_dto.rbs +25 -0
- data/sig/sentdm/models/billing_contact_info.rbs +30 -0
- data/sig/sentdm/models/brands_brand_data.rbs +210 -0
- data/sig/sentdm/models/contact_create_params.rbs +16 -5
- data/sig/sentdm/models/contact_delete_params.rbs +12 -2
- data/sig/sentdm/models/contact_list_params.rbs +8 -1
- data/sig/sentdm/models/contact_list_response.rbs +7 -5
- data/sig/sentdm/models/{contact.rbs → contact_response.rbs} +2 -2
- data/sig/sentdm/models/contact_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/contact_update_params.rbs +13 -6
- data/sig/sentdm/models/me_retrieve_params.rbs +14 -3
- data/sig/sentdm/models/me_retrieve_response.rbs +134 -7
- data/sig/sentdm/models/message_retrieve_activities_params.rbs +12 -2
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +9 -4
- data/sig/sentdm/models/message_retrieve_status_params.rbs +12 -2
- data/sig/sentdm/models/message_retrieve_status_response.rbs +5 -0
- data/sig/sentdm/models/message_send_params.rbs +15 -8
- data/sig/sentdm/models/mutation_request_base.rbs +15 -0
- data/sig/sentdm/models/{lookup_retrieve_phone_info_params.rbs → number_lookup_params.rbs} +10 -3
- data/sig/sentdm/models/{lookup_retrieve_phone_info_response.rbs → number_lookup_response.rbs} +14 -16
- data/sig/sentdm/models/payment_details.rbs +30 -0
- data/sig/sentdm/models/{profile_complete_params.rbs → profile_complete_setup_params.rbs} +15 -8
- data/sig/sentdm/models/profile_complete_setup_response.rbs +5 -0
- data/sig/sentdm/models/profile_create_params.rbs +57 -7
- data/sig/sentdm/models/profile_delete_params.rbs +23 -13
- data/sig/sentdm/models/profile_detail.rbs +374 -68
- data/sig/sentdm/models/profile_list_params.rbs +14 -3
- data/sig/sentdm/models/profile_retrieve_params.rbs +8 -1
- data/sig/sentdm/models/profile_update_params.rbs +32 -17
- data/sig/sentdm/models/{brands/api_response_tcr_campaign_with_use_cases.rbs → profiles/api_response_of_tcr_campaign_with_use_cases.rbs} +7 -7
- data/sig/sentdm/models/profiles/campaign_create_params.rbs +54 -0
- data/sig/sentdm/models/{brands → profiles}/campaign_data.rbs +27 -5
- data/sig/sentdm/models/{brands → profiles}/campaign_delete_params.rbs +17 -10
- data/sig/sentdm/models/{brands → profiles}/campaign_list_params.rbs +12 -5
- data/sig/sentdm/models/{brands → profiles}/campaign_list_response.rbs +5 -5
- data/sig/sentdm/models/{brands → profiles}/campaign_update_params.rbs +22 -15
- data/sig/sentdm/models/{brands → profiles}/messaging_use_case_us.rbs +2 -2
- data/sig/sentdm/models/{brands → profiles}/tcr_campaign_with_use_cases.rbs +29 -29
- data/sig/sentdm/models/template_create_params.rbs +15 -8
- data/sig/sentdm/models/template_definition.rbs +233 -20
- data/sig/sentdm/models/template_delete_params.rbs +16 -5
- data/sig/sentdm/models/template_list_params.rbs +13 -1
- data/sig/sentdm/models/template_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/template_update_params.rbs +15 -8
- data/sig/sentdm/models/template_variable.rbs +5 -0
- data/sig/sentdm/models/user_invite_params.rbs +13 -6
- data/sig/sentdm/models/user_list_params.rbs +14 -3
- data/sig/sentdm/models/user_remove_params.rbs +23 -13
- data/sig/sentdm/models/user_retrieve_params.rbs +8 -1
- data/sig/sentdm/models/user_update_role_params.rbs +17 -17
- data/sig/sentdm/models/webhook_create_params.rbs +13 -6
- data/sig/sentdm/models/webhook_delete_params.rbs +12 -2
- data/sig/sentdm/models/webhook_list_event_types_params.rbs +13 -3
- data/sig/sentdm/models/webhook_list_events_params.rbs +13 -1
- data/sig/sentdm/models/webhook_list_params.rbs +13 -1
- data/sig/sentdm/models/webhook_retrieve_params.rbs +12 -2
- data/sig/sentdm/models/webhook_rotate_secret_params.rbs +9 -2
- data/sig/sentdm/models/webhook_test_params.rbs +13 -6
- data/sig/sentdm/models/webhook_toggle_status_params.rbs +17 -5
- data/sig/sentdm/models/webhook_update_params.rbs +13 -6
- data/sig/sentdm/models.rbs +14 -32
- data/sig/sentdm/resources/contacts.rbs +10 -5
- data/sig/sentdm/resources/me.rbs +1 -0
- data/sig/sentdm/resources/messages.rbs +4 -1
- data/sig/sentdm/resources/{lookup.rbs → numbers.rbs} +4 -3
- data/sig/sentdm/resources/profiles/campaigns.rbs +42 -0
- data/sig/sentdm/resources/profiles.rbs +22 -9
- data/sig/sentdm/resources/templates.rbs +9 -3
- data/sig/sentdm/resources/users.rbs +10 -7
- data/sig/sentdm/resources/webhooks.rbs +18 -5
- metadata +67 -106
- data/lib/sentdm/models/api_response_brand_with_kyc.rb +0 -43
- data/lib/sentdm/models/brand_create_params.rb +0 -41
- data/lib/sentdm/models/brand_data.rb +0 -237
- data/lib/sentdm/models/brand_delete_params.rb +0 -34
- data/lib/sentdm/models/brand_list_params.rb +0 -14
- data/lib/sentdm/models/brand_list_response.rb +0 -43
- data/lib/sentdm/models/brand_update_params.rb +0 -48
- data/lib/sentdm/models/brand_with_kyc.rb +0 -335
- data/lib/sentdm/models/brands/base_dto.rb +0 -32
- data/lib/sentdm/models/brands/campaign_create_params.rb +0 -50
- data/lib/sentdm/models/brands/campaign_delete_params.rb +0 -43
- data/lib/sentdm/models/brands/campaign_list_params.rb +0 -22
- data/lib/sentdm/models/brands/campaign_update_params.rb +0 -57
- data/lib/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rb +0 -30
- data/lib/sentdm/models/mutation_request.rb +0 -20
- 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/resources/brands/campaigns.rb +0 -145
- data/lib/sentdm/resources/brands.rb +0 -130
- data/lib/sentdm/resources/lookup.rb +0 -35
- data/rbi/sentdm/models/api_response_contact.rbi +0 -74
- data/rbi/sentdm/models/brand_create_params.rbi +0 -68
- data/rbi/sentdm/models/brand_data.rbi +0 -266
- data/rbi/sentdm/models/brand_delete_params.rbi +0 -68
- data/rbi/sentdm/models/brand_list_params.rbi +0 -27
- data/rbi/sentdm/models/brand_list_response.rbi +0 -71
- data/rbi/sentdm/models/brand_update_params.rbi +0 -74
- data/rbi/sentdm/models/brand_with_kyc.rbi +0 -398
- data/rbi/sentdm/models/brands/base_dto.rbi +0 -53
- data/rbi/sentdm/models/brands/campaign_list_params.rbi +0 -37
- data/rbi/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbi +0 -52
- data/rbi/sentdm/models/mutation_request.rbi +0 -32
- 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 -79
- 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 -60
- data/rbi/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbi +0 -62
- data/rbi/sentdm/resources/brands/campaigns.rbi +0 -109
- data/rbi/sentdm/resources/brands.rbi +0 -95
- data/rbi/sentdm/resources/lookup.rbi +0 -24
- data/sig/sentdm/models/api_response_brand_with_kyc.rbs +0 -39
- data/sig/sentdm/models/brand_create_params.rbs +0 -36
- data/sig/sentdm/models/brand_data.rbs +0 -164
- data/sig/sentdm/models/brand_delete_params.rbs +0 -36
- data/sig/sentdm/models/brand_list_params.rbs +0 -14
- data/sig/sentdm/models/brand_list_response.rbs +0 -39
- data/sig/sentdm/models/brand_update_params.rbs +0 -45
- data/sig/sentdm/models/brand_with_kyc.rbs +0 -237
- data/sig/sentdm/models/brands/base_dto.rbs +0 -27
- data/sig/sentdm/models/brands/campaign_create_params.rbs +0 -47
- data/sig/sentdm/models/brands/sent_dm_services_endpoints_customer_ap_iv3_contracts_requests_campaigns_campaign_use_case_data.rbs +0 -27
- data/sig/sentdm/models/mutation_request.rbs +0 -15
- data/sig/sentdm/models/profile_complete_response.rbs +0 -5
- 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 -38
- 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 -32
- data/sig/sentdm/models/sent_dm_services_common_contracts_poc_os_template_header.rbs +0 -32
- data/sig/sentdm/resources/brands/campaigns.rbs +0 -38
- data/sig/sentdm/resources/brands.rbs +0 -34
|
@@ -4,6 +4,10 @@ module Sentdm
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Manage organization profiles
|
|
6
6
|
class Profiles
|
|
7
|
+
# Manage organization profiles
|
|
8
|
+
# @return [Sentdm::Resources::Profiles::Campaigns]
|
|
9
|
+
attr_reader :campaigns
|
|
10
|
+
|
|
7
11
|
# Some parameter documentations has been truncated, see
|
|
8
12
|
# {Sentdm::Models::ProfileCreateParams} for more details.
|
|
9
13
|
#
|
|
@@ -11,14 +15,51 @@ module Sentdm
|
|
|
11
15
|
# different brands, departments, or use cases, each with their own messaging
|
|
12
16
|
# configuration and settings. Requires admin role in the organization.
|
|
13
17
|
#
|
|
14
|
-
#
|
|
18
|
+
# ## WhatsApp Business Account
|
|
19
|
+
#
|
|
20
|
+
# Every profile must be linked to a WhatsApp Business Account. There are two ways
|
|
21
|
+
# to do this:
|
|
22
|
+
#
|
|
23
|
+
# **1. Inherit from organization (default)** — Omit the
|
|
24
|
+
# `whatsapp_business_account` field. The profile will share the organization's
|
|
25
|
+
# WhatsApp Business Account, which must have been set up via WhatsApp Embedded
|
|
26
|
+
# Signup. This is the recommended path for most use cases.
|
|
27
|
+
#
|
|
28
|
+
# **2. Direct credentials** — Provide a `whatsapp_business_account` object with
|
|
29
|
+
# `waba_id`, `phone_number_id`, and `access_token`. Use this when the profile
|
|
30
|
+
# needs its own independent WhatsApp Business Account. Obtain these from Meta
|
|
31
|
+
# Business Manager by creating a System User with `whatsapp_business_messaging`
|
|
32
|
+
# and `whatsapp_business_management` permissions.
|
|
33
|
+
#
|
|
34
|
+
# If the `whatsapp_business_account` field is omitted and the organization has no
|
|
35
|
+
# WhatsApp Business Account configured, the request will be rejected with
|
|
36
|
+
# HTTP 422.
|
|
37
|
+
#
|
|
38
|
+
# ## Brand
|
|
39
|
+
#
|
|
40
|
+
# Include the optional `brand` field to create the brand for this profile at the
|
|
41
|
+
# same time. Cannot be used when `inherit_tcr_brand` is `true`.
|
|
42
|
+
#
|
|
43
|
+
# ## Payment Details
|
|
44
|
+
#
|
|
45
|
+
# When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
46
|
+
# include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
47
|
+
# CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
48
|
+
# and are forwarded directly to the payment processor. Providing `payment_details`
|
|
49
|
+
# when `billing_model` is `"organization"` is not allowed.
|
|
50
|
+
#
|
|
51
|
+
# @overload create(allow_contact_sharing: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, short_name: nil, whatsapp_business_account: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
15
52
|
#
|
|
16
53
|
# @param allow_contact_sharing [Boolean] Body param: Whether contacts are shared across profiles (default: false)
|
|
17
54
|
#
|
|
18
55
|
# @param allow_template_sharing [Boolean] Body param: Whether templates are shared across profiles (default: false)
|
|
19
56
|
#
|
|
57
|
+
# @param billing_contact [Sentdm::Models::BillingContactInfo, nil] Body param: Billing contact for this profile. Required when billing_model is "pr
|
|
58
|
+
#
|
|
20
59
|
# @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (d
|
|
21
60
|
#
|
|
61
|
+
# @param brand [Sentdm::Models::BrandsBrandData, nil] Body param: Brand and KYC information for this profile (optional).
|
|
62
|
+
#
|
|
22
63
|
# @param description [String, nil] Body param: Profile description (optional)
|
|
23
64
|
#
|
|
24
65
|
# @param icon [String, nil] Body param: Profile icon URL (optional)
|
|
@@ -33,12 +74,18 @@ module Sentdm
|
|
|
33
74
|
#
|
|
34
75
|
# @param name [String] Body param: Profile name (required)
|
|
35
76
|
#
|
|
36
|
-
# @param
|
|
77
|
+
# @param payment_details [Sentdm::Models::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
|
|
78
|
+
#
|
|
79
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
80
|
+
#
|
|
81
|
+
# @param short_name [String, nil] Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
37
82
|
#
|
|
38
|
-
# @param
|
|
83
|
+
# @param whatsapp_business_account [Sentdm::Models::ProfileCreateParams::WhatsappBusinessAccount, nil] Body param: Direct WhatsApp Business Account credentials for this profile.
|
|
39
84
|
#
|
|
40
85
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
41
86
|
#
|
|
87
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
88
|
+
#
|
|
42
89
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
43
90
|
#
|
|
44
91
|
# @return [Sentdm::Models::APIResponseOfProfileDetail]
|
|
@@ -46,7 +93,7 @@ module Sentdm
|
|
|
46
93
|
# @see Sentdm::Models::ProfileCreateParams
|
|
47
94
|
def create(params = {})
|
|
48
95
|
parsed, options = Sentdm::ProfileCreateParams.dump_request(params)
|
|
49
|
-
header_params = {idempotency_key: "idempotency-key"}
|
|
96
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
50
97
|
@client.request(
|
|
51
98
|
method: :post,
|
|
52
99
|
path: "v3/profiles",
|
|
@@ -57,23 +104,32 @@ module Sentdm
|
|
|
57
104
|
)
|
|
58
105
|
end
|
|
59
106
|
|
|
107
|
+
# Some parameter documentations has been truncated, see
|
|
108
|
+
# {Sentdm::Models::ProfileRetrieveParams} for more details.
|
|
109
|
+
#
|
|
60
110
|
# Retrieves detailed information about a specific sender profile within an
|
|
61
|
-
# organization
|
|
111
|
+
# organization, including brand and KYC information if a brand has been
|
|
112
|
+
# configured.
|
|
62
113
|
#
|
|
63
|
-
# @overload retrieve(profile_id, request_options: {})
|
|
114
|
+
# @overload retrieve(profile_id, x_profile_id: nil, request_options: {})
|
|
64
115
|
#
|
|
65
116
|
# @param profile_id [String]
|
|
117
|
+
#
|
|
118
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
119
|
+
#
|
|
66
120
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
67
121
|
#
|
|
68
122
|
# @return [Sentdm::Models::APIResponseOfProfileDetail]
|
|
69
123
|
#
|
|
70
124
|
# @see Sentdm::Models::ProfileRetrieveParams
|
|
71
125
|
def retrieve(profile_id, params = {})
|
|
126
|
+
parsed, options = Sentdm::ProfileRetrieveParams.dump_request(params)
|
|
72
127
|
@client.request(
|
|
73
128
|
method: :get,
|
|
74
129
|
path: ["v3/profiles/%1$s", profile_id],
|
|
130
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
75
131
|
model: Sentdm::APIResponseOfProfileDetail,
|
|
76
|
-
options:
|
|
132
|
+
options: options
|
|
77
133
|
)
|
|
78
134
|
end
|
|
79
135
|
|
|
@@ -83,9 +139,25 @@ module Sentdm
|
|
|
83
139
|
# Updates a profile's configuration and settings. Requires admin role in the
|
|
84
140
|
# organization. Only provided fields will be updated (partial update).
|
|
85
141
|
#
|
|
86
|
-
#
|
|
142
|
+
# ## Brand Management
|
|
143
|
+
#
|
|
144
|
+
# Include the optional `brand` field to create or update the brand associated with
|
|
145
|
+
# this profile. The brand holds KYC and TCR compliance data (legal business info,
|
|
146
|
+
# contact details, messaging vertical). Once a brand has been submitted to TCR it
|
|
147
|
+
# cannot be modified. Setting `inherit_tcr_brand: true` and providing `brand` in
|
|
148
|
+
# the same request is not allowed.
|
|
149
|
+
#
|
|
150
|
+
# ## Payment Details
|
|
151
|
+
#
|
|
152
|
+
# When `billing_model` is `"profile"` or `"profile_and_organization"` you may
|
|
153
|
+
# include a `payment_details` object containing the card number, expiry (MM/YY),
|
|
154
|
+
# CVC, and billing ZIP code. Payment details are **never stored** on our servers
|
|
155
|
+
# and are forwarded directly to the payment processor. Providing `payment_details`
|
|
156
|
+
# when `billing_model` is `"organization"` is not allowed.
|
|
87
157
|
#
|
|
88
|
-
# @
|
|
158
|
+
# @overload update(profile_id, allow_contact_sharing: nil, allow_number_change_during_onboarding: nil, allow_template_sharing: nil, billing_contact: nil, billing_model: nil, brand: nil, description: nil, icon: nil, inherit_contacts: nil, inherit_tcr_brand: nil, inherit_tcr_campaign: nil, inherit_templates: nil, name: nil, payment_details: nil, sandbox: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, sending_whatsapp_number_profile_id: nil, short_name: nil, whatsapp_phone_number: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
159
|
+
#
|
|
160
|
+
# @param profile_id [String] Path param
|
|
89
161
|
#
|
|
90
162
|
# @param allow_contact_sharing [Boolean, nil] Body param: Whether contacts are shared across profiles (optional)
|
|
91
163
|
#
|
|
@@ -93,8 +165,12 @@ module Sentdm
|
|
|
93
165
|
#
|
|
94
166
|
# @param allow_template_sharing [Boolean, nil] Body param: Whether templates are shared across profiles (optional)
|
|
95
167
|
#
|
|
168
|
+
# @param billing_contact [Sentdm::Models::BillingContactInfo, nil] Body param: Billing contact for this profile. Required when billing_model is "pr
|
|
169
|
+
#
|
|
96
170
|
# @param billing_model [String, nil] Body param: Billing model: profile, organization, or profile_and_organization (o
|
|
97
171
|
#
|
|
172
|
+
# @param brand [Sentdm::Models::BrandsBrandData, nil] Body param: Brand and KYC information for this profile (optional).
|
|
173
|
+
#
|
|
98
174
|
# @param description [String, nil] Body param: Profile description (optional)
|
|
99
175
|
#
|
|
100
176
|
# @param icon [String, nil] Body param: Profile icon URL (optional)
|
|
@@ -109,7 +185,9 @@ module Sentdm
|
|
|
109
185
|
#
|
|
110
186
|
# @param name [String, nil] Body param: Profile name (optional)
|
|
111
187
|
#
|
|
112
|
-
# @param
|
|
188
|
+
# @param payment_details [Sentdm::Models::PaymentDetails, nil] Body param: Payment card details for this profile (optional).
|
|
189
|
+
#
|
|
190
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
113
191
|
#
|
|
114
192
|
# @param sending_phone_number [String, nil] Body param: Direct phone number for SMS sending (optional)
|
|
115
193
|
#
|
|
@@ -117,25 +195,25 @@ module Sentdm
|
|
|
117
195
|
#
|
|
118
196
|
# @param sending_whatsapp_number_profile_id [String, nil] Body param: Reference to another profile to use for WhatsApp configuration (opti
|
|
119
197
|
#
|
|
120
|
-
# @param short_name [String, nil] Body param: Profile short name/abbreviation (optional)
|
|
121
|
-
#
|
|
122
|
-
# @param test_mode [Boolean] Body param: Test mode flag - when true, the operation is simulated without side
|
|
198
|
+
# @param short_name [String, nil] Body param: Profile short name/abbreviation (optional). Must be 3–11 characters,
|
|
123
199
|
#
|
|
124
200
|
# @param whatsapp_phone_number [String, nil] Body param: Direct phone number for WhatsApp sending (optional)
|
|
125
201
|
#
|
|
126
202
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
127
203
|
#
|
|
204
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
205
|
+
#
|
|
128
206
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
129
207
|
#
|
|
130
208
|
# @return [Sentdm::Models::APIResponseOfProfileDetail]
|
|
131
209
|
#
|
|
132
210
|
# @see Sentdm::Models::ProfileUpdateParams
|
|
133
|
-
def update(
|
|
211
|
+
def update(profile_id, params = {})
|
|
134
212
|
parsed, options = Sentdm::ProfileUpdateParams.dump_request(params)
|
|
135
|
-
header_params = {idempotency_key: "idempotency-key"}
|
|
213
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
136
214
|
@client.request(
|
|
137
215
|
method: :patch,
|
|
138
|
-
path: ["v3/profiles/%1$s",
|
|
216
|
+
path: ["v3/profiles/%1$s", profile_id],
|
|
139
217
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
140
218
|
body: parsed.except(*header_params.keys),
|
|
141
219
|
model: Sentdm::APIResponseOfProfileDetail,
|
|
@@ -143,11 +221,17 @@ module Sentdm
|
|
|
143
221
|
)
|
|
144
222
|
end
|
|
145
223
|
|
|
146
|
-
#
|
|
147
|
-
#
|
|
148
|
-
#
|
|
224
|
+
# Some parameter documentations has been truncated, see
|
|
225
|
+
# {Sentdm::Models::ProfileListParams} for more details.
|
|
226
|
+
#
|
|
227
|
+
# Retrieves all sender profiles within an organization, including brand
|
|
228
|
+
# information for each profile. Profiles represent different brands, departments,
|
|
229
|
+
# or use cases within an organization, each with their own messaging
|
|
230
|
+
# configuration.
|
|
149
231
|
#
|
|
150
|
-
# @overload list(request_options: {})
|
|
232
|
+
# @overload list(x_profile_id: nil, request_options: {})
|
|
233
|
+
#
|
|
234
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
151
235
|
#
|
|
152
236
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
153
237
|
#
|
|
@@ -155,11 +239,13 @@ module Sentdm
|
|
|
155
239
|
#
|
|
156
240
|
# @see Sentdm::Models::ProfileListParams
|
|
157
241
|
def list(params = {})
|
|
242
|
+
parsed, options = Sentdm::ProfileListParams.dump_request(params)
|
|
158
243
|
@client.request(
|
|
159
244
|
method: :get,
|
|
160
245
|
path: "v3/profiles",
|
|
246
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
161
247
|
model: Sentdm::Models::ProfileListResponse,
|
|
162
|
-
options:
|
|
248
|
+
options: options
|
|
163
249
|
)
|
|
164
250
|
end
|
|
165
251
|
|
|
@@ -169,33 +255,33 @@ module Sentdm
|
|
|
169
255
|
# Soft deletes a sender profile. The profile will be marked as deleted but data is
|
|
170
256
|
# retained. Requires admin role in the organization.
|
|
171
257
|
#
|
|
172
|
-
# @overload delete(
|
|
258
|
+
# @overload delete(profile_id, body:, x_profile_id: nil, request_options: {})
|
|
173
259
|
#
|
|
174
|
-
# @param
|
|
260
|
+
# @param profile_id [String] Path param
|
|
175
261
|
#
|
|
176
|
-
# @param
|
|
262
|
+
# @param body [Sentdm::Models::ProfileDeleteParams::Body] Body param: Request to delete a profile
|
|
177
263
|
#
|
|
178
|
-
# @param
|
|
264
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
179
265
|
#
|
|
180
266
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
181
267
|
#
|
|
182
268
|
# @return [nil]
|
|
183
269
|
#
|
|
184
270
|
# @see Sentdm::Models::ProfileDeleteParams
|
|
185
|
-
def delete(
|
|
271
|
+
def delete(profile_id, params)
|
|
186
272
|
parsed, options = Sentdm::ProfileDeleteParams.dump_request(params)
|
|
187
273
|
@client.request(
|
|
188
274
|
method: :delete,
|
|
189
|
-
path: ["v3/profiles/%1$s",
|
|
190
|
-
headers:
|
|
191
|
-
body: parsed,
|
|
275
|
+
path: ["v3/profiles/%1$s", profile_id],
|
|
276
|
+
headers: parsed.except(:body).transform_keys(x_profile_id: "x-profile-id"),
|
|
277
|
+
body: parsed[:body],
|
|
192
278
|
model: NilClass,
|
|
193
279
|
options: options
|
|
194
280
|
)
|
|
195
281
|
end
|
|
196
282
|
|
|
197
283
|
# Some parameter documentations has been truncated, see
|
|
198
|
-
# {Sentdm::Models::
|
|
284
|
+
# {Sentdm::Models::ProfileCompleteSetupParams} for more details.
|
|
199
285
|
#
|
|
200
286
|
# Final step in profile compliance workflow. Validates all prerequisites (general
|
|
201
287
|
# data, brand, campaigns), connects profile to Telnyx/WhatsApp, and sets status
|
|
@@ -216,24 +302,26 @@ module Sentdm
|
|
|
216
302
|
# - If non-TCR with destination country (IsMain=true) → SUBMITTED
|
|
217
303
|
# - Otherwise → COMPLETED
|
|
218
304
|
#
|
|
219
|
-
# @overload
|
|
305
|
+
# @overload complete_setup(profile_id, web_hook_url:, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
220
306
|
#
|
|
221
307
|
# @param profile_id [String] Path param: Profile ID from route
|
|
222
308
|
#
|
|
223
309
|
# @param web_hook_url [String] Body param: Webhook URL to call when profile completion finishes (success or fai
|
|
224
310
|
#
|
|
225
|
-
# @param
|
|
311
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
226
312
|
#
|
|
227
313
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
228
314
|
#
|
|
315
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
316
|
+
#
|
|
229
317
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
230
318
|
#
|
|
231
319
|
# @return [Object]
|
|
232
320
|
#
|
|
233
|
-
# @see Sentdm::Models::
|
|
234
|
-
def
|
|
235
|
-
parsed, options = Sentdm::
|
|
236
|
-
header_params = {idempotency_key: "idempotency-key"}
|
|
321
|
+
# @see Sentdm::Models::ProfileCompleteSetupParams
|
|
322
|
+
def complete_setup(profile_id, params)
|
|
323
|
+
parsed, options = Sentdm::ProfileCompleteSetupParams.dump_request(params)
|
|
324
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
237
325
|
@client.request(
|
|
238
326
|
method: :post,
|
|
239
327
|
path: ["v3/profiles/%1$s/complete", profile_id],
|
|
@@ -249,6 +337,7 @@ module Sentdm
|
|
|
249
337
|
# @param client [Sentdm::Client]
|
|
250
338
|
def initialize(client:)
|
|
251
339
|
@client = client
|
|
340
|
+
@campaigns = Sentdm::Resources::Profiles::Campaigns.new(client: client)
|
|
252
341
|
end
|
|
253
342
|
end
|
|
254
343
|
end
|
|
@@ -11,7 +11,7 @@ module Sentdm
|
|
|
11
11
|
# template can be submitted for review immediately or saved as draft for later
|
|
12
12
|
# submission.
|
|
13
13
|
#
|
|
14
|
-
# @overload create(category: nil, creation_source: nil, definition: nil, language: nil,
|
|
14
|
+
# @overload create(category: nil, creation_source: nil, definition: nil, language: nil, sandbox: nil, submit_for_review: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
15
15
|
#
|
|
16
16
|
# @param category [String, nil] Body param: Template category: MARKETING, UTILITY, AUTHENTICATION (optional, aut
|
|
17
17
|
#
|
|
@@ -21,12 +21,14 @@ module Sentdm
|
|
|
21
21
|
#
|
|
22
22
|
# @param language [String, nil] Body param: Template language code (e.g., en_US) (optional, auto-detected if not
|
|
23
23
|
#
|
|
24
|
-
# @param
|
|
24
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
25
25
|
#
|
|
26
|
-
# @param
|
|
26
|
+
# @param submit_for_review [Boolean] Body param: Whether to submit the template for review after creation (default: f
|
|
27
27
|
#
|
|
28
28
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
29
29
|
#
|
|
30
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
31
|
+
#
|
|
30
32
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
31
33
|
#
|
|
32
34
|
# @return [Sentdm::Models::APIResponseTemplate]
|
|
@@ -34,7 +36,7 @@ module Sentdm
|
|
|
34
36
|
# @see Sentdm::Models::TemplateCreateParams
|
|
35
37
|
def create(params = {})
|
|
36
38
|
parsed, options = Sentdm::TemplateCreateParams.dump_request(params)
|
|
37
|
-
header_params = {idempotency_key: "idempotency-key"}
|
|
39
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
38
40
|
@client.request(
|
|
39
41
|
method: :post,
|
|
40
42
|
path: "v3/templates",
|
|
@@ -45,24 +47,31 @@ module Sentdm
|
|
|
45
47
|
)
|
|
46
48
|
end
|
|
47
49
|
|
|
50
|
+
# Some parameter documentations has been truncated, see
|
|
51
|
+
# {Sentdm::Models::TemplateRetrieveParams} for more details.
|
|
52
|
+
#
|
|
48
53
|
# Retrieves a specific template by its ID. Returns template details including
|
|
49
54
|
# name, category, language, status, and definition.
|
|
50
55
|
#
|
|
51
|
-
# @overload retrieve(id, request_options: {})
|
|
56
|
+
# @overload retrieve(id, x_profile_id: nil, request_options: {})
|
|
52
57
|
#
|
|
53
58
|
# @param id [String] Template ID from route parameter
|
|
54
59
|
#
|
|
60
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
61
|
+
#
|
|
55
62
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
56
63
|
#
|
|
57
64
|
# @return [Sentdm::Models::APIResponseTemplate]
|
|
58
65
|
#
|
|
59
66
|
# @see Sentdm::Models::TemplateRetrieveParams
|
|
60
67
|
def retrieve(id, params = {})
|
|
68
|
+
parsed, options = Sentdm::TemplateRetrieveParams.dump_request(params)
|
|
61
69
|
@client.request(
|
|
62
70
|
method: :get,
|
|
63
71
|
path: ["v3/templates/%1$s", id],
|
|
72
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
64
73
|
model: Sentdm::APIResponseTemplate,
|
|
65
|
-
options:
|
|
74
|
+
options: options
|
|
66
75
|
)
|
|
67
76
|
end
|
|
68
77
|
|
|
@@ -72,7 +81,7 @@ module Sentdm
|
|
|
72
81
|
# Updates an existing template's name, category, language, definition, or submits
|
|
73
82
|
# it for review.
|
|
74
83
|
#
|
|
75
|
-
# @overload update(id, category: nil, definition: nil, language: nil, name: nil,
|
|
84
|
+
# @overload update(id, category: nil, definition: nil, language: nil, name: nil, sandbox: nil, submit_for_review: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
76
85
|
#
|
|
77
86
|
# @param id [String] Path param: Template ID from route parameter
|
|
78
87
|
#
|
|
@@ -84,12 +93,14 @@ module Sentdm
|
|
|
84
93
|
#
|
|
85
94
|
# @param name [String, nil] Body param: Template display name
|
|
86
95
|
#
|
|
87
|
-
# @param
|
|
96
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
88
97
|
#
|
|
89
|
-
# @param
|
|
98
|
+
# @param submit_for_review [Boolean] Body param: Whether to submit the template for review after updating (default: f
|
|
90
99
|
#
|
|
91
100
|
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
92
101
|
#
|
|
102
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
103
|
+
#
|
|
93
104
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
94
105
|
#
|
|
95
106
|
# @return [Sentdm::Models::APIResponseTemplate]
|
|
@@ -97,7 +108,7 @@ module Sentdm
|
|
|
97
108
|
# @see Sentdm::Models::TemplateUpdateParams
|
|
98
109
|
def update(id, params = {})
|
|
99
110
|
parsed, options = Sentdm::TemplateUpdateParams.dump_request(params)
|
|
100
|
-
header_params = {idempotency_key: "idempotency-key"}
|
|
111
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
101
112
|
@client.request(
|
|
102
113
|
method: :put,
|
|
103
114
|
path: ["v3/templates/%1$s", id],
|
|
@@ -108,20 +119,27 @@ module Sentdm
|
|
|
108
119
|
)
|
|
109
120
|
end
|
|
110
121
|
|
|
122
|
+
# Some parameter documentations has been truncated, see
|
|
123
|
+
# {Sentdm::Models::TemplateListParams} for more details.
|
|
124
|
+
#
|
|
111
125
|
# Retrieves a paginated list of message templates for the authenticated customer.
|
|
112
126
|
# Supports filtering by status, category, and search term.
|
|
113
127
|
#
|
|
114
|
-
# @overload list(page:, page_size:, category: nil, search: nil, status: nil, request_options: {})
|
|
128
|
+
# @overload list(page:, page_size:, category: nil, is_welcome_playground: nil, search: nil, status: nil, x_profile_id: nil, request_options: {})
|
|
129
|
+
#
|
|
130
|
+
# @param page [Integer] Query param: Page number (1-indexed)
|
|
115
131
|
#
|
|
116
|
-
# @param
|
|
132
|
+
# @param page_size [Integer] Query param: Number of items per page
|
|
117
133
|
#
|
|
118
|
-
# @param
|
|
134
|
+
# @param category [String, nil] Query param: Optional category filter: MARKETING, UTILITY, AUTHENTICATION
|
|
119
135
|
#
|
|
120
|
-
# @param
|
|
136
|
+
# @param is_welcome_playground [Boolean, nil] Query param: Optional filter by welcome playground flag
|
|
121
137
|
#
|
|
122
|
-
# @param search [String, nil] Optional search term for filtering templates
|
|
138
|
+
# @param search [String, nil] Query param: Optional search term for filtering templates
|
|
123
139
|
#
|
|
124
|
-
# @param status [String, nil] Optional status filter: APPROVED, PENDING, REJECTED
|
|
140
|
+
# @param status [String, nil] Query param: Optional status filter: APPROVED, PENDING, REJECTED
|
|
141
|
+
#
|
|
142
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
125
143
|
#
|
|
126
144
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
127
145
|
#
|
|
@@ -129,12 +147,14 @@ module Sentdm
|
|
|
129
147
|
#
|
|
130
148
|
# @see Sentdm::Models::TemplateListParams
|
|
131
149
|
def list(params)
|
|
150
|
+
query_params = [:page, :page_size, :category, :is_welcome_playground, :search, :status]
|
|
132
151
|
parsed, options = Sentdm::TemplateListParams.dump_request(params)
|
|
133
|
-
query = Sentdm::Internal::Util.encode_query_params(parsed)
|
|
152
|
+
query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
134
153
|
@client.request(
|
|
135
154
|
method: :get,
|
|
136
155
|
path: "v3/templates",
|
|
137
|
-
query: query
|
|
156
|
+
query: query,
|
|
157
|
+
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
138
158
|
model: Sentdm::Models::TemplateListResponse,
|
|
139
159
|
options: options
|
|
140
160
|
)
|
|
@@ -146,13 +166,15 @@ module Sentdm
|
|
|
146
166
|
# Deletes a template by ID. Optionally, you can also delete the template from
|
|
147
167
|
# WhatsApp/Meta by setting delete_from_meta=true.
|
|
148
168
|
#
|
|
149
|
-
# @overload delete(id, delete_from_meta: nil,
|
|
169
|
+
# @overload delete(id, delete_from_meta: nil, sandbox: nil, x_profile_id: nil, request_options: {})
|
|
150
170
|
#
|
|
151
|
-
# @param id [String] Template ID from route parameter
|
|
171
|
+
# @param id [String] Path param: Template ID from route parameter
|
|
172
|
+
#
|
|
173
|
+
# @param delete_from_meta [Boolean, nil] Body param: Whether to also delete the template from WhatsApp/Meta (optional, de
|
|
152
174
|
#
|
|
153
|
-
# @param
|
|
175
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
154
176
|
#
|
|
155
|
-
# @param
|
|
177
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
156
178
|
#
|
|
157
179
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
158
180
|
#
|
|
@@ -161,11 +183,12 @@ module Sentdm
|
|
|
161
183
|
# @see Sentdm::Models::TemplateDeleteParams
|
|
162
184
|
def delete(id, params = {})
|
|
163
185
|
parsed, options = Sentdm::TemplateDeleteParams.dump_request(params)
|
|
186
|
+
header_params = {x_profile_id: "x-profile-id"}
|
|
164
187
|
@client.request(
|
|
165
188
|
method: :delete,
|
|
166
189
|
path: ["v3/templates/%1$s", id],
|
|
167
|
-
headers:
|
|
168
|
-
body: parsed,
|
|
190
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
191
|
+
body: parsed.except(*header_params.keys),
|
|
169
192
|
model: NilClass,
|
|
170
193
|
options: options
|
|
171
194
|
)
|