one_msg_chat_api 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE.txt +21 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddTemplateRequest.md +24 -0
  6. data/docs/BlockUserRequest.md +18 -0
  7. data/docs/CallingApi.md +231 -0
  8. data/docs/CatalogApi.md +153 -0
  9. data/docs/ChannelApi.md +225 -0
  10. data/docs/ConversationalAutomation.md +22 -0
  11. data/docs/ConversationalAutomationCommandsInner.md +20 -0
  12. data/docs/CreateCommerce200Response.md +18 -0
  13. data/docs/CreateCommerceRequest.md +18 -0
  14. data/docs/CreateCommerceRequestParams.md +20 -0
  15. data/docs/CreateGroups200Response.md +18 -0
  16. data/docs/CreateReadMessage200Response.md +18 -0
  17. data/docs/CreateReadMessage401Response.md +18 -0
  18. data/docs/CreateReadMessageRequest.md +22 -0
  19. data/docs/DeleteFlowsFlowId200Response.md +20 -0
  20. data/docs/DeleteGroupsGroupId200Response.md +20 -0
  21. data/docs/DeleteMediaLegacyRequest.md +18 -0
  22. data/docs/ErrorResponse.md +18 -0
  23. data/docs/FlowsApi.md +836 -0
  24. data/docs/GetCommerce200ResponseInner.md +22 -0
  25. data/docs/GetMmLiteStatus200Response.md +22 -0
  26. data/docs/GetWebhook200Response.md +18 -0
  27. data/docs/GetWhatsappBusinessEncryption200Response.md +22 -0
  28. data/docs/GroupsApi.md +507 -0
  29. data/docs/ListBlockedUsers200Response.md +18 -0
  30. data/docs/ListFlows200Response.md +26 -0
  31. data/docs/ListMessages200Response.md +20 -0
  32. data/docs/ListTemplates200Response.md +22 -0
  33. data/docs/MessageSentResponse.md +24 -0
  34. data/docs/MessagingApi.md +1784 -0
  35. data/docs/PatchFlowsFlowIdAssets200Response.md +22 -0
  36. data/docs/ProfileApi.md +155 -0
  37. data/docs/ProfileInfo.md +32 -0
  38. data/docs/RetrieveMedia200Response.md +26 -0
  39. data/docs/SendAddressMessageRequest.md +32 -0
  40. data/docs/SendButtonRequest.md +24 -0
  41. data/docs/SendButtonRequestSectionsInner.md +20 -0
  42. data/docs/SendButtonRequestSectionsInnerReply.md +20 -0
  43. data/docs/SendCarouselRequest1.md +26 -0
  44. data/docs/SendContactRequest.md +20 -0
  45. data/docs/SendContactRequestContactsInner.md +30 -0
  46. data/docs/SendContactRequestContactsInnerName.md +28 -0
  47. data/docs/SendContactRequestContactsInnerOrg.md +22 -0
  48. data/docs/SendContactRequestContactsInnerPhonesInner.md +22 -0
  49. data/docs/SendCtaUrlRequest.md +32 -0
  50. data/docs/SendFileRequest.md +34 -0
  51. data/docs/SendFlowRequest1.md +46 -0
  52. data/docs/SendFlowRequest1Header.md +49 -0
  53. data/docs/SendFlowRequestHeader.md +49 -0
  54. data/docs/SendListRequest.md +26 -0
  55. data/docs/SendListRequestSectionsInner.md +20 -0
  56. data/docs/SendListRequestSectionsInnerRowsInner.md +22 -0
  57. data/docs/SendLocationRequest1.md +30 -0
  58. data/docs/SendLocationRequestRequest.md +20 -0
  59. data/docs/SendMessageRequest.md +24 -0
  60. data/docs/SendOrderDetailsRequest.md +36 -0
  61. data/docs/SendOrderDetailsRequestLanguage.md +20 -0
  62. data/docs/SendOrderDetailsRequestOrder.md +28 -0
  63. data/docs/SendOrderDetailsRequestOrderItemsInner.md +24 -0
  64. data/docs/SendOrderDetailsRequestOrderItemsInnerAmount.md +20 -0
  65. data/docs/SendPaymentRequestRequest.md +26 -0
  66. data/docs/SendReactionRequest.md +22 -0
  67. data/docs/SendStickerRequest.md +26 -0
  68. data/docs/SendTemplateRequest.md +32 -0
  69. data/docs/SendTemplateRequestLanguage.md +20 -0
  70. data/docs/SetWhatsappBusinessEncryptionRequest.md +21 -0
  71. data/docs/SuccessResponse.md +18 -0
  72. data/docs/TemplatesApi.md +301 -0
  73. data/docs/UpdateMeRequest.md +30 -0
  74. data/docs/UsersApi.md +223 -0
  75. data/docs/WebhooksApi.md +155 -0
  76. data/git_push.sh +57 -0
  77. data/lib/one_msg_chat_api/api/calling_api.rb +228 -0
  78. data/lib/one_msg_chat_api/api/catalog_api.rb +161 -0
  79. data/lib/one_msg_chat_api/api/channel_api.rb +225 -0
  80. data/lib/one_msg_chat_api/api/flows_api.rb +788 -0
  81. data/lib/one_msg_chat_api/api/groups_api.rb +486 -0
  82. data/lib/one_msg_chat_api/api/messaging_api.rb +1833 -0
  83. data/lib/one_msg_chat_api/api/profile_api.rb +157 -0
  84. data/lib/one_msg_chat_api/api/templates_api.rb +293 -0
  85. data/lib/one_msg_chat_api/api/users_api.rb +232 -0
  86. data/lib/one_msg_chat_api/api/webhooks_api.rb +157 -0
  87. data/lib/one_msg_chat_api/api_client.rb +441 -0
  88. data/lib/one_msg_chat_api/api_error.rb +58 -0
  89. data/lib/one_msg_chat_api/api_model_base.rb +88 -0
  90. data/lib/one_msg_chat_api/configuration.rb +400 -0
  91. data/lib/one_msg_chat_api/models/add_template_request.rb +176 -0
  92. data/lib/one_msg_chat_api/models/block_user_request.rb +164 -0
  93. data/lib/one_msg_chat_api/models/conversational_automation.rb +210 -0
  94. data/lib/one_msg_chat_api/models/conversational_automation_commands_inner.rb +208 -0
  95. data/lib/one_msg_chat_api/models/create_commerce200_response.rb +147 -0
  96. data/lib/one_msg_chat_api/models/create_commerce_request.rb +164 -0
  97. data/lib/one_msg_chat_api/models/create_commerce_request_params.rb +192 -0
  98. data/lib/one_msg_chat_api/models/create_groups200_response.rb +149 -0
  99. data/lib/one_msg_chat_api/models/create_read_message200_response.rb +147 -0
  100. data/lib/one_msg_chat_api/models/create_read_message401_response.rb +147 -0
  101. data/lib/one_msg_chat_api/models/create_read_message_request.rb +168 -0
  102. data/lib/one_msg_chat_api/models/delete_flows_flow_id200_response.rb +158 -0
  103. data/lib/one_msg_chat_api/models/delete_groups_group_id200_response.rb +158 -0
  104. data/lib/one_msg_chat_api/models/delete_media_legacy_request.rb +165 -0
  105. data/lib/one_msg_chat_api/models/error_response.rb +149 -0
  106. data/lib/one_msg_chat_api/models/get_commerce200_response_inner.rb +168 -0
  107. data/lib/one_msg_chat_api/models/get_mm_lite_status200_response.rb +165 -0
  108. data/lib/one_msg_chat_api/models/get_webhook200_response.rb +147 -0
  109. data/lib/one_msg_chat_api/models/get_whatsapp_business_encryption200_response.rb +202 -0
  110. data/lib/one_msg_chat_api/models/list_blocked_users200_response.rb +149 -0
  111. data/lib/one_msg_chat_api/models/list_flows200_response.rb +189 -0
  112. data/lib/one_msg_chat_api/models/list_messages200_response.rb +158 -0
  113. data/lib/one_msg_chat_api/models/list_templates200_response.rb +169 -0
  114. data/lib/one_msg_chat_api/models/message_sent_response.rb +179 -0
  115. data/lib/one_msg_chat_api/models/patch_flows_flow_id_assets200_response.rb +169 -0
  116. data/lib/one_msg_chat_api/models/profile_info.rb +254 -0
  117. data/lib/one_msg_chat_api/models/retrieve_media200_response.rb +183 -0
  118. data/lib/one_msg_chat_api/models/send_address_message_request.rb +273 -0
  119. data/lib/one_msg_chat_api/models/send_button_request.rb +176 -0
  120. data/lib/one_msg_chat_api/models/send_button_request_sections_inner.rb +156 -0
  121. data/lib/one_msg_chat_api/models/send_button_request_sections_inner_reply.rb +156 -0
  122. data/lib/one_msg_chat_api/models/send_carousel_request1.rb +202 -0
  123. data/lib/one_msg_chat_api/models/send_contact_request.rb +158 -0
  124. data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner.rb +209 -0
  125. data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_name.rb +192 -0
  126. data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_org.rb +165 -0
  127. data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_phones_inner.rb +165 -0
  128. data/lib/one_msg_chat_api/models/send_cta_url_request.rb +264 -0
  129. data/lib/one_msg_chat_api/models/send_file_request.rb +278 -0
  130. data/lib/one_msg_chat_api/models/send_flow_request1.rb +387 -0
  131. data/lib/one_msg_chat_api/models/send_flow_request1_header.rb +104 -0
  132. data/lib/one_msg_chat_api/models/send_flow_request_header.rb +105 -0
  133. data/lib/one_msg_chat_api/models/send_list_request.rb +185 -0
  134. data/lib/one_msg_chat_api/models/send_list_request_sections_inner.rb +158 -0
  135. data/lib/one_msg_chat_api/models/send_list_request_sections_inner_rows_inner.rb +165 -0
  136. data/lib/one_msg_chat_api/models/send_location_request1.rb +235 -0
  137. data/lib/one_msg_chat_api/models/send_location_request_request.rb +156 -0
  138. data/lib/one_msg_chat_api/models/send_message_request.rb +284 -0
  139. data/lib/one_msg_chat_api/models/send_order_details_request.rb +308 -0
  140. data/lib/one_msg_chat_api/models/send_order_details_request_language.rb +176 -0
  141. data/lib/one_msg_chat_api/models/send_order_details_request_order.rb +220 -0
  142. data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner.rb +174 -0
  143. data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner_amount.rb +156 -0
  144. data/lib/one_msg_chat_api/models/send_payment_request_request.rb +245 -0
  145. data/lib/one_msg_chat_api/models/send_reaction_request.rb +165 -0
  146. data/lib/one_msg_chat_api/models/send_sticker_request.rb +185 -0
  147. data/lib/one_msg_chat_api/models/send_template_request.rb +215 -0
  148. data/lib/one_msg_chat_api/models/send_template_request_language.rb +156 -0
  149. data/lib/one_msg_chat_api/models/set_whatsapp_business_encryption_request.rb +165 -0
  150. data/lib/one_msg_chat_api/models/success_response.rb +149 -0
  151. data/lib/one_msg_chat_api/models/update_me_request.rb +207 -0
  152. data/lib/one_msg_chat_api/version.rb +15 -0
  153. data/lib/one_msg_chat_api.rb +111 -0
  154. data/one_msg_chat_api.gemspec +41 -0
  155. data/spec/api/calling_api_spec.rb +73 -0
  156. data/spec/api/catalog_api_spec.rb +60 -0
  157. data/spec/api/channel_api_spec.rb +72 -0
  158. data/spec/api/flows_api_spec.rb +175 -0
  159. data/spec/api/groups_api_spec.rb +117 -0
  160. data/spec/api/messaging_api_spec.rb +359 -0
  161. data/spec/api/profile_api_spec.rb +60 -0
  162. data/spec/api/templates_api_spec.rb +83 -0
  163. data/spec/api/users_api_spec.rb +71 -0
  164. data/spec/api/webhooks_api_spec.rb +60 -0
  165. data/spec/models/add_template_request_spec.rb +54 -0
  166. data/spec/models/block_user_request_spec.rb +36 -0
  167. data/spec/models/conversational_automation_commands_inner_spec.rb +42 -0
  168. data/spec/models/conversational_automation_spec.rb +48 -0
  169. data/spec/models/create_commerce200_response_spec.rb +36 -0
  170. data/spec/models/create_commerce_request_params_spec.rb +42 -0
  171. data/spec/models/create_commerce_request_spec.rb +36 -0
  172. data/spec/models/create_groups200_response_spec.rb +36 -0
  173. data/spec/models/create_read_message200_response_spec.rb +36 -0
  174. data/spec/models/create_read_message401_response_spec.rb +36 -0
  175. data/spec/models/create_read_message_request_spec.rb +48 -0
  176. data/spec/models/delete_flows_flow_id200_response_spec.rb +42 -0
  177. data/spec/models/delete_groups_group_id200_response_spec.rb +42 -0
  178. data/spec/models/delete_media_legacy_request_spec.rb +36 -0
  179. data/spec/models/error_response_spec.rb +36 -0
  180. data/spec/models/get_commerce200_response_inner_spec.rb +48 -0
  181. data/spec/models/get_mm_lite_status200_response_spec.rb +48 -0
  182. data/spec/models/get_webhook200_response_spec.rb +36 -0
  183. data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +52 -0
  184. data/spec/models/list_blocked_users200_response_spec.rb +36 -0
  185. data/spec/models/list_flows200_response_spec.rb +60 -0
  186. data/spec/models/list_messages200_response_spec.rb +42 -0
  187. data/spec/models/list_templates200_response_spec.rb +48 -0
  188. data/spec/models/message_sent_response_spec.rb +54 -0
  189. data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +48 -0
  190. data/spec/models/profile_info_spec.rb +82 -0
  191. data/spec/models/retrieve_media200_response_spec.rb +60 -0
  192. data/spec/models/send_address_message_request_spec.rb +82 -0
  193. data/spec/models/send_button_request_sections_inner_reply_spec.rb +42 -0
  194. data/spec/models/send_button_request_sections_inner_spec.rb +42 -0
  195. data/spec/models/send_button_request_spec.rb +54 -0
  196. data/spec/models/send_carousel_request1_spec.rb +60 -0
  197. data/spec/models/send_contact_request_contacts_inner_name_spec.rb +66 -0
  198. data/spec/models/send_contact_request_contacts_inner_org_spec.rb +48 -0
  199. data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +48 -0
  200. data/spec/models/send_contact_request_contacts_inner_spec.rb +72 -0
  201. data/spec/models/send_contact_request_spec.rb +42 -0
  202. data/spec/models/send_cta_url_request_spec.rb +78 -0
  203. data/spec/models/send_file_request_spec.rb +88 -0
  204. data/spec/models/send_flow_request1_header_spec.rb +32 -0
  205. data/spec/models/send_flow_request1_spec.rb +128 -0
  206. data/spec/models/send_flow_request_header_spec.rb +32 -0
  207. data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +48 -0
  208. data/spec/models/send_list_request_sections_inner_spec.rb +42 -0
  209. data/spec/models/send_list_request_spec.rb +60 -0
  210. data/spec/models/send_location_request1_spec.rb +72 -0
  211. data/spec/models/send_location_request_request_spec.rb +42 -0
  212. data/spec/models/send_message_request_spec.rb +54 -0
  213. data/spec/models/send_order_details_request_language_spec.rb +42 -0
  214. data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +42 -0
  215. data/spec/models/send_order_details_request_order_items_inner_spec.rb +54 -0
  216. data/spec/models/send_order_details_request_order_spec.rb +66 -0
  217. data/spec/models/send_order_details_request_spec.rb +90 -0
  218. data/spec/models/send_payment_request_request_spec.rb +64 -0
  219. data/spec/models/send_reaction_request_spec.rb +48 -0
  220. data/spec/models/send_sticker_request_spec.rb +60 -0
  221. data/spec/models/send_template_request_language_spec.rb +42 -0
  222. data/spec/models/send_template_request_spec.rb +78 -0
  223. data/spec/models/set_whatsapp_business_encryption_request_spec.rb +36 -0
  224. data/spec/models/success_response_spec.rb +36 -0
  225. data/spec/models/update_me_request_spec.rb +72 -0
  226. data/spec/spec_helper.rb +111 -0
  227. metadata +408 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6dce23a8916afa6b401d251d669129097e53c9f55eb3d45a0a3570c62062f3a4
4
+ data.tar.gz: 8943e5450c9bdb9ff64d4eff2ac2fac92b0f726c5ef47f2abb6678fbfc513b31
5
+ SHA512:
6
+ metadata.gz: 680a29f3c07c177d42d6af37832f85208ff75a1e2b9764ebdc6bb0a40917cb7e8224f0241065d6a9c8dfd5b7049bfd9accf05813c87f0f74f412bfcc116e8ed5
7
+ data.tar.gz: 43656c542b197e26324e80fc9d5029fa918cea38dd03e72a6bc62263cc004e0e86499ba8602fef9fd8a79723ff9389ef99fd989361ca08088a315f5165b25269
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 0.66.0'
9
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 1MSG
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
@@ -0,0 +1,24 @@
1
+ # OneMsgChatApi::AddTemplateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | [optional] |
8
+ | **category** | **String** | | [optional] |
9
+ | **language** | **String** | | [optional] |
10
+ | **components** | **Array<Hash<String, Object>>** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'one_msg_chat_api'
16
+
17
+ instance = OneMsgChatApi::AddTemplateRequest.new(
18
+ name: null,
19
+ category: null,
20
+ language: null,
21
+ components: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # OneMsgChatApi::BlockUserRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **phone** | **Integer** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'one_msg_chat_api'
13
+
14
+ instance = OneMsgChatApi::BlockUserRequest.new(
15
+ phone: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,231 @@
1
+ # OneMsgChatApi::CallingApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_calling_settings**](CallingApi.md#get_calling_settings) | **GET** /callingSettings | Get calling settings |
8
+ | [**initiate_call**](CallingApi.md#initiate_call) | **POST** /initiateCall | Initiate WhatsApp call |
9
+ | [**update_calling_settings**](CallingApi.md#update_calling_settings) | **POST** /callingSettings | Update calling settings |
10
+
11
+
12
+ ## get_calling_settings
13
+
14
+ > Hash<String, Object> get_calling_settings(token)
15
+
16
+ Get calling settings
17
+
18
+ WhatsApp Calling API settings (beta). Requires Meta Calling enablement on the WABA. Not production-complete — paths and webhook field names may change. Trial/subscription-limited channels are blocked.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'one_msg_chat_api'
25
+ # setup authorization
26
+ OneMsgChatApi.configure do |config|
27
+ # Configure API key authorization: tokenAuth
28
+ config.api_key['token'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['token'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = OneMsgChatApi::CallingApi.new
34
+ token = 'token_example' # String | JWT token or API key for authorization
35
+
36
+ begin
37
+ # Get calling settings
38
+ result = api_instance.get_calling_settings(token)
39
+ p result
40
+ rescue OneMsgChatApi::ApiError => e
41
+ puts "Error when calling CallingApi->get_calling_settings: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the get_calling_settings_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> get_calling_settings_with_http_info(token)
50
+
51
+ ```ruby
52
+ begin
53
+ # Get calling settings
54
+ data, status_code, headers = api_instance.get_calling_settings_with_http_info(token)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => Hash&lt;String, Object&gt;
58
+ rescue OneMsgChatApi::ApiError => e
59
+ puts "Error when calling CallingApi->get_calling_settings_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **token** | **String** | JWT token or API key for authorization | |
68
+
69
+ ### Return type
70
+
71
+ **Hash&lt;String, Object&gt;**
72
+
73
+ ### Authorization
74
+
75
+ [tokenAuth](../README.md#tokenAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: Not defined
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## initiate_call
84
+
85
+ > Hash&lt;String, Object&gt; initiate_call(token, opts)
86
+
87
+ Initiate WhatsApp call
88
+
89
+ Outbound Calling API (beta). Requires Meta Calling enablement and product consent. Not production-complete — verify on stage before relying on this in production. Trial/subscription-limited channels are blocked.
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'one_msg_chat_api'
96
+ # setup authorization
97
+ OneMsgChatApi.configure do |config|
98
+ # Configure API key authorization: tokenAuth
99
+ config.api_key['token'] = 'YOUR API KEY'
100
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
101
+ # config.api_key_prefix['token'] = 'Bearer'
102
+ end
103
+
104
+ api_instance = OneMsgChatApi::CallingApi.new
105
+ token = 'token_example' # String | JWT token or API key for authorization
106
+ opts = {
107
+ request_body: { key: 3.56} # Hash<String, Object> |
108
+ }
109
+
110
+ begin
111
+ # Initiate WhatsApp call
112
+ result = api_instance.initiate_call(token, opts)
113
+ p result
114
+ rescue OneMsgChatApi::ApiError => e
115
+ puts "Error when calling CallingApi->initiate_call: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the initiate_call_with_http_info variant
120
+
121
+ This returns an Array which contains the response data, status code and headers.
122
+
123
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> initiate_call_with_http_info(token, opts)
124
+
125
+ ```ruby
126
+ begin
127
+ # Initiate WhatsApp call
128
+ data, status_code, headers = api_instance.initiate_call_with_http_info(token, opts)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => Hash&lt;String, Object&gt;
132
+ rescue OneMsgChatApi::ApiError => e
133
+ puts "Error when calling CallingApi->initiate_call_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **token** | **String** | JWT token or API key for authorization | |
142
+ | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | [optional] |
143
+
144
+ ### Return type
145
+
146
+ **Hash&lt;String, Object&gt;**
147
+
148
+ ### Authorization
149
+
150
+ [tokenAuth](../README.md#tokenAuth)
151
+
152
+ ### HTTP request headers
153
+
154
+ - **Content-Type**: application/json
155
+ - **Accept**: application/json
156
+
157
+
158
+ ## update_calling_settings
159
+
160
+ > Hash&lt;String, Object&gt; update_calling_settings(token, opts)
161
+
162
+ Update calling settings
163
+
164
+ Update WhatsApp Calling API settings (beta). Requires Meta Calling enablement. Trial/subscription-limited channels are blocked.
165
+
166
+ ### Examples
167
+
168
+ ```ruby
169
+ require 'time'
170
+ require 'one_msg_chat_api'
171
+ # setup authorization
172
+ OneMsgChatApi.configure do |config|
173
+ # Configure API key authorization: tokenAuth
174
+ config.api_key['token'] = 'YOUR API KEY'
175
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
176
+ # config.api_key_prefix['token'] = 'Bearer'
177
+ end
178
+
179
+ api_instance = OneMsgChatApi::CallingApi.new
180
+ token = 'token_example' # String | JWT token or API key for authorization
181
+ opts = {
182
+ request_body: { key: 3.56} # Hash<String, Object> |
183
+ }
184
+
185
+ begin
186
+ # Update calling settings
187
+ result = api_instance.update_calling_settings(token, opts)
188
+ p result
189
+ rescue OneMsgChatApi::ApiError => e
190
+ puts "Error when calling CallingApi->update_calling_settings: #{e}"
191
+ end
192
+ ```
193
+
194
+ #### Using the update_calling_settings_with_http_info variant
195
+
196
+ This returns an Array which contains the response data, status code and headers.
197
+
198
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> update_calling_settings_with_http_info(token, opts)
199
+
200
+ ```ruby
201
+ begin
202
+ # Update calling settings
203
+ data, status_code, headers = api_instance.update_calling_settings_with_http_info(token, opts)
204
+ p status_code # => 2xx
205
+ p headers # => { ... }
206
+ p data # => Hash&lt;String, Object&gt;
207
+ rescue OneMsgChatApi::ApiError => e
208
+ puts "Error when calling CallingApi->update_calling_settings_with_http_info: #{e}"
209
+ end
210
+ ```
211
+
212
+ ### Parameters
213
+
214
+ | Name | Type | Description | Notes |
215
+ | ---- | ---- | ----------- | ----- |
216
+ | **token** | **String** | JWT token or API key for authorization | |
217
+ | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | [optional] |
218
+
219
+ ### Return type
220
+
221
+ **Hash&lt;String, Object&gt;**
222
+
223
+ ### Authorization
224
+
225
+ [tokenAuth](../README.md#tokenAuth)
226
+
227
+ ### HTTP request headers
228
+
229
+ - **Content-Type**: application/json
230
+ - **Accept**: application/json
231
+
@@ -0,0 +1,153 @@
1
+ # OneMsgChatApi::CatalogApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_commerce**](CatalogApi.md#create_commerce) | **POST** /commerce | Set Commerce Settings |
8
+ | [**get_commerce**](CatalogApi.md#get_commerce) | **GET** /commerce | Get Commerce Settings |
9
+
10
+
11
+ ## create_commerce
12
+
13
+ > <CreateCommerce200Response> create_commerce(token, create_commerce_request)
14
+
15
+ Set Commerce Settings
16
+
17
+ Update catalog/cart commerce settings via the `params` object. - `params.is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `params.is_cart_enabled` — enable cart (`true`) or disable it (`false`). Blocked when the channel subscription limit is exceeded. Requires a commerce-capable channel (Cloud Functions `/commerceWAV2`).
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'one_msg_chat_api'
24
+ # setup authorization
25
+ OneMsgChatApi.configure do |config|
26
+ # Configure API key authorization: tokenAuth
27
+ config.api_key['token'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['token'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = OneMsgChatApi::CatalogApi.new
33
+ token = 'token_example' # String | JWT token or API key for authorization
34
+ create_commerce_request = OneMsgChatApi::CreateCommerceRequest.new({params: OneMsgChatApi::CreateCommerceRequestParams.new({is_cart_enabled: false, is_catalog_visible: false})}) # CreateCommerceRequest |
35
+
36
+ begin
37
+ # Set Commerce Settings
38
+ result = api_instance.create_commerce(token, create_commerce_request)
39
+ p result
40
+ rescue OneMsgChatApi::ApiError => e
41
+ puts "Error when calling CatalogApi->create_commerce: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the create_commerce_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<CreateCommerce200Response>, Integer, Hash)> create_commerce_with_http_info(token, create_commerce_request)
50
+
51
+ ```ruby
52
+ begin
53
+ # Set Commerce Settings
54
+ data, status_code, headers = api_instance.create_commerce_with_http_info(token, create_commerce_request)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <CreateCommerce200Response>
58
+ rescue OneMsgChatApi::ApiError => e
59
+ puts "Error when calling CatalogApi->create_commerce_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **token** | **String** | JWT token or API key for authorization | |
68
+ | **create_commerce_request** | [**CreateCommerceRequest**](CreateCommerceRequest.md) | | |
69
+
70
+ ### Return type
71
+
72
+ [**CreateCommerce200Response**](CreateCommerce200Response.md)
73
+
74
+ ### Authorization
75
+
76
+ [tokenAuth](../README.md#tokenAuth)
77
+
78
+ ### HTTP request headers
79
+
80
+ - **Content-Type**: application/json
81
+ - **Accept**: application/json
82
+
83
+
84
+ ## get_commerce
85
+
86
+ > <Array<GetCommerce200ResponseInner>> get_commerce(token)
87
+
88
+ Get Commerce Settings
89
+
90
+ Returns catalog/cart commerce settings for the channel. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
91
+
92
+ ### Examples
93
+
94
+ ```ruby
95
+ require 'time'
96
+ require 'one_msg_chat_api'
97
+ # setup authorization
98
+ OneMsgChatApi.configure do |config|
99
+ # Configure API key authorization: tokenAuth
100
+ config.api_key['token'] = 'YOUR API KEY'
101
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
102
+ # config.api_key_prefix['token'] = 'Bearer'
103
+ end
104
+
105
+ api_instance = OneMsgChatApi::CatalogApi.new
106
+ token = 'token_example' # String | JWT token or API key for authorization
107
+
108
+ begin
109
+ # Get Commerce Settings
110
+ result = api_instance.get_commerce(token)
111
+ p result
112
+ rescue OneMsgChatApi::ApiError => e
113
+ puts "Error when calling CatalogApi->get_commerce: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the get_commerce_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<Array<GetCommerce200ResponseInner>>, Integer, Hash)> get_commerce_with_http_info(token)
122
+
123
+ ```ruby
124
+ begin
125
+ # Get Commerce Settings
126
+ data, status_code, headers = api_instance.get_commerce_with_http_info(token)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <Array<GetCommerce200ResponseInner>>
130
+ rescue OneMsgChatApi::ApiError => e
131
+ puts "Error when calling CatalogApi->get_commerce_with_http_info: #{e}"
132
+ end
133
+ ```
134
+
135
+ ### Parameters
136
+
137
+ | Name | Type | Description | Notes |
138
+ | ---- | ---- | ----------- | ----- |
139
+ | **token** | **String** | JWT token or API key for authorization | |
140
+
141
+ ### Return type
142
+
143
+ [**Array&lt;GetCommerce200ResponseInner&gt;**](GetCommerce200ResponseInner.md)
144
+
145
+ ### Authorization
146
+
147
+ [tokenAuth](../README.md#tokenAuth)
148
+
149
+ ### HTTP request headers
150
+
151
+ - **Content-Type**: Not defined
152
+ - **Accept**: application/json
153
+
@@ -0,0 +1,225 @@
1
+ # OneMsgChatApi::ChannelApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_conversational_automation**](ChannelApi.md#get_conversational_automation) | **GET** /conversationalAutomation | Get conversational automation settings |
8
+ | [**get_status**](ChannelApi.md#get_status) | **GET** /status | Get channel status |
9
+ | [**set_conversational_automation**](ChannelApi.md#set_conversational_automation) | **POST** /conversationalAutomation | Set conversational automation settings |
10
+
11
+
12
+ ## get_conversational_automation
13
+
14
+ > <ConversationalAutomation> get_conversational_automation(token)
15
+
16
+ Get conversational automation settings
17
+
18
+ Get WhatsApp conversational components for the channel (welcome message, ice-breaker prompts, and slash commands). Proxies Meta/360dialog `GET /conversational_automation`. When `enable_welcome_message` is true and a user opens chat for the first time, Meta delivers a webhook message with `type: request_welcome`. The inbound formatter exposes that as `type: \"request_welcome\"` and `meta.request_welcome: true` so your webhook can send a custom welcome reply.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'one_msg_chat_api'
25
+ # setup authorization
26
+ OneMsgChatApi.configure do |config|
27
+ # Configure API key authorization: tokenAuth
28
+ config.api_key['token'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ # config.api_key_prefix['token'] = 'Bearer'
31
+ end
32
+
33
+ api_instance = OneMsgChatApi::ChannelApi.new
34
+ token = 'token_example' # String | JWT token or API key for authorization
35
+
36
+ begin
37
+ # Get conversational automation settings
38
+ result = api_instance.get_conversational_automation(token)
39
+ p result
40
+ rescue OneMsgChatApi::ApiError => e
41
+ puts "Error when calling ChannelApi->get_conversational_automation: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the get_conversational_automation_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<ConversationalAutomation>, Integer, Hash)> get_conversational_automation_with_http_info(token)
50
+
51
+ ```ruby
52
+ begin
53
+ # Get conversational automation settings
54
+ data, status_code, headers = api_instance.get_conversational_automation_with_http_info(token)
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <ConversationalAutomation>
58
+ rescue OneMsgChatApi::ApiError => e
59
+ puts "Error when calling ChannelApi->get_conversational_automation_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ | Name | Type | Description | Notes |
66
+ | ---- | ---- | ----------- | ----- |
67
+ | **token** | **String** | JWT token or API key for authorization | |
68
+
69
+ ### Return type
70
+
71
+ [**ConversationalAutomation**](ConversationalAutomation.md)
72
+
73
+ ### Authorization
74
+
75
+ [tokenAuth](../README.md#tokenAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: Not defined
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## get_status
84
+
85
+ > Hash&lt;String, Object&gt; get_status(token)
86
+
87
+ Get channel status
88
+
89
+ Returns WhatsApp Business API client connection status.
90
+
91
+ ### Examples
92
+
93
+ ```ruby
94
+ require 'time'
95
+ require 'one_msg_chat_api'
96
+ # setup authorization
97
+ OneMsgChatApi.configure do |config|
98
+ # Configure API key authorization: tokenAuth
99
+ config.api_key['token'] = 'YOUR API KEY'
100
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
101
+ # config.api_key_prefix['token'] = 'Bearer'
102
+ end
103
+
104
+ api_instance = OneMsgChatApi::ChannelApi.new
105
+ token = 'token_example' # String | JWT token or API key for authorization
106
+
107
+ begin
108
+ # Get channel status
109
+ result = api_instance.get_status(token)
110
+ p result
111
+ rescue OneMsgChatApi::ApiError => e
112
+ puts "Error when calling ChannelApi->get_status: #{e}"
113
+ end
114
+ ```
115
+
116
+ #### Using the get_status_with_http_info variant
117
+
118
+ This returns an Array which contains the response data, status code and headers.
119
+
120
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> get_status_with_http_info(token)
121
+
122
+ ```ruby
123
+ begin
124
+ # Get channel status
125
+ data, status_code, headers = api_instance.get_status_with_http_info(token)
126
+ p status_code # => 2xx
127
+ p headers # => { ... }
128
+ p data # => Hash&lt;String, Object&gt;
129
+ rescue OneMsgChatApi::ApiError => e
130
+ puts "Error when calling ChannelApi->get_status_with_http_info: #{e}"
131
+ end
132
+ ```
133
+
134
+ ### Parameters
135
+
136
+ | Name | Type | Description | Notes |
137
+ | ---- | ---- | ----------- | ----- |
138
+ | **token** | **String** | JWT token or API key for authorization | |
139
+
140
+ ### Return type
141
+
142
+ **Hash&lt;String, Object&gt;**
143
+
144
+ ### Authorization
145
+
146
+ [tokenAuth](../README.md#tokenAuth)
147
+
148
+ ### HTTP request headers
149
+
150
+ - **Content-Type**: Not defined
151
+ - **Accept**: application/json
152
+
153
+
154
+ ## set_conversational_automation
155
+
156
+ > Hash&lt;String, Object&gt; set_conversational_automation(token, conversational_automation)
157
+
158
+ Set conversational automation settings
159
+
160
+ Update WhatsApp conversational components. Allowed body fields (others are ignored): - `enable_welcome_message` (boolean) - `prompts` (string[], max 4, each ≤ 80 chars) - `commands` (`{ command_name, command_description }[]`) Proxies Meta/360dialog `POST /conversational_automation`.
161
+
162
+ ### Examples
163
+
164
+ ```ruby
165
+ require 'time'
166
+ require 'one_msg_chat_api'
167
+ # setup authorization
168
+ OneMsgChatApi.configure do |config|
169
+ # Configure API key authorization: tokenAuth
170
+ config.api_key['token'] = 'YOUR API KEY'
171
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
172
+ # config.api_key_prefix['token'] = 'Bearer'
173
+ end
174
+
175
+ api_instance = OneMsgChatApi::ChannelApi.new
176
+ token = 'token_example' # String | JWT token or API key for authorization
177
+ conversational_automation = OneMsgChatApi::ConversationalAutomation.new # ConversationalAutomation |
178
+
179
+ begin
180
+ # Set conversational automation settings
181
+ result = api_instance.set_conversational_automation(token, conversational_automation)
182
+ p result
183
+ rescue OneMsgChatApi::ApiError => e
184
+ puts "Error when calling ChannelApi->set_conversational_automation: #{e}"
185
+ end
186
+ ```
187
+
188
+ #### Using the set_conversational_automation_with_http_info variant
189
+
190
+ This returns an Array which contains the response data, status code and headers.
191
+
192
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> set_conversational_automation_with_http_info(token, conversational_automation)
193
+
194
+ ```ruby
195
+ begin
196
+ # Set conversational automation settings
197
+ data, status_code, headers = api_instance.set_conversational_automation_with_http_info(token, conversational_automation)
198
+ p status_code # => 2xx
199
+ p headers # => { ... }
200
+ p data # => Hash&lt;String, Object&gt;
201
+ rescue OneMsgChatApi::ApiError => e
202
+ puts "Error when calling ChannelApi->set_conversational_automation_with_http_info: #{e}"
203
+ end
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+ | Name | Type | Description | Notes |
209
+ | ---- | ---- | ----------- | ----- |
210
+ | **token** | **String** | JWT token or API key for authorization | |
211
+ | **conversational_automation** | [**ConversationalAutomation**](ConversationalAutomation.md) | | |
212
+
213
+ ### Return type
214
+
215
+ **Hash&lt;String, Object&gt;**
216
+
217
+ ### Authorization
218
+
219
+ [tokenAuth](../README.md#tokenAuth)
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: application/json
224
+ - **Accept**: application/json
225
+