one_msg_sdk 2.0.1 → 2.0.3

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 (298) hide show
  1. checksums.yaml +4 -4
  2. data/AGENTS.md +65 -19
  3. data/README.md +102 -34
  4. data/docs/AddTemplate200Response.md +18 -0
  5. data/docs/AddTemplateRequest.md +7 -7
  6. data/docs/CallingApi.md +27 -31
  7. data/docs/CallingSettings.md +18 -0
  8. data/docs/CallingSettingsCalling.md +38 -0
  9. data/docs/CallingSettingsCallingAudio.md +18 -0
  10. data/docs/CallingSettingsCallingCallHours.md +22 -0
  11. data/docs/CallingSettingsCallingSip.md +20 -0
  12. data/docs/CallingSettingsCallingSipServersInner.md +28 -0
  13. data/docs/CallingSettingsCallingVideo.md +18 -0
  14. data/docs/CatalogApi.md +1 -1
  15. data/docs/ChannelApi.md +151 -5
  16. data/docs/CreateFlowsRequest.md +26 -0
  17. data/docs/CreateGroupsGroupIdRequest.md +22 -0
  18. data/docs/CreateGroupsRequest.md +20 -0
  19. data/docs/CreateSettingsRequest.md +28 -0
  20. data/docs/CreateSettingsRequestWebhookUrl.md +49 -0
  21. data/docs/CreateUploadMedia200Response.md +18 -0
  22. data/docs/CreateUploadMediaRequest.md +20 -0
  23. data/docs/FlowsApi.md +32 -16
  24. data/docs/GetStatus200Response.md +26 -0
  25. data/docs/GetWebhook200Response.md +24 -2
  26. data/docs/GetWebhook200ResponseWebhookUrl.md +49 -0
  27. data/docs/GroupsApi.md +38 -18
  28. data/docs/InitiateCallRequest.md +28 -0
  29. data/docs/InitiateCallRequestSession.md +20 -0
  30. data/docs/InitiateCallResponse.md +26 -0
  31. data/docs/InitiateCallResponseCallsInner.md +18 -0
  32. data/docs/InitiateCallResponseResponse.md +18 -0
  33. data/docs/ListSettings200Response.md +52 -0
  34. data/docs/ListSettings200ResponseWebhookUrl.md +49 -0
  35. data/docs/MessagingApi.md +140 -35
  36. data/docs/PatchFlowsFlowIdAssetsRequest.md +18 -0
  37. data/docs/PatchFlowsFlowIdMetadataRequest.md +22 -0
  38. data/docs/ProfileApi.md +9 -11
  39. data/docs/RemoveTemplateRequest.md +18 -0
  40. data/docs/SendButtonRequest.md +9 -1
  41. data/docs/SendCarouselRequest1.md +4 -2
  42. data/docs/SendContactInfoRequest.md +26 -0
  43. data/docs/SendContactRequest.md +7 -1
  44. data/docs/SendContactRequestContact.md +26 -0
  45. data/docs/SendContactRequestContactName.md +49 -0
  46. data/docs/SendContactRequestContactsInner.md +3 -3
  47. data/docs/SendContactRequestContactsInnerPhonesInner.md +1 -1
  48. data/docs/SendListRequest.md +5 -1
  49. data/docs/SendLocationRequestRequest.md +5 -1
  50. data/docs/SendMessageRequest.md +6 -2
  51. data/docs/SendMessageRequestDirectSend.md +20 -0
  52. data/docs/SendProductRequest.md +30 -0
  53. data/docs/SendReactionRequest.md +3 -1
  54. data/docs/SendTemplateRequest.md +9 -5
  55. data/docs/SendTemplateRequestLanguage.md +3 -3
  56. data/docs/SetWebhook200Response.md +20 -0
  57. data/docs/SetWebhook200ResponseWebhookUrl.md +49 -0
  58. data/docs/SetWebhookRequest.md +18 -0
  59. data/docs/SetWebhookRequestWebhookUrl.md +49 -0
  60. data/docs/TemplatesApi.md +29 -17
  61. data/docs/UpdateCallingSettings200Response.md +22 -0
  62. data/docs/UpdateCallingSettings200ResponseResponse.md +18 -0
  63. data/docs/UpdateMe200Response.md +18 -0
  64. data/docs/UpdateMeRequest.md +6 -6
  65. data/docs/WebhookUrlStatus.md +34 -0
  66. data/docs/WebhooksApi.md +10 -12
  67. data/lib/one_msg_sdk/api/calling_api.rb +39 -31
  68. data/lib/one_msg_sdk/api/catalog_api.rb +4 -4
  69. data/lib/one_msg_sdk/api/channel_api.rb +146 -7
  70. data/lib/one_msg_sdk/api/flows_api.rb +58 -14
  71. data/lib/one_msg_sdk/api/groups_api.rb +48 -10
  72. data/lib/one_msg_sdk/api/messaging_api.rb +163 -38
  73. data/lib/one_msg_sdk/api/profile_api.rb +17 -13
  74. data/lib/one_msg_sdk/api/templates_api.rb +36 -13
  75. data/lib/one_msg_sdk/api/users_api.rb +2 -2
  76. data/lib/one_msg_sdk/api/webhooks_api.rb +19 -15
  77. data/lib/one_msg_sdk/api_client.rb +2 -2
  78. data/lib/one_msg_sdk/api_error.rb +2 -2
  79. data/lib/one_msg_sdk/api_model_base.rb +2 -2
  80. data/lib/one_msg_sdk/configuration.rb +2 -2
  81. data/lib/one_msg_sdk/models/add_template200_response.rb +150 -0
  82. data/lib/one_msg_sdk/models/add_template_request.rb +6 -2
  83. data/lib/one_msg_sdk/models/block_user_request.rb +2 -2
  84. data/lib/one_msg_sdk/models/calling_settings.rb +148 -0
  85. data/lib/one_msg_sdk/models/calling_settings_calling.rb +321 -0
  86. data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +148 -0
  87. data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +166 -0
  88. data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +193 -0
  89. data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +196 -0
  90. data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +182 -0
  91. data/lib/one_msg_sdk/models/conversational_automation.rb +2 -2
  92. data/lib/one_msg_sdk/models/conversational_automation_commands_inner.rb +2 -2
  93. data/lib/one_msg_sdk/models/create_commerce200_response.rb +2 -2
  94. data/lib/one_msg_sdk/models/create_commerce_request.rb +2 -2
  95. data/lib/one_msg_sdk/models/create_commerce_request_params.rb +2 -2
  96. data/lib/one_msg_sdk/models/create_flows_request.rb +238 -0
  97. data/lib/one_msg_sdk/models/create_groups200_response.rb +2 -2
  98. data/lib/one_msg_sdk/models/create_groups_group_id_request.rb +168 -0
  99. data/lib/one_msg_sdk/models/create_groups_request.rb +175 -0
  100. data/lib/one_msg_sdk/models/create_read_message200_response.rb +2 -2
  101. data/lib/one_msg_sdk/models/create_read_message401_response.rb +2 -2
  102. data/lib/one_msg_sdk/models/create_read_message_request.rb +2 -2
  103. data/lib/one_msg_sdk/models/create_settings_request.rb +192 -0
  104. data/lib/one_msg_sdk/models/create_settings_request_webhook_url.rb +105 -0
  105. data/lib/one_msg_sdk/models/create_upload_media200_response.rb +147 -0
  106. data/lib/one_msg_sdk/models/create_upload_media_request.rb +158 -0
  107. data/lib/one_msg_sdk/models/delete_flows_flow_id200_response.rb +2 -2
  108. data/lib/one_msg_sdk/models/delete_groups_group_id200_response.rb +2 -2
  109. data/lib/one_msg_sdk/models/delete_media_legacy_request.rb +2 -2
  110. data/lib/one_msg_sdk/models/error_response.rb +2 -2
  111. data/lib/one_msg_sdk/models/get_commerce200_response_inner.rb +2 -2
  112. data/lib/one_msg_sdk/models/get_mm_lite_status200_response.rb +2 -2
  113. data/lib/one_msg_sdk/models/get_status200_response.rb +185 -0
  114. data/lib/one_msg_sdk/models/get_webhook200_response.rb +155 -6
  115. data/lib/one_msg_sdk/models/get_webhook200_response_webhook_url.rb +105 -0
  116. data/lib/one_msg_sdk/models/get_whatsapp_business_encryption200_response.rb +2 -2
  117. data/lib/one_msg_sdk/models/initiate_call_request.rb +277 -0
  118. data/lib/one_msg_sdk/models/initiate_call_request_session.rb +217 -0
  119. data/lib/one_msg_sdk/models/initiate_call_response.rb +188 -0
  120. data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +147 -0
  121. data/lib/one_msg_sdk/models/initiate_call_response_response.rb +148 -0
  122. data/lib/one_msg_sdk/models/list_blocked_users200_response.rb +2 -2
  123. data/lib/one_msg_sdk/models/list_flows200_response.rb +2 -2
  124. data/lib/one_msg_sdk/models/list_messages200_response.rb +2 -2
  125. data/lib/one_msg_sdk/models/list_settings200_response.rb +352 -0
  126. data/lib/one_msg_sdk/models/list_settings200_response_webhook_url.rb +105 -0
  127. data/lib/one_msg_sdk/models/list_templates200_response.rb +2 -2
  128. data/lib/one_msg_sdk/models/message_sent_response.rb +2 -2
  129. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets200_response.rb +2 -2
  130. data/lib/one_msg_sdk/models/patch_flows_flow_id_assets_request.rb +167 -0
  131. data/lib/one_msg_sdk/models/patch_flows_flow_id_metadata_request.rb +190 -0
  132. data/lib/one_msg_sdk/models/profile_info.rb +2 -2
  133. data/lib/one_msg_sdk/models/remove_template_request.rb +165 -0
  134. data/lib/one_msg_sdk/models/retrieve_media200_response.rb +2 -2
  135. data/lib/one_msg_sdk/models/send_address_message_request.rb +2 -2
  136. data/lib/one_msg_sdk/models/send_button_request.rb +48 -3
  137. data/lib/one_msg_sdk/models/send_button_request_sections_inner.rb +2 -2
  138. data/lib/one_msg_sdk/models/send_button_request_sections_inner_reply.rb +2 -2
  139. data/lib/one_msg_sdk/models/send_carousel_request1.rb +38 -13
  140. data/lib/one_msg_sdk/models/send_contact_info_request.rb +222 -0
  141. data/lib/one_msg_sdk/models/send_contact_request.rb +32 -3
  142. data/lib/one_msg_sdk/models/send_contact_request_contact.rb +221 -0
  143. data/lib/one_msg_sdk/models/send_contact_request_contact_name.rb +105 -0
  144. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner.rb +5 -5
  145. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_name.rb +2 -2
  146. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_org.rb +2 -2
  147. data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.rb +3 -2
  148. data/lib/one_msg_sdk/models/send_cta_url_request.rb +2 -2
  149. data/lib/one_msg_sdk/models/send_file_request.rb +2 -2
  150. data/lib/one_msg_sdk/models/send_flow_request1.rb +2 -2
  151. data/lib/one_msg_sdk/models/send_flow_request1_header.rb +2 -2
  152. data/lib/one_msg_sdk/models/send_flow_request_header.rb +2 -2
  153. data/lib/one_msg_sdk/models/send_list_request.rb +23 -3
  154. data/lib/one_msg_sdk/models/send_list_request_sections_inner.rb +2 -2
  155. data/lib/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.rb +2 -2
  156. data/lib/one_msg_sdk/models/send_location_request1.rb +2 -2
  157. data/lib/one_msg_sdk/models/send_location_request_request.rb +23 -3
  158. data/lib/one_msg_sdk/models/send_message_request.rb +60 -28
  159. data/lib/one_msg_sdk/models/send_message_request_direct_send.rb +189 -0
  160. data/lib/one_msg_sdk/models/send_order_details_request.rb +2 -2
  161. data/lib/one_msg_sdk/models/send_order_details_request_language.rb +2 -2
  162. data/lib/one_msg_sdk/models/send_order_details_request_order.rb +2 -2
  163. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner.rb +2 -2
  164. data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.rb +2 -2
  165. data/lib/one_msg_sdk/models/send_payment_request_request.rb +2 -2
  166. data/lib/one_msg_sdk/models/send_product_request.rb +225 -0
  167. data/lib/one_msg_sdk/models/send_reaction_request.rb +14 -3
  168. data/lib/one_msg_sdk/models/send_sticker_request.rb +2 -2
  169. data/lib/one_msg_sdk/models/send_template_request.rb +29 -5
  170. data/lib/one_msg_sdk/models/send_template_request_language.rb +6 -2
  171. data/lib/one_msg_sdk/models/set_webhook200_response.rb +157 -0
  172. data/lib/one_msg_sdk/models/set_webhook200_response_webhook_url.rb +105 -0
  173. data/lib/one_msg_sdk/models/set_webhook_request.rb +164 -0
  174. data/lib/one_msg_sdk/models/set_webhook_request_webhook_url.rb +105 -0
  175. data/lib/one_msg_sdk/models/set_whatsapp_business_encryption_request.rb +2 -2
  176. data/lib/one_msg_sdk/models/success_response.rb +2 -2
  177. data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +165 -0
  178. data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +147 -0
  179. data/lib/one_msg_sdk/models/update_me200_response.rb +147 -0
  180. data/lib/one_msg_sdk/models/update_me_request.rb +6 -3
  181. data/lib/one_msg_sdk/models/webhook_url_status.rb +287 -0
  182. data/lib/one_msg_sdk/platform_client.rb +182 -0
  183. data/lib/one_msg_sdk/version.rb +3 -3
  184. data/lib/one_msg_sdk.rb +44 -2
  185. data/one_msg_sdk.gemspec +2 -2
  186. data/spec/api/calling_api_spec.rb +11 -11
  187. data/spec/api/catalog_api_spec.rb +3 -3
  188. data/spec/api/channel_api_spec.rb +29 -4
  189. data/spec/api/flows_api_spec.rb +10 -2
  190. data/spec/api/groups_api_spec.rb +10 -2
  191. data/spec/api/messaging_api_spec.rb +37 -9
  192. data/spec/api/profile_api_spec.rb +5 -5
  193. data/spec/api/templates_api_spec.rb +11 -5
  194. data/spec/api/users_api_spec.rb +2 -2
  195. data/spec/api/webhooks_api_spec.rb +6 -6
  196. data/spec/models/add_template200_response_spec.rb +36 -0
  197. data/spec/models/add_template_request_spec.rb +2 -2
  198. data/spec/models/block_user_request_spec.rb +2 -2
  199. data/spec/models/calling_settings_calling_audio_spec.rb +36 -0
  200. data/spec/models/calling_settings_calling_call_hours_spec.rb +48 -0
  201. data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +66 -0
  202. data/spec/models/calling_settings_calling_sip_spec.rb +46 -0
  203. data/spec/models/calling_settings_calling_spec.rb +112 -0
  204. data/spec/models/calling_settings_calling_video_spec.rb +40 -0
  205. data/spec/models/calling_settings_spec.rb +36 -0
  206. data/spec/models/conversational_automation_commands_inner_spec.rb +2 -2
  207. data/spec/models/conversational_automation_spec.rb +2 -2
  208. data/spec/models/create_commerce200_response_spec.rb +2 -2
  209. data/spec/models/create_commerce_request_params_spec.rb +2 -2
  210. data/spec/models/create_commerce_request_spec.rb +2 -2
  211. data/spec/models/create_flows_request_spec.rb +64 -0
  212. data/spec/models/create_groups200_response_spec.rb +2 -2
  213. data/spec/models/create_groups_group_id_request_spec.rb +48 -0
  214. data/spec/models/create_groups_request_spec.rb +42 -0
  215. data/spec/models/create_read_message200_response_spec.rb +2 -2
  216. data/spec/models/create_read_message401_response_spec.rb +2 -2
  217. data/spec/models/create_read_message_request_spec.rb +2 -2
  218. data/spec/models/create_settings_request_spec.rb +66 -0
  219. data/spec/models/create_settings_request_webhook_url_spec.rb +32 -0
  220. data/spec/models/create_upload_media200_response_spec.rb +36 -0
  221. data/spec/models/create_upload_media_request_spec.rb +42 -0
  222. data/spec/models/delete_flows_flow_id200_response_spec.rb +2 -2
  223. data/spec/models/delete_groups_group_id200_response_spec.rb +2 -2
  224. data/spec/models/delete_media_legacy_request_spec.rb +2 -2
  225. data/spec/models/error_response_spec.rb +2 -2
  226. data/spec/models/get_commerce200_response_inner_spec.rb +2 -2
  227. data/spec/models/get_mm_lite_status200_response_spec.rb +2 -2
  228. data/spec/models/get_status200_response_spec.rb +60 -0
  229. data/spec/models/get_webhook200_response_spec.rb +72 -2
  230. data/spec/models/get_webhook200_response_webhook_url_spec.rb +32 -0
  231. data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +2 -2
  232. data/spec/models/initiate_call_request_session_spec.rb +46 -0
  233. data/spec/models/initiate_call_request_spec.rb +74 -0
  234. data/spec/models/initiate_call_response_calls_inner_spec.rb +36 -0
  235. data/spec/models/initiate_call_response_response_spec.rb +36 -0
  236. data/spec/models/initiate_call_response_spec.rb +60 -0
  237. data/spec/models/list_blocked_users200_response_spec.rb +2 -2
  238. data/spec/models/list_flows200_response_spec.rb +2 -2
  239. data/spec/models/list_messages200_response_spec.rb +2 -2
  240. data/spec/models/list_settings200_response_spec.rb +142 -0
  241. data/spec/models/list_settings200_response_webhook_url_spec.rb +32 -0
  242. data/spec/models/list_templates200_response_spec.rb +2 -2
  243. data/spec/models/message_sent_response_spec.rb +2 -2
  244. data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +2 -2
  245. data/spec/models/patch_flows_flow_id_assets_request_spec.rb +36 -0
  246. data/spec/models/patch_flows_flow_id_metadata_request_spec.rb +52 -0
  247. data/spec/models/profile_info_spec.rb +2 -2
  248. data/spec/models/remove_template_request_spec.rb +36 -0
  249. data/spec/models/retrieve_media200_response_spec.rb +2 -2
  250. data/spec/models/send_address_message_request_spec.rb +2 -2
  251. data/spec/models/send_button_request_sections_inner_reply_spec.rb +2 -2
  252. data/spec/models/send_button_request_sections_inner_spec.rb +2 -2
  253. data/spec/models/send_button_request_spec.rb +26 -2
  254. data/spec/models/send_carousel_request1_spec.rb +8 -2
  255. data/spec/models/send_contact_info_request_spec.rb +60 -0
  256. data/spec/models/send_contact_request_contact_name_spec.rb +32 -0
  257. data/spec/models/send_contact_request_contact_spec.rb +60 -0
  258. data/spec/models/send_contact_request_contacts_inner_name_spec.rb +2 -2
  259. data/spec/models/send_contact_request_contacts_inner_org_spec.rb +2 -2
  260. data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +2 -2
  261. data/spec/models/send_contact_request_contacts_inner_spec.rb +2 -2
  262. data/spec/models/send_contact_request_spec.rb +20 -2
  263. data/spec/models/send_cta_url_request_spec.rb +2 -2
  264. data/spec/models/send_file_request_spec.rb +2 -2
  265. data/spec/models/send_flow_request1_header_spec.rb +2 -2
  266. data/spec/models/send_flow_request1_spec.rb +2 -2
  267. data/spec/models/send_flow_request_header_spec.rb +2 -2
  268. data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +2 -2
  269. data/spec/models/send_list_request_sections_inner_spec.rb +2 -2
  270. data/spec/models/send_list_request_spec.rb +14 -2
  271. data/spec/models/send_location_request1_spec.rb +2 -2
  272. data/spec/models/send_location_request_request_spec.rb +14 -2
  273. data/spec/models/send_message_request_direct_send_spec.rb +42 -0
  274. data/spec/models/send_message_request_spec.rb +18 -2
  275. data/spec/models/send_order_details_request_language_spec.rb +2 -2
  276. data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +2 -2
  277. data/spec/models/send_order_details_request_order_items_inner_spec.rb +2 -2
  278. data/spec/models/send_order_details_request_order_spec.rb +2 -2
  279. data/spec/models/send_order_details_request_spec.rb +2 -2
  280. data/spec/models/send_payment_request_request_spec.rb +2 -2
  281. data/spec/models/send_product_request_spec.rb +72 -0
  282. data/spec/models/send_reaction_request_spec.rb +8 -2
  283. data/spec/models/send_sticker_request_spec.rb +2 -2
  284. data/spec/models/send_template_request_language_spec.rb +2 -2
  285. data/spec/models/send_template_request_spec.rb +14 -2
  286. data/spec/models/set_webhook200_response_spec.rb +42 -0
  287. data/spec/models/set_webhook200_response_webhook_url_spec.rb +32 -0
  288. data/spec/models/set_webhook_request_spec.rb +36 -0
  289. data/spec/models/set_webhook_request_webhook_url_spec.rb +32 -0
  290. data/spec/models/set_whatsapp_business_encryption_request_spec.rb +2 -2
  291. data/spec/models/success_response_spec.rb +2 -2
  292. data/spec/models/update_calling_settings200_response_response_spec.rb +36 -0
  293. data/spec/models/update_calling_settings200_response_spec.rb +48 -0
  294. data/spec/models/update_me200_response_spec.rb +36 -0
  295. data/spec/models/update_me_request_spec.rb +2 -2
  296. data/spec/models/webhook_url_status_spec.rb +88 -0
  297. data/spec/spec_helper.rb +2 -2
  298. metadata +319 -89
@@ -0,0 +1,22 @@
1
+ # OneMsgSdk::UpdateCallingSettings200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **success** | **Boolean** | | [optional] |
8
+ | **result** | **String** | | [optional] |
9
+ | **response** | [**UpdateCallingSettings200ResponseResponse**](UpdateCallingSettings200ResponseResponse.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'one_msg_sdk'
15
+
16
+ instance = OneMsgSdk::UpdateCallingSettings200Response.new(
17
+ success: true,
18
+ result: success,
19
+ response: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # OneMsgSdk::UpdateCallingSettings200ResponseResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'one_msg_sdk'
13
+
14
+ instance = OneMsgSdk::UpdateCallingSettings200ResponseResponse.new(
15
+ error: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # OneMsgSdk::UpdateMe200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **result** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'one_msg_sdk'
13
+
14
+ instance = OneMsgSdk::UpdateMe200Response.new(
15
+ result: success
16
+ )
17
+ ```
18
+
@@ -4,13 +4,13 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **about** | **String** | Profile About section | [optional] |
8
- | **address** | **String** | | [optional] |
7
+ | **about** | **String** | Profile About section (WhatsApp status text) | [optional] |
8
+ | **address** | **String** | Business address shown on the profile | [optional] |
9
9
  | **description** | **String** | Business description (max 256 characters) | [optional] |
10
- | **email** | **String** | | [optional] |
10
+ | **email** | **String** | Business email shown on the profile | [optional] |
11
11
  | **vertical** | **String** | Industry of the business | [optional] |
12
12
  | **photo** | **String** | HTTPS URL or data:image/...;base64,... payload | [optional] |
13
- | **websites** | **Array<String>** | | [optional] |
13
+ | **websites** | **Array<String>** | Business website URLs | [optional] |
14
14
 
15
15
  ## Example
16
16
 
@@ -18,10 +18,10 @@
18
18
  require 'one_msg_sdk'
19
19
 
20
20
  instance = OneMsgSdk::UpdateMeRequest.new(
21
- about: null,
21
+ about: Available 9–18,
22
22
  address: null,
23
23
  description: null,
24
- email: null,
24
+ email: support@example.com,
25
25
  vertical: null,
26
26
  photo: null,
27
27
  websites: null
@@ -0,0 +1,34 @@
1
+ # OneMsgSdk::WebhookUrlStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **url** | **String** | This webhook URL (same string as in `webhookUrl`) | |
8
+ | **circuit_state** | **String** | Delivery state for this URL only. `ok` delivering; `degraded` recent qualifying fails (still delivering, warning email on the 2nd fail); `open` skipping most deliveries pending a probe; `half_open` probe in flight (resume only on HTTP 2xx); `disabled` sticky auto-disabled until self-serve re-enable (`POST /webhook` / `POST /settings` with this URL) or a successful probe before sticky disable. | |
9
+ | **reason** | **String** | Last qualifying fail reason, e.g. `http_404` or `timeout_or_network` | [optional] |
10
+ | **fails** | **Integer** | Diagnostic only — safe for clients to ignore. Number of qualifying delivery failures in the rolling ~10 minute breaker window (not lifetime, not \"how many times the customer retried\"). Prefer `circuitState` / `disabledWebhooks`. | [optional] |
11
+ | **trips** | **Integer** | Diagnostic only — safe for clients to ignore. How many recovery probes already failed for this URL. Probes run on a schedule (≈15 min → 1 h → 6 h); sticky disable after 3 failed probes. The 6 h step is the last probe, not a blind \"unblock in 6 hours\" timer. | [optional] |
12
+ | **disabled_at** | **Integer** | Epoch milliseconds when this URL became sticky-disabled | [optional] |
13
+ | **first_fail_at** | **Integer** | Diagnostic only. Epoch ms of the first fail in the current ~10 minute window (pairs with `fails`; not a customer-facing period). | [optional] |
14
+ | **last_status** | **Integer** | Last HTTP status from this URL, when known | [optional] |
15
+ | **next_probe_at** | **Integer** | Epoch milliseconds of the next half-open probe, if any | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'one_msg_sdk'
21
+
22
+ instance = OneMsgSdk::WebhookUrlStatus.new(
23
+ url: null,
24
+ circuit_state: null,
25
+ reason: null,
26
+ fails: null,
27
+ trips: null,
28
+ disabled_at: null,
29
+ first_fail_at: null,
30
+ last_status: null,
31
+ next_probe_at: null
32
+ )
33
+ ```
34
+
data/docs/WebhooksApi.md CHANGED
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.1msg.io*
14
14
 
15
15
  Get webhook URL
16
16
 
17
- Returns the configured client webhook URL for this channel.
17
+ Return the webhook URL(s) currently configured for this channel, plus delivery status for each URL. `webhookUrl` is a string when a single URL is set, an array of strings when multiple URLs are configured, or `null` if none is set. **Prefer `webhookStatuses`.** The circuit breaker is per URL, not per channel. If 1 of 4 URLs is sticky-disabled, that URL is skipped; the other three still receive events. Send/receive are not affected. Channel-level `haveDisabledWebhooks`, `circuitState`, `reason`, `fails`, `trips`, and timestamps are a compatibility summary of **one** URL (the first sticky-disabled URL, else the first configured URL). They are not \"the channel is dead\". - `haveDisabledWebhooks` — `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled. Live URLs still get events. - `circuitState` — compressed scalar for that same primary URL: `ok` | `degraded` | `open` | `half_open` | `disabled`. - `disabledWebhooks` — currently configured URLs that are sticky-disabled (subset of `webhookUrl`). - `webhookStatuses` — one row per currently configured URL. Use this array to see which endpoints are live vs skipped. - `fails` / `trips` / `firstFailAt` — **diagnostics for support**, not product UI. `fails` = failures in a rolling ~10 minute window (not lifetime). `trips` = failed recovery probes on the 15 min → 1 h → 6 h schedule (sticky disable after 3). Clients can ignore these and use `webhookStatuses` + `disabledWebhooks` only. Sticky disable skips delivery; it does not unconfigure the URL (it stays in `webhookUrl`). Re-enable with `POST /webhook` or `POST /settings`. Those endpoints **replace** the whole list — with multiple URLs, send the full array.
18
18
 
19
19
  ### Examples
20
20
 
@@ -81,11 +81,11 @@ end
81
81
 
82
82
  ## set_webhook
83
83
 
84
- > Hash<String, Object> set_webhook(token, opts)
84
+ > <SetWebhook200Response> set_webhook(token, set_webhook_request)
85
85
 
86
86
  Set webhook URL
87
87
 
88
- Configure the client webhook URL for inbound events.
88
+ Set the client webhook URL that receives inbound events for this channel. **Replaces** the stored webhook list (it does not append). To deliver the same events to several endpoints, pass an array in `webhookUrl` (max 5) or use `POST /settings`. With several URLs already configured, posting only the disabled URL **drops the others** — send the complete array to re-enable one of many. Incoming payloads include messages, delivery ACKs, group updates, coexistence echoes, and calling events. WhatsApp Calling payloads (`type: \"calls\"`) are documented under the **Calling** tag. Call permission replies arrive on the normal messages path (`call_permission_reply`). Repeating `POST /webhook` with the same URL(s) clears an auto-disable (self-serve re-enable). Send/receive are not affected by webhook auto-disable.
89
89
 
90
90
  ### Examples
91
91
 
@@ -102,13 +102,11 @@ end
102
102
 
103
103
  api_instance = OneMsgSdk::WebhooksApi.new
104
104
  token = 'token_example' # String | JWT token or API key for authorization
105
- opts = {
106
- get_webhook200_response: OneMsgSdk::GetWebhook200Response.new # GetWebhook200Response |
107
- }
105
+ set_webhook_request = OneMsgSdk::SetWebhookRequest.new({webhook_url: nil}) # SetWebhookRequest |
108
106
 
109
107
  begin
110
108
  # Set webhook URL
111
- result = api_instance.set_webhook(token, opts)
109
+ result = api_instance.set_webhook(token, set_webhook_request)
112
110
  p result
113
111
  rescue OneMsgSdk::ApiError => e
114
112
  puts "Error when calling WebhooksApi->set_webhook: #{e}"
@@ -119,15 +117,15 @@ end
119
117
 
120
118
  This returns an Array which contains the response data, status code and headers.
121
119
 
122
- > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> set_webhook_with_http_info(token, opts)
120
+ > <Array(<SetWebhook200Response>, Integer, Hash)> set_webhook_with_http_info(token, set_webhook_request)
123
121
 
124
122
  ```ruby
125
123
  begin
126
124
  # Set webhook URL
127
- data, status_code, headers = api_instance.set_webhook_with_http_info(token, opts)
125
+ data, status_code, headers = api_instance.set_webhook_with_http_info(token, set_webhook_request)
128
126
  p status_code # => 2xx
129
127
  p headers # => { ... }
130
- p data # => Hash&lt;String, Object&gt;
128
+ p data # => <SetWebhook200Response>
131
129
  rescue OneMsgSdk::ApiError => e
132
130
  puts "Error when calling WebhooksApi->set_webhook_with_http_info: #{e}"
133
131
  end
@@ -138,11 +136,11 @@ end
138
136
  | Name | Type | Description | Notes |
139
137
  | ---- | ---- | ----------- | ----- |
140
138
  | **token** | **String** | JWT token or API key for authorization | |
141
- | **get_webhook200_response** | [**GetWebhook200Response**](GetWebhook200Response.md) | | [optional] |
139
+ | **set_webhook_request** | [**SetWebhookRequest**](SetWebhookRequest.md) | | |
142
140
 
143
141
  ### Return type
144
142
 
145
- **Hash&lt;String, Object&gt;**
143
+ [**SetWebhook200Response**](SetWebhook200Response.md)
146
144
 
147
145
  ### Authorization
148
146
 
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -20,20 +20,20 @@ module OneMsgSdk
20
20
  @api_client = api_client
21
21
  end
22
22
  # Get calling settings
23
- # WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
23
+ # Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
24
24
  # @param token [String] JWT token or API key for authorization
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [Hash<String, Object>]
26
+ # @return [CallingSettings]
27
27
  def get_calling_settings(token, opts = {})
28
28
  data, _status_code, _headers = get_calling_settings_with_http_info(token, opts)
29
29
  data
30
30
  end
31
31
 
32
32
  # Get calling settings
33
- # WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
33
+ # Return WhatsApp Calling API settings for this channel (beta). Proxies upstream &#x60;GET /calling/settings&#x60;. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / &#x60;subscriptionBlocked&#x60; channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
34
34
  # @param token [String] JWT token or API key for authorization
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
36
+ # @return [Array<(CallingSettings, Integer, Hash)>] CallingSettings data, response status code and response headers
37
37
  def get_calling_settings_with_http_info(token, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: CallingApi.get_calling_settings ...'
@@ -61,7 +61,7 @@ module OneMsgSdk
61
61
  post_body = opts[:debug_body]
62
62
 
63
63
  # return_type
64
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
64
+ return_type = opts[:debug_return_type] || 'CallingSettings'
65
65
 
66
66
  # auth_names
67
67
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -83,24 +83,24 @@ module OneMsgSdk
83
83
  return data, status_code, headers
84
84
  end
85
85
 
86
- # Initiate WhatsApp call
87
- # Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
86
+ # Call action (connect / pre_accept / accept / reject / terminate)
87
+ # Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"<upstream message>\" } }`. `Invalid API KEY` is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission `138006`) pass through `error.message` / `error_user_msg`.
88
88
  # @param token [String] JWT token or API key for authorization
89
+ # @param initiate_call_request [InitiateCallRequest]
89
90
  # @param [Hash] opts the optional parameters
90
- # @option opts [Hash<String, Object>] :request_body
91
- # @return [Hash<String, Object>]
92
- def initiate_call(token, opts = {})
93
- data, _status_code, _headers = initiate_call_with_http_info(token, opts)
91
+ # @return [InitiateCallResponse]
92
+ def initiate_call(token, initiate_call_request, opts = {})
93
+ data, _status_code, _headers = initiate_call_with_http_info(token, initiate_call_request, opts)
94
94
  data
95
95
  end
96
96
 
97
- # Initiate WhatsApp call
98
- # Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
97
+ # Call action (connect / pre_accept / accept / reject / terminate)
98
+ # Perform a WhatsApp Calling action (beta). Proxies upstream &#x60;POST /calling/calls&#x60;. Despite the historical path name &#x60;/initiateCall&#x60;, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | &#x60;connect&#x60; | Outbound business → user | &#x60;to&#x60; + &#x60;session&#x60; (&#x60;sdp_type: offer&#x60;) | | &#x60;pre_accept&#x60; | Inbound (optional, reduces audio clipping) | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;accept&#x60; | Inbound answer | &#x60;call_id&#x60; + &#x60;session&#x60; (&#x60;sdp_type: answer&#x60;) | | &#x60;reject&#x60; | Decline inbound | &#x60;call_id&#x60; | | &#x60;terminate&#x60; | Hang up | &#x60;call_id&#x60; | **SDP / media (critical)** - &#x60;accept&#x60; / &#x60;pre_accept&#x60; require a **WebRTC-generated SDP answer**. - Do **not** send Meta&#39;s offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound &#x60;connect&#x60; webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (&#x60;138000&#x60;), no permission (&#x60;138006&#x60;), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / &#x60;subscriptionBlocked&#x60; → **403** plain text. Upstream failures often return HTTP 200 with &#x60;{ \&quot;response\&quot;: { \&quot;error\&quot;: \&quot;&lt;upstream message&gt;\&quot; } }&#x60;. &#x60;Invalid API KEY&#x60; is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission &#x60;138006&#x60;) pass through &#x60;error.message&#x60; / &#x60;error_user_msg&#x60;.
99
99
  # @param token [String] JWT token or API key for authorization
100
+ # @param initiate_call_request [InitiateCallRequest]
100
101
  # @param [Hash] opts the optional parameters
101
- # @option opts [Hash<String, Object>] :request_body
102
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
103
- def initiate_call_with_http_info(token, opts = {})
102
+ # @return [Array<(InitiateCallResponse, Integer, Hash)>] InitiateCallResponse data, response status code and response headers
103
+ def initiate_call_with_http_info(token, initiate_call_request, opts = {})
104
104
  if @api_client.config.debugging
105
105
  @api_client.config.logger.debug 'Calling API: CallingApi.initiate_call ...'
106
106
  end
@@ -108,6 +108,10 @@ module OneMsgSdk
108
108
  if @api_client.config.client_side_validation && token.nil?
109
109
  fail ArgumentError, "Missing the required parameter 'token' when calling CallingApi.initiate_call"
110
110
  end
111
+ # verify the required parameter 'initiate_call_request' is set
112
+ if @api_client.config.client_side_validation && initiate_call_request.nil?
113
+ fail ArgumentError, "Missing the required parameter 'initiate_call_request' when calling CallingApi.initiate_call"
114
+ end
111
115
  # resource path
112
116
  local_var_path = '/initiateCall'
113
117
 
@@ -129,10 +133,10 @@ module OneMsgSdk
129
133
  form_params = opts[:form_params] || {}
130
134
 
131
135
  # http body (model)
132
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
136
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(initiate_call_request)
133
137
 
134
138
  # return_type
135
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
139
+ return_type = opts[:debug_return_type] || 'InitiateCallResponse'
136
140
 
137
141
  # auth_names
138
142
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -155,23 +159,23 @@ module OneMsgSdk
155
159
  end
156
160
 
157
161
  # Update calling settings
158
- # Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
162
+ # Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text.
159
163
  # @param token [String] JWT token or API key for authorization
164
+ # @param calling_settings [CallingSettings]
160
165
  # @param [Hash] opts the optional parameters
161
- # @option opts [Hash<String, Object>] :request_body
162
- # @return [Hash<String, Object>]
163
- def update_calling_settings(token, opts = {})
164
- data, _status_code, _headers = update_calling_settings_with_http_info(token, opts)
166
+ # @return [UpdateCallingSettings200Response]
167
+ def update_calling_settings(token, calling_settings, opts = {})
168
+ data, _status_code, _headers = update_calling_settings_with_http_info(token, calling_settings, opts)
165
169
  data
166
170
  end
167
171
 
168
172
  # Update calling settings
169
- # Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
173
+ # Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream &#x60;POST /calling/settings&#x60;. Body is forwarded as-is (1msg does not validate fields). **Common fields under &#x60;calling&#x60;** - &#x60;status&#x60; (&#x60;ENABLED&#x60; | &#x60;DISABLED&#x60;) — required to turn calling on/off - &#x60;call_icon_visibility&#x60; (&#x60;DEFAULT&#x60; | &#x60;DISABLE_ALL&#x60;) — optional - &#x60;callback_permission_status&#x60; (&#x60;ENABLED&#x60; | &#x60;DISABLED&#x60;) — optional; when enabled, inbound user calls grant callback permission - &#x60;call_hours&#x60; — optional hours / timezone object - &#x60;sip&#x60; — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - &#x60;srtp_key_exchange_protocol&#x60; (&#x60;DTLS&#x60; | &#x60;SDES&#x60;) — SDES only with SIP - &#x60;video.status&#x60; — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / &#x60;subscriptionBlocked&#x60; → **403** plain text.
170
174
  # @param token [String] JWT token or API key for authorization
175
+ # @param calling_settings [CallingSettings]
171
176
  # @param [Hash] opts the optional parameters
172
- # @option opts [Hash<String, Object>] :request_body
173
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
174
- def update_calling_settings_with_http_info(token, opts = {})
177
+ # @return [Array<(UpdateCallingSettings200Response, Integer, Hash)>] UpdateCallingSettings200Response data, response status code and response headers
178
+ def update_calling_settings_with_http_info(token, calling_settings, opts = {})
175
179
  if @api_client.config.debugging
176
180
  @api_client.config.logger.debug 'Calling API: CallingApi.update_calling_settings ...'
177
181
  end
@@ -179,6 +183,10 @@ module OneMsgSdk
179
183
  if @api_client.config.client_side_validation && token.nil?
180
184
  fail ArgumentError, "Missing the required parameter 'token' when calling CallingApi.update_calling_settings"
181
185
  end
186
+ # verify the required parameter 'calling_settings' is set
187
+ if @api_client.config.client_side_validation && calling_settings.nil?
188
+ fail ArgumentError, "Missing the required parameter 'calling_settings' when calling CallingApi.update_calling_settings"
189
+ end
182
190
  # resource path
183
191
  local_var_path = '/callingSettings'
184
192
 
@@ -200,10 +208,10 @@ module OneMsgSdk
200
208
  form_params = opts[:form_params] || {}
201
209
 
202
210
  # http body (model)
203
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
211
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(calling_settings)
204
212
 
205
213
  # return_type
206
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
214
+ return_type = opts[:debug_return_type] || 'UpdateCallingSettings200Response'
207
215
 
208
216
  # auth_names
209
217
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -95,7 +95,7 @@ module OneMsgSdk
95
95
  end
96
96
 
97
97
  # Get Commerce Settings
98
- # Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
98
+ # Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
99
99
  # @param token [String] JWT token or API key for authorization
100
100
  # @param [Hash] opts the optional parameters
101
101
  # @return [Array<GetCommerce200ResponseInner>]
@@ -105,7 +105,7 @@ module OneMsgSdk
105
105
  end
106
106
 
107
107
  # Get Commerce Settings
108
- # Returns catalog/cart commerce settings for the channel. - &#x60;is_catalog_visible&#x60; — show catalog storefront icon (&#x60;true&#x60;) or hide it (&#x60;false&#x60;). - &#x60;is_cart_enabled&#x60; — enable cart (&#x60;true&#x60;) or disable it (&#x60;false&#x60;).
108
+ # Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - &#x60;is_catalog_visible&#x60; — show catalog storefront icon (&#x60;true&#x60;) or hide it (&#x60;false&#x60;). - &#x60;is_cart_enabled&#x60; — enable cart (&#x60;true&#x60;) or disable it (&#x60;false&#x60;).
109
109
  # @param token [String] JWT token or API key for authorization
110
110
  # @param [Hash] opts the optional parameters
111
111
  # @return [Array<(Array<GetCommerce200ResponseInner>, Integer, Hash)>] Array<GetCommerce200ResponseInner> data, response status code and response headers
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #1MSG WhatsApp Business API (Public)
3
3
 
4
- #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
4
+ #Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
5
5
 
6
- The version of the OpenAPI document: 1.0.0
6
+ The version of the OpenAPI document: 2.0.0
7
7
  Contact: support@1msg.io
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -19,6 +19,81 @@ module OneMsgSdk
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Update channel settings
23
+ # Update channel settings. Only send fields you want to change. `webhookUrl` **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
24
+ # @param token [String] JWT token or API key for authorization
25
+ # @param create_settings_request [CreateSettingsRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Hash<String, Object>]
28
+ def create_settings(token, create_settings_request, opts = {})
29
+ data, _status_code, _headers = create_settings_with_http_info(token, create_settings_request, opts)
30
+ data
31
+ end
32
+
33
+ # Update channel settings
34
+ # Update channel settings. Only send fields you want to change. &#x60;webhookUrl&#x60; **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
35
+ # @param token [String] JWT token or API key for authorization
36
+ # @param create_settings_request [CreateSettingsRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
39
+ def create_settings_with_http_info(token, create_settings_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ChannelApi.create_settings ...'
42
+ end
43
+ # verify the required parameter 'token' is set
44
+ if @api_client.config.client_side_validation && token.nil?
45
+ fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.create_settings"
46
+ end
47
+ # verify the required parameter 'create_settings_request' is set
48
+ if @api_client.config.client_side_validation && create_settings_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'create_settings_request' when calling ChannelApi.create_settings"
50
+ end
51
+ # resource path
52
+ local_var_path = '/settings'
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'token'] = token
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
62
+ # HTTP header 'Content-Type'
63
+ content_type = @api_client.select_header_content_type(['application/json'])
64
+ if !content_type.nil?
65
+ header_params['Content-Type'] = content_type
66
+ end
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_settings_request)
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"ChannelApi.create_settings",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: ChannelApi#create_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
22
97
  # Get conversational automation settings
23
98
  # Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
24
99
  # @param token [String] JWT token or API key for authorization
@@ -84,20 +159,20 @@ module OneMsgSdk
84
159
  end
85
160
 
86
161
  # Get channel status
87
- # Returns WhatsApp Business API client connection status.
162
+ # Return WhatsApp Cloud API connection status for this channel (`connected` when the number can send). May include `accountStatus`, messaging limit, and MM Lite availability. Optional `health_status_warning` appears only when Meta Graph health could not be loaded and a soft `connected` response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
88
163
  # @param token [String] JWT token or API key for authorization
89
164
  # @param [Hash] opts the optional parameters
90
- # @return [Hash<String, Object>]
165
+ # @return [GetStatus200Response]
91
166
  def get_status(token, opts = {})
92
167
  data, _status_code, _headers = get_status_with_http_info(token, opts)
93
168
  data
94
169
  end
95
170
 
96
171
  # Get channel status
97
- # Returns WhatsApp Business API client connection status.
172
+ # Return WhatsApp Cloud API connection status for this channel (&#x60;connected&#x60; when the number can send). May include &#x60;accountStatus&#x60;, messaging limit, and MM Lite availability. Optional &#x60;health_status_warning&#x60; appears only when Meta Graph health could not be loaded and a soft &#x60;connected&#x60; response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
98
173
  # @param token [String] JWT token or API key for authorization
99
174
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
175
+ # @return [Array<(GetStatus200Response, Integer, Hash)>] GetStatus200Response data, response status code and response headers
101
176
  def get_status_with_http_info(token, opts = {})
102
177
  if @api_client.config.debugging
103
178
  @api_client.config.logger.debug 'Calling API: ChannelApi.get_status ...'
@@ -125,7 +200,7 @@ module OneMsgSdk
125
200
  post_body = opts[:debug_body]
126
201
 
127
202
  # return_type
128
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
203
+ return_type = opts[:debug_return_type] || 'GetStatus200Response'
129
204
 
130
205
  # auth_names
131
206
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -147,6 +222,70 @@ module OneMsgSdk
147
222
  return data, status_code, headers
148
223
  end
149
224
 
225
+ # Get channel settings
226
+ # Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches `GET /webhook`. **Prefer `webhookStatuses`** (one row per configured URL). The breaker is per URL, not per channel. Channel-level `haveDisabledWebhooks` is `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled — not \"the channel is dead\". Live URLs still receive events. Top-level `circuitState` / `reason` / `fails` / `trips` are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same `GET /settings` endpoint as the REST API (previously missing from MCP).
227
+ # @param token [String] JWT token or API key for authorization
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [ListSettings200Response]
230
+ def list_settings(token, opts = {})
231
+ data, _status_code, _headers = list_settings_with_http_info(token, opts)
232
+ data
233
+ end
234
+
235
+ # Get channel settings
236
+ # Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches &#x60;GET /webhook&#x60;. **Prefer &#x60;webhookStatuses&#x60;** (one row per configured URL). The breaker is per URL, not per channel. Channel-level &#x60;haveDisabledWebhooks&#x60; is &#x60;true&#x60; when **at least one** URL in &#x60;webhookUrl&#x60; is sticky auto-disabled — not \&quot;the channel is dead\&quot;. Live URLs still receive events. Top-level &#x60;circuitState&#x60; / &#x60;reason&#x60; / &#x60;fails&#x60; / &#x60;trips&#x60; are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same &#x60;GET /settings&#x60; endpoint as the REST API (previously missing from MCP).
237
+ # @param token [String] JWT token or API key for authorization
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [Array<(ListSettings200Response, Integer, Hash)>] ListSettings200Response data, response status code and response headers
240
+ def list_settings_with_http_info(token, opts = {})
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug 'Calling API: ChannelApi.list_settings ...'
243
+ end
244
+ # verify the required parameter 'token' is set
245
+ if @api_client.config.client_side_validation && token.nil?
246
+ fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.list_settings"
247
+ end
248
+ # resource path
249
+ local_var_path = '/settings'
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+ query_params[:'token'] = token
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+
260
+ # form parameters
261
+ form_params = opts[:form_params] || {}
262
+
263
+ # http body (model)
264
+ post_body = opts[:debug_body]
265
+
266
+ # return_type
267
+ return_type = opts[:debug_return_type] || 'ListSettings200Response'
268
+
269
+ # auth_names
270
+ auth_names = opts[:debug_auth_names] || ['tokenAuth']
271
+
272
+ new_options = opts.merge(
273
+ :operation => :"ChannelApi.list_settings",
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type
280
+ )
281
+
282
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: ChannelApi#list_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+
150
289
  # Set conversational automation settings
151
290
  # Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
152
291
  # @param token [String] JWT token or API key for authorization