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
@@ -0,0 +1,359 @@
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:** 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/
5
+
6
+ The version of the OpenAPI document: 1.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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OneMsgChatApi::MessagingApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'MessagingApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OneMsgChatApi::MessagingApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of MessagingApi' do
30
+ it 'should create an instance of MessagingApi' do
31
+ expect(@api_instance).to be_instance_of(OneMsgChatApi::MessagingApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_read_message
36
+ # Mark message as read
37
+ # @param token JWT token or API key for authorization
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :message_id
40
+ # @option opts [String] :msg_id
41
+ # @option opts [Boolean] :typing_indicator Show WhatsApp typing indicator (max 25s or until reply)
42
+ # @return [CreateReadMessage200Response]
43
+ describe 'create_read_message test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
49
+ # unit tests for create_upload_media
50
+ # Upload media
51
+ # @param token JWT token or API key for authorization
52
+ # @param [Hash] opts the optional parameters
53
+ # @option opts [Hash<String, Object>] :request_body
54
+ # @return [nil]
55
+ describe 'create_upload_media test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
58
+ end
59
+ end
60
+
61
+ # unit tests for delete_media
62
+ # Delete media from WABA storage
63
+ # Delete previously uploaded media by numeric &#x60;mediaId&#x60; (from &#x60;/uploadMedia&#x60;). This is the canonical deletion endpoint and uses the REST &#x60;DELETE&#x60; verb on the media resource path. The older &#x60;POST /deleteMedia&#x60; is a deprecated alias.
64
+ # @param token JWT token or API key for authorization
65
+ # @param media_id Numeric WABA media id
66
+ # @param [Hash] opts the optional parameters
67
+ # @return [SuccessResponse]
68
+ describe 'delete_media test' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
71
+ end
72
+ end
73
+
74
+ # unit tests for delete_media_legacy
75
+ # Delete media from WABA storage (deprecated alias)
76
+ # **Deprecated.** Use &#x60;DELETE /media/{mediaId}&#x60; instead. This POST alias is kept for backward compatibility with earlier integrations. New integrations should call &#x60;DELETE /media/{mediaId}&#x60;: 1msg follows REST conventions for resource deletion going forward (delete a resource with the &#x60;DELETE&#x60; verb on its resource path).
77
+ # @param token JWT token or API key for authorization
78
+ # @param delete_media_legacy_request
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [SuccessResponse]
81
+ describe 'delete_media_legacy test' do
82
+ it 'should work' do
83
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
84
+ end
85
+ end
86
+
87
+ # unit tests for get_mm_lite_status
88
+ # Get MM Lite availability and status
89
+ # @param token JWT token or API key for authorization
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [GetMmLiteStatus200Response]
92
+ describe 'get_mm_lite_status test' do
93
+ it 'should work' do
94
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
95
+ end
96
+ end
97
+
98
+ # unit tests for list_messages
99
+ # Get messages list
100
+ # @param token JWT token or API key for authorization
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [ListMessages200Response]
103
+ describe 'list_messages test' do
104
+ it 'should work' do
105
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
106
+ end
107
+ end
108
+
109
+ # unit tests for retrieve_media
110
+ # Retrieve uploaded media metadata
111
+ # Get WABA media URL and metadata by mediaId (from uploadMedia). The returned &#x60;url&#x60; is temporary and typically expires within ~5 minutes.
112
+ # @param token JWT token or API key for authorization
113
+ # @param media_id
114
+ # @param [Hash] opts the optional parameters
115
+ # @return [RetrieveMedia200Response]
116
+ describe 'retrieve_media test' do
117
+ it 'should work' do
118
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
119
+ end
120
+ end
121
+
122
+ # unit tests for send_address_message
123
+ # Send address request message
124
+ # Request shipping address from the user (WhatsApp interactive &#x60;address_message&#x60;). **India and Singapore only.** Requires: - Business WhatsApp number registered in that country - Recipient phone matching the country (&#x60;+91&#x60; ↔ &#x60;IN&#x60;, &#x60;+65&#x60; ↔ &#x60;SG&#x60;) Pass &#x60;country: \&quot;IN\&quot;&#x60; or &#x60;country: \&quot;SG\&quot;&#x60;. Eligibility is validated upstream; mismatches (e.g. Singapore phone with &#x60;country: \&quot;IN\&quot;&#x60;) return errors such as &#x60;Unsupported Interactive Message type&#x60; (HTTP 200 with &#x60;sent: false&#x60;). Optional action parameters: &#x60;values&#x60;, &#x60;saved_addresses&#x60;, &#x60;validation_errors&#x60;.
125
+ # @param token JWT token or API key for authorization
126
+ # @param send_address_message_request
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [MessageSentResponse]
129
+ describe 'send_address_message test' do
130
+ it 'should work' do
131
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
132
+ end
133
+ end
134
+
135
+ # unit tests for send_button
136
+ # Send Reply Buttons Message
137
+ # @param token JWT token or API key for authorization
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [SendButtonRequest] :send_button_request
140
+ # @return [MessageSentResponse]
141
+ describe 'send_button test' do
142
+ it 'should work' do
143
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
144
+ end
145
+ end
146
+
147
+ # unit tests for send_carousel
148
+ # Send Carousel
149
+ # You can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.
150
+ # @param token JWT token or API key for authorization
151
+ # @param params Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards. Structure: - params[] item with type CAROUSEL and cards (2..10) - cards[] item: - components[] items: - header: parameters[0] with type image/video/product - image: {\\\&quot;image\\\&quot;: {\\\&quot;link\\\&quot;: \\\&quot;https://...\\\&quot;}} - video: {\\\&quot;video\\\&quot;: {\\\&quot;link\\\&quot;: \\\&quot;https://...\\\&quot;}} - product: {\\\&quot;product\\\&quot;: {\\\&quot;catalog_id\\\&quot;: \\\&quot;...\\\&quot;, \\\&quot;product_retailer_id\\\&quot;: \\\&quot;...\\\&quot;}} - button: sub_type url or quick_reply - url: parameters {\\\&quot;text\\\&quot;: \\\&quot;Button\\\&quot;, \\\&quot;url\\\&quot;: \\\&quot;https://...\\\&quot;} - quick_reply: parameters[] of {\\\&quot;id\\\&quot;: \\\&quot;...\\\&quot;, \\\&quot;text\\\&quot;: \\\&quot;...\\\&quot;}
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [String] :body Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params.
154
+ # @option opts [String] :quoted_msg_id Quoted message ID (Cloud API)
155
+ # @option opts [String] :chat_id Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group)
156
+ # @option opts [Integer] :phone Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369.
157
+ # @return [MessageSentResponse]
158
+ describe 'send_carousel test' do
159
+ it 'should work' do
160
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
161
+ end
162
+ end
163
+
164
+ # unit tests for send_contact
165
+ # Send a Contact
166
+ # @param token JWT token or API key for authorization
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [SendContactRequest] :send_contact_request
169
+ # @return [MessageSentResponse]
170
+ describe 'send_contact test' do
171
+ it 'should work' do
172
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
173
+ end
174
+ end
175
+
176
+ # unit tests for send_cta_url
177
+ # Send CTA URL interactive message
178
+ # Send an interactive message with a single call-to-action URL button.
179
+ # @param token JWT token or API key for authorization
180
+ # @param send_cta_url_request
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [MessageSentResponse]
183
+ describe 'send_cta_url test' do
184
+ it 'should work' do
185
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
186
+ end
187
+ end
188
+
189
+ # unit tests for send_file
190
+ # Send a File
191
+ # Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.
192
+ # @param token JWT token or API key for authorization
193
+ # @param [Hash] opts the optional parameters
194
+ # @option opts [String] :body File source (required unless mediaId is set): - HTTP/HTTPS URL - Base64 data URI
195
+ # @option opts [String] :filename File name with extension (required with body, not with mediaId)
196
+ # @option opts [String] :media_id WABA media id from uploadMedia (alternative to body)
197
+ # @option opts [String] :media_type Required when using mediaId
198
+ # @option opts [Boolean] :voice Native WhatsApp voice note (audio/ogg only)
199
+ # @option opts [String] :caption
200
+ # @option opts [String] :quoted_msg_id
201
+ # @option opts [String] :chat_id
202
+ # @option opts [Integer] :phone
203
+ # @return [MessageSentResponse]
204
+ describe 'send_file test' do
205
+ it 'should work' do
206
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
207
+ end
208
+ end
209
+
210
+ # unit tests for send_flow
211
+ # Send WhatsApp Flow Message
212
+ # Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate.
213
+ # @param token JWT token or API key for authorization
214
+ # @param body Flow message body text
215
+ # @param flow_id Published Flow ID
216
+ # @param flow_token Flow token generated by the business
217
+ # @param flow_cta CTA button text
218
+ # @param [Hash] opts the optional parameters
219
+ # @option opts [SendFlowRequestHeader] :header
220
+ # @option opts [String] :footer Footer text
221
+ # @option opts [String] :flow_action Flow action type
222
+ # @option opts [Object] :flow_action_payload Required for flowAction&#x3D;navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object.
223
+ # @option opts [String] :flow_message_version Flow message version (default \\\&quot;3\\\&quot;)
224
+ # @option opts [String] :mode Flow mode (draft or published). If omitted, provider default applies
225
+ # @option opts [Object] :flow_action_data Shortcut for flowActionPayload.data (optional)
226
+ # @option opts [String] :flow_action_screen Shortcut for flowActionPayload.screen (optional)
227
+ # @option opts [String] :quoted_msg_id Quoted message ID (Cloud API)
228
+ # @option opts [String] :chat_id Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group)
229
+ # @option opts [Integer] :phone Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369.
230
+ # @return [MessageSentResponse]
231
+ describe 'send_flow test' do
232
+ it 'should work' do
233
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
234
+ end
235
+ end
236
+
237
+ # unit tests for send_list
238
+ # Send List Message
239
+ # @param token JWT token or API key for authorization
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [SendListRequest] :send_list_request
242
+ # @return [MessageSentResponse]
243
+ describe 'send_list test' do
244
+ it 'should work' do
245
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
246
+ end
247
+ end
248
+
249
+ # unit tests for send_location
250
+ # Send a Location
251
+ # Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.
252
+ # @param token JWT token or API key for authorization
253
+ # @param lat Latitude of the location. Example: 45.018337
254
+ # @param lng Longitude of the location. Example: -73.968285
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [String] :address Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024
257
+ # @option opts [String] :name Name of the location. Example: Facebook HQ
258
+ # @option opts [String] :quoted_msg_id Quoted message ID (Cloud API)
259
+ # @option opts [String] :chat_id Required if phone is not set. Chat ID from the message list. Examples: 12020721369@c.us or 120363046942338209@g.us(group)
260
+ # @option opts [Integer] :phone Required if chatId is not set. A phone number starting with the country code. USA example: 12020721369.
261
+ # @return [MessageSentResponse]
262
+ describe 'send_location test' do
263
+ it 'should work' do
264
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
265
+ end
266
+ end
267
+
268
+ # unit tests for send_location_request
269
+ # Send Location Request Message
270
+ # @param token JWT token or API key for authorization
271
+ # @param [Hash] opts the optional parameters
272
+ # @option opts [SendLocationRequestRequest] :send_location_request_request
273
+ # @return [MessageSentResponse]
274
+ describe 'send_location_request test' do
275
+ it 'should work' do
276
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
277
+ end
278
+ end
279
+
280
+ # unit tests for send_message
281
+ # Send a Message
282
+ # Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone.
283
+ # @param token JWT token or API key for authorization
284
+ # @param body Message text, UTF-8 or UTF-16 string with emoji
285
+ # @param [Hash] opts the optional parameters
286
+ # @option opts [String] :quoted_msg_id Message ID to quote/reply to (Cloud API wamid)
287
+ # @option opts [String] :chat_id Chat ID in format: phone@c.us (individual) or phone@g.us (group)
288
+ # @option opts [Integer] :phone Phone number starting with country code (alternative to chatId)
289
+ # @return [MessageSentResponse]
290
+ describe 'send_message test' do
291
+ it 'should work' do
292
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
293
+ end
294
+ end
295
+
296
+ # unit tests for send_order_details
297
+ # Send order details (India payments template)
298
+ # Send a WhatsApp **order details** payment / invoice message using a pre-approved **Utility** template that has an &#x60;ORDER_DETAILS&#x60; button. **India only** (WhatsApp Payments India). Requires: - India WhatsApp Business number - Commerce enabled on the channel (&#x60;GET&#x60;/&#x60;POST /commerce&#x60;) - Approved template with an &#x60;ORDER_DETAILS&#x60; button Use this method when you need structured fields (&#x60;order&#x60;, &#x60;referenceId&#x60;, &#x60;currency&#x60;, &#x60;paymentSettings&#x60;). The API appends a template button &#x60;sub_type: order_details&#x60; and sends via the same path as &#x60;POST /sendTemplate&#x60;. Works **outside the 24-hour session window** (template message). You can also send the same payload yourself with &#x60;POST /sendTemplate&#x60; by including a button component in &#x60;params&#x60;: &#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;order-123\&quot;, \&quot;currency\&quot;: \&quot;INR\&quot;, \&quot;order\&quot;: { \&quot;status\&quot;: \&quot;pending\&quot;, \&quot;items\&quot;: [], \&quot;subtotal\&quot;: { \&quot;offset\&quot;: 100, \&quot;value\&quot;: 50000 } } } } }] } &#x60;&#x60;&#x60;
299
+ # @param token JWT token or API key for authorization
300
+ # @param send_order_details_request
301
+ # @param [Hash] opts the optional parameters
302
+ # @return [MessageSentResponse]
303
+ describe 'send_order_details test' do
304
+ it 'should work' do
305
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
306
+ end
307
+ end
308
+
309
+ # unit tests for send_payment_request
310
+ # Send payment request (regional)
311
+ # Send a regional payment request interactive message (beta scaffold). &#x60;region&#x60; must be IN, SG, or BR. Payload shape follows Meta regional payments docs; verify on stage before production use. Full regional builders are not implemented yet.
312
+ # @param token JWT token or API key for authorization
313
+ # @param send_payment_request_request
314
+ # @param [Hash] opts the optional parameters
315
+ # @return [MessageSentResponse]
316
+ describe 'send_payment_request test' do
317
+ it 'should work' do
318
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
319
+ end
320
+ end
321
+
322
+ # unit tests for send_product
323
+ # Send a Product
324
+ # @param token JWT token or API key for authorization
325
+ # @param [Hash] opts the optional parameters
326
+ # @option opts [Hash<String, Object>] :request_body
327
+ # @return [MessageSentResponse]
328
+ describe 'send_product test' do
329
+ it 'should work' do
330
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
331
+ end
332
+ end
333
+
334
+ # unit tests for send_reaction
335
+ # Send Reaction
336
+ # @param token JWT token or API key for authorization
337
+ # @param [Hash] opts the optional parameters
338
+ # @option opts [SendReactionRequest] :send_reaction_request
339
+ # @return [MessageSentResponse]
340
+ describe 'send_reaction test' do
341
+ it 'should work' do
342
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
343
+ end
344
+ end
345
+
346
+ # unit tests for send_sticker
347
+ # Send sticker message
348
+ # Send a WhatsApp sticker by mediaId or link URL.
349
+ # @param token JWT token or API key for authorization
350
+ # @param send_sticker_request
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [MessageSentResponse]
353
+ describe 'send_sticker test' do
354
+ it 'should work' do
355
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
356
+ end
357
+ end
358
+
359
+ end
@@ -0,0 +1,60 @@
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:** 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/
5
+
6
+ The version of the OpenAPI document: 1.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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OneMsgChatApi::ProfileApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'ProfileApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OneMsgChatApi::ProfileApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ProfileApi' do
30
+ it 'should create an instance of ProfileApi' do
31
+ expect(@api_instance).to be_instance_of(OneMsgChatApi::ProfileApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_me
36
+ # Get Profile Info
37
+ # Get WhatsApp Business Account profile information
38
+ # @param token JWT token or API key for authorization
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [ProfileInfo]
41
+ describe 'get_me test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for update_me
48
+ # Update profile info
49
+ # Update WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded.
50
+ # @param token JWT token or API key for authorization
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [UpdateMeRequest] :update_me_request
53
+ # @return [Hash<String, Object>]
54
+ describe 'update_me test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ end
@@ -0,0 +1,83 @@
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:** 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/
5
+
6
+ The version of the OpenAPI document: 1.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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OneMsgChatApi::TemplatesApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'TemplatesApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OneMsgChatApi::TemplatesApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of TemplatesApi' do
30
+ it 'should create an instance of TemplatesApi' do
31
+ expect(@api_instance).to be_instance_of(OneMsgChatApi::TemplatesApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for add_template
36
+ # Create message template
37
+ # @param token JWT token or API key for authorization
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [AddTemplateRequest] :add_template_request
40
+ # @return [Hash<String, Object>]
41
+ describe 'add_template test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for list_templates
48
+ # Get templates list
49
+ # @param token JWT token or API key for authorization
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [ListTemplates200Response]
52
+ describe 'list_templates test' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ # unit tests for remove_template
59
+ # Remove message template
60
+ # @param token JWT token or API key for authorization
61
+ # @param [Hash] opts the optional parameters
62
+ # @option opts [Hash<String, Object>] :request_body
63
+ # @return [Hash<String, Object>]
64
+ describe 'remove_template test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
70
+ # unit tests for send_template
71
+ # Send Template Message
72
+ # 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;.
73
+ # @param token JWT token or API key for authorization
74
+ # @param [Hash] opts the optional parameters
75
+ # @option opts [SendTemplateRequest] :send_template_request
76
+ # @return [Hash<String, Object>]
77
+ describe 'send_template test' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
80
+ end
81
+ end
82
+
83
+ end
@@ -0,0 +1,71 @@
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:** 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/
5
+
6
+ The version of the OpenAPI document: 1.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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OneMsgChatApi::UsersApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'UsersApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OneMsgChatApi::UsersApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of UsersApi' do
30
+ it 'should create an instance of UsersApi' do
31
+ expect(@api_instance).to be_instance_of(OneMsgChatApi::UsersApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for block_user
36
+ # Block WhatsApp user
37
+ # @param token JWT token or API key for authorization
38
+ # @param block_user_request
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [SuccessResponse]
41
+ describe 'block_user test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for list_blocked_users
48
+ # List blocked WhatsApp users
49
+ # Returns users currently blocked on this WhatsApp channel (WABA &#x60;GET /block_users&#x60;). Same channel token auth as &#x60;blockUser&#x60; / &#x60;unblockUser&#x60;.
50
+ # @param token JWT token or API key for authorization
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [ListBlockedUsers200Response]
53
+ describe 'list_blocked_users test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
56
+ end
57
+ end
58
+
59
+ # unit tests for unblock_user
60
+ # Unblock WhatsApp user
61
+ # @param token JWT token or API key for authorization
62
+ # @param block_user_request
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [SuccessResponse]
65
+ describe 'unblock_user test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
68
+ end
69
+ end
70
+
71
+ end
@@ -0,0 +1,60 @@
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:** 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/
5
+
6
+ The version of the OpenAPI document: 1.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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OneMsgChatApi::WebhooksApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'WebhooksApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OneMsgChatApi::WebhooksApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of WebhooksApi' do
30
+ it 'should create an instance of WebhooksApi' do
31
+ expect(@api_instance).to be_instance_of(OneMsgChatApi::WebhooksApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for get_webhook
36
+ # Get webhook URL
37
+ # Returns the configured client webhook URL for this channel.
38
+ # @param token JWT token or API key for authorization
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [GetWebhook200Response]
41
+ describe 'get_webhook test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
44
+ end
45
+ end
46
+
47
+ # unit tests for set_webhook
48
+ # Set webhook URL
49
+ # Configure the client webhook URL for inbound events.
50
+ # @param token JWT token or API key for authorization
51
+ # @param [Hash] opts the optional parameters
52
+ # @option opts [GetWebhook200Response] :get_webhook200_response
53
+ # @return [Hash<String, Object>]
54
+ describe 'set_webhook test' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ end