one_msg_sdk 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AGENTS.md +65 -19
- data/README.md +102 -34
- data/docs/AddTemplate200Response.md +18 -0
- data/docs/AddTemplateRequest.md +7 -7
- data/docs/CallingApi.md +27 -31
- data/docs/CallingSettings.md +18 -0
- data/docs/CallingSettingsCalling.md +38 -0
- data/docs/CallingSettingsCallingAudio.md +18 -0
- data/docs/CallingSettingsCallingCallHours.md +22 -0
- data/docs/CallingSettingsCallingSip.md +20 -0
- data/docs/CallingSettingsCallingSipServersInner.md +28 -0
- data/docs/CallingSettingsCallingVideo.md +18 -0
- data/docs/CatalogApi.md +1 -1
- data/docs/ChannelApi.md +151 -5
- data/docs/CreateFlowsRequest.md +26 -0
- data/docs/CreateGroupsGroupIdRequest.md +22 -0
- data/docs/CreateGroupsRequest.md +20 -0
- data/docs/CreateSettingsRequest.md +28 -0
- data/docs/CreateSettingsRequestWebhookUrl.md +49 -0
- data/docs/CreateUploadMedia200Response.md +18 -0
- data/docs/CreateUploadMediaRequest.md +20 -0
- data/docs/FlowsApi.md +32 -16
- data/docs/GetStatus200Response.md +26 -0
- data/docs/GetWebhook200Response.md +24 -2
- data/docs/GetWebhook200ResponseWebhookUrl.md +49 -0
- data/docs/GroupsApi.md +38 -18
- data/docs/InitiateCallRequest.md +28 -0
- data/docs/InitiateCallRequestSession.md +20 -0
- data/docs/InitiateCallResponse.md +26 -0
- data/docs/InitiateCallResponseCallsInner.md +18 -0
- data/docs/InitiateCallResponseResponse.md +18 -0
- data/docs/ListSettings200Response.md +52 -0
- data/docs/ListSettings200ResponseWebhookUrl.md +49 -0
- data/docs/MessagingApi.md +140 -35
- data/docs/PatchFlowsFlowIdAssetsRequest.md +18 -0
- data/docs/PatchFlowsFlowIdMetadataRequest.md +22 -0
- data/docs/ProfileApi.md +9 -11
- data/docs/RemoveTemplateRequest.md +18 -0
- data/docs/SendButtonRequest.md +9 -1
- data/docs/SendCarouselRequest1.md +4 -2
- data/docs/SendContactInfoRequest.md +26 -0
- data/docs/SendContactRequest.md +7 -1
- data/docs/SendContactRequestContact.md +26 -0
- data/docs/SendContactRequestContactName.md +49 -0
- data/docs/SendContactRequestContactsInner.md +3 -3
- data/docs/SendContactRequestContactsInnerPhonesInner.md +1 -1
- data/docs/SendListRequest.md +5 -1
- data/docs/SendLocationRequestRequest.md +5 -1
- data/docs/SendMessageRequest.md +6 -2
- data/docs/SendMessageRequestDirectSend.md +20 -0
- data/docs/SendProductRequest.md +30 -0
- data/docs/SendReactionRequest.md +3 -1
- data/docs/SendTemplateRequest.md +9 -5
- data/docs/SendTemplateRequestLanguage.md +3 -3
- data/docs/SetWebhook200Response.md +20 -0
- data/docs/SetWebhook200ResponseWebhookUrl.md +49 -0
- data/docs/SetWebhookRequest.md +18 -0
- data/docs/SetWebhookRequestWebhookUrl.md +49 -0
- data/docs/TemplatesApi.md +29 -17
- data/docs/UpdateCallingSettings200Response.md +22 -0
- data/docs/UpdateCallingSettings200ResponseResponse.md +18 -0
- data/docs/UpdateMe200Response.md +18 -0
- data/docs/UpdateMeRequest.md +6 -6
- data/docs/WebhookUrlStatus.md +34 -0
- data/docs/WebhooksApi.md +10 -12
- data/lib/one_msg_sdk/api/calling_api.rb +39 -31
- data/lib/one_msg_sdk/api/catalog_api.rb +4 -4
- data/lib/one_msg_sdk/api/channel_api.rb +146 -7
- data/lib/one_msg_sdk/api/flows_api.rb +58 -14
- data/lib/one_msg_sdk/api/groups_api.rb +48 -10
- data/lib/one_msg_sdk/api/messaging_api.rb +163 -38
- data/lib/one_msg_sdk/api/profile_api.rb +17 -13
- data/lib/one_msg_sdk/api/templates_api.rb +36 -13
- data/lib/one_msg_sdk/api/users_api.rb +2 -2
- data/lib/one_msg_sdk/api/webhooks_api.rb +19 -15
- data/lib/one_msg_sdk/api_client.rb +2 -2
- data/lib/one_msg_sdk/api_error.rb +2 -2
- data/lib/one_msg_sdk/api_model_base.rb +2 -2
- data/lib/one_msg_sdk/configuration.rb +2 -2
- data/lib/one_msg_sdk/models/add_template200_response.rb +150 -0
- data/lib/one_msg_sdk/models/add_template_request.rb +6 -2
- data/lib/one_msg_sdk/models/block_user_request.rb +2 -2
- data/lib/one_msg_sdk/models/calling_settings.rb +148 -0
- data/lib/one_msg_sdk/models/calling_settings_calling.rb +321 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_audio.rb +148 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_call_hours.rb +166 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_sip.rb +193 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_sip_servers_inner.rb +196 -0
- data/lib/one_msg_sdk/models/calling_settings_calling_video.rb +182 -0
- data/lib/one_msg_sdk/models/conversational_automation.rb +2 -2
- data/lib/one_msg_sdk/models/conversational_automation_commands_inner.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce_request.rb +2 -2
- data/lib/one_msg_sdk/models/create_commerce_request_params.rb +2 -2
- data/lib/one_msg_sdk/models/create_flows_request.rb +238 -0
- data/lib/one_msg_sdk/models/create_groups200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_groups_group_id_request.rb +168 -0
- data/lib/one_msg_sdk/models/create_groups_request.rb +175 -0
- data/lib/one_msg_sdk/models/create_read_message200_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_read_message401_response.rb +2 -2
- data/lib/one_msg_sdk/models/create_read_message_request.rb +2 -2
- data/lib/one_msg_sdk/models/create_settings_request.rb +192 -0
- data/lib/one_msg_sdk/models/create_settings_request_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/create_upload_media200_response.rb +147 -0
- data/lib/one_msg_sdk/models/create_upload_media_request.rb +158 -0
- data/lib/one_msg_sdk/models/delete_flows_flow_id200_response.rb +2 -2
- data/lib/one_msg_sdk/models/delete_groups_group_id200_response.rb +2 -2
- data/lib/one_msg_sdk/models/delete_media_legacy_request.rb +2 -2
- data/lib/one_msg_sdk/models/error_response.rb +2 -2
- data/lib/one_msg_sdk/models/get_commerce200_response_inner.rb +2 -2
- data/lib/one_msg_sdk/models/get_mm_lite_status200_response.rb +2 -2
- data/lib/one_msg_sdk/models/get_status200_response.rb +185 -0
- data/lib/one_msg_sdk/models/get_webhook200_response.rb +155 -6
- data/lib/one_msg_sdk/models/get_webhook200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/get_whatsapp_business_encryption200_response.rb +2 -2
- data/lib/one_msg_sdk/models/initiate_call_request.rb +277 -0
- data/lib/one_msg_sdk/models/initiate_call_request_session.rb +217 -0
- data/lib/one_msg_sdk/models/initiate_call_response.rb +188 -0
- data/lib/one_msg_sdk/models/initiate_call_response_calls_inner.rb +147 -0
- data/lib/one_msg_sdk/models/initiate_call_response_response.rb +148 -0
- data/lib/one_msg_sdk/models/list_blocked_users200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_flows200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_messages200_response.rb +2 -2
- data/lib/one_msg_sdk/models/list_settings200_response.rb +352 -0
- data/lib/one_msg_sdk/models/list_settings200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/list_templates200_response.rb +2 -2
- data/lib/one_msg_sdk/models/message_sent_response.rb +2 -2
- data/lib/one_msg_sdk/models/patch_flows_flow_id_assets200_response.rb +2 -2
- data/lib/one_msg_sdk/models/patch_flows_flow_id_assets_request.rb +167 -0
- data/lib/one_msg_sdk/models/patch_flows_flow_id_metadata_request.rb +190 -0
- data/lib/one_msg_sdk/models/profile_info.rb +2 -2
- data/lib/one_msg_sdk/models/remove_template_request.rb +165 -0
- data/lib/one_msg_sdk/models/retrieve_media200_response.rb +2 -2
- data/lib/one_msg_sdk/models/send_address_message_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_button_request.rb +48 -3
- data/lib/one_msg_sdk/models/send_button_request_sections_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_button_request_sections_inner_reply.rb +2 -2
- data/lib/one_msg_sdk/models/send_carousel_request1.rb +38 -13
- data/lib/one_msg_sdk/models/send_contact_info_request.rb +222 -0
- data/lib/one_msg_sdk/models/send_contact_request.rb +32 -3
- data/lib/one_msg_sdk/models/send_contact_request_contact.rb +221 -0
- data/lib/one_msg_sdk/models/send_contact_request_contact_name.rb +105 -0
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner.rb +5 -5
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_name.rb +2 -2
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_org.rb +2 -2
- data/lib/one_msg_sdk/models/send_contact_request_contacts_inner_phones_inner.rb +3 -2
- data/lib/one_msg_sdk/models/send_cta_url_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_file_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request1.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request1_header.rb +2 -2
- data/lib/one_msg_sdk/models/send_flow_request_header.rb +2 -2
- data/lib/one_msg_sdk/models/send_list_request.rb +23 -3
- data/lib/one_msg_sdk/models/send_list_request_sections_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_list_request_sections_inner_rows_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_location_request1.rb +2 -2
- data/lib/one_msg_sdk/models/send_location_request_request.rb +23 -3
- data/lib/one_msg_sdk/models/send_message_request.rb +60 -28
- data/lib/one_msg_sdk/models/send_message_request_direct_send.rb +189 -0
- data/lib/one_msg_sdk/models/send_order_details_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_language.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner.rb +2 -2
- data/lib/one_msg_sdk/models/send_order_details_request_order_items_inner_amount.rb +2 -2
- data/lib/one_msg_sdk/models/send_payment_request_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_product_request.rb +225 -0
- data/lib/one_msg_sdk/models/send_reaction_request.rb +14 -3
- data/lib/one_msg_sdk/models/send_sticker_request.rb +2 -2
- data/lib/one_msg_sdk/models/send_template_request.rb +29 -5
- data/lib/one_msg_sdk/models/send_template_request_language.rb +6 -2
- data/lib/one_msg_sdk/models/set_webhook200_response.rb +157 -0
- data/lib/one_msg_sdk/models/set_webhook200_response_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/set_webhook_request.rb +164 -0
- data/lib/one_msg_sdk/models/set_webhook_request_webhook_url.rb +105 -0
- data/lib/one_msg_sdk/models/set_whatsapp_business_encryption_request.rb +2 -2
- data/lib/one_msg_sdk/models/success_response.rb +2 -2
- data/lib/one_msg_sdk/models/update_calling_settings200_response.rb +165 -0
- data/lib/one_msg_sdk/models/update_calling_settings200_response_response.rb +147 -0
- data/lib/one_msg_sdk/models/update_me200_response.rb +147 -0
- data/lib/one_msg_sdk/models/update_me_request.rb +6 -3
- data/lib/one_msg_sdk/models/webhook_url_status.rb +287 -0
- data/lib/one_msg_sdk/platform_client.rb +182 -0
- data/lib/one_msg_sdk/version.rb +3 -3
- data/lib/one_msg_sdk.rb +44 -2
- data/one_msg_sdk.gemspec +2 -2
- data/spec/api/calling_api_spec.rb +11 -11
- data/spec/api/catalog_api_spec.rb +3 -3
- data/spec/api/channel_api_spec.rb +29 -4
- data/spec/api/flows_api_spec.rb +10 -2
- data/spec/api/groups_api_spec.rb +10 -2
- data/spec/api/messaging_api_spec.rb +37 -9
- data/spec/api/profile_api_spec.rb +5 -5
- data/spec/api/templates_api_spec.rb +11 -5
- data/spec/api/users_api_spec.rb +2 -2
- data/spec/api/webhooks_api_spec.rb +6 -6
- data/spec/models/add_template200_response_spec.rb +36 -0
- data/spec/models/add_template_request_spec.rb +2 -2
- data/spec/models/block_user_request_spec.rb +2 -2
- data/spec/models/calling_settings_calling_audio_spec.rb +36 -0
- data/spec/models/calling_settings_calling_call_hours_spec.rb +48 -0
- data/spec/models/calling_settings_calling_sip_servers_inner_spec.rb +66 -0
- data/spec/models/calling_settings_calling_sip_spec.rb +46 -0
- data/spec/models/calling_settings_calling_spec.rb +112 -0
- data/spec/models/calling_settings_calling_video_spec.rb +40 -0
- data/spec/models/calling_settings_spec.rb +36 -0
- data/spec/models/conversational_automation_commands_inner_spec.rb +2 -2
- data/spec/models/conversational_automation_spec.rb +2 -2
- data/spec/models/create_commerce200_response_spec.rb +2 -2
- data/spec/models/create_commerce_request_params_spec.rb +2 -2
- data/spec/models/create_commerce_request_spec.rb +2 -2
- data/spec/models/create_flows_request_spec.rb +64 -0
- data/spec/models/create_groups200_response_spec.rb +2 -2
- data/spec/models/create_groups_group_id_request_spec.rb +48 -0
- data/spec/models/create_groups_request_spec.rb +42 -0
- data/spec/models/create_read_message200_response_spec.rb +2 -2
- data/spec/models/create_read_message401_response_spec.rb +2 -2
- data/spec/models/create_read_message_request_spec.rb +2 -2
- data/spec/models/create_settings_request_spec.rb +66 -0
- data/spec/models/create_settings_request_webhook_url_spec.rb +32 -0
- data/spec/models/create_upload_media200_response_spec.rb +36 -0
- data/spec/models/create_upload_media_request_spec.rb +42 -0
- data/spec/models/delete_flows_flow_id200_response_spec.rb +2 -2
- data/spec/models/delete_groups_group_id200_response_spec.rb +2 -2
- data/spec/models/delete_media_legacy_request_spec.rb +2 -2
- data/spec/models/error_response_spec.rb +2 -2
- data/spec/models/get_commerce200_response_inner_spec.rb +2 -2
- data/spec/models/get_mm_lite_status200_response_spec.rb +2 -2
- data/spec/models/get_status200_response_spec.rb +60 -0
- data/spec/models/get_webhook200_response_spec.rb +72 -2
- data/spec/models/get_webhook200_response_webhook_url_spec.rb +32 -0
- data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +2 -2
- data/spec/models/initiate_call_request_session_spec.rb +46 -0
- data/spec/models/initiate_call_request_spec.rb +74 -0
- data/spec/models/initiate_call_response_calls_inner_spec.rb +36 -0
- data/spec/models/initiate_call_response_response_spec.rb +36 -0
- data/spec/models/initiate_call_response_spec.rb +60 -0
- data/spec/models/list_blocked_users200_response_spec.rb +2 -2
- data/spec/models/list_flows200_response_spec.rb +2 -2
- data/spec/models/list_messages200_response_spec.rb +2 -2
- data/spec/models/list_settings200_response_spec.rb +142 -0
- data/spec/models/list_settings200_response_webhook_url_spec.rb +32 -0
- data/spec/models/list_templates200_response_spec.rb +2 -2
- data/spec/models/message_sent_response_spec.rb +2 -2
- data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +2 -2
- data/spec/models/patch_flows_flow_id_assets_request_spec.rb +36 -0
- data/spec/models/patch_flows_flow_id_metadata_request_spec.rb +52 -0
- data/spec/models/profile_info_spec.rb +2 -2
- data/spec/models/remove_template_request_spec.rb +36 -0
- data/spec/models/retrieve_media200_response_spec.rb +2 -2
- data/spec/models/send_address_message_request_spec.rb +2 -2
- data/spec/models/send_button_request_sections_inner_reply_spec.rb +2 -2
- data/spec/models/send_button_request_sections_inner_spec.rb +2 -2
- data/spec/models/send_button_request_spec.rb +26 -2
- data/spec/models/send_carousel_request1_spec.rb +8 -2
- data/spec/models/send_contact_info_request_spec.rb +60 -0
- data/spec/models/send_contact_request_contact_name_spec.rb +32 -0
- data/spec/models/send_contact_request_contact_spec.rb +60 -0
- data/spec/models/send_contact_request_contacts_inner_name_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_org_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +2 -2
- data/spec/models/send_contact_request_contacts_inner_spec.rb +2 -2
- data/spec/models/send_contact_request_spec.rb +20 -2
- data/spec/models/send_cta_url_request_spec.rb +2 -2
- data/spec/models/send_file_request_spec.rb +2 -2
- data/spec/models/send_flow_request1_header_spec.rb +2 -2
- data/spec/models/send_flow_request1_spec.rb +2 -2
- data/spec/models/send_flow_request_header_spec.rb +2 -2
- data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +2 -2
- data/spec/models/send_list_request_sections_inner_spec.rb +2 -2
- data/spec/models/send_list_request_spec.rb +14 -2
- data/spec/models/send_location_request1_spec.rb +2 -2
- data/spec/models/send_location_request_request_spec.rb +14 -2
- data/spec/models/send_message_request_direct_send_spec.rb +42 -0
- data/spec/models/send_message_request_spec.rb +18 -2
- data/spec/models/send_order_details_request_language_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_items_inner_spec.rb +2 -2
- data/spec/models/send_order_details_request_order_spec.rb +2 -2
- data/spec/models/send_order_details_request_spec.rb +2 -2
- data/spec/models/send_payment_request_request_spec.rb +2 -2
- data/spec/models/send_product_request_spec.rb +72 -0
- data/spec/models/send_reaction_request_spec.rb +8 -2
- data/spec/models/send_sticker_request_spec.rb +2 -2
- data/spec/models/send_template_request_language_spec.rb +2 -2
- data/spec/models/send_template_request_spec.rb +14 -2
- data/spec/models/set_webhook200_response_spec.rb +42 -0
- data/spec/models/set_webhook200_response_webhook_url_spec.rb +32 -0
- data/spec/models/set_webhook_request_spec.rb +36 -0
- data/spec/models/set_webhook_request_webhook_url_spec.rb +32 -0
- data/spec/models/set_whatsapp_business_encryption_request_spec.rb +2 -2
- data/spec/models/success_response_spec.rb +2 -2
- data/spec/models/update_calling_settings200_response_response_spec.rb +36 -0
- data/spec/models/update_calling_settings200_response_spec.rb +48 -0
- data/spec/models/update_me200_response_spec.rb +36 -0
- data/spec/models/update_me_request_spec.rb +2 -2
- data/spec/models/webhook_url_status_spec.rb +88 -0
- data/spec/spec_helper.rb +2 -2
- metadata +319 -89
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
require 'net/http'
|
|
3
|
+
require 'uri'
|
|
4
|
+
|
|
5
|
+
module OneMsgSdk
|
|
6
|
+
class PlatformError < StandardError
|
|
7
|
+
attr_reader :status, :body
|
|
8
|
+
def initialize(status, body)
|
|
9
|
+
super("Platform API HTTP #{status}")
|
|
10
|
+
@status = status
|
|
11
|
+
@body = body
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Platform API client. Bearer API key, not the WhatsApp channel token.
|
|
16
|
+
class PlatformClient
|
|
17
|
+
def initialize(api_key, base_url = 'https://api.1msg.io')
|
|
18
|
+
raise ArgumentError, 'api_key is required' if api_key.nil? || api_key.strip.empty?
|
|
19
|
+
@api_key = api_key.strip
|
|
20
|
+
@base_url = (base_url.nil? || base_url.strip.empty? ? 'https://api.1msg.io' : base_url).sub(%r{/+$}, '')
|
|
21
|
+
@operations = {}
|
|
22
|
+
JSON.parse("[{\"id\":\"listInboxChannels\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/channels\",\"pathParams\":[]},{\"id\":\"listInboxChannelAssignees\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/channels/{channelId}/assignees\",\"pathParams\":[\"channelId\"]},{\"id\":\"listInboxConversations\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/conversations\",\"pathParams\":[]},{\"id\":\"searchInboxConversations\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/conversations/search\",\"pathParams\":[]},{\"id\":\"countInboxConversations\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/conversations/counts\",\"pathParams\":[]},{\"id\":\"getInboxConversation\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/conversations/{conversationId}\",\"pathParams\":[\"conversationId\"]},{\"id\":\"updateInboxConversationStatus\",\"method\":\"PATCH\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/status\",\"pathParams\":[\"conversationId\"]},{\"id\":\"updateInboxConversationAssignee\",\"method\":\"PATCH\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/assignee\",\"pathParams\":[\"conversationId\"]},{\"id\":\"listInboxConversationMessages\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/messages\",\"pathParams\":[\"conversationId\"]},{\"id\":\"blockInboxContact\",\"method\":\"POST\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/block\",\"pathParams\":[\"conversationId\"]},{\"id\":\"unblockInboxContact\",\"method\":\"POST\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/unblock\",\"pathParams\":[\"conversationId\"]},{\"id\":\"renameInboxConversation\",\"method\":\"PATCH\",\"path\":\"/api/v1/inbox/conversations/{conversationId}/title\",\"pathParams\":[\"conversationId\"]},{\"id\":\"listInboxContacts\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/contacts\",\"pathParams\":[]},{\"id\":\"getInboxWebhook\",\"method\":\"GET\",\"path\":\"/api/v1/inbox/webhook\",\"pathParams\":[]},{\"id\":\"setInboxWebhook\",\"method\":\"PUT\",\"path\":\"/api/v1/inbox/webhook\",\"pathParams\":[]},{\"id\":\"deleteInboxWebhook\",\"method\":\"DELETE\",\"path\":\"/api/v1/inbox/webhook\",\"pathParams\":[]},{\"id\":\"rotateInboxWebhookSecret\",\"method\":\"POST\",\"path\":\"/api/v1/inbox/webhook/secret\",\"pathParams\":[]},{\"id\":\"listCampaignSegments\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/segments\",\"pathParams\":[]},{\"id\":\"createCampaignSegment\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/segments\",\"pathParams\":[]},{\"id\":\"getCampaignSegment\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/segments/{segmentId}\",\"pathParams\":[\"segmentId\"]},{\"id\":\"updateCampaignSegment\",\"method\":\"PATCH\",\"path\":\"/api/v1/campaigns/segments/{segmentId}\",\"pathParams\":[\"segmentId\"]},{\"id\":\"deleteCampaignSegment\",\"method\":\"DELETE\",\"path\":\"/api/v1/campaigns/segments/{segmentId}\",\"pathParams\":[\"segmentId\"]},{\"id\":\"listCampaignSegmentMembers\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/segments/{segmentId}/members\",\"pathParams\":[\"segmentId\"]},{\"id\":\"addCampaignSegmentMembers\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/segments/{segmentId}/members\",\"pathParams\":[\"segmentId\"]},{\"id\":\"replaceCampaignSegmentMembers\",\"method\":\"PUT\",\"path\":\"/api/v1/campaigns/segments/{segmentId}/members\",\"pathParams\":[\"segmentId\"]},{\"id\":\"removeCampaignSegmentMembers\",\"method\":\"DELETE\",\"path\":\"/api/v1/campaigns/segments/{segmentId}/members\",\"pathParams\":[\"segmentId\"]},{\"id\":\"updateCampaignSegmentMember\",\"method\":\"PATCH\",\"path\":\"/api/v1/campaigns/segments/{segmentId}/members/{memberId}\",\"pathParams\":[\"segmentId\",\"memberId\"]},{\"id\":\"listCampaigns\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns\",\"pathParams\":[]},{\"id\":\"createCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns\",\"pathParams\":[]},{\"id\":\"getCampaign\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}\",\"pathParams\":[\"campaignId\"]},{\"id\":\"updateCampaign\",\"method\":\"PATCH\",\"path\":\"/api/v1/campaigns/{campaignId}\",\"pathParams\":[\"campaignId\"]},{\"id\":\"previewCampaign\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}/preview\",\"pathParams\":[\"campaignId\"]},{\"id\":\"sendCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/send\",\"pathParams\":[\"campaignId\"]},{\"id\":\"scheduleCampaign\",\"method\":\"PATCH\",\"path\":\"/api/v1/campaigns/{campaignId}/schedule\",\"pathParams\":[\"campaignId\"]},{\"id\":\"unscheduleCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/unschedule\",\"pathParams\":[\"campaignId\"]},{\"id\":\"pauseCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/pause\",\"pathParams\":[\"campaignId\"]},{\"id\":\"resumeCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/resume\",\"pathParams\":[\"campaignId\"]},{\"id\":\"completeCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/complete\",\"pathParams\":[\"campaignId\"]},{\"id\":\"testCampaign\",\"method\":\"POST\",\"path\":\"/api/v1/campaigns/{campaignId}/test\",\"pathParams\":[\"campaignId\"]},{\"id\":\"getCampaignAnalytics\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}/analytics\",\"pathParams\":[\"campaignId\"]},{\"id\":\"listCampaignAnalyticsRecipients\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}/analytics/recipients\",\"pathParams\":[\"campaignId\"]},{\"id\":\"listCampaignAnalyticsReplies\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}/analytics/replies\",\"pathParams\":[\"campaignId\"]},{\"id\":\"listCampaignAnalyticsErrors\",\"method\":\"GET\",\"path\":\"/api/v1/campaigns/{campaignId}/analytics/errors\",\"pathParams\":[\"campaignId\"]}]").each { |operation| @operations[operation['id']] = operation }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def call(operation_id, path: nil, query: nil, body: nil)
|
|
26
|
+
spec = @operations[operation_id] or raise ArgumentError, "unknown platform operation #{operation_id}"
|
|
27
|
+
url_path = spec['path']
|
|
28
|
+
spec['pathParams'].each do |name|
|
|
29
|
+
value = path && path[name]
|
|
30
|
+
raise ArgumentError, "missing path param #{name}" if value.nil?
|
|
31
|
+
url_path = url_path.sub('{' + name + '}', URI.encode_www_form_component(value.to_s))
|
|
32
|
+
end
|
|
33
|
+
url = @base_url + url_path
|
|
34
|
+
url += '?' + URI.encode_www_form(query) if query && !query.empty?
|
|
35
|
+
uri = URI(url)
|
|
36
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
37
|
+
http.use_ssl = uri.scheme == 'https'
|
|
38
|
+
request = Net::HTTPGenericRequest.new(spec['method'], !body.nil?, true, uri)
|
|
39
|
+
request['Authorization'] = "Bearer #{@api_key}"
|
|
40
|
+
request['Accept'] = 'application/json'
|
|
41
|
+
if body
|
|
42
|
+
request['Content-Type'] = 'application/json'
|
|
43
|
+
request.body = JSON.generate(body)
|
|
44
|
+
end
|
|
45
|
+
response = http.request(request)
|
|
46
|
+
text = response.body.to_s
|
|
47
|
+
raise PlatformError.new(response.code.to_i, text) unless response.is_a?(Net::HTTPSuccess)
|
|
48
|
+
return nil if text.empty?
|
|
49
|
+
JSON.parse(text)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def list_inbox_channels(path: nil, query: nil, body: nil)
|
|
53
|
+
call("listInboxChannels", path: path, query: query, body: body)
|
|
54
|
+
end
|
|
55
|
+
def list_inbox_channel_assignees(path: nil, query: nil, body: nil)
|
|
56
|
+
call("listInboxChannelAssignees", path: path, query: query, body: body)
|
|
57
|
+
end
|
|
58
|
+
def list_inbox_conversations(path: nil, query: nil, body: nil)
|
|
59
|
+
call("listInboxConversations", path: path, query: query, body: body)
|
|
60
|
+
end
|
|
61
|
+
def search_inbox_conversations(path: nil, query: nil, body: nil)
|
|
62
|
+
call("searchInboxConversations", path: path, query: query, body: body)
|
|
63
|
+
end
|
|
64
|
+
def count_inbox_conversations(path: nil, query: nil, body: nil)
|
|
65
|
+
call("countInboxConversations", path: path, query: query, body: body)
|
|
66
|
+
end
|
|
67
|
+
def get_inbox_conversation(path: nil, query: nil, body: nil)
|
|
68
|
+
call("getInboxConversation", path: path, query: query, body: body)
|
|
69
|
+
end
|
|
70
|
+
def update_inbox_conversation_status(path: nil, query: nil, body: nil)
|
|
71
|
+
call("updateInboxConversationStatus", path: path, query: query, body: body)
|
|
72
|
+
end
|
|
73
|
+
def update_inbox_conversation_assignee(path: nil, query: nil, body: nil)
|
|
74
|
+
call("updateInboxConversationAssignee", path: path, query: query, body: body)
|
|
75
|
+
end
|
|
76
|
+
def list_inbox_conversation_messages(path: nil, query: nil, body: nil)
|
|
77
|
+
call("listInboxConversationMessages", path: path, query: query, body: body)
|
|
78
|
+
end
|
|
79
|
+
def block_inbox_contact(path: nil, query: nil, body: nil)
|
|
80
|
+
call("blockInboxContact", path: path, query: query, body: body)
|
|
81
|
+
end
|
|
82
|
+
def unblock_inbox_contact(path: nil, query: nil, body: nil)
|
|
83
|
+
call("unblockInboxContact", path: path, query: query, body: body)
|
|
84
|
+
end
|
|
85
|
+
def rename_inbox_conversation(path: nil, query: nil, body: nil)
|
|
86
|
+
call("renameInboxConversation", path: path, query: query, body: body)
|
|
87
|
+
end
|
|
88
|
+
def list_inbox_contacts(path: nil, query: nil, body: nil)
|
|
89
|
+
call("listInboxContacts", path: path, query: query, body: body)
|
|
90
|
+
end
|
|
91
|
+
def get_inbox_webhook(path: nil, query: nil, body: nil)
|
|
92
|
+
call("getInboxWebhook", path: path, query: query, body: body)
|
|
93
|
+
end
|
|
94
|
+
def set_inbox_webhook(path: nil, query: nil, body: nil)
|
|
95
|
+
call("setInboxWebhook", path: path, query: query, body: body)
|
|
96
|
+
end
|
|
97
|
+
def delete_inbox_webhook(path: nil, query: nil, body: nil)
|
|
98
|
+
call("deleteInboxWebhook", path: path, query: query, body: body)
|
|
99
|
+
end
|
|
100
|
+
def rotate_inbox_webhook_secret(path: nil, query: nil, body: nil)
|
|
101
|
+
call("rotateInboxWebhookSecret", path: path, query: query, body: body)
|
|
102
|
+
end
|
|
103
|
+
def list_campaign_segments(path: nil, query: nil, body: nil)
|
|
104
|
+
call("listCampaignSegments", path: path, query: query, body: body)
|
|
105
|
+
end
|
|
106
|
+
def create_campaign_segment(path: nil, query: nil, body: nil)
|
|
107
|
+
call("createCampaignSegment", path: path, query: query, body: body)
|
|
108
|
+
end
|
|
109
|
+
def get_campaign_segment(path: nil, query: nil, body: nil)
|
|
110
|
+
call("getCampaignSegment", path: path, query: query, body: body)
|
|
111
|
+
end
|
|
112
|
+
def update_campaign_segment(path: nil, query: nil, body: nil)
|
|
113
|
+
call("updateCampaignSegment", path: path, query: query, body: body)
|
|
114
|
+
end
|
|
115
|
+
def delete_campaign_segment(path: nil, query: nil, body: nil)
|
|
116
|
+
call("deleteCampaignSegment", path: path, query: query, body: body)
|
|
117
|
+
end
|
|
118
|
+
def list_campaign_segment_members(path: nil, query: nil, body: nil)
|
|
119
|
+
call("listCampaignSegmentMembers", path: path, query: query, body: body)
|
|
120
|
+
end
|
|
121
|
+
def add_campaign_segment_members(path: nil, query: nil, body: nil)
|
|
122
|
+
call("addCampaignSegmentMembers", path: path, query: query, body: body)
|
|
123
|
+
end
|
|
124
|
+
def replace_campaign_segment_members(path: nil, query: nil, body: nil)
|
|
125
|
+
call("replaceCampaignSegmentMembers", path: path, query: query, body: body)
|
|
126
|
+
end
|
|
127
|
+
def remove_campaign_segment_members(path: nil, query: nil, body: nil)
|
|
128
|
+
call("removeCampaignSegmentMembers", path: path, query: query, body: body)
|
|
129
|
+
end
|
|
130
|
+
def update_campaign_segment_member(path: nil, query: nil, body: nil)
|
|
131
|
+
call("updateCampaignSegmentMember", path: path, query: query, body: body)
|
|
132
|
+
end
|
|
133
|
+
def list_campaigns(path: nil, query: nil, body: nil)
|
|
134
|
+
call("listCampaigns", path: path, query: query, body: body)
|
|
135
|
+
end
|
|
136
|
+
def create_campaign(path: nil, query: nil, body: nil)
|
|
137
|
+
call("createCampaign", path: path, query: query, body: body)
|
|
138
|
+
end
|
|
139
|
+
def get_campaign(path: nil, query: nil, body: nil)
|
|
140
|
+
call("getCampaign", path: path, query: query, body: body)
|
|
141
|
+
end
|
|
142
|
+
def update_campaign(path: nil, query: nil, body: nil)
|
|
143
|
+
call("updateCampaign", path: path, query: query, body: body)
|
|
144
|
+
end
|
|
145
|
+
def preview_campaign(path: nil, query: nil, body: nil)
|
|
146
|
+
call("previewCampaign", path: path, query: query, body: body)
|
|
147
|
+
end
|
|
148
|
+
def send_campaign(path: nil, query: nil, body: nil)
|
|
149
|
+
call("sendCampaign", path: path, query: query, body: body)
|
|
150
|
+
end
|
|
151
|
+
def schedule_campaign(path: nil, query: nil, body: nil)
|
|
152
|
+
call("scheduleCampaign", path: path, query: query, body: body)
|
|
153
|
+
end
|
|
154
|
+
def unschedule_campaign(path: nil, query: nil, body: nil)
|
|
155
|
+
call("unscheduleCampaign", path: path, query: query, body: body)
|
|
156
|
+
end
|
|
157
|
+
def pause_campaign(path: nil, query: nil, body: nil)
|
|
158
|
+
call("pauseCampaign", path: path, query: query, body: body)
|
|
159
|
+
end
|
|
160
|
+
def resume_campaign(path: nil, query: nil, body: nil)
|
|
161
|
+
call("resumeCampaign", path: path, query: query, body: body)
|
|
162
|
+
end
|
|
163
|
+
def complete_campaign(path: nil, query: nil, body: nil)
|
|
164
|
+
call("completeCampaign", path: path, query: query, body: body)
|
|
165
|
+
end
|
|
166
|
+
def test_campaign(path: nil, query: nil, body: nil)
|
|
167
|
+
call("testCampaign", path: path, query: query, body: body)
|
|
168
|
+
end
|
|
169
|
+
def get_campaign_analytics(path: nil, query: nil, body: nil)
|
|
170
|
+
call("getCampaignAnalytics", path: path, query: query, body: body)
|
|
171
|
+
end
|
|
172
|
+
def list_campaign_analytics_recipients(path: nil, query: nil, body: nil)
|
|
173
|
+
call("listCampaignAnalyticsRecipients", path: path, query: query, body: body)
|
|
174
|
+
end
|
|
175
|
+
def list_campaign_analytics_replies(path: nil, query: nil, body: nil)
|
|
176
|
+
call("listCampaignAnalyticsReplies", path: path, query: query, body: body)
|
|
177
|
+
end
|
|
178
|
+
def list_campaign_analytics_errors(path: nil, query: nil, body: nil)
|
|
179
|
+
call("listCampaignAnalyticsErrors", path: path, query: query, body: body)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
data/lib/one_msg_sdk/version.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -11,5 +11,5 @@ Generator version: 7.22.0
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
13
13
|
module OneMsgSdk
|
|
14
|
-
VERSION = '2.0.
|
|
14
|
+
VERSION = '2.0.3'
|
|
15
15
|
end
|
data/lib/one_msg_sdk.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -18,39 +18,69 @@ require 'one_msg_sdk/version'
|
|
|
18
18
|
require 'one_msg_sdk/configuration'
|
|
19
19
|
|
|
20
20
|
# Models
|
|
21
|
+
require 'one_msg_sdk/models/add_template200_response'
|
|
21
22
|
require 'one_msg_sdk/models/add_template_request'
|
|
22
23
|
require 'one_msg_sdk/models/block_user_request'
|
|
24
|
+
require 'one_msg_sdk/models/calling_settings'
|
|
25
|
+
require 'one_msg_sdk/models/calling_settings_calling'
|
|
26
|
+
require 'one_msg_sdk/models/calling_settings_calling_audio'
|
|
27
|
+
require 'one_msg_sdk/models/calling_settings_calling_call_hours'
|
|
28
|
+
require 'one_msg_sdk/models/calling_settings_calling_sip'
|
|
29
|
+
require 'one_msg_sdk/models/calling_settings_calling_sip_servers_inner'
|
|
30
|
+
require 'one_msg_sdk/models/calling_settings_calling_video'
|
|
23
31
|
require 'one_msg_sdk/models/conversational_automation'
|
|
24
32
|
require 'one_msg_sdk/models/conversational_automation_commands_inner'
|
|
25
33
|
require 'one_msg_sdk/models/create_commerce200_response'
|
|
26
34
|
require 'one_msg_sdk/models/create_commerce_request'
|
|
27
35
|
require 'one_msg_sdk/models/create_commerce_request_params'
|
|
36
|
+
require 'one_msg_sdk/models/create_flows_request'
|
|
28
37
|
require 'one_msg_sdk/models/create_groups200_response'
|
|
38
|
+
require 'one_msg_sdk/models/create_groups_group_id_request'
|
|
39
|
+
require 'one_msg_sdk/models/create_groups_request'
|
|
29
40
|
require 'one_msg_sdk/models/create_read_message200_response'
|
|
30
41
|
require 'one_msg_sdk/models/create_read_message401_response'
|
|
31
42
|
require 'one_msg_sdk/models/create_read_message_request'
|
|
43
|
+
require 'one_msg_sdk/models/create_settings_request'
|
|
44
|
+
require 'one_msg_sdk/models/create_settings_request_webhook_url'
|
|
45
|
+
require 'one_msg_sdk/models/create_upload_media200_response'
|
|
46
|
+
require 'one_msg_sdk/models/create_upload_media_request'
|
|
32
47
|
require 'one_msg_sdk/models/delete_flows_flow_id200_response'
|
|
33
48
|
require 'one_msg_sdk/models/delete_groups_group_id200_response'
|
|
34
49
|
require 'one_msg_sdk/models/delete_media_legacy_request'
|
|
35
50
|
require 'one_msg_sdk/models/error_response'
|
|
36
51
|
require 'one_msg_sdk/models/get_commerce200_response_inner'
|
|
37
52
|
require 'one_msg_sdk/models/get_mm_lite_status200_response'
|
|
53
|
+
require 'one_msg_sdk/models/get_status200_response'
|
|
38
54
|
require 'one_msg_sdk/models/get_webhook200_response'
|
|
55
|
+
require 'one_msg_sdk/models/get_webhook200_response_webhook_url'
|
|
39
56
|
require 'one_msg_sdk/models/get_whatsapp_business_encryption200_response'
|
|
57
|
+
require 'one_msg_sdk/models/initiate_call_request'
|
|
58
|
+
require 'one_msg_sdk/models/initiate_call_request_session'
|
|
59
|
+
require 'one_msg_sdk/models/initiate_call_response'
|
|
60
|
+
require 'one_msg_sdk/models/initiate_call_response_calls_inner'
|
|
61
|
+
require 'one_msg_sdk/models/initiate_call_response_response'
|
|
40
62
|
require 'one_msg_sdk/models/list_blocked_users200_response'
|
|
41
63
|
require 'one_msg_sdk/models/list_flows200_response'
|
|
42
64
|
require 'one_msg_sdk/models/list_messages200_response'
|
|
65
|
+
require 'one_msg_sdk/models/list_settings200_response'
|
|
66
|
+
require 'one_msg_sdk/models/list_settings200_response_webhook_url'
|
|
43
67
|
require 'one_msg_sdk/models/list_templates200_response'
|
|
44
68
|
require 'one_msg_sdk/models/message_sent_response'
|
|
45
69
|
require 'one_msg_sdk/models/patch_flows_flow_id_assets200_response'
|
|
70
|
+
require 'one_msg_sdk/models/patch_flows_flow_id_assets_request'
|
|
71
|
+
require 'one_msg_sdk/models/patch_flows_flow_id_metadata_request'
|
|
46
72
|
require 'one_msg_sdk/models/profile_info'
|
|
73
|
+
require 'one_msg_sdk/models/remove_template_request'
|
|
47
74
|
require 'one_msg_sdk/models/retrieve_media200_response'
|
|
48
75
|
require 'one_msg_sdk/models/send_address_message_request'
|
|
49
76
|
require 'one_msg_sdk/models/send_button_request'
|
|
50
77
|
require 'one_msg_sdk/models/send_button_request_sections_inner'
|
|
51
78
|
require 'one_msg_sdk/models/send_button_request_sections_inner_reply'
|
|
52
79
|
require 'one_msg_sdk/models/send_carousel_request1'
|
|
80
|
+
require 'one_msg_sdk/models/send_contact_info_request'
|
|
53
81
|
require 'one_msg_sdk/models/send_contact_request'
|
|
82
|
+
require 'one_msg_sdk/models/send_contact_request_contact'
|
|
83
|
+
require 'one_msg_sdk/models/send_contact_request_contact_name'
|
|
54
84
|
require 'one_msg_sdk/models/send_contact_request_contacts_inner'
|
|
55
85
|
require 'one_msg_sdk/models/send_contact_request_contacts_inner_name'
|
|
56
86
|
require 'one_msg_sdk/models/send_contact_request_contacts_inner_org'
|
|
@@ -66,19 +96,29 @@ require 'one_msg_sdk/models/send_list_request_sections_inner_rows_inner'
|
|
|
66
96
|
require 'one_msg_sdk/models/send_location_request1'
|
|
67
97
|
require 'one_msg_sdk/models/send_location_request_request'
|
|
68
98
|
require 'one_msg_sdk/models/send_message_request'
|
|
99
|
+
require 'one_msg_sdk/models/send_message_request_direct_send'
|
|
69
100
|
require 'one_msg_sdk/models/send_order_details_request'
|
|
70
101
|
require 'one_msg_sdk/models/send_order_details_request_language'
|
|
71
102
|
require 'one_msg_sdk/models/send_order_details_request_order'
|
|
72
103
|
require 'one_msg_sdk/models/send_order_details_request_order_items_inner'
|
|
73
104
|
require 'one_msg_sdk/models/send_order_details_request_order_items_inner_amount'
|
|
74
105
|
require 'one_msg_sdk/models/send_payment_request_request'
|
|
106
|
+
require 'one_msg_sdk/models/send_product_request'
|
|
75
107
|
require 'one_msg_sdk/models/send_reaction_request'
|
|
76
108
|
require 'one_msg_sdk/models/send_sticker_request'
|
|
77
109
|
require 'one_msg_sdk/models/send_template_request'
|
|
78
110
|
require 'one_msg_sdk/models/send_template_request_language'
|
|
111
|
+
require 'one_msg_sdk/models/set_webhook200_response'
|
|
112
|
+
require 'one_msg_sdk/models/set_webhook200_response_webhook_url'
|
|
113
|
+
require 'one_msg_sdk/models/set_webhook_request'
|
|
114
|
+
require 'one_msg_sdk/models/set_webhook_request_webhook_url'
|
|
79
115
|
require 'one_msg_sdk/models/set_whatsapp_business_encryption_request'
|
|
80
116
|
require 'one_msg_sdk/models/success_response'
|
|
117
|
+
require 'one_msg_sdk/models/update_calling_settings200_response'
|
|
118
|
+
require 'one_msg_sdk/models/update_calling_settings200_response_response'
|
|
119
|
+
require 'one_msg_sdk/models/update_me200_response'
|
|
81
120
|
require 'one_msg_sdk/models/update_me_request'
|
|
121
|
+
require 'one_msg_sdk/models/webhook_url_status'
|
|
82
122
|
|
|
83
123
|
# APIs
|
|
84
124
|
require 'one_msg_sdk/api/calling_api'
|
|
@@ -109,3 +149,5 @@ module OneMsgSdk
|
|
|
109
149
|
end
|
|
110
150
|
end
|
|
111
151
|
end
|
|
152
|
+
|
|
153
|
+
require 'one_msg_sdk/platform_client'
|
data/one_msg_sdk.gemspec
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
=begin
|
|
4
4
|
#1MSG WhatsApp Business API (Public)
|
|
5
5
|
|
|
6
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
6
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
9
|
Contact: support@1msg.io
|
|
10
10
|
Generated by: https://openapi-generator.tech
|
|
11
11
|
Generator version: 7.22.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -34,10 +34,10 @@ describe 'CallingApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for get_calling_settings
|
|
36
36
|
# Get calling settings
|
|
37
|
-
# WhatsApp Calling API settings (beta).
|
|
37
|
+
# Return WhatsApp Calling API settings for this channel (beta). Proxies upstream `GET /calling/settings`. **Prerequisites** - Number must be eligible for Meta Calling (Cloud API; not COEX) - Trial / `subscriptionBlocked` channels receive **403** plain text - You need your own WebRTC or SIP stack; 1msg is a **signaling proxy** only and does **not** store call history or recordings See the **Calling** tag overview for inbound/outbound flows and webhooks.
|
|
38
38
|
# @param token JWT token or API key for authorization
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [
|
|
40
|
+
# @return [CallingSettings]
|
|
41
41
|
describe 'get_calling_settings test' do
|
|
42
42
|
it 'should work' do
|
|
43
43
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -45,12 +45,12 @@ describe 'CallingApi' do
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
# unit tests for initiate_call
|
|
48
|
-
#
|
|
49
|
-
#
|
|
48
|
+
# Call action (connect / pre_accept / accept / reject / terminate)
|
|
49
|
+
# Perform a WhatsApp Calling action (beta). Proxies upstream `POST /calling/calls`. Despite the historical path name `/initiateCall`, this endpoint handles **all** call actions: | action | Use | Required | |--------|-----|----------| | `connect` | Outbound business → user | `to` + `session` (`sdp_type: offer`) | | `pre_accept` | Inbound (optional, reduces audio clipping) | `call_id` + `session` (`sdp_type: answer`) | | `accept` | Inbound answer | `call_id` + `session` (`sdp_type: answer`) | | `reject` | Decline inbound | `call_id` | | `terminate` | Hang up | `call_id` | **SDP / media (critical)** - `accept` / `pre_accept` require a **WebRTC-generated SDP answer**. - Do **not** send Meta's offer SDP back as the answer. - Postman (or curl) alone **cannot** establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling. Answer within ~**30–60 seconds** of an inbound `connect` webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (`138000`), no permission (`138006`), SDP validation failures. **Outbound** requires a prior Call Permission Request (CPR) acceptance. See the **Calling** tag overview for the full outbound flow and CPR limits. Trial / `subscriptionBlocked` → **403** plain text. Upstream failures often return HTTP 200 with `{ \"response\": { \"error\": \"<upstream message>\" } }`. `Invalid API KEY` is used only when Meta/360 body actually indicates an invalid API key or token. Other upstream 401s (notably call permission `138006`) pass through `error.message` / `error_user_msg`.
|
|
50
50
|
# @param token JWT token or API key for authorization
|
|
51
|
+
# @param initiate_call_request
|
|
51
52
|
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @
|
|
53
|
-
# @return [Hash<String, Object>]
|
|
53
|
+
# @return [InitiateCallResponse]
|
|
54
54
|
describe 'initiate_call test' do
|
|
55
55
|
it 'should work' do
|
|
56
56
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -59,11 +59,11 @@ describe 'CallingApi' do
|
|
|
59
59
|
|
|
60
60
|
# unit tests for update_calling_settings
|
|
61
61
|
# Update calling settings
|
|
62
|
-
#
|
|
62
|
+
# Enable, disable, or update WhatsApp Calling settings (beta). Proxies upstream `POST /calling/settings`. Body is forwarded as-is (1msg does not validate fields). **Common fields under `calling`** - `status` (`ENABLED` | `DISABLED`) — required to turn calling on/off - `call_icon_visibility` (`DEFAULT` | `DISABLE_ALL`) — optional - `callback_permission_status` (`ENABLED` | `DISABLED`) — optional; when enabled, inbound user calls grant callback permission - `call_hours` — optional hours / timezone object - `sip` — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used - `srtp_key_exchange_protocol` (`DTLS` | `SDES`) — SDES only with SIP - `video.status` — optional Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP). Trial / `subscriptionBlocked` → **403** plain text.
|
|
63
63
|
# @param token JWT token or API key for authorization
|
|
64
|
+
# @param calling_settings
|
|
64
65
|
# @param [Hash] opts the optional parameters
|
|
65
|
-
# @
|
|
66
|
-
# @return [Hash<String, Object>]
|
|
66
|
+
# @return [UpdateCallingSettings200Response]
|
|
67
67
|
describe 'update_calling_settings test' do
|
|
68
68
|
it 'should work' do
|
|
69
69
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -47,7 +47,7 @@ describe 'CatalogApi' do
|
|
|
47
47
|
|
|
48
48
|
# unit tests for get_commerce
|
|
49
49
|
# Get Commerce Settings
|
|
50
|
-
# 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`).
|
|
50
|
+
# Returns catalog/cart commerce settings for the channel. Fails with a provider error when the WABA has no catalog linked — that is an API/account limitation, not an MCP schema bug. - `is_catalog_visible` — show catalog storefront icon (`true`) or hide it (`false`). - `is_cart_enabled` — enable cart (`true`) or disable it (`false`).
|
|
51
51
|
# @param token JWT token or API key for authorization
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
53
53
|
# @return [Array<GetCommerce200ResponseInner>]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -32,6 +32,19 @@ describe 'ChannelApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for create_settings
|
|
36
|
+
# Update channel settings
|
|
37
|
+
# Update channel settings. Only send fields you want to change. `webhookUrl` **replaces** the stored list (one URL string, or up to 5 URLs as an array). Passing an empty value clears webhooks. Repeating the same URL(s) also clears a sticky auto-disable. With several URLs, send the complete array to re-enable one of them — omitting a URL removes it from the channel.
|
|
38
|
+
# @param token JWT token or API key for authorization
|
|
39
|
+
# @param create_settings_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [Hash<String, Object>]
|
|
42
|
+
describe 'create_settings test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
35
48
|
# unit tests for get_conversational_automation
|
|
36
49
|
# Get conversational automation settings
|
|
37
50
|
# 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.
|
|
@@ -46,16 +59,28 @@ describe 'ChannelApi' do
|
|
|
46
59
|
|
|
47
60
|
# unit tests for get_status
|
|
48
61
|
# Get channel status
|
|
49
|
-
#
|
|
62
|
+
# Return WhatsApp Cloud API connection status for this channel (`connected` when the number can send). May include `accountStatus`, messaging limit, and MM Lite availability. Optional `health_status_warning` appears only when Meta Graph health could not be loaded and a soft `connected` response is returned. Omitted on the normal path and when health details are not applicable for the channel — never an internal provider/transport name.
|
|
50
63
|
# @param token JWT token or API key for authorization
|
|
51
64
|
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @return [
|
|
65
|
+
# @return [GetStatus200Response]
|
|
53
66
|
describe 'get_status test' do
|
|
54
67
|
it 'should work' do
|
|
55
68
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
69
|
end
|
|
57
70
|
end
|
|
58
71
|
|
|
72
|
+
# unit tests for list_settings
|
|
73
|
+
# Get channel settings
|
|
74
|
+
# Return channel settings: webhook URL(s), delivery flags, and analytics toggles. Auto-disable / circuit state matches `GET /webhook`. **Prefer `webhookStatuses`** (one row per configured URL). The breaker is per URL, not per channel. Channel-level `haveDisabledWebhooks` is `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled — not \"the channel is dead\". Live URLs still receive events. Top-level `circuitState` / `reason` / `fails` / `trips` are a compatibility summary of one URL (first sticky-disabled, else first configured). This is the same `GET /settings` endpoint as the REST API (previously missing from MCP).
|
|
75
|
+
# @param token JWT token or API key for authorization
|
|
76
|
+
# @param [Hash] opts the optional parameters
|
|
77
|
+
# @return [ListSettings200Response]
|
|
78
|
+
describe 'list_settings test' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
59
84
|
# unit tests for set_conversational_automation
|
|
60
85
|
# Set conversational automation settings
|
|
61
86
|
# 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`.
|
data/spec/api/flows_api_spec.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -34,7 +34,9 @@ describe 'FlowsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_flows
|
|
36
36
|
# Create Flow
|
|
37
|
+
# Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
37
38
|
# @param token JWT token or API key for authorization
|
|
39
|
+
# @param create_flows_request
|
|
38
40
|
# @param [Hash] opts the optional parameters
|
|
39
41
|
# @option opts [String] :waba_account_id
|
|
40
42
|
# @return [CreateGroups200Response]
|
|
@@ -123,9 +125,11 @@ describe 'FlowsApi' do
|
|
|
123
125
|
|
|
124
126
|
# unit tests for list_flows
|
|
125
127
|
# List Flows
|
|
128
|
+
# List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
126
129
|
# @param token JWT token or API key for authorization
|
|
127
130
|
# @param [Hash] opts the optional parameters
|
|
128
131
|
# @option opts [String] :waba_account_id
|
|
132
|
+
# @option opts [String] :fields Comma-separated Flow fields to return
|
|
129
133
|
# @return [ListFlows200Response]
|
|
130
134
|
describe 'list_flows test' do
|
|
131
135
|
it 'should work' do
|
|
@@ -135,8 +139,10 @@ describe 'FlowsApi' do
|
|
|
135
139
|
|
|
136
140
|
# unit tests for patch_flows_flow_id_assets
|
|
137
141
|
# Update Flow Structure
|
|
142
|
+
# Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
138
143
|
# @param flow_id Flow ID
|
|
139
144
|
# @param token JWT token or API key for authorization
|
|
145
|
+
# @param patch_flows_flow_id_assets_request
|
|
140
146
|
# @param [Hash] opts the optional parameters
|
|
141
147
|
# @option opts [String] :waba_account_id
|
|
142
148
|
# @return [PatchFlowsFlowIdAssets200Response]
|
|
@@ -148,8 +154,10 @@ describe 'FlowsApi' do
|
|
|
148
154
|
|
|
149
155
|
# unit tests for patch_flows_flow_id_metadata
|
|
150
156
|
# Update Flow Metadata
|
|
157
|
+
# Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
151
158
|
# @param flow_id Flow ID
|
|
152
159
|
# @param token JWT token or API key for authorization
|
|
160
|
+
# @param patch_flows_flow_id_metadata_request
|
|
153
161
|
# @param [Hash] opts the optional parameters
|
|
154
162
|
# @option opts [String] :waba_account_id
|
|
155
163
|
# @return [Hash<String, Object>]
|
data/spec/api/groups_api_spec.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#1MSG WhatsApp Business API (Public)
|
|
3
3
|
|
|
4
|
-
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:**
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** Pass the channel token in **one** place. The API checks JSON body (`token`), then query string (`?token=`), then `Authorization: Bearer` header (preferred in production). **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
7
|
Contact: support@1msg.io
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -35,6 +35,7 @@ describe 'GroupsApi' do
|
|
|
35
35
|
# unit tests for create_groups
|
|
36
36
|
# Create Group
|
|
37
37
|
# @param token JWT token or API key for authorization
|
|
38
|
+
# @param create_groups_request
|
|
38
39
|
# @param [Hash] opts the optional parameters
|
|
39
40
|
# @return [CreateGroups200Response]
|
|
40
41
|
describe 'create_groups test' do
|
|
@@ -45,8 +46,10 @@ describe 'GroupsApi' do
|
|
|
45
46
|
|
|
46
47
|
# unit tests for create_groups_group_id
|
|
47
48
|
# Update Group Info
|
|
49
|
+
# Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
48
50
|
# @param group_id
|
|
49
51
|
# @param token JWT token or API key for authorization
|
|
52
|
+
# @param create_groups_group_id_request
|
|
50
53
|
# @param [Hash] opts the optional parameters
|
|
51
54
|
# @return [Hash<String, Object>]
|
|
52
55
|
describe 'create_groups_group_id test' do
|
|
@@ -84,6 +87,7 @@ describe 'GroupsApi' do
|
|
|
84
87
|
# @param group_id
|
|
85
88
|
# @param token JWT token or API key for authorization
|
|
86
89
|
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @option opts [String] :fields Comma-separated group fields to return
|
|
87
91
|
# @return [Hash<String, Object>]
|
|
88
92
|
describe 'get_groups_group_id test' do
|
|
89
93
|
it 'should work' do
|
|
@@ -105,8 +109,12 @@ describe 'GroupsApi' do
|
|
|
105
109
|
|
|
106
110
|
# unit tests for list_groups
|
|
107
111
|
# Get Groups List
|
|
112
|
+
# List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
108
113
|
# @param token JWT token or API key for authorization
|
|
109
114
|
# @param [Hash] opts the optional parameters
|
|
115
|
+
# @option opts [Integer] :limit Max groups to return
|
|
116
|
+
# @option opts [String] :before Cursor for the previous page
|
|
117
|
+
# @option opts [String] :after Cursor for the next page
|
|
110
118
|
# @return [Hash<String, Object>]
|
|
111
119
|
describe 'list_groups test' do
|
|
112
120
|
it 'should work' do
|