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,301 @@
1
+ # OneMsgChatApi::TemplatesApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**add_template**](TemplatesApi.md#add_template) | **POST** /addTemplate | Create message template |
8
+ | [**list_templates**](TemplatesApi.md#list_templates) | **GET** /templates | Get templates list |
9
+ | [**remove_template**](TemplatesApi.md#remove_template) | **POST** /removeTemplate | Remove message template |
10
+ | [**send_template**](TemplatesApi.md#send_template) | **POST** /sendTemplate | Send Template Message |
11
+
12
+
13
+ ## add_template
14
+
15
+ > Hash<String, Object> add_template(token, opts)
16
+
17
+ Create message template
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::TemplatesApi.new
33
+ token = 'token_example' # String | JWT token or API key for authorization
34
+ opts = {
35
+ add_template_request: OneMsgChatApi::AddTemplateRequest.new # AddTemplateRequest |
36
+ }
37
+
38
+ begin
39
+ # Create message template
40
+ result = api_instance.add_template(token, opts)
41
+ p result
42
+ rescue OneMsgChatApi::ApiError => e
43
+ puts "Error when calling TemplatesApi->add_template: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the add_template_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> add_template_with_http_info(token, opts)
52
+
53
+ ```ruby
54
+ begin
55
+ # Create message template
56
+ data, status_code, headers = api_instance.add_template_with_http_info(token, opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => Hash&lt;String, Object&gt;
60
+ rescue OneMsgChatApi::ApiError => e
61
+ puts "Error when calling TemplatesApi->add_template_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **token** | **String** | JWT token or API key for authorization | |
70
+ | **add_template_request** | [**AddTemplateRequest**](AddTemplateRequest.md) | | [optional] |
71
+
72
+ ### Return type
73
+
74
+ **Hash&lt;String, Object&gt;**
75
+
76
+ ### Authorization
77
+
78
+ [tokenAuth](../README.md#tokenAuth)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: application/json
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## list_templates
87
+
88
+ > <ListTemplates200Response> list_templates(token)
89
+
90
+ Get templates list
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::TemplatesApi.new
106
+ token = 'token_example' # String | JWT token or API key for authorization
107
+
108
+ begin
109
+ # Get templates list
110
+ result = api_instance.list_templates(token)
111
+ p result
112
+ rescue OneMsgChatApi::ApiError => e
113
+ puts "Error when calling TemplatesApi->list_templates: #{e}"
114
+ end
115
+ ```
116
+
117
+ #### Using the list_templates_with_http_info variant
118
+
119
+ This returns an Array which contains the response data, status code and headers.
120
+
121
+ > <Array(<ListTemplates200Response>, Integer, Hash)> list_templates_with_http_info(token)
122
+
123
+ ```ruby
124
+ begin
125
+ # Get templates list
126
+ data, status_code, headers = api_instance.list_templates_with_http_info(token)
127
+ p status_code # => 2xx
128
+ p headers # => { ... }
129
+ p data # => <ListTemplates200Response>
130
+ rescue OneMsgChatApi::ApiError => e
131
+ puts "Error when calling TemplatesApi->list_templates_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
+ [**ListTemplates200Response**](ListTemplates200Response.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
+
154
+
155
+ ## remove_template
156
+
157
+ > Hash&lt;String, Object&gt; remove_template(token, opts)
158
+
159
+ Remove message template
160
+
161
+ ### Examples
162
+
163
+ ```ruby
164
+ require 'time'
165
+ require 'one_msg_chat_api'
166
+ # setup authorization
167
+ OneMsgChatApi.configure do |config|
168
+ # Configure API key authorization: tokenAuth
169
+ config.api_key['token'] = 'YOUR API KEY'
170
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
171
+ # config.api_key_prefix['token'] = 'Bearer'
172
+ end
173
+
174
+ api_instance = OneMsgChatApi::TemplatesApi.new
175
+ token = 'token_example' # String | JWT token or API key for authorization
176
+ opts = {
177
+ request_body: { key: 3.56} # Hash<String, Object> |
178
+ }
179
+
180
+ begin
181
+ # Remove message template
182
+ result = api_instance.remove_template(token, opts)
183
+ p result
184
+ rescue OneMsgChatApi::ApiError => e
185
+ puts "Error when calling TemplatesApi->remove_template: #{e}"
186
+ end
187
+ ```
188
+
189
+ #### Using the remove_template_with_http_info variant
190
+
191
+ This returns an Array which contains the response data, status code and headers.
192
+
193
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> remove_template_with_http_info(token, opts)
194
+
195
+ ```ruby
196
+ begin
197
+ # Remove message template
198
+ data, status_code, headers = api_instance.remove_template_with_http_info(token, opts)
199
+ p status_code # => 2xx
200
+ p headers # => { ... }
201
+ p data # => Hash&lt;String, Object&gt;
202
+ rescue OneMsgChatApi::ApiError => e
203
+ puts "Error when calling TemplatesApi->remove_template_with_http_info: #{e}"
204
+ end
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+ | Name | Type | Description | Notes |
210
+ | ---- | ---- | ----------- | ----- |
211
+ | **token** | **String** | JWT token or API key for authorization | |
212
+ | **request_body** | [**Hash&lt;String, Object&gt;**](Object.md) | | [optional] |
213
+
214
+ ### Return type
215
+
216
+ **Hash&lt;String, Object&gt;**
217
+
218
+ ### Authorization
219
+
220
+ [tokenAuth](../README.md#tokenAuth)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: application/json
225
+ - **Accept**: application/json
226
+
227
+
228
+ ## send_template
229
+
230
+ > Hash&lt;String, Object&gt; send_template(token, opts)
231
+
232
+ Send Template Message
233
+
234
+ Send a WhatsApp template message (works outside the 24-hour session window). Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). For India order/invoice payments outside 24h, include a button component: ```json { \"type\": \"button\", \"sub_type\": \"order_details\", \"index\": 0, \"parameters\": [{ \"type\": \"action\", \"action\": { \"order_details\": { \"reference_id\": \"...\", \"currency\": \"INR\", \"order\": {} } } }] } ``` Convenience wrapper with structured fields: `POST /sendOrderDetails`.
235
+
236
+ ### Examples
237
+
238
+ ```ruby
239
+ require 'time'
240
+ require 'one_msg_chat_api'
241
+ # setup authorization
242
+ OneMsgChatApi.configure do |config|
243
+ # Configure API key authorization: tokenAuth
244
+ config.api_key['token'] = 'YOUR API KEY'
245
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
246
+ # config.api_key_prefix['token'] = 'Bearer'
247
+ end
248
+
249
+ api_instance = OneMsgChatApi::TemplatesApi.new
250
+ token = 'token_example' # String | JWT token or API key for authorization
251
+ opts = {
252
+ send_template_request: OneMsgChatApi::SendTemplateRequest.new # SendTemplateRequest |
253
+ }
254
+
255
+ begin
256
+ # Send Template Message
257
+ result = api_instance.send_template(token, opts)
258
+ p result
259
+ rescue OneMsgChatApi::ApiError => e
260
+ puts "Error when calling TemplatesApi->send_template: #{e}"
261
+ end
262
+ ```
263
+
264
+ #### Using the send_template_with_http_info variant
265
+
266
+ This returns an Array which contains the response data, status code and headers.
267
+
268
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> send_template_with_http_info(token, opts)
269
+
270
+ ```ruby
271
+ begin
272
+ # Send Template Message
273
+ data, status_code, headers = api_instance.send_template_with_http_info(token, opts)
274
+ p status_code # => 2xx
275
+ p headers # => { ... }
276
+ p data # => Hash&lt;String, Object&gt;
277
+ rescue OneMsgChatApi::ApiError => e
278
+ puts "Error when calling TemplatesApi->send_template_with_http_info: #{e}"
279
+ end
280
+ ```
281
+
282
+ ### Parameters
283
+
284
+ | Name | Type | Description | Notes |
285
+ | ---- | ---- | ----------- | ----- |
286
+ | **token** | **String** | JWT token or API key for authorization | |
287
+ | **send_template_request** | [**SendTemplateRequest**](SendTemplateRequest.md) | | [optional] |
288
+
289
+ ### Return type
290
+
291
+ **Hash&lt;String, Object&gt;**
292
+
293
+ ### Authorization
294
+
295
+ [tokenAuth](../README.md#tokenAuth)
296
+
297
+ ### HTTP request headers
298
+
299
+ - **Content-Type**: application/json
300
+ - **Accept**: application/json
301
+
@@ -0,0 +1,30 @@
1
+ # OneMsgChatApi::UpdateMeRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **about** | **String** | Profile About section | [optional] |
8
+ | **address** | **String** | | [optional] |
9
+ | **description** | **String** | Business description (max 256 characters) | [optional] |
10
+ | **email** | **String** | | [optional] |
11
+ | **vertical** | **String** | Industry of the business | [optional] |
12
+ | **photo** | **String** | HTTPS URL or data:image/...;base64,... payload | [optional] |
13
+ | **websites** | **Array&lt;String&gt;** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'one_msg_chat_api'
19
+
20
+ instance = OneMsgChatApi::UpdateMeRequest.new(
21
+ about: null,
22
+ address: null,
23
+ description: null,
24
+ email: null,
25
+ vertical: null,
26
+ photo: null,
27
+ websites: null
28
+ )
29
+ ```
30
+
data/docs/UsersApi.md ADDED
@@ -0,0 +1,223 @@
1
+ # OneMsgChatApi::UsersApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**block_user**](UsersApi.md#block_user) | **POST** /blockUser | Block WhatsApp user |
8
+ | [**list_blocked_users**](UsersApi.md#list_blocked_users) | **GET** /blockedUsers | List blocked WhatsApp users |
9
+ | [**unblock_user**](UsersApi.md#unblock_user) | **POST** /unblockUser | Unblock WhatsApp user |
10
+
11
+
12
+ ## block_user
13
+
14
+ > <SuccessResponse> block_user(token, block_user_request)
15
+
16
+ Block WhatsApp user
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'one_msg_chat_api'
23
+ # setup authorization
24
+ OneMsgChatApi.configure do |config|
25
+ # Configure API key authorization: tokenAuth
26
+ config.api_key['token'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['token'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = OneMsgChatApi::UsersApi.new
32
+ token = 'token_example' # String | JWT token or API key for authorization
33
+ block_user_request = OneMsgChatApi::BlockUserRequest.new({phone: 37}) # BlockUserRequest |
34
+
35
+ begin
36
+ # Block WhatsApp user
37
+ result = api_instance.block_user(token, block_user_request)
38
+ p result
39
+ rescue OneMsgChatApi::ApiError => e
40
+ puts "Error when calling UsersApi->block_user: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the block_user_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<SuccessResponse>, Integer, Hash)> block_user_with_http_info(token, block_user_request)
49
+
50
+ ```ruby
51
+ begin
52
+ # Block WhatsApp user
53
+ data, status_code, headers = api_instance.block_user_with_http_info(token, block_user_request)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <SuccessResponse>
57
+ rescue OneMsgChatApi::ApiError => e
58
+ puts "Error when calling UsersApi->block_user_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **token** | **String** | JWT token or API key for authorization | |
67
+ | **block_user_request** | [**BlockUserRequest**](BlockUserRequest.md) | | |
68
+
69
+ ### Return type
70
+
71
+ [**SuccessResponse**](SuccessResponse.md)
72
+
73
+ ### Authorization
74
+
75
+ [tokenAuth](../README.md#tokenAuth)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: application/json
80
+ - **Accept**: application/json
81
+
82
+
83
+ ## list_blocked_users
84
+
85
+ > <ListBlockedUsers200Response> list_blocked_users(token)
86
+
87
+ List blocked WhatsApp users
88
+
89
+ Returns users currently blocked on this WhatsApp channel (WABA `GET /block_users`). Same channel token auth as `blockUser` / `unblockUser`.
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::UsersApi.new
105
+ token = 'token_example' # String | JWT token or API key for authorization
106
+
107
+ begin
108
+ # List blocked WhatsApp users
109
+ result = api_instance.list_blocked_users(token)
110
+ p result
111
+ rescue OneMsgChatApi::ApiError => e
112
+ puts "Error when calling UsersApi->list_blocked_users: #{e}"
113
+ end
114
+ ```
115
+
116
+ #### Using the list_blocked_users_with_http_info variant
117
+
118
+ This returns an Array which contains the response data, status code and headers.
119
+
120
+ > <Array(<ListBlockedUsers200Response>, Integer, Hash)> list_blocked_users_with_http_info(token)
121
+
122
+ ```ruby
123
+ begin
124
+ # List blocked WhatsApp users
125
+ data, status_code, headers = api_instance.list_blocked_users_with_http_info(token)
126
+ p status_code # => 2xx
127
+ p headers # => { ... }
128
+ p data # => <ListBlockedUsers200Response>
129
+ rescue OneMsgChatApi::ApiError => e
130
+ puts "Error when calling UsersApi->list_blocked_users_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
+ [**ListBlockedUsers200Response**](ListBlockedUsers200Response.md)
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
+ ## unblock_user
155
+
156
+ > <SuccessResponse> unblock_user(token, block_user_request)
157
+
158
+ Unblock WhatsApp user
159
+
160
+ ### Examples
161
+
162
+ ```ruby
163
+ require 'time'
164
+ require 'one_msg_chat_api'
165
+ # setup authorization
166
+ OneMsgChatApi.configure do |config|
167
+ # Configure API key authorization: tokenAuth
168
+ config.api_key['token'] = 'YOUR API KEY'
169
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
170
+ # config.api_key_prefix['token'] = 'Bearer'
171
+ end
172
+
173
+ api_instance = OneMsgChatApi::UsersApi.new
174
+ token = 'token_example' # String | JWT token or API key for authorization
175
+ block_user_request = OneMsgChatApi::BlockUserRequest.new({phone: 37}) # BlockUserRequest |
176
+
177
+ begin
178
+ # Unblock WhatsApp user
179
+ result = api_instance.unblock_user(token, block_user_request)
180
+ p result
181
+ rescue OneMsgChatApi::ApiError => e
182
+ puts "Error when calling UsersApi->unblock_user: #{e}"
183
+ end
184
+ ```
185
+
186
+ #### Using the unblock_user_with_http_info variant
187
+
188
+ This returns an Array which contains the response data, status code and headers.
189
+
190
+ > <Array(<SuccessResponse>, Integer, Hash)> unblock_user_with_http_info(token, block_user_request)
191
+
192
+ ```ruby
193
+ begin
194
+ # Unblock WhatsApp user
195
+ data, status_code, headers = api_instance.unblock_user_with_http_info(token, block_user_request)
196
+ p status_code # => 2xx
197
+ p headers # => { ... }
198
+ p data # => <SuccessResponse>
199
+ rescue OneMsgChatApi::ApiError => e
200
+ puts "Error when calling UsersApi->unblock_user_with_http_info: #{e}"
201
+ end
202
+ ```
203
+
204
+ ### Parameters
205
+
206
+ | Name | Type | Description | Notes |
207
+ | ---- | ---- | ----------- | ----- |
208
+ | **token** | **String** | JWT token or API key for authorization | |
209
+ | **block_user_request** | [**BlockUserRequest**](BlockUserRequest.md) | | |
210
+
211
+ ### Return type
212
+
213
+ [**SuccessResponse**](SuccessResponse.md)
214
+
215
+ ### Authorization
216
+
217
+ [tokenAuth](../README.md#tokenAuth)
218
+
219
+ ### HTTP request headers
220
+
221
+ - **Content-Type**: application/json
222
+ - **Accept**: application/json
223
+
@@ -0,0 +1,155 @@
1
+ # OneMsgChatApi::WebhooksApi
2
+
3
+ All URIs are relative to *https://api.1msg.io*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_webhook**](WebhooksApi.md#get_webhook) | **GET** /webhook | Get webhook URL |
8
+ | [**set_webhook**](WebhooksApi.md#set_webhook) | **POST** /webhook | Set webhook URL |
9
+
10
+
11
+ ## get_webhook
12
+
13
+ > <GetWebhook200Response> get_webhook(token)
14
+
15
+ Get webhook URL
16
+
17
+ Returns the configured client webhook URL for this channel.
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::WebhooksApi.new
33
+ token = 'token_example' # String | JWT token or API key for authorization
34
+
35
+ begin
36
+ # Get webhook URL
37
+ result = api_instance.get_webhook(token)
38
+ p result
39
+ rescue OneMsgChatApi::ApiError => e
40
+ puts "Error when calling WebhooksApi->get_webhook: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the get_webhook_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<GetWebhook200Response>, Integer, Hash)> get_webhook_with_http_info(token)
49
+
50
+ ```ruby
51
+ begin
52
+ # Get webhook URL
53
+ data, status_code, headers = api_instance.get_webhook_with_http_info(token)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <GetWebhook200Response>
57
+ rescue OneMsgChatApi::ApiError => e
58
+ puts "Error when calling WebhooksApi->get_webhook_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **token** | **String** | JWT token or API key for authorization | |
67
+
68
+ ### Return type
69
+
70
+ [**GetWebhook200Response**](GetWebhook200Response.md)
71
+
72
+ ### Authorization
73
+
74
+ [tokenAuth](../README.md#tokenAuth)
75
+
76
+ ### HTTP request headers
77
+
78
+ - **Content-Type**: Not defined
79
+ - **Accept**: application/json
80
+
81
+
82
+ ## set_webhook
83
+
84
+ > Hash&lt;String, Object&gt; set_webhook(token, opts)
85
+
86
+ Set webhook URL
87
+
88
+ Configure the client webhook URL for inbound events.
89
+
90
+ ### Examples
91
+
92
+ ```ruby
93
+ require 'time'
94
+ require 'one_msg_chat_api'
95
+ # setup authorization
96
+ OneMsgChatApi.configure do |config|
97
+ # Configure API key authorization: tokenAuth
98
+ config.api_key['token'] = 'YOUR API KEY'
99
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
100
+ # config.api_key_prefix['token'] = 'Bearer'
101
+ end
102
+
103
+ api_instance = OneMsgChatApi::WebhooksApi.new
104
+ token = 'token_example' # String | JWT token or API key for authorization
105
+ opts = {
106
+ get_webhook200_response: OneMsgChatApi::GetWebhook200Response.new # GetWebhook200Response |
107
+ }
108
+
109
+ begin
110
+ # Set webhook URL
111
+ result = api_instance.set_webhook(token, opts)
112
+ p result
113
+ rescue OneMsgChatApi::ApiError => e
114
+ puts "Error when calling WebhooksApi->set_webhook: #{e}"
115
+ end
116
+ ```
117
+
118
+ #### Using the set_webhook_with_http_info variant
119
+
120
+ This returns an Array which contains the response data, status code and headers.
121
+
122
+ > <Array(Hash&lt;String, Object&gt;, Integer, Hash)> set_webhook_with_http_info(token, opts)
123
+
124
+ ```ruby
125
+ begin
126
+ # Set webhook URL
127
+ data, status_code, headers = api_instance.set_webhook_with_http_info(token, opts)
128
+ p status_code # => 2xx
129
+ p headers # => { ... }
130
+ p data # => Hash&lt;String, Object&gt;
131
+ rescue OneMsgChatApi::ApiError => e
132
+ puts "Error when calling WebhooksApi->set_webhook_with_http_info: #{e}"
133
+ end
134
+ ```
135
+
136
+ ### Parameters
137
+
138
+ | Name | Type | Description | Notes |
139
+ | ---- | ---- | ----------- | ----- |
140
+ | **token** | **String** | JWT token or API key for authorization | |
141
+ | **get_webhook200_response** | [**GetWebhook200Response**](GetWebhook200Response.md) | | [optional] |
142
+
143
+ ### Return type
144
+
145
+ **Hash&lt;String, Object&gt;**
146
+
147
+ ### Authorization
148
+
149
+ [tokenAuth](../README.md#tokenAuth)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: application/json
154
+ - **Accept**: application/json
155
+