sentdm 0.44.0 → 0.46.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 +18 -0
- data/README.md +11 -11
- data/lib/sentdm/client.rb +66 -0
- data/lib/sentdm/internal/sender_profiles_page.rb +140 -0
- data/lib/sentdm/internal/type/enum.rb +11 -11
- data/lib/sentdm/models/account.rb +173 -0
- data/lib/sentdm/models/account_channels.rb +39 -0
- data/lib/sentdm/models/account_profile.rb +86 -0
- data/lib/sentdm/models/account_rcs_channel.rb +26 -0
- data/lib/sentdm/models/account_sms_channel.rb +26 -0
- data/lib/sentdm/models/account_whatsapp_channel.rb +35 -0
- data/lib/sentdm/models/api_response_of_account.rb +48 -0
- data/lib/sentdm/models/api_response_of_cancelled_message.rb +43 -0
- data/lib/sentdm/models/api_response_of_channels_state.rb +48 -0
- data/lib/sentdm/models/api_response_of_compliance_requirements.rb +47 -0
- data/lib/sentdm/models/api_response_of_contacts_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_message.rb +51 -0
- data/lib/sentdm/models/api_response_of_message_activities.rb +43 -0
- data/lib/sentdm/models/api_response_of_number_lookup_result.rb +43 -0
- data/lib/sentdm/models/api_response_of_profile_completion_accepted.rb +47 -0
- data/lib/sentdm/models/api_response_of_profile_completion_result.rb +47 -0
- data/lib/sentdm/models/api_response_of_profiles_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_sender_profile.rb +54 -0
- data/lib/sentdm/models/api_response_of_sender_profiles_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_templates_list.rb +42 -0
- data/lib/sentdm/models/api_response_of_users_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_webhook_event_types_list.rb +43 -0
- data/lib/sentdm/models/api_response_of_webhook_events_list.rb +42 -0
- data/lib/sentdm/models/{webhook_rotate_secret_response.rb → api_response_of_webhook_secret.rb} +4 -17
- data/lib/sentdm/models/{webhook_test_response.rb → api_response_of_webhook_test.rb} +4 -23
- data/lib/sentdm/models/api_response_of_webhooks_list.rb +42 -0
- data/lib/sentdm/models/billing_contact.rb +35 -0
- data/lib/sentdm/models/brand_business.rb +96 -0
- data/lib/sentdm/models/brand_business_info.rb +3 -20
- data/lib/sentdm/models/brand_compliance.rb +75 -0
- data/lib/sentdm/models/brand_contact.rb +56 -0
- data/lib/sentdm/models/brand_with_kyc.rb +129 -0
- data/lib/sentdm/models/cancelled_message.rb +28 -0
- data/lib/sentdm/models/channel_event_payload.rb +3 -114
- data/lib/sentdm/models/channel_list_params.rb +20 -0
- data/lib/sentdm/models/channel_score.rb +35 -0
- data/lib/sentdm/models/channels/api_response_of_list_of_sms_market.rb +45 -0
- data/lib/sentdm/models/channels/api_response_of_rcs_agent.rb +60 -0
- data/lib/sentdm/models/channels/api_response_of_sms_market.rb +54 -0
- data/lib/sentdm/models/channels/api_response_of_whatsapp_channel.rb +47 -0
- data/lib/sentdm/models/channels/market_compliance.rb +409 -0
- data/lib/sentdm/models/channels/rc_create_params.rb +260 -0
- data/lib/sentdm/models/channels/rcs_address.rb +43 -0
- data/lib/sentdm/models/channels/rcs_agent.rb +278 -0
- data/lib/sentdm/models/channels/sms_create_params.rb +173 -0
- data/lib/sentdm/models/channels/sms_list_params.rb +22 -0
- data/lib/sentdm/models/channels/sms_market.rb +158 -0
- data/lib/sentdm/models/channels/sms_number.rb +41 -0
- data/lib/sentdm/models/channels/sms_number_request.rb +33 -0
- data/lib/sentdm/models/channels/sms_retrieve_params.rb +34 -0
- data/lib/sentdm/models/channels/sms_update_params.rb +64 -0
- data/lib/sentdm/models/channels/supplied_compliance.rb +89 -0
- data/lib/sentdm/models/channels/supplied_document.rb +35 -0
- data/lib/sentdm/models/channels/whatsapp_channel.rb +109 -0
- data/lib/sentdm/models/channels/whatsapp_create_params.rb +65 -0
- data/lib/sentdm/models/channels_state.rb +89 -0
- data/lib/sentdm/models/compliance_attachment_template.rb +36 -0
- data/lib/sentdm/models/compliance_requirement.rb +112 -0
- data/lib/sentdm/models/compliance_requirements.rb +98 -0
- data/lib/sentdm/models/compliance_retrieve_requirements_params.rb +52 -0
- data/lib/sentdm/models/compliance_setup_step.rb +78 -0
- data/lib/sentdm/models/contact_message_summary.rb +3 -34
- data/lib/sentdm/models/contacts_list.rb +26 -0
- data/lib/sentdm/models/conversation_messages_list.rb +3 -430
- data/lib/sentdm/models/entity_type.rb +18 -0
- data/lib/sentdm/models/inbound_media.rb +53 -0
- data/lib/sentdm/models/inbound_message_event_payload.rb +3 -53
- data/lib/sentdm/models/link_event.rb +79 -0
- data/lib/sentdm/models/link_event_payload.rb +211 -0
- data/lib/sentdm/models/message.rb +168 -0
- data/lib/sentdm/models/message_activities.rb +34 -0
- data/lib/sentdm/models/message_activity.rb +105 -0
- data/lib/sentdm/models/message_body.rb +79 -0
- data/lib/sentdm/models/message_button.rb +33 -0
- data/lib/sentdm/models/message_cancel_params.rb +32 -0
- data/lib/sentdm/models/message_channel_options.rb +43 -0
- data/lib/sentdm/models/message_event_payload.rb +3 -2
- data/lib/sentdm/models/message_header_media.rb +31 -0
- data/lib/sentdm/models/message_media.rb +74 -0
- data/lib/sentdm/models/message_recipient.rb +46 -0
- data/lib/sentdm/models/message_send_params.rb +6 -90
- data/lib/sentdm/models/message_send_response.rb +3 -95
- data/lib/sentdm/models/message_send_result.rb +55 -0
- data/lib/sentdm/models/message_status_event.rb +54 -0
- data/lib/sentdm/models/mms_market.rb +48 -0
- data/lib/sentdm/models/number_lookup_result.rb +63 -0
- data/lib/sentdm/models/pagination_cursors.rb +27 -0
- data/lib/sentdm/models/pagination_meta.rb +3 -27
- data/lib/sentdm/models/profile_completion_accepted.rb +20 -0
- data/lib/sentdm/models/profile_completion_result.rb +31 -0
- data/lib/sentdm/models/profile_detail.rb +6 -408
- data/lib/sentdm/models/profiles/brand_campaign.rb +3 -15
- data/lib/sentdm/models/profiles_list.rb +26 -0
- data/lib/sentdm/models/sender_profile.rb +138 -0
- data/lib/sentdm/models/sender_profile_billing.rb +21 -0
- data/lib/sentdm/models/sender_profile_billing_request.rb +33 -0
- data/lib/sentdm/models/sender_profile_channels.rb +90 -0
- data/lib/sentdm/models/sender_profile_create_params.rb +116 -0
- data/lib/sentdm/models/sender_profile_delete_params.rb +20 -0
- data/lib/sentdm/models/sender_profile_list_params.rb +30 -0
- data/lib/sentdm/models/sender_profile_rcs.rb +209 -0
- data/lib/sentdm/models/sender_profile_retrieve_params.rb +20 -0
- data/lib/sentdm/models/sender_profile_sms.rb +106 -0
- data/lib/sentdm/models/sender_profile_update_params.rb +71 -0
- data/lib/sentdm/models/sender_profile_whatsapp.rb +61 -0
- data/lib/sentdm/models/sender_profiles_list.rb +26 -0
- data/lib/sentdm/models/tcr_brand_identity_status.rb +17 -0
- data/lib/sentdm/models/tcr_brand_status.rb +16 -0
- data/lib/sentdm/models/tcr_campaign_status.rb +16 -0
- data/lib/sentdm/models/template_body.rb +3 -70
- data/lib/sentdm/models/template_create_params.rb +11 -1
- data/lib/sentdm/models/template_header.rb +3 -37
- data/lib/sentdm/models/template_header_location.rb +38 -0
- data/lib/sentdm/models/template_media_item.rb +34 -0
- data/lib/sentdm/models/template_mms_body_content.rb +49 -0
- data/lib/sentdm/models/template_ref.rb +51 -0
- data/lib/sentdm/models/template_variable.rb +3 -64
- data/lib/sentdm/models/template_variable_props.rb +65 -0
- data/lib/sentdm/models/templates_list.rb +26 -0
- data/lib/sentdm/models/users_list.rb +26 -0
- data/lib/sentdm/models/voice/call.rb +3 -54
- data/lib/sentdm/models/voice/call_leg.rb +58 -0
- data/lib/sentdm/models/webhook_create_params.rb +3 -25
- data/lib/sentdm/models/webhook_delivery.rb +160 -0
- data/lib/sentdm/models/webhook_event_types_list.rb +26 -0
- data/lib/sentdm/models/webhook_events_list.rb +26 -0
- data/lib/sentdm/models/webhook_response.rb +3 -28
- data/lib/sentdm/models/webhook_secret.rb +15 -0
- data/lib/sentdm/models/webhook_sender_profile.rb +29 -0
- data/lib/sentdm/models/webhook_sender_profile_config.rb +27 -0
- data/lib/sentdm/models/webhook_test.rb +21 -0
- data/lib/sentdm/models/webhook_update_params.rb +3 -25
- data/lib/sentdm/models/webhooks_list.rb +26 -0
- data/lib/sentdm/models.rb +188 -0
- data/lib/sentdm/resources/channels/rcs.rb +177 -0
- data/lib/sentdm/resources/channels/sms.rb +417 -0
- data/lib/sentdm/resources/channels/whatsapp.rb +106 -0
- data/lib/sentdm/resources/channels.rb +162 -0
- data/lib/sentdm/resources/compliance.rb +127 -0
- data/lib/sentdm/resources/conversations.rb +4 -4
- data/lib/sentdm/resources/me.rb +2 -2
- data/lib/sentdm/resources/messages.rb +73 -7
- data/lib/sentdm/resources/numbers.rb +2 -2
- data/lib/sentdm/resources/profiles.rb +4 -4
- data/lib/sentdm/resources/sender_profiles.rb +463 -0
- data/lib/sentdm/resources/templates.rb +5 -3
- data/lib/sentdm/resources/users.rb +2 -2
- data/lib/sentdm/resources/webhooks.rb +10 -10
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +120 -11
- data/rbi/sentdm/client.rbi +64 -0
- data/rbi/sentdm/internal/sender_profiles_page.rbi +122 -0
- data/rbi/sentdm/models/account.rbi +242 -0
- data/rbi/sentdm/models/account_channels.rbi +66 -0
- data/rbi/sentdm/models/account_profile.rbi +116 -0
- data/rbi/sentdm/models/account_rcs_channel.rbi +45 -0
- data/rbi/sentdm/models/account_sms_channel.rbi +45 -0
- data/rbi/sentdm/models/account_whatsapp_channel.rbi +58 -0
- data/rbi/sentdm/models/api_response_of_account.rbi +78 -0
- data/rbi/sentdm/models/{webhook_rotate_secret_response.rbi → api_response_of_cancelled_message.rbi} +6 -41
- data/rbi/sentdm/models/api_response_of_channels_state.rbi +78 -0
- data/rbi/sentdm/models/api_response_of_compliance_requirements.rbi +81 -0
- data/rbi/sentdm/models/api_response_of_contacts_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_message.rbi +84 -0
- data/rbi/sentdm/models/api_response_of_message_activities.rbi +77 -0
- data/rbi/sentdm/models/{webhook_test_response.rbi → api_response_of_number_lookup_result.rbi} +9 -43
- data/rbi/sentdm/models/api_response_of_profile_completion_accepted.rbi +83 -0
- data/rbi/sentdm/models/{profile_complete_response.rbi → api_response_of_profile_completion_result.rbi} +6 -52
- data/rbi/sentdm/models/api_response_of_profiles_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_sender_profile.rbi +90 -0
- data/rbi/sentdm/models/api_response_of_sender_profiles_list.rbi +77 -0
- data/rbi/sentdm/models/api_response_of_templates_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_users_list.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhook_event_types_list.rbi +79 -0
- data/rbi/sentdm/models/api_response_of_webhook_events_list.rbi +77 -0
- data/rbi/sentdm/models/api_response_of_webhook_secret.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhook_test.rbi +74 -0
- data/rbi/sentdm/models/api_response_of_webhooks_list.rbi +74 -0
- data/rbi/sentdm/models/billing_contact.rbi +49 -0
- data/rbi/sentdm/models/brand_business.rbi +115 -0
- data/rbi/sentdm/models/brand_business_info.rbi +3 -49
- data/rbi/sentdm/models/brand_compliance.rbi +108 -0
- data/rbi/sentdm/models/brand_contact.rbi +78 -0
- data/rbi/sentdm/models/brand_with_kyc.rbi +167 -0
- data/rbi/sentdm/models/cancelled_message.rbi +37 -0
- data/rbi/sentdm/models/channel_event_payload.rbi +4 -204
- data/rbi/sentdm/models/channel_list_params.rbi +38 -0
- data/rbi/sentdm/models/channel_score.rbi +56 -0
- data/rbi/sentdm/models/channels/api_response_of_list_of_sms_market.rbi +76 -0
- data/rbi/sentdm/models/channels/api_response_of_rcs_agent.rbi +103 -0
- data/rbi/sentdm/models/channels/api_response_of_sms_market.rbi +93 -0
- data/rbi/sentdm/models/channels/api_response_of_whatsapp_channel.rbi +85 -0
- data/rbi/sentdm/models/channels/market_compliance.rbi +770 -0
- data/rbi/sentdm/models/channels/rc_create_params.rbi +397 -0
- data/rbi/sentdm/models/channels/rcs_address.rbi +62 -0
- data/rbi/sentdm/models/channels/rcs_agent.rbi +320 -0
- data/rbi/sentdm/models/channels/sms_create_params.rbi +291 -0
- data/rbi/sentdm/models/channels/sms_list_params.rbi +40 -0
- data/rbi/sentdm/models/channels/sms_market.rbi +247 -0
- data/rbi/sentdm/models/channels/sms_number.rbi +60 -0
- data/rbi/sentdm/models/channels/sms_number_request.rbi +48 -0
- data/rbi/sentdm/models/channels/sms_retrieve_params.rbi +56 -0
- data/rbi/sentdm/models/channels/sms_update_params.rbi +93 -0
- data/rbi/sentdm/models/channels/supplied_compliance.rbi +140 -0
- data/rbi/sentdm/models/channels/supplied_document.rbi +57 -0
- data/rbi/sentdm/models/channels/whatsapp_channel.rbi +172 -0
- data/rbi/sentdm/models/channels/whatsapp_create_params.rbi +104 -0
- data/rbi/sentdm/models/channels_state.rbi +151 -0
- data/rbi/sentdm/models/compliance_attachment_template.rbi +56 -0
- data/rbi/sentdm/models/compliance_requirement.rbi +149 -0
- data/rbi/sentdm/models/compliance_requirements.rbi +165 -0
- data/rbi/sentdm/models/compliance_retrieve_requirements_params.rbi +79 -0
- data/rbi/sentdm/models/compliance_setup_step.rbi +115 -0
- data/rbi/sentdm/models/contact_message_summary.rbi +4 -69
- data/rbi/sentdm/models/contacts_list.rbi +50 -0
- data/rbi/sentdm/models/conversation_messages_list.rbi +4 -669
- data/rbi/sentdm/models/entity_type.rbi +23 -0
- data/rbi/sentdm/models/inbound_media.rbi +76 -0
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +3 -85
- data/rbi/sentdm/models/link_event.rbi +128 -0
- data/rbi/sentdm/models/link_event_payload.rbi +279 -0
- data/rbi/sentdm/models/message.rbi +214 -0
- data/rbi/sentdm/models/message_activities.rbi +63 -0
- data/rbi/sentdm/models/message_activity.rbi +145 -0
- data/rbi/sentdm/models/message_body.rbi +104 -0
- data/rbi/sentdm/models/message_button.rbi +52 -0
- data/rbi/sentdm/models/message_cancel_params.rbi +59 -0
- data/rbi/sentdm/models/message_channel_options.rbi +65 -0
- data/rbi/sentdm/models/message_event_payload.rbi +4 -2
- data/rbi/sentdm/models/message_header_media.rbi +44 -0
- data/rbi/sentdm/models/message_media.rbi +95 -0
- data/rbi/sentdm/models/message_recipient.rbi +70 -0
- data/rbi/sentdm/models/message_send_params.rbi +7 -155
- data/rbi/sentdm/models/message_send_response.rbi +4 -163
- data/rbi/sentdm/models/message_send_result.rbi +85 -0
- data/rbi/sentdm/models/message_status_event.rbi +70 -0
- data/rbi/sentdm/models/mms_market.rbi +66 -0
- data/rbi/sentdm/models/number_lookup_result.rbi +89 -0
- data/rbi/sentdm/models/pagination_cursors.rbi +42 -0
- data/rbi/sentdm/models/pagination_meta.rbi +4 -43
- data/rbi/sentdm/models/profile_completion_accepted.rbi +33 -0
- data/rbi/sentdm/models/profile_completion_result.rbi +43 -0
- data/rbi/sentdm/models/profile_detail.rbi +8 -621
- data/rbi/sentdm/models/profiles/brand_campaign.rbi +3 -45
- data/rbi/sentdm/models/profiles_list.rbi +50 -0
- data/rbi/sentdm/models/sender_profile.rbi +204 -0
- data/rbi/sentdm/models/sender_profile_billing.rbi +34 -0
- data/rbi/sentdm/models/sender_profile_billing_request.rbi +46 -0
- data/rbi/sentdm/models/sender_profile_channels.rbi +163 -0
- data/rbi/sentdm/models/sender_profile_create_params.rbi +190 -0
- data/rbi/sentdm/models/sender_profile_delete_params.rbi +35 -0
- data/rbi/sentdm/models/sender_profile_list_params.rbi +57 -0
- data/rbi/sentdm/models/sender_profile_rcs.rbi +211 -0
- data/rbi/sentdm/models/sender_profile_retrieve_params.rbi +35 -0
- data/rbi/sentdm/models/sender_profile_sms.rbi +156 -0
- data/rbi/sentdm/models/sender_profile_update_params.rbi +96 -0
- data/rbi/sentdm/models/sender_profile_whatsapp.rbi +83 -0
- data/rbi/sentdm/models/sender_profiles_list.rbi +54 -0
- data/rbi/sentdm/models/tcr_brand_identity_status.rbi +27 -0
- data/rbi/sentdm/models/tcr_brand_status.rbi +20 -0
- data/rbi/sentdm/models/tcr_campaign_status.rbi +23 -0
- data/rbi/sentdm/models/template_body.rbi +6 -114
- data/rbi/sentdm/models/template_create_params.rbi +12 -0
- data/rbi/sentdm/models/template_header.rbi +4 -53
- data/rbi/sentdm/models/template_header_location.rbi +47 -0
- data/rbi/sentdm/models/template_media_item.rbi +51 -0
- data/rbi/sentdm/models/template_mms_body_content.rbi +73 -0
- data/rbi/sentdm/models/template_ref.rbi +79 -0
- data/rbi/sentdm/models/template_variable.rbi +4 -80
- data/rbi/sentdm/models/template_variable_props.rbi +81 -0
- data/rbi/sentdm/models/templates_list.rbi +50 -0
- data/rbi/sentdm/models/users_list.rbi +50 -0
- data/rbi/sentdm/models/voice/call.rbi +3 -86
- data/rbi/sentdm/models/voice/call_leg.rbi +90 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +4 -49
- data/rbi/sentdm/models/webhook_delivery.rbi +211 -0
- data/rbi/sentdm/models/webhook_event_types_list.rbi +54 -0
- data/rbi/sentdm/models/webhook_events_list.rbi +52 -0
- data/rbi/sentdm/models/webhook_response.rbi +4 -50
- data/rbi/sentdm/models/webhook_secret.rbi +24 -0
- data/rbi/sentdm/models/webhook_sender_profile.rbi +46 -0
- data/rbi/sentdm/models/webhook_sender_profile_config.rbi +44 -0
- data/rbi/sentdm/models/webhook_test.rbi +32 -0
- data/rbi/sentdm/models/webhook_update_params.rbi +4 -49
- data/rbi/sentdm/models/webhooks_list.rbi +50 -0
- data/rbi/sentdm/models.rbi +197 -0
- data/rbi/sentdm/resources/channels/rcs.rbi +208 -0
- data/rbi/sentdm/resources/channels/sms.rbi +437 -0
- data/rbi/sentdm/resources/channels/whatsapp.rbi +108 -0
- data/rbi/sentdm/resources/channels.rbi +149 -0
- data/rbi/sentdm/resources/compliance.rbi +121 -0
- data/rbi/sentdm/resources/conversations.rbi +2 -10
- data/rbi/sentdm/resources/me.rbi +1 -1
- data/rbi/sentdm/resources/messages.rbi +66 -8
- data/rbi/sentdm/resources/numbers.rbi +1 -1
- data/rbi/sentdm/resources/profiles.rbi +2 -2
- data/rbi/sentdm/resources/sender_profiles.rbi +461 -0
- data/rbi/sentdm/resources/templates.rbi +7 -2
- data/rbi/sentdm/resources/users.rbi +1 -1
- data/rbi/sentdm/resources/webhooks.rbi +6 -12
- data/sig/sentdm/client.rbs +4 -0
- data/sig/sentdm/internal/sender_profiles_page.rbs +80 -0
- data/sig/sentdm/models/account.rbs +111 -0
- data/sig/sentdm/models/account_channels.rbs +38 -0
- data/sig/sentdm/models/account_profile.rbs +68 -0
- data/sig/sentdm/models/account_rcs_channel.rbs +17 -0
- data/sig/sentdm/models/account_sms_channel.rbs +17 -0
- data/sig/sentdm/models/account_whatsapp_channel.rbs +28 -0
- data/sig/sentdm/models/api_response_of_account.rbs +39 -0
- data/sig/sentdm/models/api_response_of_cancelled_message.rbs +39 -0
- data/sig/sentdm/models/api_response_of_channels_state.rbs +39 -0
- data/sig/sentdm/models/api_response_of_compliance_requirements.rbs +39 -0
- data/sig/sentdm/models/api_response_of_contacts_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_message.rbs +39 -0
- data/sig/sentdm/models/api_response_of_message_activities.rbs +39 -0
- data/sig/sentdm/models/api_response_of_number_lookup_result.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_completion_accepted.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profile_completion_result.rbs +39 -0
- data/sig/sentdm/models/api_response_of_profiles_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_sender_profile.rbs +39 -0
- data/sig/sentdm/models/api_response_of_sender_profiles_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_templates_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_users_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_event_types_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_events_list.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_secret.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhook_test.rbs +39 -0
- data/sig/sentdm/models/api_response_of_webhooks_list.rbs +39 -0
- data/sig/sentdm/models/billing_contact.rbs +30 -0
- data/sig/sentdm/models/brand_business.rbs +70 -0
- data/sig/sentdm/models/brand_business_info.rbs +4 -23
- data/sig/sentdm/models/brand_compliance.rbs +56 -0
- data/sig/sentdm/models/brand_contact.rbs +47 -0
- data/sig/sentdm/models/brand_with_kyc.rbs +93 -0
- data/sig/sentdm/models/cancelled_message.rbs +15 -0
- data/sig/sentdm/models/channel_event_payload.rbs +4 -56
- data/sig/sentdm/models/channel_list_params.rbs +25 -0
- data/sig/sentdm/models/channel_score.rbs +32 -0
- data/sig/sentdm/models/channels/api_response_of_list_of_sms_market.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_rcs_agent.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_sms_market.rbs +41 -0
- data/sig/sentdm/models/channels/api_response_of_whatsapp_channel.rbs +43 -0
- data/sig/sentdm/models/channels/market_compliance.rbs +338 -0
- data/sig/sentdm/models/channels/rc_create_params.rbs +242 -0
- data/sig/sentdm/models/channels/rcs_address.rbs +42 -0
- data/sig/sentdm/models/channels/rcs_agent.rbs +181 -0
- data/sig/sentdm/models/channels/sms_create_params.rbs +116 -0
- data/sig/sentdm/models/channels/sms_list_params.rbs +27 -0
- data/sig/sentdm/models/channels/sms_market.rbs +85 -0
- data/sig/sentdm/models/channels/sms_number.rbs +28 -0
- data/sig/sentdm/models/channels/sms_number_request.rbs +17 -0
- data/sig/sentdm/models/channels/sms_retrieve_params.rbs +36 -0
- data/sig/sentdm/models/channels/sms_update_params.rbs +63 -0
- data/sig/sentdm/models/channels/supplied_compliance.rbs +32 -0
- data/sig/sentdm/models/channels/supplied_document.rbs +30 -0
- data/sig/sentdm/models/channels/whatsapp_channel.rbs +78 -0
- data/sig/sentdm/models/channels/whatsapp_create_params.rbs +56 -0
- data/sig/sentdm/models/channels_state.rbs +55 -0
- data/sig/sentdm/models/compliance_attachment_template.rbs +26 -0
- data/sig/sentdm/models/compliance_requirement.rbs +76 -0
- data/sig/sentdm/models/compliance_requirements.rbs +66 -0
- data/sig/sentdm/models/compliance_retrieve_requirements_params.rbs +43 -0
- data/sig/sentdm/models/compliance_setup_step.rbs +62 -0
- data/sig/sentdm/models/contact_message_summary.rbs +6 -35
- data/sig/sentdm/models/contacts_list.rbs +31 -0
- data/sig/sentdm/models/conversation_messages_list.rbs +5 -312
- data/sig/sentdm/models/entity_type.rbs +22 -0
- data/sig/sentdm/models/inbound_media.rbs +35 -0
- data/sig/sentdm/models/inbound_message_event_payload.rbs +4 -36
- data/sig/sentdm/models/link_event.rbs +44 -0
- data/sig/sentdm/models/link_event_payload.rbs +106 -0
- data/sig/sentdm/models/message.rbs +130 -0
- data/sig/sentdm/models/message_activities.rbs +38 -0
- data/sig/sentdm/models/message_activity.rbs +66 -0
- data/sig/sentdm/models/message_body.rbs +52 -0
- data/sig/sentdm/models/message_button.rbs +34 -0
- data/sig/sentdm/models/message_cancel_params.rbs +38 -0
- data/sig/sentdm/models/message_channel_options.rbs +26 -0
- data/sig/sentdm/models/message_header_media.rbs +19 -0
- data/sig/sentdm/models/message_media.rbs +40 -0
- data/sig/sentdm/models/message_recipient.rbs +34 -0
- data/sig/sentdm/models/message_send_params.rbs +8 -54
- data/sig/sentdm/models/message_send_response.rbs +4 -77
- data/sig/sentdm/models/message_send_result.rbs +45 -0
- data/sig/sentdm/models/message_status_event.rbs +40 -0
- data/sig/sentdm/models/mms_market.rbs +35 -0
- data/sig/sentdm/models/number_lookup_result.rbs +64 -0
- data/sig/sentdm/models/pagination_cursors.rbs +15 -0
- data/sig/sentdm/models/pagination_meta.rbs +4 -16
- data/sig/sentdm/models/profile_completion_accepted.rbs +15 -0
- data/sig/sentdm/models/profile_completion_result.rbs +19 -0
- data/sig/sentdm/models/profile_detail.rbs +8 -315
- data/sig/sentdm/models/profiles/brand_campaign.rbs +4 -16
- data/sig/sentdm/models/profiles_list.rbs +31 -0
- data/sig/sentdm/models/sender_profile.rbs +76 -0
- data/sig/sentdm/models/sender_profile_billing.rbs +15 -0
- data/sig/sentdm/models/sender_profile_billing_request.rbs +15 -0
- data/sig/sentdm/models/sender_profile_channels.rbs +30 -0
- data/sig/sentdm/models/sender_profile_create_params.rbs +78 -0
- data/sig/sentdm/models/sender_profile_delete_params.rbs +20 -0
- data/sig/sentdm/models/sender_profile_list_params.rbs +32 -0
- data/sig/sentdm/models/sender_profile_rcs.rbs +150 -0
- data/sig/sentdm/models/sender_profile_retrieve_params.rbs +20 -0
- data/sig/sentdm/models/sender_profile_sms.rbs +40 -0
- data/sig/sentdm/models/sender_profile_update_params.rbs +62 -0
- data/sig/sentdm/models/sender_profile_whatsapp.rbs +16 -0
- data/sig/sentdm/models/sender_profiles_list.rbs +31 -0
- data/sig/sentdm/models/tcr_brand_identity_status.rbs +17 -0
- data/sig/sentdm/models/tcr_brand_status.rbs +15 -0
- data/sig/sentdm/models/tcr_campaign_status.rbs +15 -0
- data/sig/sentdm/models/template_body.rbs +4 -43
- data/sig/sentdm/models/template_create_params.rbs +5 -0
- data/sig/sentdm/models/template_header.rbs +4 -31
- data/sig/sentdm/models/template_header_location.rbs +30 -0
- data/sig/sentdm/models/template_media_item.rbs +17 -0
- data/sig/sentdm/models/template_mms_body_content.rbs +28 -0
- data/sig/sentdm/models/template_ref.rbs +26 -0
- data/sig/sentdm/models/template_variable.rbs +4 -51
- data/sig/sentdm/models/template_variable_props.rbs +50 -0
- data/sig/sentdm/models/templates_list.rbs +29 -0
- data/sig/sentdm/models/users_list.rbs +31 -0
- data/sig/sentdm/models/voice/call.rbs +4 -49
- data/sig/sentdm/models/voice/call_leg.rbs +50 -0
- data/sig/sentdm/models/webhook_create_params.rbs +4 -28
- data/sig/sentdm/models/webhook_delivery.rbs +99 -0
- data/sig/sentdm/models/webhook_event_types_list.rbs +31 -0
- data/sig/sentdm/models/webhook_events_list.rbs +31 -0
- data/sig/sentdm/models/webhook_response.rbs +4 -28
- data/sig/sentdm/models/webhook_secret.rbs +15 -0
- data/sig/sentdm/models/webhook_sender_profile.rbs +27 -0
- data/sig/sentdm/models/webhook_sender_profile_config.rbs +27 -0
- data/sig/sentdm/models/webhook_test.rbs +19 -0
- data/sig/sentdm/models/webhook_update_params.rbs +4 -28
- data/sig/sentdm/models/webhooks_list.rbs +31 -0
- data/sig/sentdm/models.rbs +188 -0
- data/sig/sentdm/resources/channels/rcs.rbs +41 -0
- data/sig/sentdm/resources/channels/sms.rbs +44 -0
- data/sig/sentdm/resources/channels/whatsapp.rbs +18 -0
- data/sig/sentdm/resources/channels.rbs +11 -0
- data/sig/sentdm/resources/compliance.rbs +15 -0
- data/sig/sentdm/resources/conversations.rbs +2 -2
- data/sig/sentdm/resources/me.rbs +1 -1
- data/sig/sentdm/resources/messages.rbs +12 -4
- data/sig/sentdm/resources/numbers.rbs +1 -1
- data/sig/sentdm/resources/profiles.rbs +2 -2
- data/sig/sentdm/resources/sender_profiles.rbs +44 -0
- data/sig/sentdm/resources/templates.rbs +1 -0
- data/sig/sentdm/resources/users.rbs +1 -1
- data/sig/sentdm/resources/webhooks.rbs +6 -6
- metadata +362 -35
- data/lib/sentdm/models/me_retrieve_response.rb +0 -409
- data/lib/sentdm/models/message_retrieve_activities_response.rb +0 -175
- data/lib/sentdm/models/message_retrieve_status_response.rb +0 -477
- data/lib/sentdm/models/number_lookup_response.rb +0 -104
- data/lib/sentdm/models/profile_complete_response.rb +0 -74
- data/lib/sentdm/models/profile_list_response.rb +0 -65
- data/lib/sentdm/models/user_list_response.rb +0 -65
- data/lib/sentdm/models/webhook_list_event_types_response.rb +0 -65
- data/lib/sentdm/models/webhook_list_events_response.rb +0 -445
- data/rbi/sentdm/models/me_retrieve_response.rbi +0 -705
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +0 -319
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +0 -765
- data/rbi/sentdm/models/number_lookup_response.rbi +0 -166
- data/rbi/sentdm/models/profile_list_response.rbi +0 -128
- data/rbi/sentdm/models/user_list_response.rbi +0 -128
- data/rbi/sentdm/models/webhook_list_event_types_response.rbi +0 -142
- data/rbi/sentdm/models/webhook_list_events_response.rbi +0 -647
- data/sig/sentdm/models/me_retrieve_response.rbs +0 -306
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +0 -137
- data/sig/sentdm/models/message_retrieve_status_response.rbs +0 -341
- data/sig/sentdm/models/number_lookup_response.rbs +0 -100
- data/sig/sentdm/models/profile_complete_response.rbs +0 -55
- data/sig/sentdm/models/profile_list_response.rbs +0 -67
- data/sig/sentdm/models/user_list_response.rbs +0 -67
- data/sig/sentdm/models/webhook_list_event_types_response.rbs +0 -67
- data/sig/sentdm/models/webhook_list_events_response.rbs +0 -243
- data/sig/sentdm/models/webhook_rotate_secret_response.rbs +0 -51
- data/sig/sentdm/models/webhook_test_response.rbs +0 -55
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
class Channels
|
|
6
|
+
# The senders you send from, one per channel.
|
|
7
|
+
#
|
|
8
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
9
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
10
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
11
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
12
|
+
# number**: each number you hold can carry phone calls on its own
|
|
13
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
14
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
15
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
16
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
17
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
18
|
+
#
|
|
19
|
+
# ## Compliance lives on the market
|
|
20
|
+
#
|
|
21
|
+
# Adding a market records everything that market registers with, in its
|
|
22
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
23
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
24
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
25
|
+
# for none at all.
|
|
26
|
+
#
|
|
27
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
28
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
29
|
+
# `requirements` is the path into the body that clears it.
|
|
30
|
+
#
|
|
31
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
32
|
+
# before you hold it, with a body you can fill in and post.
|
|
33
|
+
class Whatsapp
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Sentdm::Models::Channels::WhatsappCreateParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# Connects a WhatsApp Business Account shared with us through a Multi-Partner
|
|
38
|
+
# Solution to the calling sender profile. Send `x-profile-id` for the profile the
|
|
39
|
+
# account belongs to.
|
|
40
|
+
#
|
|
41
|
+
# **Two fields, because everything else is derived.** `waba_id` says which of your
|
|
42
|
+
# organization's shared accounts this is — you hold one per client, and nothing
|
|
43
|
+
# else can say which. `phone_number_id` names the account's number, which is what
|
|
44
|
+
# assigns it to the profile as the number it sends from.
|
|
45
|
+
#
|
|
46
|
+
# The solution the account arrived through, the client business portfolio that
|
|
47
|
+
# owns it, the access token and its expiry are all resolved from your
|
|
48
|
+
# organization. They are not accepted here: the first two are Meta's answer about
|
|
49
|
+
# provenance, and the token is minted per client business and rotates roughly
|
|
50
|
+
# every sixty days, so a value you sent would be stale before it was useful.
|
|
51
|
+
#
|
|
52
|
+
# `phone_number_id` is optional. Omit it to connect the account now and settle the
|
|
53
|
+
# number later — the channel reads as `ACTION_NEEDED` with `reason_code`
|
|
54
|
+
# `CHANNEL_007`, and the profile's WhatsApp messages fail until a number is named.
|
|
55
|
+
# They do not fall back to your organization's account. Call this endpoint again
|
|
56
|
+
# with `phone_number_id` to name one.
|
|
57
|
+
#
|
|
58
|
+
# The same resolution runs behind `channels.whatsapp` on
|
|
59
|
+
# `POST /v3/sender-profiles`, so connecting at create and connecting afterwards
|
|
60
|
+
# fill the same fields.
|
|
61
|
+
#
|
|
62
|
+
# Returns **the account**, not every channel you have — adding one cannot change a
|
|
63
|
+
# market or an RCS agent, and `GET /v3/channels` is the whole picture. Giving an
|
|
64
|
+
# account up is not self-service: ask support, because deregistering a number
|
|
65
|
+
# lands in your own Meta business.
|
|
66
|
+
#
|
|
67
|
+
# @overload create(phone_number_id: nil, sandbox: nil, waba_id: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
68
|
+
#
|
|
69
|
+
# @param phone_number_id [String, nil] Body param: The Meta phone-number id of the number on WabaId, which assigns it t
|
|
70
|
+
#
|
|
71
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
72
|
+
#
|
|
73
|
+
# @param waba_id [String] Body param: WhatsApp Business Account id — one of the accounts shared into your
|
|
74
|
+
#
|
|
75
|
+
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
76
|
+
#
|
|
77
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
78
|
+
#
|
|
79
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
80
|
+
#
|
|
81
|
+
# @return [Sentdm::Models::Channels::APIResponseOfWhatsappChannel]
|
|
82
|
+
#
|
|
83
|
+
# @see Sentdm::Models::Channels::WhatsappCreateParams
|
|
84
|
+
def create(params = {})
|
|
85
|
+
parsed, options = Sentdm::Channels::WhatsappCreateParams.dump_request(params)
|
|
86
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
87
|
+
@client.request(
|
|
88
|
+
method: :post,
|
|
89
|
+
path: "v3/channels/whatsapp",
|
|
90
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
91
|
+
body: parsed.except(*header_params.keys),
|
|
92
|
+
model: Sentdm::Channels::APIResponseOfWhatsappChannel,
|
|
93
|
+
options: options
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @api private
|
|
98
|
+
#
|
|
99
|
+
# @param client [Sentdm::Client]
|
|
100
|
+
def initialize(client:)
|
|
101
|
+
@client = client
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -2,7 +2,124 @@
|
|
|
2
2
|
|
|
3
3
|
module Sentdm
|
|
4
4
|
module Resources
|
|
5
|
+
# The senders you send from, one per channel.
|
|
6
|
+
#
|
|
7
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
8
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
9
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
10
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
11
|
+
# number**: each number you hold can carry phone calls on its own
|
|
12
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
13
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
14
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
15
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
16
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
17
|
+
#
|
|
18
|
+
# ## Compliance lives on the market
|
|
19
|
+
#
|
|
20
|
+
# Adding a market records everything that market registers with, in its
|
|
21
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
22
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
23
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
24
|
+
# for none at all.
|
|
25
|
+
#
|
|
26
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
27
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
28
|
+
# `requirements` is the path into the body that clears it.
|
|
29
|
+
#
|
|
30
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
31
|
+
# before you hold it, with a body you can fill in and post.
|
|
5
32
|
class Channels
|
|
33
|
+
# The senders you send from, one per channel.
|
|
34
|
+
#
|
|
35
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
36
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
37
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
38
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
39
|
+
# number**: each number you hold can carry phone calls on its own
|
|
40
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
41
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
42
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
43
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
44
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
45
|
+
#
|
|
46
|
+
# ## Compliance lives on the market
|
|
47
|
+
#
|
|
48
|
+
# Adding a market records everything that market registers with, in its
|
|
49
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
50
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
51
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
52
|
+
# for none at all.
|
|
53
|
+
#
|
|
54
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
55
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
56
|
+
# `requirements` is the path into the body that clears it.
|
|
57
|
+
#
|
|
58
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
59
|
+
# before you hold it, with a body you can fill in and post.
|
|
60
|
+
# @return [Sentdm::Resources::Channels::SMS]
|
|
61
|
+
attr_reader :sms
|
|
62
|
+
|
|
63
|
+
# The senders you send from, one per channel.
|
|
64
|
+
#
|
|
65
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
66
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
67
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
68
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
69
|
+
# number**: each number you hold can carry phone calls on its own
|
|
70
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
71
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
72
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
73
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
74
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
75
|
+
#
|
|
76
|
+
# ## Compliance lives on the market
|
|
77
|
+
#
|
|
78
|
+
# Adding a market records everything that market registers with, in its
|
|
79
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
80
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
81
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
82
|
+
# for none at all.
|
|
83
|
+
#
|
|
84
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
85
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
86
|
+
# `requirements` is the path into the body that clears it.
|
|
87
|
+
#
|
|
88
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
89
|
+
# before you hold it, with a body you can fill in and post.
|
|
90
|
+
# @return [Sentdm::Resources::Channels::Rcs]
|
|
91
|
+
attr_reader :rcs
|
|
92
|
+
|
|
93
|
+
# The senders you send from, one per channel.
|
|
94
|
+
#
|
|
95
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
96
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
97
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
98
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
99
|
+
# number**: each number you hold can carry phone calls on its own
|
|
100
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
101
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
102
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
103
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
104
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
105
|
+
#
|
|
106
|
+
# ## Compliance lives on the market
|
|
107
|
+
#
|
|
108
|
+
# Adding a market records everything that market registers with, in its
|
|
109
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
110
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
111
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
112
|
+
# for none at all.
|
|
113
|
+
#
|
|
114
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
115
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
116
|
+
# `requirements` is the path into the body that clears it.
|
|
117
|
+
#
|
|
118
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
119
|
+
# before you hold it, with a body you can fill in and post.
|
|
120
|
+
# @return [Sentdm::Resources::Channels::Whatsapp]
|
|
121
|
+
attr_reader :whatsapp
|
|
122
|
+
|
|
6
123
|
# The senders you send from, one per channel.
|
|
7
124
|
#
|
|
8
125
|
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
@@ -33,11 +150,56 @@ module Sentdm
|
|
|
33
150
|
# @return [Sentdm::Resources::Channels::Voice]
|
|
34
151
|
attr_reader :voice
|
|
35
152
|
|
|
153
|
+
# Some parameter documentations has been truncated, see
|
|
154
|
+
# {Sentdm::Models::ChannelListParams} for more details.
|
|
155
|
+
#
|
|
156
|
+
# Every market you send SMS in, your WhatsApp account, your RCS agent and the
|
|
157
|
+
# numbers you carry phone calls on — with each one's status, and what each market
|
|
158
|
+
# has supplied.
|
|
159
|
+
#
|
|
160
|
+
# **Status lives on the channel, never on you or your brand.** An identity has no
|
|
161
|
+
# lifecycle; what has one is the registration of a sender in a market and the
|
|
162
|
+
# approval of a channel. So a customer live in one country and mid-registration in
|
|
163
|
+
# another reports exactly that, rather than one flattened answer.
|
|
164
|
+
#
|
|
165
|
+
# `sms[n].compliance` carries what each market holds: `brand` and `campaign` for
|
|
166
|
+
# markets that register with a compliance regime such as US TEN_DLC, and
|
|
167
|
+
# `documents` for markets that pre-register an alphanumeric or similar sender.
|
|
168
|
+
# Absent means the market registers with nobody and nothing has been supplied.
|
|
169
|
+
# `GET /v3/compliance/requirements` says what a market demands of any new
|
|
170
|
+
# customer; this says what you gave it.
|
|
171
|
+
#
|
|
172
|
+
# Send `x-profile-id` with an organization key to read one of your profiles'
|
|
173
|
+
# channels.
|
|
174
|
+
#
|
|
175
|
+
# @overload list(x_profile_id: nil, request_options: {})
|
|
176
|
+
#
|
|
177
|
+
# @param x_profile_id [String] Profile UUID to scope the request to a child profile. Only organization API keys
|
|
178
|
+
#
|
|
179
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
180
|
+
#
|
|
181
|
+
# @return [Sentdm::Models::APIResponseOfChannelsState]
|
|
182
|
+
#
|
|
183
|
+
# @see Sentdm::Models::ChannelListParams
|
|
184
|
+
def list(params = {})
|
|
185
|
+
parsed, options = Sentdm::ChannelListParams.dump_request(params)
|
|
186
|
+
@client.request(
|
|
187
|
+
method: :get,
|
|
188
|
+
path: "v3/channels",
|
|
189
|
+
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
190
|
+
model: Sentdm::APIResponseOfChannelsState,
|
|
191
|
+
options: options
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
36
195
|
# @api private
|
|
37
196
|
#
|
|
38
197
|
# @param client [Sentdm::Client]
|
|
39
198
|
def initialize(client:)
|
|
40
199
|
@client = client
|
|
200
|
+
@sms = Sentdm::Resources::Channels::SMS.new(client: client)
|
|
201
|
+
@rcs = Sentdm::Resources::Channels::Rcs.new(client: client)
|
|
202
|
+
@whatsapp = Sentdm::Resources::Channels::Whatsapp.new(client: client)
|
|
41
203
|
@voice = Sentdm::Resources::Channels::Voice.new(client: client)
|
|
42
204
|
end
|
|
43
205
|
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Resources
|
|
5
|
+
# What a market demands, before you have it.
|
|
6
|
+
#
|
|
7
|
+
# Requirements vary enormously and change without notice. US `TEN_DLC` registers a
|
|
8
|
+
# brand and a campaign with The Campaign Registry and asks a substantial set of
|
|
9
|
+
# questions; an alphanumeric sender pre-registers with documents in one country
|
|
10
|
+
# and needs nothing in another.
|
|
11
|
+
#
|
|
12
|
+
# This is the authoritative answer for whichever market you ask about, and it is
|
|
13
|
+
# generated from the same declaration that validates the calls themselves — so it
|
|
14
|
+
# cannot drift from what is actually enforced. The response includes the request
|
|
15
|
+
# body to send, with every key that market wants already present and blank.
|
|
16
|
+
#
|
|
17
|
+
# What you supplied, as opposed to what is asked of you, is reported on the market
|
|
18
|
+
# under **Channels**.
|
|
19
|
+
class Compliance
|
|
20
|
+
# Some parameter documentations has been truncated, see
|
|
21
|
+
# {Sentdm::Models::ComplianceRetrieveRequirementsParams} for more details.
|
|
22
|
+
#
|
|
23
|
+
# **Call this first.** It returns what a channel, country and sender type demand
|
|
24
|
+
# before you can send there — and `setup[]`, the calls that satisfy those demands,
|
|
25
|
+
# in order, each with a body you can copy and send as it stands. You never have to
|
|
26
|
+
# track forty countries' rules yourself.
|
|
27
|
+
#
|
|
28
|
+
# ## Channel
|
|
29
|
+
#
|
|
30
|
+
# `channel` is `sms`, `whatsapp` or `rcs`, and **defaults to `sms`** — so a caller
|
|
31
|
+
# that omits it gets exactly what this endpoint has always returned.
|
|
32
|
+
#
|
|
33
|
+
# `sms` is the only one answered today; the other two are `501` until their
|
|
34
|
+
# requirements are declared. They are refused rather than answered with an empty
|
|
35
|
+
# requirement set, because empty would say the channel demands nothing, and both
|
|
36
|
+
# demand plenty — WhatsApp a business verification and a display name review, RCS
|
|
37
|
+
# a carrier approval. Saying "not yet" is the true answer and the same one
|
|
38
|
+
# `POST /v3/sender-profiles` gives for `channels.whatsapp`.
|
|
39
|
+
#
|
|
40
|
+
# `type` is an SMS sender type, and SMS is the only channel whose senders have
|
|
41
|
+
# one.
|
|
42
|
+
#
|
|
43
|
+
# Requirements vary enormously. US `TEN_DLC` registers a brand and a campaign with
|
|
44
|
+
# The Campaign Registry and asks for a substantial set of values. An alphanumeric
|
|
45
|
+
# sender in one country pre-registers with supporting documents; in another it
|
|
46
|
+
# needs nothing at all. This is the authoritative answer for whichever market you
|
|
47
|
+
# are asking about, and it is the same declaration used to validate the calls
|
|
48
|
+
# themselves — so it can never drift from what is actually enforced.
|
|
49
|
+
#
|
|
50
|
+
# ## `setup[]` — what to do
|
|
51
|
+
#
|
|
52
|
+
# **One step.** `POST /v3/channels/sms` adds the market and records everything it
|
|
53
|
+
# registers with — the identity in `compliance.brand`, the programme in
|
|
54
|
+
# `compliance.campaign`. There were three, in a load-bearing order, while the
|
|
55
|
+
# identity and the campaign were resources of their own; they are members of this
|
|
56
|
+
# call's body now, so there is nothing to sequence.
|
|
57
|
+
#
|
|
58
|
+
# Correct any of it afterwards with `PATCH /v3/channels/sms/{country}/{type}`,
|
|
59
|
+
# which takes the same `compliance` object one key at a time.
|
|
60
|
+
#
|
|
61
|
+
# Each step's `body` has every key that market wants already present, with the
|
|
62
|
+
# values left **blank**. Blank rather than filled with placeholders, because the
|
|
63
|
+
# body is meant to be sent: a null value counts as not supplied, so posting a step
|
|
64
|
+
# verbatim comes back naming every blank you left. `attachments[]` lists files to
|
|
65
|
+
# send as multipart on the channel call, each under the field name given — a file
|
|
66
|
+
# cannot be a JSON value, so documents are never listed in `compliance[]`.
|
|
67
|
+
#
|
|
68
|
+
# Every step is a call for whoever holds the key. To set a **sender profile** up
|
|
69
|
+
# instead, send the same requests with the `x-profile-id` header naming it; there
|
|
70
|
+
# is no separate path.
|
|
71
|
+
#
|
|
72
|
+
# ## `requirements[]` — what each value means
|
|
73
|
+
#
|
|
74
|
+
# Each entry names a key for the `compliance` array, its value type, and whether
|
|
75
|
+
# it is required. `required_when` marks values needed only in certain cases —
|
|
76
|
+
# evaluate it against your own payload, e.g. `brand.entity_type == PUBLIC_PROFIT`.
|
|
77
|
+
# `options` lists accepted values where the market constrains them, and `label` is
|
|
78
|
+
# suitable for rendering a form field.
|
|
79
|
+
#
|
|
80
|
+
# Values Sent supplies on your behalf are never listed: correlation ids,
|
|
81
|
+
# environment flags, carrier elections, and booleans derivable from what you
|
|
82
|
+
# already send.
|
|
83
|
+
#
|
|
84
|
+
# ## When nothing is required
|
|
85
|
+
#
|
|
86
|
+
# `required` is `false` and `requirements` is empty, and the single `setup` step
|
|
87
|
+
# carries no `compliance` array at all. A `sender_id_pattern` may still be present
|
|
88
|
+
# — many markets constrain the sender string without registering anything.
|
|
89
|
+
#
|
|
90
|
+
# @overload retrieve_requirements(channel: nil, country: nil, type: nil, x_profile_id: nil, request_options: {})
|
|
91
|
+
#
|
|
92
|
+
# @param channel [String, nil] Query param: Channel the sender is for: sms, whatsapp or rcs. Defaults to sms, w
|
|
93
|
+
#
|
|
94
|
+
# @param country [String, nil] Query param: ISO 3166-1 alpha-2 country code, e.g. US, XK, IN
|
|
95
|
+
#
|
|
96
|
+
# @param type [String, nil] Query param: Sender type: LOCAL, MOBILE, TEN_DLC, TOLL_FREE, SHORT_CODE, ALPHANU
|
|
97
|
+
#
|
|
98
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
99
|
+
#
|
|
100
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
101
|
+
#
|
|
102
|
+
# @return [Sentdm::Models::APIResponseOfComplianceRequirements]
|
|
103
|
+
#
|
|
104
|
+
# @see Sentdm::Models::ComplianceRetrieveRequirementsParams
|
|
105
|
+
def retrieve_requirements(params = {})
|
|
106
|
+
query_params = [:channel, :country, :type]
|
|
107
|
+
parsed, options = Sentdm::ComplianceRetrieveRequirementsParams.dump_request(params)
|
|
108
|
+
query = Sentdm::Internal::Util.encode_query_params(parsed.slice(*query_params))
|
|
109
|
+
@client.request(
|
|
110
|
+
method: :get,
|
|
111
|
+
path: "v3/compliance/requirements",
|
|
112
|
+
query: query,
|
|
113
|
+
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
114
|
+
model: Sentdm::APIResponseOfComplianceRequirements,
|
|
115
|
+
options: options
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @api private
|
|
120
|
+
#
|
|
121
|
+
# @param client [Sentdm::Client]
|
|
122
|
+
def initialize(client:)
|
|
123
|
+
@client = client
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -27,7 +27,7 @@ module Sentdm
|
|
|
27
27
|
#
|
|
28
28
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
29
29
|
#
|
|
30
|
-
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::
|
|
30
|
+
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::Message>]
|
|
31
31
|
#
|
|
32
32
|
# @see Sentdm::Models::ConversationListParams
|
|
33
33
|
def list(params = {})
|
|
@@ -40,7 +40,7 @@ module Sentdm
|
|
|
40
40
|
query: query,
|
|
41
41
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
42
42
|
page: Sentdm::Internal::ConversationsPage,
|
|
43
|
-
model: Sentdm::
|
|
43
|
+
model: Sentdm::Message,
|
|
44
44
|
options: options
|
|
45
45
|
)
|
|
46
46
|
end
|
|
@@ -63,7 +63,7 @@ module Sentdm
|
|
|
63
63
|
#
|
|
64
64
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
65
65
|
#
|
|
66
|
-
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::
|
|
66
|
+
# @return [Sentdm::Internal::ConversationsPage<Sentdm::Models::Message>]
|
|
67
67
|
#
|
|
68
68
|
# @see Sentdm::Models::ConversationListMessagesParams
|
|
69
69
|
def list_messages(id, params = {})
|
|
@@ -76,7 +76,7 @@ module Sentdm
|
|
|
76
76
|
query: query,
|
|
77
77
|
headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
|
|
78
78
|
page: Sentdm::Internal::ConversationsPage,
|
|
79
|
-
model: Sentdm::
|
|
79
|
+
model: Sentdm::Message,
|
|
80
80
|
options: options
|
|
81
81
|
)
|
|
82
82
|
end
|
data/lib/sentdm/resources/me.rb
CHANGED
|
@@ -50,7 +50,7 @@ module Sentdm
|
|
|
50
50
|
#
|
|
51
51
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
52
52
|
#
|
|
53
|
-
# @return [Sentdm::Models::
|
|
53
|
+
# @return [Sentdm::Models::APIResponseOfAccount]
|
|
54
54
|
#
|
|
55
55
|
# @see Sentdm::Models::MeRetrieveParams
|
|
56
56
|
def retrieve(params = {})
|
|
@@ -59,7 +59,7 @@ module Sentdm
|
|
|
59
59
|
method: :get,
|
|
60
60
|
path: "v3/me",
|
|
61
61
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
62
|
-
model: Sentdm::
|
|
62
|
+
model: Sentdm::APIResponseOfAccount,
|
|
63
63
|
options: options
|
|
64
64
|
)
|
|
65
65
|
end
|
|
@@ -25,6 +25,71 @@ module Sentdm
|
|
|
25
25
|
# released yet. Cancelling is free, fires `message.cancelled`, and is final — a
|
|
26
26
|
# cancelled message cannot be resent.
|
|
27
27
|
class Messages
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Sentdm::Models::MessageCancelParams} for more details.
|
|
30
|
+
#
|
|
31
|
+
# Calls off a message you scheduled with `scheduled_at`, before it is released for
|
|
32
|
+
# sending. The message moves to `CANCELLED`, which is terminal, and it is never
|
|
33
|
+
# sent.
|
|
34
|
+
#
|
|
35
|
+
# **Only a SCHEDULED message can be cancelled.** A message that has already been
|
|
36
|
+
# released — queued, in flight, or finished — returns 409. The release sweeper
|
|
37
|
+
# runs continuously, so a cancellation sent within about a minute of the scheduled
|
|
38
|
+
# instant can lose that race and be refused; cancel with time to spare.
|
|
39
|
+
#
|
|
40
|
+
# **One message per call.** A send to many recipients, or on several channels,
|
|
41
|
+
# becomes one message per recipient × channel, each with its own id; cancel the
|
|
42
|
+
# ones you want stopped. There is no bulk cancellation.
|
|
43
|
+
#
|
|
44
|
+
# **Cancelling is free**, and nothing was charged for the hold in the first place
|
|
45
|
+
# — a scheduled message is only priced and billed at release.
|
|
46
|
+
#
|
|
47
|
+
# **A cancellation fires `message.cancelled`** on your webhook, exactly once,
|
|
48
|
+
# carrying the `scheduled_at` that was called off so a consumer can un-record the
|
|
49
|
+
# send it was expecting. Cancelling the same message again returns this same
|
|
50
|
+
# response and fires no second event. `Idempotency-Key` is honoured.
|
|
51
|
+
#
|
|
52
|
+
# A cancelled message cannot be resent — send a new one.
|
|
53
|
+
#
|
|
54
|
+
# The response is the message itself, in the same shape `GET /v3/messages/{id}`
|
|
55
|
+
# returns, so the `status` you read back is the one now stored on the row, and
|
|
56
|
+
# `scheduled_at` is the time it would have gone out. `GET /v3/messages/{id}` keeps
|
|
57
|
+
# reporting both afterwards.
|
|
58
|
+
#
|
|
59
|
+
# `events` is the message lifecycle as it stood immediately before the
|
|
60
|
+
# cancellation: the CANCELLED entry is written asynchronously and lands a moment
|
|
61
|
+
# later, so read `status` for the outcome. If you need the entry itself, re-fetch
|
|
62
|
+
# the message after a few seconds — `GET /v3/messages/{id}` is cached briefly, so
|
|
63
|
+
# an immediate re-fetch can still show the pre-cancellation state.
|
|
64
|
+
#
|
|
65
|
+
# @overload cancel(id, sandbox: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
66
|
+
#
|
|
67
|
+
# @param id [String] Path param: Message ID
|
|
68
|
+
#
|
|
69
|
+
# @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
|
|
70
|
+
#
|
|
71
|
+
# @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
72
|
+
#
|
|
73
|
+
# @param x_profile_id [String] Header param: Profile UUID to scope the request to a child profile. Only organiz
|
|
74
|
+
#
|
|
75
|
+
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
76
|
+
#
|
|
77
|
+
# @return [Sentdm::Models::APIResponseOfCancelledMessage]
|
|
78
|
+
#
|
|
79
|
+
# @see Sentdm::Models::MessageCancelParams
|
|
80
|
+
def cancel(id, params = {})
|
|
81
|
+
parsed, options = Sentdm::MessageCancelParams.dump_request(params)
|
|
82
|
+
header_params = {idempotency_key: "idempotency-key", x_profile_id: "x-profile-id"}
|
|
83
|
+
@client.request(
|
|
84
|
+
method: :post,
|
|
85
|
+
path: ["v3/messages/%1$s/cancel", id],
|
|
86
|
+
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
87
|
+
body: parsed.except(*header_params.keys),
|
|
88
|
+
model: Sentdm::APIResponseOfCancelledMessage,
|
|
89
|
+
options: options
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
28
93
|
# Some parameter documentations has been truncated, see
|
|
29
94
|
# {Sentdm::Models::MessageResendParams} for more details.
|
|
30
95
|
#
|
|
@@ -102,7 +167,7 @@ module Sentdm
|
|
|
102
167
|
#
|
|
103
168
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
104
169
|
#
|
|
105
|
-
# @return [Sentdm::Models::
|
|
170
|
+
# @return [Sentdm::Models::APIResponseOfMessageActivities]
|
|
106
171
|
#
|
|
107
172
|
# @see Sentdm::Models::MessageRetrieveActivitiesParams
|
|
108
173
|
def retrieve_activities(id, params = {})
|
|
@@ -111,7 +176,7 @@ module Sentdm
|
|
|
111
176
|
method: :get,
|
|
112
177
|
path: ["v3/messages/%1$s/activities", id],
|
|
113
178
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
114
|
-
model: Sentdm::
|
|
179
|
+
model: Sentdm::APIResponseOfMessageActivities,
|
|
115
180
|
options: options
|
|
116
181
|
)
|
|
117
182
|
end
|
|
@@ -135,7 +200,7 @@ module Sentdm
|
|
|
135
200
|
#
|
|
136
201
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
137
202
|
#
|
|
138
|
-
# @return [Sentdm::Models::
|
|
203
|
+
# @return [Sentdm::Models::APIResponseOfMessage]
|
|
139
204
|
#
|
|
140
205
|
# @see Sentdm::Models::MessageRetrieveStatusParams
|
|
141
206
|
def retrieve_status(id, params = {})
|
|
@@ -144,7 +209,7 @@ module Sentdm
|
|
|
144
209
|
method: :get,
|
|
145
210
|
path: ["v3/messages/%1$s", id],
|
|
146
211
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
147
|
-
model: Sentdm::
|
|
212
|
+
model: Sentdm::APIResponseOfMessage,
|
|
148
213
|
options: options
|
|
149
214
|
)
|
|
150
215
|
end
|
|
@@ -185,13 +250,14 @@ module Sentdm
|
|
|
185
250
|
# accepted: if the time falls inside a legally protected quiet-hours window for a
|
|
186
251
|
# recipient, that message is moved to the next allowed time at release and a
|
|
187
252
|
# second message.scheduled webhook reports the new scheduled_at. An account may
|
|
188
|
-
# hold at most 1,000,000 scheduled messages at once
|
|
253
|
+
# hold at most 1,000,000 scheduled messages at once: a message scheduled past that
|
|
254
|
+
# is reported as BLOCKED (LIMIT_001) instead of being held.
|
|
189
255
|
#
|
|
190
256
|
# @overload send_(channel: nil, channels: nil, media_urls: nil, sandbox: nil, scheduled_at: nil, subject: nil, template: nil, text: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
|
|
191
257
|
#
|
|
192
258
|
# @param channel [Array<String>, nil] Body param: Channels to broadcast on, e.g. ["whatsapp", "sms"].
|
|
193
259
|
#
|
|
194
|
-
# @param channels [Hash{Symbol=>Array<Sentdm::Models::
|
|
260
|
+
# @param channels [Hash{Symbol=>Array<Sentdm::Models::MessageChannelOptions>}, nil] Body param: Which of your own numbers to send from, keyed by channel, each chann
|
|
195
261
|
#
|
|
196
262
|
# @param media_urls [Array<String>, nil] Body param: Attachments for this send, as publicly fetchable https URLs. Used by
|
|
197
263
|
#
|
|
@@ -201,7 +267,7 @@ module Sentdm
|
|
|
201
267
|
#
|
|
202
268
|
# @param subject [String, nil] Body param: Subject line for this send, overriding the template's. MMS only; ign
|
|
203
269
|
#
|
|
204
|
-
# @param template [Sentdm::Models::
|
|
270
|
+
# @param template [Sentdm::Models::TemplateRef, nil] Body param: SDK-style template reference: resolve by ID or by name, with optiona
|
|
205
271
|
#
|
|
206
272
|
# @param text [String, nil] Body param: Plain-text (free-form) message body. Provide either Template or this
|
|
207
273
|
#
|
|
@@ -24,7 +24,7 @@ module Sentdm
|
|
|
24
24
|
#
|
|
25
25
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
26
26
|
#
|
|
27
|
-
# @return [Sentdm::Models::
|
|
27
|
+
# @return [Sentdm::Models::APIResponseOfNumberLookupResult]
|
|
28
28
|
#
|
|
29
29
|
# @see Sentdm::Models::NumberLookupParams
|
|
30
30
|
def lookup(phone_number, params = {})
|
|
@@ -33,7 +33,7 @@ module Sentdm
|
|
|
33
33
|
method: :get,
|
|
34
34
|
path: ["v3/numbers/lookup/%1$s", phone_number],
|
|
35
35
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
36
|
-
model: Sentdm::
|
|
36
|
+
model: Sentdm::APIResponseOfNumberLookupResult,
|
|
37
37
|
options: options
|
|
38
38
|
)
|
|
39
39
|
end
|
|
@@ -285,7 +285,7 @@ module Sentdm
|
|
|
285
285
|
#
|
|
286
286
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
287
287
|
#
|
|
288
|
-
# @return [Sentdm::Models::
|
|
288
|
+
# @return [Sentdm::Models::APIResponseOfProfilesList]
|
|
289
289
|
#
|
|
290
290
|
# @see Sentdm::Models::ProfileListParams
|
|
291
291
|
def list(params = {})
|
|
@@ -294,7 +294,7 @@ module Sentdm
|
|
|
294
294
|
method: :get,
|
|
295
295
|
path: "v3/profiles",
|
|
296
296
|
headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
|
|
297
|
-
model: Sentdm::
|
|
297
|
+
model: Sentdm::APIResponseOfProfilesList,
|
|
298
298
|
options: options
|
|
299
299
|
)
|
|
300
300
|
end
|
|
@@ -412,7 +412,7 @@ module Sentdm
|
|
|
412
412
|
#
|
|
413
413
|
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
414
414
|
#
|
|
415
|
-
# @return [Sentdm::Models::
|
|
415
|
+
# @return [Sentdm::Models::APIResponseOfProfileCompletionResult]
|
|
416
416
|
#
|
|
417
417
|
# @see Sentdm::Models::ProfileCompleteParams
|
|
418
418
|
def complete(profile_id, params)
|
|
@@ -423,7 +423,7 @@ module Sentdm
|
|
|
423
423
|
path: ["v3/profiles/%1$s/complete", profile_id],
|
|
424
424
|
headers: parsed.slice(*header_params.keys).transform_keys(header_params),
|
|
425
425
|
body: parsed.except(*header_params.keys),
|
|
426
|
-
model: Sentdm::
|
|
426
|
+
model: Sentdm::APIResponseOfProfileCompletionResult,
|
|
427
427
|
options: options
|
|
428
428
|
)
|
|
429
429
|
end
|