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
@@ -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,22 @@ module OneMsgSdk
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create message template
23
+ # Create a WABA message template (`name`, `category`, `language`, `components`). After create, Meta reviews the template; list it with `GET /templates`. Authentication OTP templates (`category: AUTHENTICATION`, copy-code / OTP button) can later be sent only to a phone number. Meta does not accept a BSUID recipient for them (error 131062). If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — that template cannot be sent. To ask a BSUID user for their phone number, add a `REQUEST_CONTACT_INFO` button on a `UTILITY` or `MARKETING` template. Do not send `text` on that button — WhatsApp sets the label (and rejects a custom one). The button also has no send-time parameters: `POST /sendTemplate` does not take a button component for it. Inside an open 24-hour window, call `POST /sendContactInfo` instead of a template. When the user shares the number, the inbound webhook is a `contacts` message with `origin: contact_request`. The phone is stored on that BSUID automatically. See `POST /sendContactInfo`. ```json { \"name\": \"request_phone\", \"category\": \"UTILITY\", \"language\": \"en_US\", \"components\": [ { \"type\": \"BODY\", \"text\": \"Please share your phone number so we can continue.\" }, { \"type\": \"BUTTONS\", \"buttons\": [{ \"type\": \"REQUEST_CONTACT_INFO\" }] } ] } ```
23
24
  # @param token [String] JWT token or API key for authorization
24
25
  # @param [Hash] opts the optional parameters
25
26
  # @option opts [AddTemplateRequest] :add_template_request
26
- # @return [Hash<String, Object>]
27
+ # @return [AddTemplate200Response]
27
28
  def add_template(token, opts = {})
28
29
  data, _status_code, _headers = add_template_with_http_info(token, opts)
29
30
  data
30
31
  end
31
32
 
32
33
  # Create message template
34
+ # Create a WABA message template (&#x60;name&#x60;, &#x60;category&#x60;, &#x60;language&#x60;, &#x60;components&#x60;). After create, Meta reviews the template; list it with &#x60;GET /templates&#x60;. Authentication OTP templates (&#x60;category: AUTHENTICATION&#x60;, copy-code / OTP button) can later be sent only to a phone number. Meta does not accept a BSUID recipient for them (error 131062). If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — that template cannot be sent. To ask a BSUID user for their phone number, add a &#x60;REQUEST_CONTACT_INFO&#x60; button on a &#x60;UTILITY&#x60; or &#x60;MARKETING&#x60; template. Do not send &#x60;text&#x60; on that button — WhatsApp sets the label (and rejects a custom one). The button also has no send-time parameters: &#x60;POST /sendTemplate&#x60; does not take a button component for it. Inside an open 24-hour window, call &#x60;POST /sendContactInfo&#x60; instead of a template. When the user shares the number, the inbound webhook is a &#x60;contacts&#x60; message with &#x60;origin: contact_request&#x60;. The phone is stored on that BSUID automatically. See &#x60;POST /sendContactInfo&#x60;. &#x60;&#x60;&#x60;json { \&quot;name\&quot;: \&quot;request_phone\&quot;, \&quot;category\&quot;: \&quot;UTILITY\&quot;, \&quot;language\&quot;: \&quot;en_US\&quot;, \&quot;components\&quot;: [ { \&quot;type\&quot;: \&quot;BODY\&quot;, \&quot;text\&quot;: \&quot;Please share your phone number so we can continue.\&quot; }, { \&quot;type\&quot;: \&quot;BUTTONS\&quot;, \&quot;buttons\&quot;: [{ \&quot;type\&quot;: \&quot;REQUEST_CONTACT_INFO\&quot; }] } ] } &#x60;&#x60;&#x60;
33
35
  # @param token [String] JWT token or API key for authorization
34
36
  # @param [Hash] opts the optional parameters
35
37
  # @option opts [AddTemplateRequest] :add_template_request
36
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
38
+ # @return [Array<(AddTemplate200Response, Integer, Hash)>] AddTemplate200Response data, response status code and response headers
37
39
  def add_template_with_http_info(token, opts = {})
38
40
  if @api_client.config.debugging
39
41
  @api_client.config.logger.debug 'Calling API: TemplatesApi.add_template ...'
@@ -66,7 +68,7 @@ module OneMsgSdk
66
68
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'add_template_request'])
67
69
 
68
70
  # return_type
69
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
71
+ return_type = opts[:debug_return_type] || 'AddTemplate200Response'
70
72
 
71
73
  # auth_names
72
74
  auth_names = opts[:debug_auth_names] || ['tokenAuth']
@@ -89,8 +91,12 @@ module OneMsgSdk
89
91
  end
90
92
 
91
93
  # Get templates list
94
+ # List message templates. Paginate with `limit` / `offset`; sort by `id`, `name`, or `status`.
92
95
  # @param token [String] JWT token or API key for authorization
93
96
  # @param [Hash] opts the optional parameters
97
+ # @option opts [Integer] :limit
98
+ # @option opts [Integer] :offset
99
+ # @option opts [String] :sort Sort field (&#x60;id&#x60;, &#x60;name&#x60;, or &#x60;status&#x60;)
94
100
  # @return [ListTemplates200Response]
95
101
  def list_templates(token, opts = {})
96
102
  data, _status_code, _headers = list_templates_with_http_info(token, opts)
@@ -98,8 +104,12 @@ module OneMsgSdk
98
104
  end
99
105
 
100
106
  # Get templates list
107
+ # List message templates. Paginate with &#x60;limit&#x60; / &#x60;offset&#x60;; sort by &#x60;id&#x60;, &#x60;name&#x60;, or &#x60;status&#x60;.
101
108
  # @param token [String] JWT token or API key for authorization
102
109
  # @param [Hash] opts the optional parameters
110
+ # @option opts [Integer] :limit
111
+ # @option opts [Integer] :offset
112
+ # @option opts [String] :sort Sort field (&#x60;id&#x60;, &#x60;name&#x60;, or &#x60;status&#x60;)
103
113
  # @return [Array<(ListTemplates200Response, Integer, Hash)>] ListTemplates200Response data, response status code and response headers
104
114
  def list_templates_with_http_info(token, opts = {})
105
115
  if @api_client.config.debugging
@@ -109,12 +119,19 @@ module OneMsgSdk
109
119
  if @api_client.config.client_side_validation && token.nil?
110
120
  fail ArgumentError, "Missing the required parameter 'token' when calling TemplatesApi.list_templates"
111
121
  end
122
+ allowable_values = ["id", "name", "status"]
123
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
124
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
125
+ end
112
126
  # resource path
113
127
  local_var_path = '/templates'
114
128
 
115
129
  # query parameters
116
130
  query_params = opts[:query_params] || {}
117
131
  query_params[:'token'] = token
132
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
133
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
134
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
118
135
 
119
136
  # header parameters
120
137
  header_params = opts[:header_params] || {}
@@ -151,21 +168,23 @@ module OneMsgSdk
151
168
  end
152
169
 
153
170
  # Remove message template
171
+ # Delete a message template by `name` (all language versions of that name).
154
172
  # @param token [String] JWT token or API key for authorization
173
+ # @param remove_template_request [RemoveTemplateRequest]
155
174
  # @param [Hash] opts the optional parameters
156
- # @option opts [Hash<String, Object>] :request_body
157
175
  # @return [Hash<String, Object>]
158
- def remove_template(token, opts = {})
159
- data, _status_code, _headers = remove_template_with_http_info(token, opts)
176
+ def remove_template(token, remove_template_request, opts = {})
177
+ data, _status_code, _headers = remove_template_with_http_info(token, remove_template_request, opts)
160
178
  data
161
179
  end
162
180
 
163
181
  # Remove message template
182
+ # Delete a message template by &#x60;name&#x60; (all language versions of that name).
164
183
  # @param token [String] JWT token or API key for authorization
184
+ # @param remove_template_request [RemoveTemplateRequest]
165
185
  # @param [Hash] opts the optional parameters
166
- # @option opts [Hash<String, Object>] :request_body
167
186
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
168
- def remove_template_with_http_info(token, opts = {})
187
+ def remove_template_with_http_info(token, remove_template_request, opts = {})
169
188
  if @api_client.config.debugging
170
189
  @api_client.config.logger.debug 'Calling API: TemplatesApi.remove_template ...'
171
190
  end
@@ -173,6 +192,10 @@ module OneMsgSdk
173
192
  if @api_client.config.client_side_validation && token.nil?
174
193
  fail ArgumentError, "Missing the required parameter 'token' when calling TemplatesApi.remove_template"
175
194
  end
195
+ # verify the required parameter 'remove_template_request' is set
196
+ if @api_client.config.client_side_validation && remove_template_request.nil?
197
+ fail ArgumentError, "Missing the required parameter 'remove_template_request' when calling TemplatesApi.remove_template"
198
+ end
176
199
  # resource path
177
200
  local_var_path = '/removeTemplate'
178
201
 
@@ -194,7 +217,7 @@ module OneMsgSdk
194
217
  form_params = opts[:form_params] || {}
195
218
 
196
219
  # http body (model)
197
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
220
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(remove_template_request)
198
221
 
199
222
  # return_type
200
223
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
@@ -220,7 +243,7 @@ module OneMsgSdk
220
243
  end
221
244
 
222
245
  # Send Template Message
223
- # Send a WhatsApp template message (works outside the 24-hour session window). Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). For India order/invoice payments outside 24h, include a button component: ```json { \"type\": \"button\", \"sub_type\": \"order_details\", \"index\": 0, \"parameters\": [{ \"type\": \"action\", \"action\": { \"order_details\": { \"reference_id\": \"...\", \"currency\": \"INR\", \"order\": {} } } }] } ``` Convenience wrapper with structured fields: `POST /sendOrderDetails`.
246
+ # Send a WhatsApp **template** message (works outside the 24-hour session window). Use this tool — not `send_message` — when the 24h session is closed. `params` MUST be Cloud API **component objects**, never a flat list of strings and never the old On-Prem `hsm` / `localizable_params` format. Example body variable `{{1}}`: ```json { \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"Ivan\" }] } ``` Do not send `\"type\": \"hsm\"` and do not send `params: [\"Ivan\", \"123\"]`. Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). Convenience wrapper with structured fields: `POST /sendOrderDetails`. Authentication OTP templates (category `AUTHENTICATION`, or a template with an OTP / copy-code button) can only be sent to a phone number (`phone` or a phone `chatId`). Meta rejects a BSUID `recipient` for these templates with error 131062. If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — the template cannot be sent. A `REQUEST_CONTACT_INFO` button (UTILITY or MARKETING only) has no send-time parameters. Do not add a button component for it in `params`, and do not send button text — WhatsApp sets that label on the template. Create the button with `POST /addTemplate` as `{ \"type\": \"REQUEST_CONTACT_INFO\" }` with no `text`. Inside an open 24-hour window, `POST /sendContactInfo` asks for the number without a template.
224
247
  # @param token [String] JWT token or API key for authorization
225
248
  # @param [Hash] opts the optional parameters
226
249
  # @option opts [SendTemplateRequest] :send_template_request
@@ -231,7 +254,7 @@ module OneMsgSdk
231
254
  end
232
255
 
233
256
  # Send Template Message
234
- # Send a WhatsApp template message (works outside the 24-hour session window). Supported &#x60;params&#x60; button &#x60;sub_type&#x60; values include: &#x60;url&#x60;, &#x60;quick_reply&#x60;, &#x60;copy_code&#x60; / &#x60;coupon_code&#x60;, &#x60;catalog&#x60;, &#x60;flow&#x60;, &#x60;limited_time_offer&#x60;, and **&#x60;order_details&#x60;** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). For India order/invoice payments outside 24h, include a button component: &#x60;&#x60;&#x60;json { \&quot;type\&quot;: \&quot;button\&quot;, \&quot;sub_type\&quot;: \&quot;order_details\&quot;, \&quot;index\&quot;: 0, \&quot;parameters\&quot;: [{ \&quot;type\&quot;: \&quot;action\&quot;, \&quot;action\&quot;: { \&quot;order_details\&quot;: { \&quot;reference_id\&quot;: \&quot;...\&quot;, \&quot;currency\&quot;: \&quot;INR\&quot;, \&quot;order\&quot;: {} } } }] } &#x60;&#x60;&#x60; Convenience wrapper with structured fields: &#x60;POST /sendOrderDetails&#x60;.
257
+ # Send a WhatsApp **template** message (works outside the 24-hour session window). Use this tool — not &#x60;send_message&#x60; — when the 24h session is closed. &#x60;params&#x60; MUST be Cloud API **component objects**, never a flat list of strings and never the old On-Prem &#x60;hsm&#x60; / &#x60;localizable_params&#x60; format. Example body variable &#x60;{{1}}&#x60;: &#x60;&#x60;&#x60;json { \&quot;type\&quot;: \&quot;body\&quot;, \&quot;parameters\&quot;: [{ \&quot;type\&quot;: \&quot;text\&quot;, \&quot;text\&quot;: \&quot;Ivan\&quot; }] } &#x60;&#x60;&#x60; Do not send &#x60;\&quot;type\&quot;: \&quot;hsm\&quot;&#x60; and do not send &#x60;params: [\&quot;Ivan\&quot;, \&quot;123\&quot;]&#x60;. Supported &#x60;params&#x60; button &#x60;sub_type&#x60; values include: &#x60;url&#x60;, &#x60;quick_reply&#x60;, &#x60;copy_code&#x60; / &#x60;coupon_code&#x60;, &#x60;catalog&#x60;, &#x60;flow&#x60;, &#x60;limited_time_offer&#x60;, and **&#x60;order_details&#x60;** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). Convenience wrapper with structured fields: &#x60;POST /sendOrderDetails&#x60;. Authentication OTP templates (category &#x60;AUTHENTICATION&#x60;, or a template with an OTP / copy-code button) can only be sent to a phone number (&#x60;phone&#x60; or a phone &#x60;chatId&#x60;). Meta rejects a BSUID &#x60;recipient&#x60; for these templates with error 131062. If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — the template cannot be sent. A &#x60;REQUEST_CONTACT_INFO&#x60; button (UTILITY or MARKETING only) has no send-time parameters. Do not add a button component for it in &#x60;params&#x60;, and do not send button text — WhatsApp sets that label on the template. Create the button with &#x60;POST /addTemplate&#x60; as &#x60;{ \&quot;type\&quot;: \&quot;REQUEST_CONTACT_INFO\&quot; }&#x60; with no &#x60;text&#x60;. Inside an open 24-hour window, &#x60;POST /sendContactInfo&#x60; asks for the number without a template.
235
258
  # @param token [String] JWT token or API key for authorization
236
259
  # @param [Hash] opts the optional parameters
237
260
  # @option opts [SendTemplateRequest] :send_template_request
@@ -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
@@ -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,7 +20,7 @@ module OneMsgSdk
20
20
  @api_client = api_client
21
21
  end
22
22
  # Get webhook URL
23
- # Returns the configured client webhook URL for this channel.
23
+ # 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.
24
24
  # @param token [String] JWT token or API key for authorization
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [GetWebhook200Response]
@@ -30,7 +30,7 @@ module OneMsgSdk
30
30
  end
31
31
 
32
32
  # Get webhook URL
33
- # Returns the configured client webhook URL for this channel.
33
+ # Return the webhook URL(s) currently configured for this channel, plus delivery status for each URL. &#x60;webhookUrl&#x60; is a string when a single URL is set, an array of strings when multiple URLs are configured, or &#x60;null&#x60; if none is set. **Prefer &#x60;webhookStatuses&#x60;.** 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 &#x60;haveDisabledWebhooks&#x60;, &#x60;circuitState&#x60;, &#x60;reason&#x60;, &#x60;fails&#x60;, &#x60;trips&#x60;, and timestamps are a compatibility summary of **one** URL (the first sticky-disabled URL, else the first configured URL). They are not \&quot;the channel is dead\&quot;. - &#x60;haveDisabledWebhooks&#x60; — &#x60;true&#x60; when **at least one** URL in &#x60;webhookUrl&#x60; is sticky auto-disabled. Live URLs still get events. - &#x60;circuitState&#x60; — compressed scalar for that same primary URL: &#x60;ok&#x60; | &#x60;degraded&#x60; | &#x60;open&#x60; | &#x60;half_open&#x60; | &#x60;disabled&#x60;. - &#x60;disabledWebhooks&#x60; — currently configured URLs that are sticky-disabled (subset of &#x60;webhookUrl&#x60;). - &#x60;webhookStatuses&#x60; — one row per currently configured URL. Use this array to see which endpoints are live vs skipped. - &#x60;fails&#x60; / &#x60;trips&#x60; / &#x60;firstFailAt&#x60; — **diagnostics for support**, not product UI. &#x60;fails&#x60; &#x3D; failures in a rolling ~10 minute window (not lifetime). &#x60;trips&#x60; &#x3D; failed recovery probes on the 15 min → 1 h → 6 h schedule (sticky disable after 3). Clients can ignore these and use &#x60;webhookStatuses&#x60; + &#x60;disabledWebhooks&#x60; only. Sticky disable skips delivery; it does not unconfigure the URL (it stays in &#x60;webhookUrl&#x60;). Re-enable with &#x60;POST /webhook&#x60; or &#x60;POST /settings&#x60;. Those endpoints **replace** the whole list — with multiple URLs, send the full array.
34
34
  # @param token [String] JWT token or API key for authorization
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(GetWebhook200Response, Integer, Hash)>] GetWebhook200Response data, response status code and response headers
@@ -84,23 +84,23 @@ module OneMsgSdk
84
84
  end
85
85
 
86
86
  # Set webhook URL
87
- # Configure the client webhook URL for inbound events.
87
+ # 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.
88
88
  # @param token [String] JWT token or API key for authorization
89
+ # @param set_webhook_request [SetWebhookRequest]
89
90
  # @param [Hash] opts the optional parameters
90
- # @option opts [GetWebhook200Response] :get_webhook200_response
91
- # @return [Hash<String, Object>]
92
- def set_webhook(token, opts = {})
93
- data, _status_code, _headers = set_webhook_with_http_info(token, opts)
91
+ # @return [SetWebhook200Response]
92
+ def set_webhook(token, set_webhook_request, opts = {})
93
+ data, _status_code, _headers = set_webhook_with_http_info(token, set_webhook_request, opts)
94
94
  data
95
95
  end
96
96
 
97
97
  # Set webhook URL
98
- # Configure the client webhook URL for inbound events.
98
+ # 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 &#x60;webhookUrl&#x60; (max 5) or use &#x60;POST /settings&#x60;. 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 (&#x60;type: \&quot;calls\&quot;&#x60;) are documented under the **Calling** tag. Call permission replies arrive on the normal messages path (&#x60;call_permission_reply&#x60;). Repeating &#x60;POST /webhook&#x60; with the same URL(s) clears an auto-disable (self-serve re-enable). Send/receive are not affected by webhook auto-disable.
99
99
  # @param token [String] JWT token or API key for authorization
100
+ # @param set_webhook_request [SetWebhookRequest]
100
101
  # @param [Hash] opts the optional parameters
101
- # @option opts [GetWebhook200Response] :get_webhook200_response
102
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
103
- def set_webhook_with_http_info(token, opts = {})
102
+ # @return [Array<(SetWebhook200Response, Integer, Hash)>] SetWebhook200Response data, response status code and response headers
103
+ def set_webhook_with_http_info(token, set_webhook_request, opts = {})
104
104
  if @api_client.config.debugging
105
105
  @api_client.config.logger.debug 'Calling API: WebhooksApi.set_webhook ...'
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 WebhooksApi.set_webhook"
110
110
  end
111
+ # verify the required parameter 'set_webhook_request' is set
112
+ if @api_client.config.client_side_validation && set_webhook_request.nil?
113
+ fail ArgumentError, "Missing the required parameter 'set_webhook_request' when calling WebhooksApi.set_webhook"
114
+ end
111
115
  # resource path
112
116
  local_var_path = '/webhook'
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[:'get_webhook200_response'])
136
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_webhook_request)
133
137
 
134
138
  # return_type
135
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
139
+ return_type = opts[:debug_return_type] || 'SetWebhook200Response'
136
140
 
137
141
  # auth_names
138
142
  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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,150 @@
1
+ =begin
2
+ #1MSG WhatsApp Business API (Public)
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:** 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
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@1msg.io
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OneMsgSdk
17
+ class AddTemplate200Response < ApiModelBase
18
+ # Upstream create-template payload
19
+ attr_accessor :response
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'response' => :'response'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'response' => :'Hash<String, Object>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::AddTemplate200Response` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::AddTemplate200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'response')
68
+ if (value = attributes[:'response']).is_a?(Hash)
69
+ self.response = value
70
+ end
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ warn '[DEPRECATED] the `valid?` method is obsolete'
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ response == o.response
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [response].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
128
+ end
129
+ new(transformed_hash)
130
+ end
131
+
132
+ # Returns the object in the form of hash
133
+ # @return [Hash] Returns the object in the form of hash
134
+ def to_hash
135
+ hash = {}
136
+ self.class.attribute_map.each_pair do |attr, param|
137
+ value = self.send(attr)
138
+ if value.nil?
139
+ is_nullable = self.class.openapi_nullable.include?(attr)
140
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
141
+ end
142
+
143
+ hash[param] = _to_hash(value)
144
+ end
145
+ hash
146
+ end
147
+
148
+ end
149
+
150
+ end
@@ -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
@@ -15,12 +15,16 @@ require 'time'
15
15
 
16
16
  module OneMsgSdk
17
17
  class AddTemplateRequest < ApiModelBase
18
+ # Template name
18
19
  attr_accessor :name
19
20
 
21
+ # MARKETING, UTILITY, or AUTHENTICATION
20
22
  attr_accessor :category
21
23
 
24
+ # Template language code (e.g. en_US)
22
25
  attr_accessor :language
23
26
 
27
+ # Template components (HEADER, BODY, FOOTER, BUTTONS, CAROUSEL)
24
28
  attr_accessor :components
25
29
 
26
30
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -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