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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 819f750414001d5ce375dfda603f82bdf86ac538321ad3c9a507211cbf03e961
|
|
4
|
+
data.tar.gz: 438e1fa1e2c0dc0566f22a96af84026c640db01e4605635e3156fdfd81c6a0b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31802c8938ba238bae598ec3c37fd21103d8627752dc936f503c33ada9ba8bc7580840db2bb6572b04badc9da775a45eec55820b5b1e675dc20a3b54cfbce6e5
|
|
7
|
+
data.tar.gz: 5a9d28dcae2395c7f925a04dd8dc825d0ca2c17df646ade6304a31fd0679ee136af4ff0f01270762cc82d2ab08e3d6b5e5b1beeed3f148576480fffc70bac936
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.46.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.45.0...v0.46.0) (2026-11-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* **api:** stable names for shared models; typed methods for sender profiles, channels, compliance requirements and message cancel
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **api:** stable names for shared models; typed methods for sender profiles, channels, compliance requirements and message cancel ([7cb0e2c](https://github.com/sentdm/sent-dm-ruby/commit/7cb0e2c11b4dce51a7832d4ae4352224957f0224))
|
|
13
|
+
|
|
14
|
+
## [0.45.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.44.0...v0.45.0) (2026-11-05)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **api:** sync OpenAPI spec from production ([850cfec](https://github.com/sentdm/sent-dm-ruby/commit/850cfec93cf24d63cc4be16f61a61b14587fe7cc))
|
|
20
|
+
|
|
3
21
|
## [0.44.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.43.0...v0.44.0) (2026-11-04)
|
|
4
22
|
|
|
5
23
|
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
17
17
|
<!-- x-release-please-start-version -->
|
|
18
18
|
|
|
19
19
|
```ruby
|
|
20
|
-
gem "sentdm", "~> 0.
|
|
20
|
+
gem "sentdm", "~> 0.46.0"
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
<!-- x-release-please-end -->
|
|
@@ -248,7 +248,7 @@ You can provide typesafe request parameters like so:
|
|
|
248
248
|
```ruby
|
|
249
249
|
sent.messages.send_(
|
|
250
250
|
channel: ["sms", "whatsapp"],
|
|
251
|
-
template: Sentdm::
|
|
251
|
+
template: Sentdm::TemplateRef.new(
|
|
252
252
|
id: "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
|
|
253
253
|
name: "order_confirmation",
|
|
254
254
|
parameters: {name: "John Doe", order_id: "12345"}
|
|
@@ -274,7 +274,7 @@ sent.messages.send_(
|
|
|
274
274
|
# You can also splat a full Params class:
|
|
275
275
|
params = Sentdm::MessageSendParams.new(
|
|
276
276
|
channel: ["sms", "whatsapp"],
|
|
277
|
-
template: Sentdm::
|
|
277
|
+
template: Sentdm::TemplateRef.new(
|
|
278
278
|
id: "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
|
|
279
279
|
name: "order_confirmation",
|
|
280
280
|
parameters: {name: "John Doe", order_id: "12345"}
|
|
@@ -289,25 +289,25 @@ sent.messages.send_(**params)
|
|
|
289
289
|
Since this library does not depend on `sorbet-runtime`, it cannot provide [`T::Enum`](https://sorbet.org/docs/tenum) instances. Instead, we provide "tagged symbols" instead, which is always a primitive at runtime:
|
|
290
290
|
|
|
291
291
|
```ruby
|
|
292
|
-
# :
|
|
293
|
-
puts(Sentdm::Channels::
|
|
292
|
+
# :LOCAL
|
|
293
|
+
puts(Sentdm::Channels::SMSCreateParams::NumberType::LOCAL)
|
|
294
294
|
|
|
295
|
-
# Revealed type: `T.all(Sentdm::Channels::
|
|
296
|
-
T.reveal_type(Sentdm::Channels::
|
|
295
|
+
# Revealed type: `T.all(Sentdm::Channels::SMSCreateParams::NumberType, Symbol)`
|
|
296
|
+
T.reveal_type(Sentdm::Channels::SMSCreateParams::NumberType::LOCAL)
|
|
297
297
|
```
|
|
298
298
|
|
|
299
299
|
Enum parameters have a "relaxed" type, so you can either pass in enum constants or their literal value:
|
|
300
300
|
|
|
301
301
|
```ruby
|
|
302
302
|
# Using the enum constants preserves the tagged type information:
|
|
303
|
-
sent.channels.
|
|
304
|
-
|
|
303
|
+
sent.channels.sms.create(
|
|
304
|
+
number_type: Sentdm::Channels::SMSCreateParams::NumberType::LOCAL,
|
|
305
305
|
# …
|
|
306
306
|
)
|
|
307
307
|
|
|
308
308
|
# Literal values are also permissible:
|
|
309
|
-
sent.channels.
|
|
310
|
-
|
|
309
|
+
sent.channels.sms.create(
|
|
310
|
+
number_type: :LOCAL,
|
|
311
311
|
# …
|
|
312
312
|
)
|
|
313
313
|
```
|
data/lib/sentdm/client.rb
CHANGED
|
@@ -63,6 +63,26 @@ module Sentdm
|
|
|
63
63
|
# @return [Sentdm::Resources::Profiles]
|
|
64
64
|
attr_reader :profiles
|
|
65
65
|
|
|
66
|
+
# Your customers, each sending as itself.
|
|
67
|
+
#
|
|
68
|
+
# A sender profile is a tenant of yours: it has its own API key, its own balance,
|
|
69
|
+
# and can have its own identity and senders — so your customers send under their
|
|
70
|
+
# own brand and never see Sent. Depth is one; a profile cannot create profiles.
|
|
71
|
+
#
|
|
72
|
+
# **Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone
|
|
73
|
+
# gives you a usable profile immediately, running on your identity, your inbox and
|
|
74
|
+
# your billing. Supply a capability's fields and the profile owns that one
|
|
75
|
+
# instead.
|
|
76
|
+
#
|
|
77
|
+
# **A sender is the exception.** A brand and a campaign can be inherited; a number
|
|
78
|
+
# cannot. A profile either has a sender of its own or terminates through your
|
|
79
|
+
# shared routes.
|
|
80
|
+
#
|
|
81
|
+
# To act for a profile on any other resource, send `x-profile-id` with your
|
|
82
|
+
# organization key rather than looking for a parallel set of endpoints.
|
|
83
|
+
# @return [Sentdm::Resources::SenderProfiles]
|
|
84
|
+
attr_reader :sender_profiles
|
|
85
|
+
|
|
66
86
|
# What a phone number actually is, before you send to it.
|
|
67
87
|
#
|
|
68
88
|
# A lookup returns the number's country, line type and carrier, which is what
|
|
@@ -123,9 +143,53 @@ module Sentdm
|
|
|
123
143
|
# @return [Sentdm::Resources::Voice]
|
|
124
144
|
attr_reader :voice
|
|
125
145
|
|
|
146
|
+
# The senders you send from, one per channel.
|
|
147
|
+
#
|
|
148
|
+
# **SMS is a list of markets**, each keyed by `(country, number_type)` — a
|
|
149
|
+
# customer can hold `us/10dlc` and `gb/alphanumeric` at once, so a market is
|
|
150
|
+
# addressed by the pair rather than by country alone. **WhatsApp and RCS are
|
|
151
|
+
# single**: a customer has one business account and one agent. **Voice is per
|
|
152
|
+
# number**: each number you hold can carry phone calls on its own
|
|
153
|
+
# (`POST /v3/channels/voice`), each with the callback URL Sent asks what to do
|
|
154
|
+
# with its calls, one of them is the default line for calls placed from your app,
|
|
155
|
+
# and voice tokens are minted with `POST /v3/voice/tokens`. Read your voice
|
|
156
|
+
# numbers with `GET /v3/channels/voice` and change one with
|
|
157
|
+
# `PATCH /v3/channels/voice/{number}`.
|
|
158
|
+
#
|
|
159
|
+
# ## Compliance lives on the market
|
|
160
|
+
#
|
|
161
|
+
# Adding a market records everything that market registers with, in its
|
|
162
|
+
# `compliance` object. Only **US `TEN_DLC`** registers with a regime — The
|
|
163
|
+
# Campaign Registry — and it is the only market whose compliance carries `brand`
|
|
164
|
+
# and `campaign`. Everywhere else compliance is documents, and many markets ask
|
|
165
|
+
# for none at all.
|
|
166
|
+
#
|
|
167
|
+
# `GET` and `PATCH` on a market return and accept the same shape, so what comes
|
|
168
|
+
# back can be sent back: an omitted key is left alone, and a key reported in
|
|
169
|
+
# `requirements` is the path into the body that clears it.
|
|
170
|
+
#
|
|
171
|
+
# Call `GET /v3/compliance/requirements` first — it answers what a market demands
|
|
172
|
+
# before you hold it, with a body you can fill in and post.
|
|
126
173
|
# @return [Sentdm::Resources::Channels]
|
|
127
174
|
attr_reader :channels
|
|
128
175
|
|
|
176
|
+
# What a market demands, before you have it.
|
|
177
|
+
#
|
|
178
|
+
# Requirements vary enormously and change without notice. US `TEN_DLC` registers a
|
|
179
|
+
# brand and a campaign with The Campaign Registry and asks a substantial set of
|
|
180
|
+
# questions; an alphanumeric sender pre-registers with documents in one country
|
|
181
|
+
# and needs nothing in another.
|
|
182
|
+
#
|
|
183
|
+
# This is the authoritative answer for whichever market you ask about, and it is
|
|
184
|
+
# generated from the same declaration that validates the calls themselves — so it
|
|
185
|
+
# cannot drift from what is actually enforced. The response includes the request
|
|
186
|
+
# body to send, with every key that market wants already present and blank.
|
|
187
|
+
#
|
|
188
|
+
# What you supplied, as opposed to what is asked of you, is reported on the market
|
|
189
|
+
# under **Channels**.
|
|
190
|
+
# @return [Sentdm::Resources::Compliance]
|
|
191
|
+
attr_reader :compliance
|
|
192
|
+
|
|
129
193
|
# Who the current key is.
|
|
130
194
|
#
|
|
131
195
|
# `GET /v3/me` answers with the account the key authenticates as, which is the
|
|
@@ -200,12 +264,14 @@ module Sentdm
|
|
|
200
264
|
@users = Sentdm::Resources::Users.new(client: self)
|
|
201
265
|
@templates = Sentdm::Resources::Templates.new(client: self)
|
|
202
266
|
@profiles = Sentdm::Resources::Profiles.new(client: self)
|
|
267
|
+
@sender_profiles = Sentdm::Resources::SenderProfiles.new(client: self)
|
|
203
268
|
@numbers = Sentdm::Resources::Numbers.new(client: self)
|
|
204
269
|
@messages = Sentdm::Resources::Messages.new(client: self)
|
|
205
270
|
@contacts = Sentdm::Resources::Contacts.new(client: self)
|
|
206
271
|
@conversations = Sentdm::Resources::Conversations.new(client: self)
|
|
207
272
|
@voice = Sentdm::Resources::Voice.new(client: self)
|
|
208
273
|
@channels = Sentdm::Resources::Channels.new(client: self)
|
|
274
|
+
@compliance = Sentdm::Resources::Compliance.new(client: self)
|
|
209
275
|
@me = Sentdm::Resources::Me.new(client: self)
|
|
210
276
|
end
|
|
211
277
|
end
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Internal
|
|
5
|
+
# @generic Elem
|
|
6
|
+
#
|
|
7
|
+
# @example
|
|
8
|
+
# if sender_profiles_page.has_next?
|
|
9
|
+
# sender_profiles_page = sender_profiles_page.next_page
|
|
10
|
+
# end
|
|
11
|
+
#
|
|
12
|
+
# @example
|
|
13
|
+
# sender_profiles_page.auto_paging_each do |sender_profile|
|
|
14
|
+
# puts(sender_profile)
|
|
15
|
+
# end
|
|
16
|
+
class SenderProfilesPage
|
|
17
|
+
include Sentdm::Internal::Type::BasePage
|
|
18
|
+
|
|
19
|
+
# @return [Data]
|
|
20
|
+
attr_accessor :data
|
|
21
|
+
|
|
22
|
+
# @return [Boolean]
|
|
23
|
+
def next_page?
|
|
24
|
+
data&.pagination&.has_more
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @raise [Sentdm::HTTP::Error]
|
|
28
|
+
# @return [self]
|
|
29
|
+
def next_page
|
|
30
|
+
unless next_page?
|
|
31
|
+
message = "No more pages available. Please check #next_page? before calling ##{__method__}"
|
|
32
|
+
raise RuntimeError.new(message)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
req = Sentdm::Internal::Util.deep_merge(
|
|
36
|
+
@req,
|
|
37
|
+
{query: {page: @req.fetch(:query).fetch(:page, 1).to_i.succ}}
|
|
38
|
+
)
|
|
39
|
+
@client.request(req)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# @param blk [Proc]
|
|
43
|
+
#
|
|
44
|
+
# @yieldparam [generic<Elem>]
|
|
45
|
+
def auto_paging_each(&blk)
|
|
46
|
+
unless block_given?
|
|
47
|
+
raise ArgumentError.new("A block must be given to ##{__method__}")
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
page = self
|
|
51
|
+
loop do
|
|
52
|
+
page.data&.sender_profiles&.each(&blk)
|
|
53
|
+
|
|
54
|
+
break unless page.next_page?
|
|
55
|
+
page = page.next_page
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @api private
|
|
60
|
+
#
|
|
61
|
+
# @param client [Sentdm::Internal::Transport::BaseClient]
|
|
62
|
+
# @param req [Hash{Symbol=>Object}]
|
|
63
|
+
# @param headers [Hash{String=>String}]
|
|
64
|
+
# @param page_data [Hash{Symbol=>Object}]
|
|
65
|
+
def initialize(client:, req:, headers:, page_data:)
|
|
66
|
+
super
|
|
67
|
+
|
|
68
|
+
case page_data
|
|
69
|
+
in {data: Hash | nil => data}
|
|
70
|
+
if (sender_profiles = data[:sender_profiles]).is_a?(Array)
|
|
71
|
+
data =
|
|
72
|
+
{**data, sender_profiles: sender_profiles.map { Sentdm::Internal::Type::Converter.coerce(@model, _1) }}
|
|
73
|
+
end
|
|
74
|
+
@data = Sentdm::Internal::Type::Converter.coerce(Sentdm::Internal::SenderProfilesPage::Data, data)
|
|
75
|
+
else
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @api private
|
|
80
|
+
#
|
|
81
|
+
# @return [String]
|
|
82
|
+
def inspect
|
|
83
|
+
model = Sentdm::Internal::Type::Converter.inspect(@model, depth: 1)
|
|
84
|
+
|
|
85
|
+
"#<#{self.class}[#{model}]:0x#{object_id.to_s(16)}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class Data < Sentdm::Internal::Type::BaseModel
|
|
89
|
+
# @!attribute pagination
|
|
90
|
+
#
|
|
91
|
+
# @return [Data::Pagination, nil]
|
|
92
|
+
optional :pagination, -> { Data::Pagination }
|
|
93
|
+
|
|
94
|
+
# @!attribute sender_profiles
|
|
95
|
+
#
|
|
96
|
+
# @return [Array<Object>, nil]
|
|
97
|
+
optional :sender_profiles, Sentdm::Internal::Type::ArrayOf[Sentdm::Internal::Type::Unknown]
|
|
98
|
+
|
|
99
|
+
# @!method initialize(pagination: nil, sender_profiles: nil)
|
|
100
|
+
# @param pagination [Data::Pagination]
|
|
101
|
+
# @param sender_profiles [Array<Object>]
|
|
102
|
+
|
|
103
|
+
# @see Data#pagination
|
|
104
|
+
class Pagination < Sentdm::Internal::Type::BaseModel
|
|
105
|
+
# @!attribute has_more
|
|
106
|
+
#
|
|
107
|
+
# @return [Boolean, nil]
|
|
108
|
+
optional :has_more, Sentdm::Internal::Type::Boolean
|
|
109
|
+
|
|
110
|
+
# @!attribute page
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer, nil]
|
|
113
|
+
optional :page, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute page_size
|
|
116
|
+
#
|
|
117
|
+
# @return [Integer, nil]
|
|
118
|
+
optional :page_size, Integer
|
|
119
|
+
|
|
120
|
+
# @!attribute total_count
|
|
121
|
+
#
|
|
122
|
+
# @return [Integer, nil]
|
|
123
|
+
optional :total_count, Integer
|
|
124
|
+
|
|
125
|
+
# @!attribute total_pages
|
|
126
|
+
#
|
|
127
|
+
# @return [Integer, nil]
|
|
128
|
+
optional :total_pages, Integer
|
|
129
|
+
|
|
130
|
+
# @!method initialize(has_more: nil, page: nil, page_size: nil, total_count: nil, total_pages: nil)
|
|
131
|
+
# @param has_more [Boolean]
|
|
132
|
+
# @param page [Integer]
|
|
133
|
+
# @param page_size [Integer]
|
|
134
|
+
# @param total_count [Integer]
|
|
135
|
+
# @param total_pages [Integer]
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
@@ -17,28 +17,28 @@ module Sentdm
|
|
|
17
17
|
# values safely.
|
|
18
18
|
#
|
|
19
19
|
# @example
|
|
20
|
-
# # `
|
|
21
|
-
# case
|
|
22
|
-
# when Sentdm::
|
|
20
|
+
# # `entity_type` is a `Sentdm::EntityType`
|
|
21
|
+
# case entity_type
|
|
22
|
+
# when Sentdm::EntityType::PRIVATE_PROFIT
|
|
23
23
|
# # ...
|
|
24
|
-
# when Sentdm::
|
|
24
|
+
# when Sentdm::EntityType::PUBLIC_PROFIT
|
|
25
25
|
# # ...
|
|
26
|
-
# when Sentdm::
|
|
26
|
+
# when Sentdm::EntityType::NON_PROFIT
|
|
27
27
|
# # ...
|
|
28
28
|
# else
|
|
29
|
-
# puts(
|
|
29
|
+
# puts(entity_type)
|
|
30
30
|
# end
|
|
31
31
|
#
|
|
32
32
|
# @example
|
|
33
|
-
# case
|
|
34
|
-
# in :
|
|
33
|
+
# case entity_type
|
|
34
|
+
# in :PRIVATE_PROFIT
|
|
35
35
|
# # ...
|
|
36
|
-
# in :
|
|
36
|
+
# in :PUBLIC_PROFIT
|
|
37
37
|
# # ...
|
|
38
|
-
# in :
|
|
38
|
+
# in :NON_PROFIT
|
|
39
39
|
# # ...
|
|
40
40
|
# else
|
|
41
|
-
# puts(
|
|
41
|
+
# puts(entity_type)
|
|
42
42
|
# end
|
|
43
43
|
module Enum
|
|
44
44
|
include Sentdm::Internal::Type::Converter
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class Account < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# Customer ID (organization, account, or profile)
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute channels
|
|
13
|
+
# Messaging channel configuration. All three channels are always present. Each
|
|
14
|
+
# channel has a "configured" flag; configured channels expose additional details.
|
|
15
|
+
#
|
|
16
|
+
# @return [Sentdm::Models::AccountChannels, nil]
|
|
17
|
+
optional :channels, -> { Sentdm::AccountChannels }
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# When the account was created
|
|
21
|
+
#
|
|
22
|
+
# @return [Time, nil]
|
|
23
|
+
optional :created_at, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute description
|
|
26
|
+
# Account description
|
|
27
|
+
#
|
|
28
|
+
# @return [String, nil]
|
|
29
|
+
optional :description, String, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute email
|
|
32
|
+
# Contact email address
|
|
33
|
+
#
|
|
34
|
+
# @return [String, nil]
|
|
35
|
+
optional :email, String, nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute enable_template_auto_creation_for_sp
|
|
38
|
+
# Whether this account may mark a template for automatic creation on its sender
|
|
39
|
+
# profiles. Granted by Sent per account and off by default, so it is what a
|
|
40
|
+
# template-create form reads to decide whether to offer the option at all —
|
|
41
|
+
# marking a template without it does nothing.
|
|
42
|
+
#
|
|
43
|
+
# Top-level rather than inside settings, which is written for type: "profile" only
|
|
44
|
+
# and so would never carry it to the account type that can act on it.
|
|
45
|
+
#
|
|
46
|
+
# This is the capability, not the stored flag: a profile reports false whatever
|
|
47
|
+
# its own row holds. A sender profile owns no sender profiles, so a template it
|
|
48
|
+
# marked would have nothing to be created on and the fan-out would never read the
|
|
49
|
+
# flag. The admin GET /customers/{id} reports the stored value instead, because
|
|
50
|
+
# that is the one an operator granted.
|
|
51
|
+
#
|
|
52
|
+
# @return [Boolean, nil]
|
|
53
|
+
optional :enable_template_auto_creation_for_sp, Sentdm::Internal::Type::Boolean
|
|
54
|
+
|
|
55
|
+
# @!attribute icon
|
|
56
|
+
# Account icon URL
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :icon, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute name
|
|
62
|
+
# Account name
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :name, String
|
|
66
|
+
|
|
67
|
+
# @!attribute organization_id
|
|
68
|
+
# Organization ID (only for profile type — the parent organization)
|
|
69
|
+
#
|
|
70
|
+
# @return [String, nil]
|
|
71
|
+
optional :organization_id, String, nil?: true
|
|
72
|
+
|
|
73
|
+
# @!attribute profiles
|
|
74
|
+
# List of profiles (populated for organization type, empty for user and profile
|
|
75
|
+
# types)
|
|
76
|
+
#
|
|
77
|
+
# @return [Array<Sentdm::Models::AccountProfile>, nil]
|
|
78
|
+
optional :profiles, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::AccountProfile] }
|
|
79
|
+
|
|
80
|
+
# @!attribute sending_phone_number
|
|
81
|
+
# The SMS sender this account sends from in the United States, in E.164 form. Null
|
|
82
|
+
# when the account has no US SMS sender.
|
|
83
|
+
#
|
|
84
|
+
# The same value as channels.sms.phone_number, published under both names on
|
|
85
|
+
# purpose: sending_phone_number is what this value is already called on GET
|
|
86
|
+
# /v3/profiles, so the same key answers the same question whichever of the two
|
|
87
|
+
# endpoints you ask. Neither name is preferred over the other and neither is
|
|
88
|
+
# deprecated.
|
|
89
|
+
#
|
|
90
|
+
# The same value, not the same presence: this key is always written, including as
|
|
91
|
+
# null, whereas channels.sms.phone_number is left out entirely when there is no
|
|
92
|
+
# sender.
|
|
93
|
+
#
|
|
94
|
+
# @return [String, nil]
|
|
95
|
+
optional :sending_phone_number, String, nil?: true
|
|
96
|
+
|
|
97
|
+
# @!attribute sending_phone_number_profile_id
|
|
98
|
+
# The account that holds sending_phone_number in number inventory: normally this
|
|
99
|
+
# account itself, and a different account when the number is held elsewhere. Null
|
|
100
|
+
# when there is no US sender, or when the sender is not a number drawn from
|
|
101
|
+
# inventory — an alphanumeric sender ID or a short code.
|
|
102
|
+
#
|
|
103
|
+
# @return [String, nil]
|
|
104
|
+
optional :sending_phone_number_profile_id, String, nil?: true
|
|
105
|
+
|
|
106
|
+
# @!attribute settings
|
|
107
|
+
# Profile configuration settings
|
|
108
|
+
#
|
|
109
|
+
# @return [Sentdm::Models::ProfileSettings, nil]
|
|
110
|
+
optional :settings, -> { Sentdm::ProfileSettings }, nil?: true
|
|
111
|
+
|
|
112
|
+
# @!attribute short_name
|
|
113
|
+
# Short name / abbreviation (only for profile type)
|
|
114
|
+
#
|
|
115
|
+
# @return [String, nil]
|
|
116
|
+
optional :short_name, String, nil?: true
|
|
117
|
+
|
|
118
|
+
# @!attribute status
|
|
119
|
+
# Profile status (only for profile type): incomplete, pending_review, approved,
|
|
120
|
+
# etc.
|
|
121
|
+
#
|
|
122
|
+
# @return [String, nil]
|
|
123
|
+
optional :status, String, nil?: true
|
|
124
|
+
|
|
125
|
+
# @!attribute type
|
|
126
|
+
# Account type: "organization" (has profiles), "user" (no profiles), or "profile"
|
|
127
|
+
# (child of an organization)
|
|
128
|
+
#
|
|
129
|
+
# @return [String, nil]
|
|
130
|
+
optional :type, String
|
|
131
|
+
|
|
132
|
+
# @!method initialize(id: nil, channels: nil, created_at: nil, description: nil, email: nil, enable_template_auto_creation_for_sp: nil, icon: nil, name: nil, organization_id: nil, profiles: nil, sending_phone_number: nil, sending_phone_number_profile_id: nil, settings: nil, short_name: nil, status: nil, type: nil)
|
|
133
|
+
# Some parameter documentations has been truncated, see {Sentdm::Models::Account}
|
|
134
|
+
# for more details.
|
|
135
|
+
#
|
|
136
|
+
# Account response for GET /v3/me endpoint. Returns organization (with profiles),
|
|
137
|
+
# user (standalone), or profile (child of an organization) data depending on the
|
|
138
|
+
# API key type. Always includes messaging channel configuration.
|
|
139
|
+
#
|
|
140
|
+
# @param id [String] Customer ID (organization, account, or profile)
|
|
141
|
+
#
|
|
142
|
+
# @param channels [Sentdm::Models::AccountChannels] Messaging channel configuration. All three channels are always present.
|
|
143
|
+
#
|
|
144
|
+
# @param created_at [Time] When the account was created
|
|
145
|
+
#
|
|
146
|
+
# @param description [String, nil] Account description
|
|
147
|
+
#
|
|
148
|
+
# @param email [String, nil] Contact email address
|
|
149
|
+
#
|
|
150
|
+
# @param enable_template_auto_creation_for_sp [Boolean] Whether this account may mark a template for automatic creation on its sender pr
|
|
151
|
+
#
|
|
152
|
+
# @param icon [String, nil] Account icon URL
|
|
153
|
+
#
|
|
154
|
+
# @param name [String] Account name
|
|
155
|
+
#
|
|
156
|
+
# @param organization_id [String, nil] Organization ID (only for profile type — the parent organization)
|
|
157
|
+
#
|
|
158
|
+
# @param profiles [Array<Sentdm::Models::AccountProfile>] List of profiles (populated for organization type, empty for user and profile ty
|
|
159
|
+
#
|
|
160
|
+
# @param sending_phone_number [String, nil] The SMS sender this account sends from in the United States, in E.164 form. Null
|
|
161
|
+
#
|
|
162
|
+
# @param sending_phone_number_profile_id [String, nil] The account that holds sending_phone_number in number inventory: normally this a
|
|
163
|
+
#
|
|
164
|
+
# @param settings [Sentdm::Models::ProfileSettings, nil] Profile configuration settings
|
|
165
|
+
#
|
|
166
|
+
# @param short_name [String, nil] Short name / abbreviation (only for profile type)
|
|
167
|
+
#
|
|
168
|
+
# @param status [String, nil] Profile status (only for profile type): incomplete, pending_review, approved, et
|
|
169
|
+
#
|
|
170
|
+
# @param type [String] Account type: "organization" (has profiles), "user" (no profiles), or "profile"
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class AccountChannels < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute rcs
|
|
7
|
+
# RCS channel configuration. When configured, includes the RCS phone number.
|
|
8
|
+
#
|
|
9
|
+
# @return [Sentdm::Models::AccountRcsChannel, nil]
|
|
10
|
+
optional :rcs, -> { Sentdm::AccountRcsChannel }
|
|
11
|
+
|
|
12
|
+
# @!attribute sms
|
|
13
|
+
# SMS channel configuration. When configured, includes the sending phone number.
|
|
14
|
+
#
|
|
15
|
+
# @return [Sentdm::Models::AccountSMSChannel, nil]
|
|
16
|
+
optional :sms, -> { Sentdm::AccountSMSChannel }
|
|
17
|
+
|
|
18
|
+
# @!attribute whatsapp
|
|
19
|
+
# WhatsApp Business channel configuration. When configured, includes the WhatsApp
|
|
20
|
+
# phone number and business name.
|
|
21
|
+
#
|
|
22
|
+
# @return [Sentdm::Models::AccountWhatsappChannel, nil]
|
|
23
|
+
optional :whatsapp, -> { Sentdm::AccountWhatsappChannel }
|
|
24
|
+
|
|
25
|
+
# @!method initialize(rcs: nil, sms: nil, whatsapp: nil)
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Sentdm::Models::AccountChannels} for more details.
|
|
28
|
+
#
|
|
29
|
+
# Messaging channel configuration. All three channels are always present. Each
|
|
30
|
+
# channel has a "configured" flag; configured channels expose additional details.
|
|
31
|
+
#
|
|
32
|
+
# @param rcs [Sentdm::Models::AccountRcsChannel] RCS channel configuration. When configured, includes the RCS phone number.
|
|
33
|
+
#
|
|
34
|
+
# @param sms [Sentdm::Models::AccountSMSChannel] SMS channel configuration. When configured, includes the sending phone number.
|
|
35
|
+
#
|
|
36
|
+
# @param whatsapp [Sentdm::Models::AccountWhatsappChannel] WhatsApp Business channel configuration. When configured, includes the WhatsApp
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class AccountProfile < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute id
|
|
7
|
+
# Profile unique identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute created_at
|
|
13
|
+
# When the profile was created
|
|
14
|
+
#
|
|
15
|
+
# @return [Time, nil]
|
|
16
|
+
optional :created_at, Time
|
|
17
|
+
|
|
18
|
+
# @!attribute description
|
|
19
|
+
# Profile description
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :description, String, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute icon
|
|
25
|
+
# Profile icon URL
|
|
26
|
+
#
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :icon, String, nil?: true
|
|
29
|
+
|
|
30
|
+
# @!attribute name
|
|
31
|
+
# Profile name
|
|
32
|
+
#
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :name, String
|
|
35
|
+
|
|
36
|
+
# @!attribute role
|
|
37
|
+
# User's role in this profile: admin, billing, developer (inherited from
|
|
38
|
+
# organization if not explicitly set)
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :role, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute settings
|
|
44
|
+
# Profile configuration settings
|
|
45
|
+
#
|
|
46
|
+
# @return [Sentdm::Models::ProfileSettings, nil]
|
|
47
|
+
optional :settings, -> { Sentdm::ProfileSettings }
|
|
48
|
+
|
|
49
|
+
# @!attribute short_name
|
|
50
|
+
# Profile short name (abbreviation)
|
|
51
|
+
#
|
|
52
|
+
# @return [String, nil]
|
|
53
|
+
optional :short_name, String, nil?: true
|
|
54
|
+
|
|
55
|
+
# @!attribute status
|
|
56
|
+
# Profile setup status: incomplete, pending_review, approved, rejected
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :status, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!method initialize(id: nil, created_at: nil, description: nil, icon: nil, name: nil, role: nil, settings: nil, short_name: nil, status: nil)
|
|
62
|
+
# Some parameter documentations has been truncated, see
|
|
63
|
+
# {Sentdm::Models::AccountProfile} for more details.
|
|
64
|
+
#
|
|
65
|
+
# Profile (sender profile) response for v3 API
|
|
66
|
+
#
|
|
67
|
+
# @param id [String] Profile unique identifier
|
|
68
|
+
#
|
|
69
|
+
# @param created_at [Time] When the profile was created
|
|
70
|
+
#
|
|
71
|
+
# @param description [String, nil] Profile description
|
|
72
|
+
#
|
|
73
|
+
# @param icon [String, nil] Profile icon URL
|
|
74
|
+
#
|
|
75
|
+
# @param name [String] Profile name
|
|
76
|
+
#
|
|
77
|
+
# @param role [String, nil] User's role in this profile: admin, billing, developer (inherited from organizat
|
|
78
|
+
#
|
|
79
|
+
# @param settings [Sentdm::Models::ProfileSettings] Profile configuration settings
|
|
80
|
+
#
|
|
81
|
+
# @param short_name [String, nil] Profile short name (abbreviation)
|
|
82
|
+
#
|
|
83
|
+
# @param status [String, nil] Profile setup status: incomplete, pending_review, approved, rejected
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|