sentdm 0.45.0 → 0.47.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.
Files changed (483) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +11 -11
  4. data/lib/sentdm/client.rb +66 -0
  5. data/lib/sentdm/internal/sender_profiles_page.rb +140 -0
  6. data/lib/sentdm/internal/type/enum.rb +11 -11
  7. data/lib/sentdm/models/account.rb +173 -0
  8. data/lib/sentdm/models/account_channels.rb +39 -0
  9. data/lib/sentdm/models/account_profile.rb +86 -0
  10. data/lib/sentdm/models/account_rcs_channel.rb +26 -0
  11. data/lib/sentdm/models/account_sms_channel.rb +26 -0
  12. data/lib/sentdm/models/account_whatsapp_channel.rb +35 -0
  13. data/lib/sentdm/models/api_response_of_account.rb +48 -0
  14. data/lib/sentdm/models/api_response_of_cancelled_message.rb +43 -0
  15. data/lib/sentdm/models/api_response_of_channels_state.rb +48 -0
  16. data/lib/sentdm/models/api_response_of_compliance_requirements.rb +47 -0
  17. data/lib/sentdm/models/api_response_of_contacts_list.rb +42 -0
  18. data/lib/sentdm/models/api_response_of_message.rb +51 -0
  19. data/lib/sentdm/models/api_response_of_message_activities.rb +43 -0
  20. data/lib/sentdm/models/api_response_of_number_lookup_result.rb +43 -0
  21. data/lib/sentdm/models/api_response_of_profile_completion_accepted.rb +47 -0
  22. data/lib/sentdm/models/api_response_of_profile_completion_result.rb +47 -0
  23. data/lib/sentdm/models/api_response_of_profiles_list.rb +43 -0
  24. data/lib/sentdm/models/api_response_of_sender_profile.rb +54 -0
  25. data/lib/sentdm/models/api_response_of_sender_profiles_list.rb +42 -0
  26. data/lib/sentdm/models/api_response_of_templates_list.rb +42 -0
  27. data/lib/sentdm/models/api_response_of_users_list.rb +43 -0
  28. data/lib/sentdm/models/api_response_of_webhook_event_types_list.rb +43 -0
  29. data/lib/sentdm/models/api_response_of_webhook_events_list.rb +42 -0
  30. data/lib/sentdm/models/{webhook_rotate_secret_response.rb → api_response_of_webhook_secret.rb} +4 -17
  31. data/lib/sentdm/models/{webhook_test_response.rb → api_response_of_webhook_test.rb} +4 -23
  32. data/lib/sentdm/models/api_response_of_webhooks_list.rb +42 -0
  33. data/lib/sentdm/models/billing_contact.rb +35 -0
  34. data/lib/sentdm/models/brand_business.rb +96 -0
  35. data/lib/sentdm/models/brand_business_info.rb +3 -20
  36. data/lib/sentdm/models/brand_compliance.rb +75 -0
  37. data/lib/sentdm/models/brand_contact.rb +56 -0
  38. data/lib/sentdm/models/brand_with_kyc.rb +129 -0
  39. data/lib/sentdm/models/cancelled_message.rb +28 -0
  40. data/lib/sentdm/models/channel_event_payload.rb +3 -114
  41. data/lib/sentdm/models/channel_list_params.rb +20 -0
  42. data/lib/sentdm/models/channel_score.rb +35 -0
  43. data/lib/sentdm/models/channels/api_response_of_list_of_sms_market.rb +45 -0
  44. data/lib/sentdm/models/channels/api_response_of_rcs_agent.rb +60 -0
  45. data/lib/sentdm/models/channels/api_response_of_sms_market.rb +54 -0
  46. data/lib/sentdm/models/channels/api_response_of_whatsapp_channel.rb +47 -0
  47. data/lib/sentdm/models/channels/market_compliance.rb +409 -0
  48. data/lib/sentdm/models/channels/rc_create_params.rb +260 -0
  49. data/lib/sentdm/models/channels/rcs_address.rb +43 -0
  50. data/lib/sentdm/models/channels/rcs_agent.rb +278 -0
  51. data/lib/sentdm/models/channels/sms_create_params.rb +173 -0
  52. data/lib/sentdm/models/channels/sms_list_params.rb +22 -0
  53. data/lib/sentdm/models/channels/sms_market.rb +148 -0
  54. data/lib/sentdm/models/channels/sms_number.rb +52 -0
  55. data/lib/sentdm/models/channels/sms_number_request.rb +33 -0
  56. data/lib/sentdm/models/channels/sms_retrieve_params.rb +34 -0
  57. data/lib/sentdm/models/channels/sms_update_params.rb +64 -0
  58. data/lib/sentdm/models/channels/supplied_campaign.rb +10 -0
  59. data/lib/sentdm/models/channels/supplied_compliance.rb +115 -0
  60. data/lib/sentdm/models/channels/supplied_document.rb +35 -0
  61. data/lib/sentdm/models/channels/whatsapp_channel.rb +109 -0
  62. data/lib/sentdm/models/channels/whatsapp_create_params.rb +65 -0
  63. data/lib/sentdm/models/channels_state.rb +89 -0
  64. data/lib/sentdm/models/compliance_attachment_template.rb +36 -0
  65. data/lib/sentdm/models/compliance_requirement.rb +112 -0
  66. data/lib/sentdm/models/compliance_requirements.rb +98 -0
  67. data/lib/sentdm/models/compliance_retrieve_requirements_params.rb +52 -0
  68. data/lib/sentdm/models/compliance_setup_step.rb +78 -0
  69. data/lib/sentdm/models/contact_message_summary.rb +3 -34
  70. data/lib/sentdm/models/contacts_list.rb +26 -0
  71. data/lib/sentdm/models/conversation_messages_list.rb +3 -430
  72. data/lib/sentdm/models/entity_type.rb +18 -0
  73. data/lib/sentdm/models/inbound_media.rb +53 -0
  74. data/lib/sentdm/models/inbound_message_event_payload.rb +3 -53
  75. data/lib/sentdm/models/link_event.rb +79 -0
  76. data/lib/sentdm/models/link_event_payload.rb +211 -0
  77. data/lib/sentdm/models/message.rb +168 -0
  78. data/lib/sentdm/models/message_activities.rb +34 -0
  79. data/lib/sentdm/models/message_activity.rb +105 -0
  80. data/lib/sentdm/models/message_body.rb +79 -0
  81. data/lib/sentdm/models/message_button.rb +33 -0
  82. data/lib/sentdm/models/message_cancel_params.rb +32 -0
  83. data/lib/sentdm/models/message_channel_options.rb +43 -0
  84. data/lib/sentdm/models/message_header_media.rb +31 -0
  85. data/lib/sentdm/models/message_media.rb +74 -0
  86. data/lib/sentdm/models/message_recipient.rb +46 -0
  87. data/lib/sentdm/models/message_send_params.rb +6 -90
  88. data/lib/sentdm/models/message_send_response.rb +3 -95
  89. data/lib/sentdm/models/message_send_result.rb +55 -0
  90. data/lib/sentdm/models/message_status_event.rb +54 -0
  91. data/lib/sentdm/models/mms_market.rb +48 -0
  92. data/lib/sentdm/models/number_lookup_result.rb +63 -0
  93. data/lib/sentdm/models/pagination_cursors.rb +27 -0
  94. data/lib/sentdm/models/pagination_meta.rb +3 -27
  95. data/lib/sentdm/models/profile_completion_accepted.rb +20 -0
  96. data/lib/sentdm/models/profile_completion_result.rb +31 -0
  97. data/lib/sentdm/models/profile_detail.rb +6 -408
  98. data/lib/sentdm/models/profiles/brand_campaign.rb +14 -16
  99. data/lib/sentdm/models/profiles_list.rb +26 -0
  100. data/lib/sentdm/models/sender_profile.rb +138 -0
  101. data/lib/sentdm/models/sender_profile_billing.rb +21 -0
  102. data/lib/sentdm/models/sender_profile_billing_request.rb +33 -0
  103. data/lib/sentdm/models/sender_profile_channels.rb +90 -0
  104. data/lib/sentdm/models/sender_profile_create_params.rb +116 -0
  105. data/lib/sentdm/models/sender_profile_delete_params.rb +20 -0
  106. data/lib/sentdm/models/sender_profile_list_params.rb +30 -0
  107. data/lib/sentdm/models/sender_profile_rcs.rb +209 -0
  108. data/lib/sentdm/models/sender_profile_retrieve_params.rb +20 -0
  109. data/lib/sentdm/models/sender_profile_sms.rb +106 -0
  110. data/lib/sentdm/models/sender_profile_update_params.rb +71 -0
  111. data/lib/sentdm/models/sender_profile_whatsapp.rb +61 -0
  112. data/lib/sentdm/models/sender_profiles_list.rb +26 -0
  113. data/lib/sentdm/models/tcr_brand_identity_status.rb +17 -0
  114. data/lib/sentdm/models/tcr_brand_status.rb +16 -0
  115. data/lib/sentdm/models/tcr_campaign_status.rb +16 -0
  116. data/lib/sentdm/models/template_body.rb +3 -70
  117. data/lib/sentdm/models/template_header.rb +3 -37
  118. data/lib/sentdm/models/template_header_location.rb +38 -0
  119. data/lib/sentdm/models/template_media_item.rb +34 -0
  120. data/lib/sentdm/models/template_mms_body_content.rb +49 -0
  121. data/lib/sentdm/models/template_ref.rb +51 -0
  122. data/lib/sentdm/models/template_variable.rb +3 -64
  123. data/lib/sentdm/models/template_variable_props.rb +65 -0
  124. data/lib/sentdm/models/templates_list.rb +26 -0
  125. data/lib/sentdm/models/users_list.rb +26 -0
  126. data/lib/sentdm/models/voice/call.rb +7 -57
  127. data/lib/sentdm/models/voice/call_leg.rb +58 -0
  128. data/lib/sentdm/models/webhook_create_params.rb +3 -25
  129. data/lib/sentdm/models/webhook_delivery.rb +160 -0
  130. data/lib/sentdm/models/webhook_event_types_list.rb +26 -0
  131. data/lib/sentdm/models/webhook_events_list.rb +26 -0
  132. data/lib/sentdm/models/webhook_response.rb +3 -28
  133. data/lib/sentdm/models/webhook_secret.rb +15 -0
  134. data/lib/sentdm/models/webhook_sender_profile.rb +29 -0
  135. data/lib/sentdm/models/webhook_sender_profile_config.rb +27 -0
  136. data/lib/sentdm/models/webhook_test.rb +21 -0
  137. data/lib/sentdm/models/webhook_update_params.rb +3 -25
  138. data/lib/sentdm/models/webhooks_list.rb +26 -0
  139. data/lib/sentdm/models.rb +188 -0
  140. data/lib/sentdm/resources/channels/rcs.rb +177 -0
  141. data/lib/sentdm/resources/channels/sms.rb +420 -0
  142. data/lib/sentdm/resources/channels/whatsapp.rb +106 -0
  143. data/lib/sentdm/resources/channels.rb +162 -0
  144. data/lib/sentdm/resources/compliance.rb +127 -0
  145. data/lib/sentdm/resources/conversations.rb +4 -4
  146. data/lib/sentdm/resources/me.rb +2 -2
  147. data/lib/sentdm/resources/messages.rb +71 -6
  148. data/lib/sentdm/resources/numbers.rb +2 -2
  149. data/lib/sentdm/resources/profiles/campaigns.rb +4 -1
  150. data/lib/sentdm/resources/profiles.rb +4 -4
  151. data/lib/sentdm/resources/sender_profiles.rb +465 -0
  152. data/lib/sentdm/resources/users.rb +2 -2
  153. data/lib/sentdm/resources/voice/calls/participants.rb +5 -5
  154. data/lib/sentdm/resources/webhooks.rb +10 -10
  155. data/lib/sentdm/version.rb +1 -1
  156. data/lib/sentdm.rb +121 -11
  157. data/rbi/sentdm/client.rbi +64 -0
  158. data/rbi/sentdm/internal/sender_profiles_page.rbi +122 -0
  159. data/rbi/sentdm/models/account.rbi +242 -0
  160. data/rbi/sentdm/models/account_channels.rbi +66 -0
  161. data/rbi/sentdm/models/account_profile.rbi +116 -0
  162. data/rbi/sentdm/models/account_rcs_channel.rbi +45 -0
  163. data/rbi/sentdm/models/account_sms_channel.rbi +45 -0
  164. data/rbi/sentdm/models/account_whatsapp_channel.rbi +58 -0
  165. data/rbi/sentdm/models/api_response_of_account.rbi +78 -0
  166. data/rbi/sentdm/models/{webhook_rotate_secret_response.rbi → api_response_of_cancelled_message.rbi} +6 -41
  167. data/rbi/sentdm/models/api_response_of_channels_state.rbi +78 -0
  168. data/rbi/sentdm/models/api_response_of_compliance_requirements.rbi +81 -0
  169. data/rbi/sentdm/models/api_response_of_contacts_list.rbi +74 -0
  170. data/rbi/sentdm/models/api_response_of_message.rbi +84 -0
  171. data/rbi/sentdm/models/api_response_of_message_activities.rbi +77 -0
  172. data/rbi/sentdm/models/{webhook_test_response.rbi → api_response_of_number_lookup_result.rbi} +9 -43
  173. data/rbi/sentdm/models/api_response_of_profile_completion_accepted.rbi +83 -0
  174. data/rbi/sentdm/models/{profile_complete_response.rbi → api_response_of_profile_completion_result.rbi} +6 -52
  175. data/rbi/sentdm/models/api_response_of_profiles_list.rbi +74 -0
  176. data/rbi/sentdm/models/api_response_of_sender_profile.rbi +90 -0
  177. data/rbi/sentdm/models/api_response_of_sender_profiles_list.rbi +77 -0
  178. data/rbi/sentdm/models/api_response_of_templates_list.rbi +74 -0
  179. data/rbi/sentdm/models/api_response_of_users_list.rbi +74 -0
  180. data/rbi/sentdm/models/api_response_of_webhook_event_types_list.rbi +79 -0
  181. data/rbi/sentdm/models/api_response_of_webhook_events_list.rbi +77 -0
  182. data/rbi/sentdm/models/api_response_of_webhook_secret.rbi +74 -0
  183. data/rbi/sentdm/models/api_response_of_webhook_test.rbi +74 -0
  184. data/rbi/sentdm/models/api_response_of_webhooks_list.rbi +74 -0
  185. data/rbi/sentdm/models/billing_contact.rbi +49 -0
  186. data/rbi/sentdm/models/brand_business.rbi +115 -0
  187. data/rbi/sentdm/models/brand_business_info.rbi +3 -49
  188. data/rbi/sentdm/models/brand_compliance.rbi +108 -0
  189. data/rbi/sentdm/models/brand_contact.rbi +78 -0
  190. data/rbi/sentdm/models/brand_with_kyc.rbi +167 -0
  191. data/rbi/sentdm/models/cancelled_message.rbi +37 -0
  192. data/rbi/sentdm/models/channel_event_payload.rbi +4 -204
  193. data/rbi/sentdm/models/channel_list_params.rbi +38 -0
  194. data/rbi/sentdm/models/channel_score.rbi +56 -0
  195. data/rbi/sentdm/models/channels/api_response_of_list_of_sms_market.rbi +76 -0
  196. data/rbi/sentdm/models/channels/api_response_of_rcs_agent.rbi +103 -0
  197. data/rbi/sentdm/models/channels/api_response_of_sms_market.rbi +93 -0
  198. data/rbi/sentdm/models/channels/api_response_of_whatsapp_channel.rbi +85 -0
  199. data/rbi/sentdm/models/channels/market_compliance.rbi +770 -0
  200. data/rbi/sentdm/models/channels/rc_create_params.rbi +397 -0
  201. data/rbi/sentdm/models/channels/rcs_address.rbi +62 -0
  202. data/rbi/sentdm/models/channels/rcs_agent.rbi +320 -0
  203. data/rbi/sentdm/models/channels/sms_create_params.rbi +291 -0
  204. data/rbi/sentdm/models/channels/sms_list_params.rbi +40 -0
  205. data/rbi/sentdm/models/channels/sms_market.rbi +235 -0
  206. data/rbi/sentdm/models/channels/sms_number.rbi +74 -0
  207. data/rbi/sentdm/models/channels/sms_number_request.rbi +48 -0
  208. data/rbi/sentdm/models/channels/sms_retrieve_params.rbi +56 -0
  209. data/rbi/sentdm/models/channels/sms_update_params.rbi +93 -0
  210. data/rbi/sentdm/models/channels/supplied_campaign.rbi +13 -0
  211. data/rbi/sentdm/models/channels/supplied_compliance.rbi +180 -0
  212. data/rbi/sentdm/models/channels/supplied_document.rbi +57 -0
  213. data/rbi/sentdm/models/channels/whatsapp_channel.rbi +172 -0
  214. data/rbi/sentdm/models/channels/whatsapp_create_params.rbi +104 -0
  215. data/rbi/sentdm/models/channels_state.rbi +151 -0
  216. data/rbi/sentdm/models/compliance_attachment_template.rbi +56 -0
  217. data/rbi/sentdm/models/compliance_requirement.rbi +149 -0
  218. data/rbi/sentdm/models/compliance_requirements.rbi +165 -0
  219. data/rbi/sentdm/models/compliance_retrieve_requirements_params.rbi +79 -0
  220. data/rbi/sentdm/models/compliance_setup_step.rbi +115 -0
  221. data/rbi/sentdm/models/contact_message_summary.rbi +4 -69
  222. data/rbi/sentdm/models/contacts_list.rbi +50 -0
  223. data/rbi/sentdm/models/conversation_messages_list.rbi +4 -669
  224. data/rbi/sentdm/models/entity_type.rbi +23 -0
  225. data/rbi/sentdm/models/inbound_media.rbi +76 -0
  226. data/rbi/sentdm/models/inbound_message_event_payload.rbi +3 -85
  227. data/rbi/sentdm/models/link_event.rbi +128 -0
  228. data/rbi/sentdm/models/link_event_payload.rbi +279 -0
  229. data/rbi/sentdm/models/message.rbi +214 -0
  230. data/rbi/sentdm/models/message_activities.rbi +63 -0
  231. data/rbi/sentdm/models/message_activity.rbi +145 -0
  232. data/rbi/sentdm/models/message_body.rbi +104 -0
  233. data/rbi/sentdm/models/message_button.rbi +52 -0
  234. data/rbi/sentdm/models/message_cancel_params.rbi +59 -0
  235. data/rbi/sentdm/models/message_channel_options.rbi +65 -0
  236. data/rbi/sentdm/models/message_header_media.rbi +44 -0
  237. data/rbi/sentdm/models/message_media.rbi +95 -0
  238. data/rbi/sentdm/models/message_recipient.rbi +70 -0
  239. data/rbi/sentdm/models/message_send_params.rbi +7 -155
  240. data/rbi/sentdm/models/message_send_response.rbi +4 -163
  241. data/rbi/sentdm/models/message_send_result.rbi +85 -0
  242. data/rbi/sentdm/models/message_status_event.rbi +70 -0
  243. data/rbi/sentdm/models/mms_market.rbi +66 -0
  244. data/rbi/sentdm/models/number_lookup_result.rbi +89 -0
  245. data/rbi/sentdm/models/pagination_cursors.rbi +42 -0
  246. data/rbi/sentdm/models/pagination_meta.rbi +4 -43
  247. data/rbi/sentdm/models/profile_completion_accepted.rbi +33 -0
  248. data/rbi/sentdm/models/profile_completion_result.rbi +43 -0
  249. data/rbi/sentdm/models/profile_detail.rbi +8 -621
  250. data/rbi/sentdm/models/profiles/brand_campaign.rbi +18 -45
  251. data/rbi/sentdm/models/profiles_list.rbi +50 -0
  252. data/rbi/sentdm/models/sender_profile.rbi +204 -0
  253. data/rbi/sentdm/models/sender_profile_billing.rbi +34 -0
  254. data/rbi/sentdm/models/sender_profile_billing_request.rbi +46 -0
  255. data/rbi/sentdm/models/sender_profile_channels.rbi +163 -0
  256. data/rbi/sentdm/models/sender_profile_create_params.rbi +190 -0
  257. data/rbi/sentdm/models/sender_profile_delete_params.rbi +35 -0
  258. data/rbi/sentdm/models/sender_profile_list_params.rbi +57 -0
  259. data/rbi/sentdm/models/sender_profile_rcs.rbi +211 -0
  260. data/rbi/sentdm/models/sender_profile_retrieve_params.rbi +35 -0
  261. data/rbi/sentdm/models/sender_profile_sms.rbi +156 -0
  262. data/rbi/sentdm/models/sender_profile_update_params.rbi +96 -0
  263. data/rbi/sentdm/models/sender_profile_whatsapp.rbi +83 -0
  264. data/rbi/sentdm/models/sender_profiles_list.rbi +54 -0
  265. data/rbi/sentdm/models/tcr_brand_identity_status.rbi +27 -0
  266. data/rbi/sentdm/models/tcr_brand_status.rbi +20 -0
  267. data/rbi/sentdm/models/tcr_campaign_status.rbi +23 -0
  268. data/rbi/sentdm/models/template_body.rbi +6 -114
  269. data/rbi/sentdm/models/template_header.rbi +4 -53
  270. data/rbi/sentdm/models/template_header_location.rbi +47 -0
  271. data/rbi/sentdm/models/template_media_item.rbi +51 -0
  272. data/rbi/sentdm/models/template_mms_body_content.rbi +73 -0
  273. data/rbi/sentdm/models/template_ref.rbi +79 -0
  274. data/rbi/sentdm/models/template_variable.rbi +4 -80
  275. data/rbi/sentdm/models/template_variable_props.rbi +81 -0
  276. data/rbi/sentdm/models/templates_list.rbi +50 -0
  277. data/rbi/sentdm/models/users_list.rbi +50 -0
  278. data/rbi/sentdm/models/voice/call.rbi +11 -92
  279. data/rbi/sentdm/models/voice/call_leg.rbi +90 -0
  280. data/rbi/sentdm/models/webhook_create_params.rbi +4 -49
  281. data/rbi/sentdm/models/webhook_delivery.rbi +211 -0
  282. data/rbi/sentdm/models/webhook_event_types_list.rbi +54 -0
  283. data/rbi/sentdm/models/webhook_events_list.rbi +52 -0
  284. data/rbi/sentdm/models/webhook_response.rbi +4 -50
  285. data/rbi/sentdm/models/webhook_secret.rbi +24 -0
  286. data/rbi/sentdm/models/webhook_sender_profile.rbi +46 -0
  287. data/rbi/sentdm/models/webhook_sender_profile_config.rbi +44 -0
  288. data/rbi/sentdm/models/webhook_test.rbi +32 -0
  289. data/rbi/sentdm/models/webhook_update_params.rbi +4 -49
  290. data/rbi/sentdm/models/webhooks_list.rbi +50 -0
  291. data/rbi/sentdm/models.rbi +197 -0
  292. data/rbi/sentdm/resources/channels/rcs.rbi +208 -0
  293. data/rbi/sentdm/resources/channels/sms.rbi +440 -0
  294. data/rbi/sentdm/resources/channels/whatsapp.rbi +108 -0
  295. data/rbi/sentdm/resources/channels.rbi +149 -0
  296. data/rbi/sentdm/resources/compliance.rbi +121 -0
  297. data/rbi/sentdm/resources/conversations.rbi +2 -10
  298. data/rbi/sentdm/resources/me.rbi +1 -1
  299. data/rbi/sentdm/resources/messages.rbi +64 -7
  300. data/rbi/sentdm/resources/numbers.rbi +1 -1
  301. data/rbi/sentdm/resources/profiles/campaigns.rbi +4 -1
  302. data/rbi/sentdm/resources/profiles.rbi +2 -2
  303. data/rbi/sentdm/resources/sender_profiles.rbi +463 -0
  304. data/rbi/sentdm/resources/users.rbi +1 -1
  305. data/rbi/sentdm/resources/voice/calls/participants.rbi +5 -5
  306. data/rbi/sentdm/resources/webhooks.rbi +6 -12
  307. data/sig/sentdm/client.rbs +4 -0
  308. data/sig/sentdm/internal/sender_profiles_page.rbs +80 -0
  309. data/sig/sentdm/models/account.rbs +111 -0
  310. data/sig/sentdm/models/account_channels.rbs +38 -0
  311. data/sig/sentdm/models/account_profile.rbs +68 -0
  312. data/sig/sentdm/models/account_rcs_channel.rbs +17 -0
  313. data/sig/sentdm/models/account_sms_channel.rbs +17 -0
  314. data/sig/sentdm/models/account_whatsapp_channel.rbs +28 -0
  315. data/sig/sentdm/models/api_response_of_account.rbs +39 -0
  316. data/sig/sentdm/models/api_response_of_cancelled_message.rbs +39 -0
  317. data/sig/sentdm/models/api_response_of_channels_state.rbs +39 -0
  318. data/sig/sentdm/models/api_response_of_compliance_requirements.rbs +39 -0
  319. data/sig/sentdm/models/api_response_of_contacts_list.rbs +39 -0
  320. data/sig/sentdm/models/api_response_of_message.rbs +39 -0
  321. data/sig/sentdm/models/api_response_of_message_activities.rbs +39 -0
  322. data/sig/sentdm/models/api_response_of_number_lookup_result.rbs +39 -0
  323. data/sig/sentdm/models/api_response_of_profile_completion_accepted.rbs +39 -0
  324. data/sig/sentdm/models/api_response_of_profile_completion_result.rbs +39 -0
  325. data/sig/sentdm/models/api_response_of_profiles_list.rbs +39 -0
  326. data/sig/sentdm/models/api_response_of_sender_profile.rbs +39 -0
  327. data/sig/sentdm/models/api_response_of_sender_profiles_list.rbs +39 -0
  328. data/sig/sentdm/models/api_response_of_templates_list.rbs +39 -0
  329. data/sig/sentdm/models/api_response_of_users_list.rbs +39 -0
  330. data/sig/sentdm/models/api_response_of_webhook_event_types_list.rbs +39 -0
  331. data/sig/sentdm/models/api_response_of_webhook_events_list.rbs +39 -0
  332. data/sig/sentdm/models/api_response_of_webhook_secret.rbs +39 -0
  333. data/sig/sentdm/models/api_response_of_webhook_test.rbs +39 -0
  334. data/sig/sentdm/models/api_response_of_webhooks_list.rbs +39 -0
  335. data/sig/sentdm/models/billing_contact.rbs +30 -0
  336. data/sig/sentdm/models/brand_business.rbs +70 -0
  337. data/sig/sentdm/models/brand_business_info.rbs +4 -23
  338. data/sig/sentdm/models/brand_compliance.rbs +56 -0
  339. data/sig/sentdm/models/brand_contact.rbs +47 -0
  340. data/sig/sentdm/models/brand_with_kyc.rbs +93 -0
  341. data/sig/sentdm/models/cancelled_message.rbs +15 -0
  342. data/sig/sentdm/models/channel_event_payload.rbs +4 -56
  343. data/sig/sentdm/models/channel_list_params.rbs +25 -0
  344. data/sig/sentdm/models/channel_score.rbs +32 -0
  345. data/sig/sentdm/models/channels/api_response_of_list_of_sms_market.rbs +41 -0
  346. data/sig/sentdm/models/channels/api_response_of_rcs_agent.rbs +41 -0
  347. data/sig/sentdm/models/channels/api_response_of_sms_market.rbs +41 -0
  348. data/sig/sentdm/models/channels/api_response_of_whatsapp_channel.rbs +43 -0
  349. data/sig/sentdm/models/channels/market_compliance.rbs +338 -0
  350. data/sig/sentdm/models/channels/rc_create_params.rbs +242 -0
  351. data/sig/sentdm/models/channels/rcs_address.rbs +42 -0
  352. data/sig/sentdm/models/channels/rcs_agent.rbs +181 -0
  353. data/sig/sentdm/models/channels/sms_create_params.rbs +116 -0
  354. data/sig/sentdm/models/channels/sms_list_params.rbs +27 -0
  355. data/sig/sentdm/models/channels/sms_market.rbs +80 -0
  356. data/sig/sentdm/models/channels/sms_number.rbs +37 -0
  357. data/sig/sentdm/models/channels/sms_number_request.rbs +17 -0
  358. data/sig/sentdm/models/channels/sms_retrieve_params.rbs +36 -0
  359. data/sig/sentdm/models/channels/sms_update_params.rbs +63 -0
  360. data/sig/sentdm/models/channels/supplied_campaign.rbs +9 -0
  361. data/sig/sentdm/models/channels/supplied_compliance.rbs +37 -0
  362. data/sig/sentdm/models/channels/supplied_document.rbs +30 -0
  363. data/sig/sentdm/models/channels/whatsapp_channel.rbs +78 -0
  364. data/sig/sentdm/models/channels/whatsapp_create_params.rbs +56 -0
  365. data/sig/sentdm/models/channels_state.rbs +55 -0
  366. data/sig/sentdm/models/compliance_attachment_template.rbs +26 -0
  367. data/sig/sentdm/models/compliance_requirement.rbs +76 -0
  368. data/sig/sentdm/models/compliance_requirements.rbs +66 -0
  369. data/sig/sentdm/models/compliance_retrieve_requirements_params.rbs +43 -0
  370. data/sig/sentdm/models/compliance_setup_step.rbs +62 -0
  371. data/sig/sentdm/models/contact_message_summary.rbs +6 -35
  372. data/sig/sentdm/models/contacts_list.rbs +31 -0
  373. data/sig/sentdm/models/conversation_messages_list.rbs +5 -312
  374. data/sig/sentdm/models/entity_type.rbs +22 -0
  375. data/sig/sentdm/models/inbound_media.rbs +35 -0
  376. data/sig/sentdm/models/inbound_message_event_payload.rbs +4 -36
  377. data/sig/sentdm/models/link_event.rbs +44 -0
  378. data/sig/sentdm/models/link_event_payload.rbs +106 -0
  379. data/sig/sentdm/models/message.rbs +130 -0
  380. data/sig/sentdm/models/message_activities.rbs +38 -0
  381. data/sig/sentdm/models/message_activity.rbs +66 -0
  382. data/sig/sentdm/models/message_body.rbs +52 -0
  383. data/sig/sentdm/models/message_button.rbs +34 -0
  384. data/sig/sentdm/models/message_cancel_params.rbs +38 -0
  385. data/sig/sentdm/models/message_channel_options.rbs +26 -0
  386. data/sig/sentdm/models/message_header_media.rbs +19 -0
  387. data/sig/sentdm/models/message_media.rbs +40 -0
  388. data/sig/sentdm/models/message_recipient.rbs +34 -0
  389. data/sig/sentdm/models/message_send_params.rbs +8 -54
  390. data/sig/sentdm/models/message_send_response.rbs +4 -77
  391. data/sig/sentdm/models/message_send_result.rbs +45 -0
  392. data/sig/sentdm/models/message_status_event.rbs +40 -0
  393. data/sig/sentdm/models/mms_market.rbs +35 -0
  394. data/sig/sentdm/models/number_lookup_result.rbs +64 -0
  395. data/sig/sentdm/models/pagination_cursors.rbs +15 -0
  396. data/sig/sentdm/models/pagination_meta.rbs +4 -16
  397. data/sig/sentdm/models/profile_completion_accepted.rbs +15 -0
  398. data/sig/sentdm/models/profile_completion_result.rbs +19 -0
  399. data/sig/sentdm/models/profile_detail.rbs +8 -315
  400. data/sig/sentdm/models/profiles/brand_campaign.rbs +11 -16
  401. data/sig/sentdm/models/profiles_list.rbs +31 -0
  402. data/sig/sentdm/models/sender_profile.rbs +76 -0
  403. data/sig/sentdm/models/sender_profile_billing.rbs +15 -0
  404. data/sig/sentdm/models/sender_profile_billing_request.rbs +15 -0
  405. data/sig/sentdm/models/sender_profile_channels.rbs +30 -0
  406. data/sig/sentdm/models/sender_profile_create_params.rbs +78 -0
  407. data/sig/sentdm/models/sender_profile_delete_params.rbs +20 -0
  408. data/sig/sentdm/models/sender_profile_list_params.rbs +32 -0
  409. data/sig/sentdm/models/sender_profile_rcs.rbs +150 -0
  410. data/sig/sentdm/models/sender_profile_retrieve_params.rbs +20 -0
  411. data/sig/sentdm/models/sender_profile_sms.rbs +40 -0
  412. data/sig/sentdm/models/sender_profile_update_params.rbs +62 -0
  413. data/sig/sentdm/models/sender_profile_whatsapp.rbs +16 -0
  414. data/sig/sentdm/models/sender_profiles_list.rbs +31 -0
  415. data/sig/sentdm/models/tcr_brand_identity_status.rbs +17 -0
  416. data/sig/sentdm/models/tcr_brand_status.rbs +15 -0
  417. data/sig/sentdm/models/tcr_campaign_status.rbs +15 -0
  418. data/sig/sentdm/models/template_body.rbs +4 -43
  419. data/sig/sentdm/models/template_header.rbs +4 -31
  420. data/sig/sentdm/models/template_header_location.rbs +30 -0
  421. data/sig/sentdm/models/template_media_item.rbs +17 -0
  422. data/sig/sentdm/models/template_mms_body_content.rbs +28 -0
  423. data/sig/sentdm/models/template_ref.rbs +26 -0
  424. data/sig/sentdm/models/template_variable.rbs +4 -51
  425. data/sig/sentdm/models/template_variable_props.rbs +50 -0
  426. data/sig/sentdm/models/templates_list.rbs +29 -0
  427. data/sig/sentdm/models/users_list.rbs +31 -0
  428. data/sig/sentdm/models/voice/call.rbs +4 -49
  429. data/sig/sentdm/models/voice/call_leg.rbs +50 -0
  430. data/sig/sentdm/models/webhook_create_params.rbs +4 -28
  431. data/sig/sentdm/models/webhook_delivery.rbs +99 -0
  432. data/sig/sentdm/models/webhook_event_types_list.rbs +31 -0
  433. data/sig/sentdm/models/webhook_events_list.rbs +31 -0
  434. data/sig/sentdm/models/webhook_response.rbs +4 -28
  435. data/sig/sentdm/models/webhook_secret.rbs +15 -0
  436. data/sig/sentdm/models/webhook_sender_profile.rbs +27 -0
  437. data/sig/sentdm/models/webhook_sender_profile_config.rbs +27 -0
  438. data/sig/sentdm/models/webhook_test.rbs +19 -0
  439. data/sig/sentdm/models/webhook_update_params.rbs +4 -28
  440. data/sig/sentdm/models/webhooks_list.rbs +31 -0
  441. data/sig/sentdm/models.rbs +188 -0
  442. data/sig/sentdm/resources/channels/rcs.rbs +41 -0
  443. data/sig/sentdm/resources/channels/sms.rbs +44 -0
  444. data/sig/sentdm/resources/channels/whatsapp.rbs +18 -0
  445. data/sig/sentdm/resources/channels.rbs +11 -0
  446. data/sig/sentdm/resources/compliance.rbs +15 -0
  447. data/sig/sentdm/resources/conversations.rbs +2 -2
  448. data/sig/sentdm/resources/me.rbs +1 -1
  449. data/sig/sentdm/resources/messages.rbs +12 -4
  450. data/sig/sentdm/resources/numbers.rbs +1 -1
  451. data/sig/sentdm/resources/profiles.rbs +2 -2
  452. data/sig/sentdm/resources/sender_profiles.rbs +44 -0
  453. data/sig/sentdm/resources/users.rbs +1 -1
  454. data/sig/sentdm/resources/webhooks.rbs +6 -6
  455. metadata +365 -35
  456. data/lib/sentdm/models/me_retrieve_response.rb +0 -409
  457. data/lib/sentdm/models/message_retrieve_activities_response.rb +0 -175
  458. data/lib/sentdm/models/message_retrieve_status_response.rb +0 -477
  459. data/lib/sentdm/models/number_lookup_response.rb +0 -104
  460. data/lib/sentdm/models/profile_complete_response.rb +0 -74
  461. data/lib/sentdm/models/profile_list_response.rb +0 -65
  462. data/lib/sentdm/models/user_list_response.rb +0 -65
  463. data/lib/sentdm/models/webhook_list_event_types_response.rb +0 -65
  464. data/lib/sentdm/models/webhook_list_events_response.rb +0 -445
  465. data/rbi/sentdm/models/me_retrieve_response.rbi +0 -705
  466. data/rbi/sentdm/models/message_retrieve_activities_response.rbi +0 -319
  467. data/rbi/sentdm/models/message_retrieve_status_response.rbi +0 -765
  468. data/rbi/sentdm/models/number_lookup_response.rbi +0 -166
  469. data/rbi/sentdm/models/profile_list_response.rbi +0 -128
  470. data/rbi/sentdm/models/user_list_response.rbi +0 -128
  471. data/rbi/sentdm/models/webhook_list_event_types_response.rbi +0 -142
  472. data/rbi/sentdm/models/webhook_list_events_response.rbi +0 -647
  473. data/sig/sentdm/models/me_retrieve_response.rbs +0 -306
  474. data/sig/sentdm/models/message_retrieve_activities_response.rbs +0 -137
  475. data/sig/sentdm/models/message_retrieve_status_response.rbs +0 -341
  476. data/sig/sentdm/models/number_lookup_response.rbs +0 -100
  477. data/sig/sentdm/models/profile_complete_response.rbs +0 -55
  478. data/sig/sentdm/models/profile_list_response.rbs +0 -67
  479. data/sig/sentdm/models/user_list_response.rbs +0 -67
  480. data/sig/sentdm/models/webhook_list_event_types_response.rbs +0 -67
  481. data/sig/sentdm/models/webhook_list_events_response.rbs +0 -243
  482. data/sig/sentdm/models/webhook_rotate_secret_response.rbs +0 -51
  483. data/sig/sentdm/models/webhook_test_response.rbs +0 -55
@@ -0,0 +1,465 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sentdm
4
+ module Resources
5
+ # Your customers, each sending as itself.
6
+ #
7
+ # A sender profile is a tenant of yours: it has its own API key, its own balance,
8
+ # and can have its own identity and senders — so your customers send under their
9
+ # own brand and never see Sent. Depth is one; a profile cannot create profiles.
10
+ #
11
+ # **Everything is inherited unless the profile owns it.** `{ "name": "…" }` alone
12
+ # gives you a usable profile immediately, running on your identity, your inbox and
13
+ # your billing. Supply a capability's fields and the profile owns that one
14
+ # instead.
15
+ #
16
+ # **A sender is the exception.** A brand and a campaign can be inherited; a number
17
+ # cannot. A profile either has a sender of its own or reaches only the countries
18
+ # Sent runs a shared route for, and the US is not one of them.
19
+ #
20
+ # To act for a profile on any other resource, send `x-profile-id` with your
21
+ # organization key rather than looking for a parallel set of endpoints.
22
+ class SenderProfiles
23
+ # Some parameter documentations has been truncated, see
24
+ # {Sentdm::Models::SenderProfileCreateParams} for more details.
25
+ #
26
+ # Creates a sender profile under your organization. A profile is a customer of
27
+ # yours: it sends under its own or your identity, and your customers never see
28
+ # Sent.
29
+ #
30
+ # ## The minimum
31
+ #
32
+ # `{ "name": "Example Retail", "short_name": "Example" }`. `short_name` is the SMS
33
+ # sender id and is required. Inbox and opt-out list come from your organization.
34
+ # Its brand and campaign are your organization's only where `compliance` says
35
+ # `{ "inherit": true }` — omitted, the profile has neither. Billing defaults to
36
+ # the profile's own balance, with your organization covering what it cannot.
37
+ #
38
+ # **A sender is not one of them.** The brand and the campaign can be inherited; a
39
+ # number cannot. A profile either has a sender of its own — `channels.sms` — or it
40
+ # has none and reaches only the countries Sent runs a shared route for. The US has
41
+ # none: without a `TEN_DLC` number of its own, a profile's SMS to US numbers ends
42
+ # as `FAILED` with `DELIVERY_003`.
43
+ #
44
+ # ## Saying what a profile owns
45
+ #
46
+ # Every capability is one of three things, and there is no flag per state:
47
+ #
48
+ # - **Its own** — supply the capability's fields. Data is what owning looks like.
49
+ # - **The organization's** — `{ "inherit": true }`, with nothing else.
50
+ # - **None** — omit the block.
51
+ #
52
+ # There is no `"inherit": false` that also carries no data. A second way to say
53
+ # the same thing would let a request contradict itself.
54
+ #
55
+ # Inheriting needs no id. A customer has exactly one brand, so `brand` resolves
56
+ # without one.
57
+ #
58
+ # **The campaign has no block of its own.** It is only ever a registration, and
59
+ # every field of one is something a specific market demands — so it lives in
60
+ # `compliance`, alongside the rest of what that market asks for, and it says whose
61
+ # it is there too: `"compliance": { "campaign": { "inherit": true } }` runs the
62
+ # profile on your organization's campaign and brand, and stops this call asking
63
+ # for any campaign field. `"brand": { "inherit": true }` alone inherits the brand
64
+ # only: the campaign is then the profile's own. Inheriting takes _all_ of your
65
+ # organization's, because inheritance resolves an owner rather than a single row.
66
+ #
67
+ # A profile with a `brand` of its own **cannot** inherit the campaign, and asking
68
+ # is refused with `400`: a campaign is filed against a brand registration, and
69
+ # your organization's campaign is filed against your organization's brand rather
70
+ # than this profile's. Inherit both, own both, or inherit the brand and own the
71
+ # campaign.
72
+ #
73
+ # `channels.sms` is the market the profile starts in — one `country` and
74
+ # `number_type`. It decides what else this call asks for: the compliance catalog
75
+ # is keyed on that pair, and it determines which fields `brand` accepts and what
76
+ # `compliance` answers for.
77
+ #
78
+ # **Several numbers in that market**: `channels.sms.numbers` lists them, one entry
79
+ # per area code, e.g. `[{"area_code": "212", "quantity": 2}, {"quantity": 1}]` for
80
+ # two in 212 and one in any area code. `quantity` defaults to 1, an entry without
81
+ # `area_code` means any area code, and the total is at most 49. The market is
82
+ # created with **one campaign**, the one in `compliance.campaign`, and a US
83
+ # `TEN_DLC` market's numbers are stored on it and assigned when it is approved. A
84
+ # profile inheriting your organization's campaign keeps one number. Every number
85
+ # is listed in `channels.sms[].numbers` with its area code and status.
86
+ #
87
+ # A profile is a tenant, not a market, so it can go on to send in several — but
88
+ # through `POST /v3/channels/sms` with the `x-profile-id` header, one market and
89
+ # its compliance at a time. Reads return every market as `channels.sms[]`, so the
90
+ # read shape is a list even where this one is not.
91
+ #
92
+ # `brand` is required when `number_type` is `TEN_DLC` — inherited or its own. A
93
+ # 10DLC registration has nothing to attach to without one, and no later call can
94
+ # supply it, so omitting it is refused with `400` rather than reported as
95
+ # outstanding.
96
+ #
97
+ # ## Use cases and volume
98
+ #
99
+ # A TCR campaign declares one to five `use_cases`, each with its own
100
+ # `sample_messages` — TCR attributes samples to the use case they illustrate, so
101
+ # they travel together.
102
+ #
103
+ # How that set registers is derived from `volume` and never declared. Below the
104
+ # low-volume threshold the campaign registers as `LOW_VOLUME` with every entry as
105
+ # a sub-use-case; above it, one entry registers as that use case outright and
106
+ # several register as `MIXED` with sub-use-cases. `MIXED` and `LOW_VOLUME` are
107
+ # therefore refused as `use_case` values: they describe the shape of a set, which
108
+ # is ours to work out.
109
+ #
110
+ # **Leaving `volume` out is accepted and costs more.** An absent value registers
111
+ # the campaign at the standard tier, which carries the higher fee — so say so when
112
+ # a campaign is low volume. Sole proprietor brands are the exception: their fee is
113
+ # fixed by entity type, and volume only decides the use case.
114
+ #
115
+ # ## Compliance
116
+ #
117
+ # `brand` is captured identically in every country. Everything a specific market
118
+ # demands on top of it — including every field of the campaign — goes in
119
+ # `compliance`, as key/value entries whose keys depend on the sender's country and
120
+ # type. US `TEN_DLC` registers with The Campaign Registry and asks for a
121
+ # substantial set; an alphanumeric sender may pre-register with documents, or need
122
+ # nothing at all.
123
+ #
124
+ # You do not have to know any of it. Omit `compliance` and the response lists
125
+ # exactly what is outstanding, with types and accepted values — or call
126
+ # `GET /v3/compliance/requirements` first. Anything Sent supplies on your behalf
127
+ # is never asked for, and is rejected if sent.
128
+ #
129
+ # Requirements can be conditional, and the condition is published as
130
+ # `required_when` so you can render a form from it rather than discover the rule
131
+ # by being rejected. Every US `TEN_DLC` campaign field carries
132
+ # `compliance.inherit != true` — send `"inherit": true` and none of them is asked
133
+ # for or accepted, because the profile is running on your organization's campaign.
134
+ #
135
+ # ## Uploading documents
136
+ #
137
+ # Send `application/json` for everything except a market that pre-registers a
138
+ # sender with supporting documents. For those, send `multipart/form-data` instead:
139
+ # put this entire document — unchanged — in a single field named `profile`, and
140
+ # attach each file under a field named after the compliance key it satisfies.
141
+ # Individual form fields per property are not read; the payload is always the one
142
+ # `profile` field.
143
+ #
144
+ # A pre-registration market has no `brand` and no `campaign` — those are asked for
145
+ # only where a regime registers one — so its `compliance` carries nothing at all,
146
+ # and the documents are the request:
147
+ #
148
+ # ```bash
149
+ # curl -X POST https://api.sent.dm/v3/sender-profiles \
150
+ # -H 'x-api-key: YOUR_SECRET_TOKEN' \
151
+ # -F 'profile={
152
+ # "name": "Example Retail",
153
+ # "short_name": "EXAMPLE",
154
+ # "channels": {
155
+ # "sms": {
156
+ # "country": "XK",
157
+ # "number_type": "ALPHANUMERIC",
158
+ # "sender_value": "EXAMPLE"
159
+ # }
160
+ # }
161
+ # }' \
162
+ # -F 'business_registration=@registration.pdf' \
163
+ # -F 'letter_of_authorization=@loa.pdf'
164
+ # ```
165
+ #
166
+ # `business_registration` and `letter_of_authorization` are illustrative. The real
167
+ # field names are whatever that market configures, so read them from
168
+ # `GET /v3/compliance/requirements`, which lists documents separately from the
169
+ # values — under `attachments`, each with the `field_name` to put the file under.
170
+ #
171
+ # A document has no JSON form, so naming one in `compliance` is refused with `400`
172
+ # rather than ignored: accepting it would report the requirement as satisfied
173
+ # while no file was ever stored.
174
+ #
175
+ # ## WhatsApp and RCS
176
+ #
177
+ # Neither can be inherited, so neither takes an `inherit`: the profile's WhatsApp
178
+ # account and RCS agent are its own or it has none. Sharing your organization's
179
+ # would share its inbox and its throughput, which makes the two indistinguishable
180
+ # to a recipient.
181
+ #
182
+ # `channels.whatsapp` names one of the accounts shared into your organization, and
183
+ # takes the two identifiers nothing else can supply: `waba_id`, because your
184
+ # organization holds one account per client, and `phone_number_id`, because naming
185
+ # the account's number is what assigns it to the profile as the number it sends
186
+ # from.
187
+ #
188
+ # Everything else is resolved from your organization — the Multi-Partner Solution
189
+ # the account arrived through, the client business portfolio that owns it, the
190
+ # access token and that token's expiry. None of them is accepted here: the first
191
+ # two are Meta's answer about provenance, so a value you sent could assert a
192
+ # partnership Meta disagrees with, and the token is minted per client business and
193
+ # rotates roughly every sixty days.
194
+ #
195
+ # `phone_number_id` is optional. Omit it to connect the account now and settle the
196
+ # number later — the channel reads as `ACTION_NEEDED` with `reason_code`
197
+ # `CHANNEL_007`, and the profile's WhatsApp messages fail until a number is named.
198
+ # They do not fall back to your organization's account.
199
+ # `POST /v3/channels/whatsapp` connects an account to an existing profile and
200
+ # resolves the same fields the same way.
201
+ #
202
+ # An account of its own needs a sender of its own, so `channels.whatsapp` requires
203
+ # `channels.sms`. A profile sending SMS on your organization's sender shares that
204
+ # inbox and opt-out list, and is not a separate tenant to give an account to —
205
+ # asking is refused with `400`, before your organization is asked to resolve
206
+ # anything.
207
+ #
208
+ # `channels.rcs` records the RCS agent. RCS (Rich Communication Services) is the
209
+ # next-generation SMS standard built into Android — it lets you send branded
210
+ # messages with images, buttons and read receipts over the carrier network, with
211
+ # no app install required. Learn more in the
212
+ # [Google RCS documentation](https://developers.google.com/business-communications/rcs-business-messaging).
213
+ #
214
+ # All fields on the agent form are required except `opt_in_screenshot_url`. The
215
+ # full form must be submitted in one go so the carrier review has everything it
216
+ # needs. A carrier approval no API call can trigger is arranged offline, so the
217
+ # status reports `PROVISIONING` until it is.
218
+ #
219
+ # ## Responses
220
+ #
221
+ # `201` when the profile is complete on return — the fully-inherited case, where
222
+ # nothing needs registering. `202` when something is still provisioning, with
223
+ # per-capability status and outstanding requirements. `409` when the WhatsApp
224
+ # account supplied is already recorded. `400` covers a wrong value as well as a
225
+ # missing one: a missing brand under `TEN_DLC`, a brand or campaign inherited
226
+ # under `TEN_DLC` that your organization does not have yet, an unknown compliance
227
+ # key, a bad type, a sender id the market does not allow, a `waba_id` that is not
228
+ # one of the accounts shared into your organization, or a WhatsApp account Meta
229
+ # rejects. `502` when Meta could not be reached to verify the WhatsApp account;
230
+ # nothing was created, so retry.
231
+ #
232
+ # @overload create(billing: nil, channels: nil, compliance: nil, description: nil, name: nil, notifications: nil, sandbox: nil, short_name: nil, idempotency_key: nil, request_options: {})
233
+ #
234
+ # @param billing [Sentdm::Models::SenderProfileBillingRequest, nil] Body param: Who pays for what a sender profile sends.
235
+ #
236
+ # @param channels [Sentdm::Models::SenderProfileChannels, nil] Body param: The channels the profile sends on. Each is independently the profile
237
+ #
238
+ # @param compliance [Sentdm::Models::Channels::MarketCompliance] Body param: The compliance values a market registers with. `brand` and `campaign
239
+ #
240
+ # @param description [String, nil] Body param
241
+ #
242
+ # @param name [String] Body param: Display name for the profile. Required.
243
+ #
244
+ # @param notifications [String, nil] Body param: Who is notified about this profile's events: ORGANIZATION, SENDER_PR
245
+ #
246
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
247
+ #
248
+ # @param short_name [String] Body param: Short name, which is also the SMS sender id — required. 3–11 charact
249
+ #
250
+ # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
251
+ #
252
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
253
+ #
254
+ # @return [Sentdm::Models::APIResponseOfSenderProfile]
255
+ #
256
+ # @see Sentdm::Models::SenderProfileCreateParams
257
+ def create(params = {})
258
+ parsed, options = Sentdm::SenderProfileCreateParams.dump_request(params)
259
+ header_params = {idempotency_key: "idempotency-key"}
260
+ @client.request(
261
+ method: :post,
262
+ path: "v3/sender-profiles",
263
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
264
+ body: parsed.except(*header_params.keys),
265
+ model: Sentdm::APIResponseOfSenderProfile,
266
+ options: options
267
+ )
268
+ end
269
+
270
+ # Reads one of your sender profiles.
271
+ #
272
+ # The document mirrors `POST /v3/sender-profiles`, with three differences that
273
+ # follow from this being a read rather than a request.
274
+ #
275
+ # `channels.sms` is a **list**. Create takes the one market a profile starts in; a
276
+ # profile can go on to send in several, and this reports all of them, each with
277
+ # its own `status`.
278
+ #
279
+ # `compliance.brand` comes back **in full, with `inherit` saying whose it is**. On
280
+ # a request `{ "inherit": true }` carries no data because there is nothing to
281
+ # send; here it carries the data, because the point of a read is to say what the
282
+ # profile actually sends under.
283
+ #
284
+ # **There is no `campaigns` array.** Brand, campaign, and compliance documents are
285
+ # reported at the profile root in `compliance`. A profile running on your
286
+ # organization's campaign is asked for none of the campaign fields, so
287
+ # `compliance.campaign` carries `{ "inherit": true }` with no campaign data.
288
+ #
289
+ # `api_key` is **never** returned here. It is shown once, by create.
290
+ #
291
+ # A profile belonging to another organization reads as `404`, not `403`: saying
292
+ # which of the two it is would confirm the id exists.
293
+ #
294
+ # @overload retrieve(id, request_options: {})
295
+ #
296
+ # @param id [String] Identifier of the profile, as returned by POST /v3/sender-profiles.
297
+ #
298
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
299
+ #
300
+ # @return [Sentdm::Models::APIResponseOfSenderProfile]
301
+ #
302
+ # @see Sentdm::Models::SenderProfileRetrieveParams
303
+ def retrieve(id, params = {})
304
+ @client.request(
305
+ method: :get,
306
+ path: ["v3/sender-profiles/%1$s", id],
307
+ model: Sentdm::APIResponseOfSenderProfile,
308
+ options: params[:request_options]
309
+ )
310
+ end
311
+
312
+ # Some parameter documentations has been truncated, see
313
+ # {Sentdm::Models::SenderProfileUpdateParams} for more details.
314
+ #
315
+ # Changes a profile's own attributes: `name`, `short_name`, `description` and
316
+ # `notifications` (who is emailed about the profile's events — `ORGANIZATION`,
317
+ # `SENDER_PROFILE`, or `ORGANIZATION_AND_SENDER_PROFILE`).
318
+ #
319
+ # **Only those.** A profile's identity, its markets and its compliance each have a
320
+ # sub-resource of their own, because each has its own validation and its own
321
+ # external consequences — a brand change may need re-registering, a market change
322
+ # provisions a sender. Folding them in here would give those fields two writers
323
+ # and no way to say which one wins.
324
+ #
325
+ # Omitting a field leaves it alone; sending `null` clears it. Those are different
326
+ # requests, so `{}` changes nothing and is refused rather than silently accepted —
327
+ # a caller who misspelt every field would otherwise get a `200` and an unchanged
328
+ # profile.
329
+ #
330
+ # `name` and `short_name` cannot be cleared: `short_name` is the SMS sender id, so
331
+ # a supplied value must be 3–11 characters of letters, numbers and spaces with at
332
+ # least one letter.
333
+ #
334
+ # Returns the profile as `GET /v3/sender-profiles/{id}` would, so the result of
335
+ # the change needs no second call to see.
336
+ #
337
+ # @overload update(id, description: nil, name: nil, notifications: nil, sandbox: nil, short_name: nil, idempotency_key: nil, request_options: {})
338
+ #
339
+ # @param id [String] Path param
340
+ #
341
+ # @param description [String, nil] Body param
342
+ #
343
+ # @param name [String] Body param
344
+ #
345
+ # @param notifications [String, nil] Body param: Who is notified about this profile's events: ORGANIZATION, SENDER_PR
346
+ #
347
+ # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
348
+ #
349
+ # @param short_name [String, nil] Body param
350
+ #
351
+ # @param idempotency_key [String] Header param: Unique key to ensure idempotent request processing. Must be 1-255
352
+ #
353
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
354
+ #
355
+ # @return [Sentdm::Models::APIResponseOfSenderProfile]
356
+ #
357
+ # @see Sentdm::Models::SenderProfileUpdateParams
358
+ def update(id, params = {})
359
+ parsed, options = Sentdm::SenderProfileUpdateParams.dump_request(params)
360
+ header_params = {idempotency_key: "idempotency-key"}
361
+ @client.request(
362
+ method: :patch,
363
+ path: ["v3/sender-profiles/%1$s", id],
364
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
365
+ body: parsed.except(*header_params.keys),
366
+ model: Sentdm::APIResponseOfSenderProfile,
367
+ options: options
368
+ )
369
+ end
370
+
371
+ # Lists the sender profiles under your organization, newest first, paginated with
372
+ # `page` and `page_size`.
373
+ #
374
+ # Each entry is the same document `GET /v3/sender-profiles/{id}` returns, with one
375
+ # difference: **`compliance.documents` at the profile root is absent**. Working
376
+ # out which documents a market holds means a catalog lookup and a document read
377
+ # per market, and doing that for every profile on a page would turn one request
378
+ # into dozens to answer a question you did not ask. Read a single profile for
379
+ # that. Brand and campaign are still included when they exist.
380
+ #
381
+ # `compliance.documents` being **absent** is not the same as it being an **empty
382
+ # list**. Absent means the documents were not fetched here; an empty list means
383
+ # the profile holds none.
384
+ #
385
+ # `api_key` is never returned. It is shown once, by create.
386
+ #
387
+ # @overload list(page: nil, page_size: nil, request_options: {})
388
+ #
389
+ # @param page [Integer] Page number, 1-indexed.
390
+ #
391
+ # @param page_size [Integer] Profiles per page. Between 1 and 100.
392
+ #
393
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
394
+ #
395
+ # @return [Sentdm::Internal::SenderProfilesPage<Sentdm::Models::SenderProfile>]
396
+ #
397
+ # @see Sentdm::Models::SenderProfileListParams
398
+ def list(params = {})
399
+ parsed, options = Sentdm::SenderProfileListParams.dump_request(params)
400
+ query = Sentdm::Internal::Util.encode_query_params(parsed)
401
+ @client.request(
402
+ method: :get,
403
+ path: "v3/sender-profiles",
404
+ query: query,
405
+ page: Sentdm::Internal::SenderProfilesPage,
406
+ model: Sentdm::SenderProfile,
407
+ options: options
408
+ )
409
+ end
410
+
411
+ # Deletes one of your sender profiles and returns `204`.
412
+ #
413
+ # The delete is **soft**: the profile stops being usable and stops appearing in
414
+ # reads, and its message history is kept, because deleting a profile must not
415
+ # delete the record of what it sent.
416
+ #
417
+ # ## What it releases
418
+ #
419
+ # Anything the profile still held goes with it. A **phone number** returns to our
420
+ # inventory and can be given to whoever asks next — it does not stay reserved for
421
+ # you, and getting the same number back afterwards is not something we can
422
+ # promise. A **WhatsApp account of its own** is deregistered from Meta. Its
423
+ # routing rules stop being used, so nothing sends through the profile after this
424
+ # call.
425
+ #
426
+ # A profile that only inherits from its organization holds nothing of its own and
427
+ # releases nothing.
428
+ #
429
+ # ## When it is refused
430
+ #
431
+ # A number the profile holds that your **WhatsApp Business Account still carries**
432
+ # refuses the delete with a `409 CONFLICT_012`, and nothing is deleted: it would
433
+ # return to our shared inventory while Meta still routes WhatsApp to it, and the
434
+ # next customer given it could not register it at all. Only you can take it off
435
+ # the account — deregister **and** delete it in WhatsApp Manager, then try again.
436
+ # A `409 CONFLICT_013` means we could not read the account, so we cannot tell
437
+ # either way.
438
+ #
439
+ # @overload delete(id, request_options: {})
440
+ #
441
+ # @param id [String] Identifier of the profile.
442
+ #
443
+ # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
444
+ #
445
+ # @return [nil]
446
+ #
447
+ # @see Sentdm::Models::SenderProfileDeleteParams
448
+ def delete(id, params = {})
449
+ @client.request(
450
+ method: :delete,
451
+ path: ["v3/sender-profiles/%1$s", id],
452
+ model: NilClass,
453
+ options: params[:request_options]
454
+ )
455
+ end
456
+
457
+ # @api private
458
+ #
459
+ # @param client [Sentdm::Client]
460
+ def initialize(client:)
461
+ @client = client
462
+ end
463
+ end
464
+ end
465
+ end
@@ -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::UserListResponse]
53
+ # @return [Sentdm::Models::APIResponseOfUsersList]
54
54
  #
55
55
  # @see Sentdm::Models::UserListParams
56
56
  def list(params = {})
@@ -59,7 +59,7 @@ module Sentdm
59
59
  method: :get,
60
60
  path: "v3/users",
61
61
  headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
62
- model: Sentdm::Models::UserListResponse,
62
+ model: Sentdm::APIResponseOfUsersList,
63
63
  options: options
64
64
  )
65
65
  end
@@ -118,11 +118,11 @@ module Sentdm
118
118
  # conference room, and answers with the participant's own call record. The
119
119
  # participant is a call of their own: it has its own id, can be looked up and hung
120
120
  # up, and is billed and reported through call.completed and call.failed like any
121
- # other call. Every participant needs a positive balance. A phone participant is
122
- # called from caller_id, which must be one of your numbers, or from the call's
123
- # owning number when omitted, and needs a destination you may call. Only a call
124
- # your answer connected to a conference can take participants: a call connected to
125
- # a user or a number answers 409.
121
+ # other call. Every participant needs a payment method on file and a positive
122
+ # balance. A phone participant is called from caller_id, which must be one of your
123
+ # numbers, or from the call's owning number when omitted, and needs a destination
124
+ # you may call. Only a call your answer connected to a conference can take
125
+ # participants: a call connected to a user or a number answers 409.
126
126
  #
127
127
  # @overload add(id, caller_id: nil, sandbox: nil, to: nil, idempotency_key: nil, x_profile_id: nil, request_options: {})
128
128
  #
@@ -43,7 +43,7 @@ module Sentdm
43
43
  #
44
44
  # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
45
45
  #
46
- # @param sender_profile [Sentdm::Models::WebhookCreateParams::SenderProfile, nil] Body param: Request-only: the events an organization webhook's sender profile cl
46
+ # @param sender_profile [Sentdm::Models::WebhookSenderProfileConfig, nil] Body param: Request-only: the events an organization webhook's sender profile cl
47
47
  #
48
48
  # @param timeout_seconds [Integer] Body param: Delivery timeout. Applies to version 1 only.
49
49
  #
@@ -126,7 +126,7 @@ module Sentdm
126
126
  #
127
127
  # @param sandbox [Boolean] Body param: Sandbox flag - when true, the operation is simulated without side ef
128
128
  #
129
- # @param sender_profile [Sentdm::Models::WebhookUpdateParams::SenderProfile, nil] Body param: Request-only: the events an organization webhook's sender profile cl
129
+ # @param sender_profile [Sentdm::Models::WebhookSenderProfileConfig, nil] Body param: Request-only: the events an organization webhook's sender profile cl
130
130
  #
131
131
  # @param timeout_seconds [Integer] Body param
132
132
  #
@@ -228,7 +228,7 @@ module Sentdm
228
228
  #
229
229
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
230
230
  #
231
- # @return [Sentdm::Models::WebhookListEventTypesResponse]
231
+ # @return [Sentdm::Models::APIResponseOfWebhookEventTypesList]
232
232
  #
233
233
  # @see Sentdm::Models::WebhookListEventTypesParams
234
234
  def list_event_types(params = {})
@@ -237,7 +237,7 @@ module Sentdm
237
237
  method: :get,
238
238
  path: "v3/webhooks/event-types",
239
239
  headers: parsed.transform_keys(x_profile_id: "x-profile-id"),
240
- model: Sentdm::Models::WebhookListEventTypesResponse,
240
+ model: Sentdm::APIResponseOfWebhookEventTypesList,
241
241
  options: options
242
242
  )
243
243
  end
@@ -265,7 +265,7 @@ module Sentdm
265
265
  #
266
266
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
267
267
  #
268
- # @return [Sentdm::Internal::WebhookEventsPage<Sentdm::Models::WebhookListEventsResponse>]
268
+ # @return [Sentdm::Internal::WebhookEventsPage<Sentdm::Models::WebhookDelivery>]
269
269
  #
270
270
  # @see Sentdm::Models::WebhookListEventsParams
271
271
  def list_events(id, params = {})
@@ -278,7 +278,7 @@ module Sentdm
278
278
  query: query,
279
279
  headers: parsed.except(*query_params).transform_keys(x_profile_id: "x-profile-id"),
280
280
  page: Sentdm::Internal::WebhookEventsPage,
281
- model: Sentdm::Models::WebhookListEventsResponse,
281
+ model: Sentdm::WebhookDelivery,
282
282
  options: options
283
283
  )
284
284
  end
@@ -304,7 +304,7 @@ module Sentdm
304
304
  #
305
305
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
306
306
  #
307
- # @return [Sentdm::Models::WebhookRotateSecretResponse]
307
+ # @return [Sentdm::Models::APIResponseOfWebhookSecret]
308
308
  #
309
309
  # @see Sentdm::Models::WebhookRotateSecretParams
310
310
  def rotate_secret(id, params = {})
@@ -315,7 +315,7 @@ module Sentdm
315
315
  path: ["v3/webhooks/%1$s/rotate-secret", id],
316
316
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
317
317
  body: parsed.except(*header_params.keys),
318
- model: Sentdm::Models::WebhookRotateSecretResponse,
318
+ model: Sentdm::APIResponseOfWebhookSecret,
319
319
  options: options
320
320
  )
321
321
  end
@@ -342,7 +342,7 @@ module Sentdm
342
342
  #
343
343
  # @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
344
344
  #
345
- # @return [Sentdm::Models::WebhookTestResponse]
345
+ # @return [Sentdm::Models::APIResponseOfWebhookTest]
346
346
  #
347
347
  # @see Sentdm::Models::WebhookTestParams
348
348
  def test_(id, params = {})
@@ -353,7 +353,7 @@ module Sentdm
353
353
  path: ["v3/webhooks/%1$s/test", id],
354
354
  headers: parsed.slice(*header_params.keys).transform_keys(header_params),
355
355
  body: parsed.except(*header_params.keys),
356
- model: Sentdm::Models::WebhookTestResponse,
356
+ model: Sentdm::APIResponseOfWebhookTest,
357
357
  options: options
358
358
  )
359
359
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sentdm
4
- VERSION = "0.45.0"
4
+ VERSION = "0.47.0"
5
5
  end