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,147 @@
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 UpdateCallingSettings200ResponseResponse < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'error' => :'error'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'error' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::UpdateCallingSettings200ResponseResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::UpdateCallingSettings200ResponseResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'error')
67
+ self.error = attributes[:'error']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ error == o.error
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [error].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -0,0 +1,147 @@
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 UpdateMe200Response < ApiModelBase
18
+ attr_accessor :result
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'result' => :'result'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'result' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::UpdateMe200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::UpdateMe200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'result')
67
+ self.result = attributes[:'result']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ result == o.result
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [result].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ 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,14 +15,16 @@ require 'time'
15
15
 
16
16
  module OneMsgSdk
17
17
  class UpdateMeRequest < ApiModelBase
18
- # Profile About section
18
+ # Profile About section (WhatsApp status text)
19
19
  attr_accessor :about
20
20
 
21
+ # Business address shown on the profile
21
22
  attr_accessor :address
22
23
 
23
24
  # Business description (max 256 characters)
24
25
  attr_accessor :description
25
26
 
27
+ # Business email shown on the profile
26
28
  attr_accessor :email
27
29
 
28
30
  # Industry of the business
@@ -31,6 +33,7 @@ module OneMsgSdk
31
33
  # HTTPS URL or data:image/...;base64,... payload
32
34
  attr_accessor :photo
33
35
 
36
+ # Business website URLs
34
37
  attr_accessor :websites
35
38
 
36
39
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -0,0 +1,287 @@
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
+ # Circuit / auto-disable status for one configured webhook URL. The breaker is per URL (`instanceId` + URL hash), not per channel.
18
+ class WebhookUrlStatus < ApiModelBase
19
+ # This webhook URL (same string as in `webhookUrl`)
20
+ attr_accessor :url
21
+
22
+ # 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.
23
+ attr_accessor :circuit_state
24
+
25
+ # Last qualifying fail reason, e.g. `http_404` or `timeout_or_network`
26
+ attr_accessor :reason
27
+
28
+ # 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`.
29
+ attr_accessor :fails
30
+
31
+ # 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.
32
+ attr_accessor :trips
33
+
34
+ # Epoch milliseconds when this URL became sticky-disabled
35
+ attr_accessor :disabled_at
36
+
37
+ # Diagnostic only. Epoch ms of the first fail in the current ~10 minute window (pairs with `fails`; not a customer-facing period).
38
+ attr_accessor :first_fail_at
39
+
40
+ # Last HTTP status from this URL, when known
41
+ attr_accessor :last_status
42
+
43
+ # Epoch milliseconds of the next half-open probe, if any
44
+ attr_accessor :next_probe_at
45
+
46
+ class EnumAttributeValidator
47
+ attr_reader :datatype
48
+ attr_reader :allowable_values
49
+
50
+ def initialize(datatype, allowable_values)
51
+ @allowable_values = allowable_values.map do |value|
52
+ case datatype.to_s
53
+ when /Integer/i
54
+ value.to_i
55
+ when /Float/i
56
+ value.to_f
57
+ else
58
+ value
59
+ end
60
+ end
61
+ end
62
+
63
+ def valid?(value)
64
+ !value || allowable_values.include?(value)
65
+ end
66
+ end
67
+
68
+ # Attribute mapping from ruby-style variable name to JSON key.
69
+ def self.attribute_map
70
+ {
71
+ :'url' => :'url',
72
+ :'circuit_state' => :'circuitState',
73
+ :'reason' => :'reason',
74
+ :'fails' => :'fails',
75
+ :'trips' => :'trips',
76
+ :'disabled_at' => :'disabledAt',
77
+ :'first_fail_at' => :'firstFailAt',
78
+ :'last_status' => :'lastStatus',
79
+ :'next_probe_at' => :'nextProbeAt'
80
+ }
81
+ end
82
+
83
+ # Returns attribute mapping this model knows about
84
+ def self.acceptable_attribute_map
85
+ attribute_map
86
+ end
87
+
88
+ # Returns all the JSON keys this model knows about
89
+ def self.acceptable_attributes
90
+ acceptable_attribute_map.values
91
+ end
92
+
93
+ # Attribute type mapping.
94
+ def self.openapi_types
95
+ {
96
+ :'url' => :'String',
97
+ :'circuit_state' => :'String',
98
+ :'reason' => :'String',
99
+ :'fails' => :'Integer',
100
+ :'trips' => :'Integer',
101
+ :'disabled_at' => :'Integer',
102
+ :'first_fail_at' => :'Integer',
103
+ :'last_status' => :'Integer',
104
+ :'next_probe_at' => :'Integer'
105
+ }
106
+ end
107
+
108
+ # List of attributes with nullable: true
109
+ def self.openapi_nullable
110
+ Set.new([
111
+ ])
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ if (!attributes.is_a?(Hash))
118
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OneMsgSdk::WebhookUrlStatus` initialize method"
119
+ end
120
+
121
+ # check to see if the attribute exists and convert string to symbol for hash key
122
+ acceptable_attribute_map = self.class.acceptable_attribute_map
123
+ attributes = attributes.each_with_object({}) { |(k, v), h|
124
+ if (!acceptable_attribute_map.key?(k.to_sym))
125
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OneMsgSdk::WebhookUrlStatus`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
126
+ end
127
+ h[k.to_sym] = v
128
+ }
129
+
130
+ if attributes.key?(:'url')
131
+ self.url = attributes[:'url']
132
+ else
133
+ self.url = nil
134
+ end
135
+
136
+ if attributes.key?(:'circuit_state')
137
+ self.circuit_state = attributes[:'circuit_state']
138
+ else
139
+ self.circuit_state = nil
140
+ end
141
+
142
+ if attributes.key?(:'reason')
143
+ self.reason = attributes[:'reason']
144
+ end
145
+
146
+ if attributes.key?(:'fails')
147
+ self.fails = attributes[:'fails']
148
+ end
149
+
150
+ if attributes.key?(:'trips')
151
+ self.trips = attributes[:'trips']
152
+ end
153
+
154
+ if attributes.key?(:'disabled_at')
155
+ self.disabled_at = attributes[:'disabled_at']
156
+ end
157
+
158
+ if attributes.key?(:'first_fail_at')
159
+ self.first_fail_at = attributes[:'first_fail_at']
160
+ end
161
+
162
+ if attributes.key?(:'last_status')
163
+ self.last_status = attributes[:'last_status']
164
+ end
165
+
166
+ if attributes.key?(:'next_probe_at')
167
+ self.next_probe_at = attributes[:'next_probe_at']
168
+ end
169
+ end
170
+
171
+ # Show invalid properties with the reasons. Usually used together with valid?
172
+ # @return Array for valid properties with the reasons
173
+ def list_invalid_properties
174
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
175
+ invalid_properties = Array.new
176
+ if @url.nil?
177
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
178
+ end
179
+
180
+ if @circuit_state.nil?
181
+ invalid_properties.push('invalid value for "circuit_state", circuit_state cannot be nil.')
182
+ end
183
+
184
+ invalid_properties
185
+ end
186
+
187
+ # Check to see if the all the properties in the model are valid
188
+ # @return true if the model is valid
189
+ def valid?
190
+ warn '[DEPRECATED] the `valid?` method is obsolete'
191
+ return false if @url.nil?
192
+ return false if @circuit_state.nil?
193
+ circuit_state_validator = EnumAttributeValidator.new('String', ["ok", "degraded", "open", "half_open", "disabled"])
194
+ return false unless circuit_state_validator.valid?(@circuit_state)
195
+ true
196
+ end
197
+
198
+ # Custom attribute writer method with validation
199
+ # @param [Object] url Value to be assigned
200
+ def url=(url)
201
+ if url.nil?
202
+ fail ArgumentError, 'url cannot be nil'
203
+ end
204
+
205
+ @url = url
206
+ end
207
+
208
+ # Custom attribute writer method checking allowed values (enum).
209
+ # @param [Object] circuit_state Object to be assigned
210
+ def circuit_state=(circuit_state)
211
+ validator = EnumAttributeValidator.new('String', ["ok", "degraded", "open", "half_open", "disabled"])
212
+ unless validator.valid?(circuit_state)
213
+ fail ArgumentError, "invalid value for \"circuit_state\", must be one of #{validator.allowable_values}."
214
+ end
215
+ @circuit_state = circuit_state
216
+ end
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] Object to be compared
220
+ def ==(o)
221
+ return true if self.equal?(o)
222
+ self.class == o.class &&
223
+ url == o.url &&
224
+ circuit_state == o.circuit_state &&
225
+ reason == o.reason &&
226
+ fails == o.fails &&
227
+ trips == o.trips &&
228
+ disabled_at == o.disabled_at &&
229
+ first_fail_at == o.first_fail_at &&
230
+ last_status == o.last_status &&
231
+ next_probe_at == o.next_probe_at
232
+ end
233
+
234
+ # @see the `==` method
235
+ # @param [Object] Object to be compared
236
+ def eql?(o)
237
+ self == o
238
+ end
239
+
240
+ # Calculates hash code according to all attributes.
241
+ # @return [Integer] Hash code
242
+ def hash
243
+ [url, circuit_state, reason, fails, trips, disabled_at, first_fail_at, last_status, next_probe_at].hash
244
+ end
245
+
246
+ # Builds the object from hash
247
+ # @param [Hash] attributes Model attributes in the form of hash
248
+ # @return [Object] Returns the model itself
249
+ def self.build_from_hash(attributes)
250
+ return nil unless attributes.is_a?(Hash)
251
+ attributes = attributes.transform_keys(&:to_sym)
252
+ transformed_hash = {}
253
+ openapi_types.each_pair do |key, type|
254
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
255
+ transformed_hash["#{key}"] = nil
256
+ elsif type =~ /\AArray<(.*)>/i
257
+ # check to ensure the input is an array given that the attribute
258
+ # is documented as an array but the input is not
259
+ if attributes[attribute_map[key]].is_a?(Array)
260
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
261
+ end
262
+ elsif !attributes[attribute_map[key]].nil?
263
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
264
+ end
265
+ end
266
+ new(transformed_hash)
267
+ end
268
+
269
+ # Returns the object in the form of hash
270
+ # @return [Hash] Returns the object in the form of hash
271
+ def to_hash
272
+ hash = {}
273
+ self.class.attribute_map.each_pair do |attr, param|
274
+ value = self.send(attr)
275
+ if value.nil?
276
+ is_nullable = self.class.openapi_nullable.include?(attr)
277
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
278
+ end
279
+
280
+ hash[param] = _to_hash(value)
281
+ end
282
+ hash
283
+ end
284
+
285
+ end
286
+
287
+ end