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
|
@@ -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
|
|
@@ -20,21 +20,25 @@ module OneMsgSdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create Flow
|
|
23
|
+
# Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
23
24
|
# @param token [String] JWT token or API key for authorization
|
|
25
|
+
# @param create_flows_request [CreateFlowsRequest]
|
|
24
26
|
# @param [Hash] opts the optional parameters
|
|
25
27
|
# @option opts [String] :waba_account_id
|
|
26
28
|
# @return [CreateGroups200Response]
|
|
27
|
-
def create_flows(token, opts = {})
|
|
28
|
-
data, _status_code, _headers = create_flows_with_http_info(token, opts)
|
|
29
|
+
def create_flows(token, create_flows_request, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_flows_with_http_info(token, create_flows_request, opts)
|
|
29
31
|
data
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
# Create Flow
|
|
35
|
+
# Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
33
36
|
# @param token [String] JWT token or API key for authorization
|
|
37
|
+
# @param create_flows_request [CreateFlowsRequest]
|
|
34
38
|
# @param [Hash] opts the optional parameters
|
|
35
39
|
# @option opts [String] :waba_account_id
|
|
36
40
|
# @return [Array<(CreateGroups200Response, Integer, Hash)>] CreateGroups200Response data, response status code and response headers
|
|
37
|
-
def create_flows_with_http_info(token, opts = {})
|
|
41
|
+
def create_flows_with_http_info(token, create_flows_request, opts = {})
|
|
38
42
|
if @api_client.config.debugging
|
|
39
43
|
@api_client.config.logger.debug 'Calling API: FlowsApi.create_flows ...'
|
|
40
44
|
end
|
|
@@ -42,6 +46,10 @@ module OneMsgSdk
|
|
|
42
46
|
if @api_client.config.client_side_validation && token.nil?
|
|
43
47
|
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.create_flows"
|
|
44
48
|
end
|
|
49
|
+
# verify the required parameter 'create_flows_request' is set
|
|
50
|
+
if @api_client.config.client_side_validation && create_flows_request.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'create_flows_request' when calling FlowsApi.create_flows"
|
|
52
|
+
end
|
|
45
53
|
# resource path
|
|
46
54
|
local_var_path = '/flows'
|
|
47
55
|
|
|
@@ -54,12 +62,17 @@ module OneMsgSdk
|
|
|
54
62
|
header_params = opts[:header_params] || {}
|
|
55
63
|
# HTTP header 'Accept' (if needed)
|
|
56
64
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
65
|
+
# HTTP header 'Content-Type'
|
|
66
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
67
|
+
if !content_type.nil?
|
|
68
|
+
header_params['Content-Type'] = content_type
|
|
69
|
+
end
|
|
57
70
|
|
|
58
71
|
# form parameters
|
|
59
72
|
form_params = opts[:form_params] || {}
|
|
60
73
|
|
|
61
74
|
# http body (model)
|
|
62
|
-
post_body = opts[:debug_body]
|
|
75
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_flows_request)
|
|
63
76
|
|
|
64
77
|
# return_type
|
|
65
78
|
return_type = opts[:debug_return_type] || 'CreateGroups200Response'
|
|
@@ -504,9 +517,11 @@ module OneMsgSdk
|
|
|
504
517
|
end
|
|
505
518
|
|
|
506
519
|
# List Flows
|
|
520
|
+
# List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
507
521
|
# @param token [String] JWT token or API key for authorization
|
|
508
522
|
# @param [Hash] opts the optional parameters
|
|
509
523
|
# @option opts [String] :waba_account_id
|
|
524
|
+
# @option opts [String] :fields Comma-separated Flow fields to return
|
|
510
525
|
# @return [ListFlows200Response]
|
|
511
526
|
def list_flows(token, opts = {})
|
|
512
527
|
data, _status_code, _headers = list_flows_with_http_info(token, opts)
|
|
@@ -514,9 +529,11 @@ module OneMsgSdk
|
|
|
514
529
|
end
|
|
515
530
|
|
|
516
531
|
# List Flows
|
|
532
|
+
# List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
517
533
|
# @param token [String] JWT token or API key for authorization
|
|
518
534
|
# @param [Hash] opts the optional parameters
|
|
519
535
|
# @option opts [String] :waba_account_id
|
|
536
|
+
# @option opts [String] :fields Comma-separated Flow fields to return
|
|
520
537
|
# @return [Array<(ListFlows200Response, Integer, Hash)>] ListFlows200Response data, response status code and response headers
|
|
521
538
|
def list_flows_with_http_info(token, opts = {})
|
|
522
539
|
if @api_client.config.debugging
|
|
@@ -533,6 +550,7 @@ module OneMsgSdk
|
|
|
533
550
|
query_params = opts[:query_params] || {}
|
|
534
551
|
query_params[:'token'] = token
|
|
535
552
|
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
553
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
536
554
|
|
|
537
555
|
# header parameters
|
|
538
556
|
header_params = opts[:header_params] || {}
|
|
@@ -569,23 +587,27 @@ module OneMsgSdk
|
|
|
569
587
|
end
|
|
570
588
|
|
|
571
589
|
# Update Flow Structure
|
|
590
|
+
# Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
572
591
|
# @param flow_id [String] Flow ID
|
|
573
592
|
# @param token [String] JWT token or API key for authorization
|
|
593
|
+
# @param patch_flows_flow_id_assets_request [PatchFlowsFlowIdAssetsRequest]
|
|
574
594
|
# @param [Hash] opts the optional parameters
|
|
575
595
|
# @option opts [String] :waba_account_id
|
|
576
596
|
# @return [PatchFlowsFlowIdAssets200Response]
|
|
577
|
-
def patch_flows_flow_id_assets(flow_id, token, opts = {})
|
|
578
|
-
data, _status_code, _headers = patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
597
|
+
def patch_flows_flow_id_assets(flow_id, token, patch_flows_flow_id_assets_request, opts = {})
|
|
598
|
+
data, _status_code, _headers = patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts)
|
|
579
599
|
data
|
|
580
600
|
end
|
|
581
601
|
|
|
582
602
|
# Update Flow Structure
|
|
603
|
+
# Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
583
604
|
# @param flow_id [String] Flow ID
|
|
584
605
|
# @param token [String] JWT token or API key for authorization
|
|
606
|
+
# @param patch_flows_flow_id_assets_request [PatchFlowsFlowIdAssetsRequest]
|
|
585
607
|
# @param [Hash] opts the optional parameters
|
|
586
608
|
# @option opts [String] :waba_account_id
|
|
587
609
|
# @return [Array<(PatchFlowsFlowIdAssets200Response, Integer, Hash)>] PatchFlowsFlowIdAssets200Response data, response status code and response headers
|
|
588
|
-
def patch_flows_flow_id_assets_with_http_info(flow_id, token, opts = {})
|
|
610
|
+
def patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts = {})
|
|
589
611
|
if @api_client.config.debugging
|
|
590
612
|
@api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_assets ...'
|
|
591
613
|
end
|
|
@@ -597,6 +619,10 @@ module OneMsgSdk
|
|
|
597
619
|
if @api_client.config.client_side_validation && token.nil?
|
|
598
620
|
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_assets"
|
|
599
621
|
end
|
|
622
|
+
# verify the required parameter 'patch_flows_flow_id_assets_request' is set
|
|
623
|
+
if @api_client.config.client_side_validation && patch_flows_flow_id_assets_request.nil?
|
|
624
|
+
fail ArgumentError, "Missing the required parameter 'patch_flows_flow_id_assets_request' when calling FlowsApi.patch_flows_flow_id_assets"
|
|
625
|
+
end
|
|
600
626
|
# resource path
|
|
601
627
|
local_var_path = '/flows/{flowId}/assets'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
602
628
|
|
|
@@ -609,12 +635,17 @@ module OneMsgSdk
|
|
|
609
635
|
header_params = opts[:header_params] || {}
|
|
610
636
|
# HTTP header 'Accept' (if needed)
|
|
611
637
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
638
|
+
# HTTP header 'Content-Type'
|
|
639
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
640
|
+
if !content_type.nil?
|
|
641
|
+
header_params['Content-Type'] = content_type
|
|
642
|
+
end
|
|
612
643
|
|
|
613
644
|
# form parameters
|
|
614
645
|
form_params = opts[:form_params] || {}
|
|
615
646
|
|
|
616
647
|
# http body (model)
|
|
617
|
-
post_body = opts[:debug_body]
|
|
648
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_flows_flow_id_assets_request)
|
|
618
649
|
|
|
619
650
|
# return_type
|
|
620
651
|
return_type = opts[:debug_return_type] || 'PatchFlowsFlowIdAssets200Response'
|
|
@@ -640,23 +671,27 @@ module OneMsgSdk
|
|
|
640
671
|
end
|
|
641
672
|
|
|
642
673
|
# Update Flow Metadata
|
|
674
|
+
# Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
643
675
|
# @param flow_id [String] Flow ID
|
|
644
676
|
# @param token [String] JWT token or API key for authorization
|
|
677
|
+
# @param patch_flows_flow_id_metadata_request [PatchFlowsFlowIdMetadataRequest]
|
|
645
678
|
# @param [Hash] opts the optional parameters
|
|
646
679
|
# @option opts [String] :waba_account_id
|
|
647
680
|
# @return [Hash<String, Object>]
|
|
648
|
-
def patch_flows_flow_id_metadata(flow_id, token, opts = {})
|
|
649
|
-
data, _status_code, _headers = patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
681
|
+
def patch_flows_flow_id_metadata(flow_id, token, patch_flows_flow_id_metadata_request, opts = {})
|
|
682
|
+
data, _status_code, _headers = patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts)
|
|
650
683
|
data
|
|
651
684
|
end
|
|
652
685
|
|
|
653
686
|
# Update Flow Metadata
|
|
687
|
+
# Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
654
688
|
# @param flow_id [String] Flow ID
|
|
655
689
|
# @param token [String] JWT token or API key for authorization
|
|
690
|
+
# @param patch_flows_flow_id_metadata_request [PatchFlowsFlowIdMetadataRequest]
|
|
656
691
|
# @param [Hash] opts the optional parameters
|
|
657
692
|
# @option opts [String] :waba_account_id
|
|
658
693
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
659
|
-
def patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts = {})
|
|
694
|
+
def patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts = {})
|
|
660
695
|
if @api_client.config.debugging
|
|
661
696
|
@api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_metadata ...'
|
|
662
697
|
end
|
|
@@ -668,6 +703,10 @@ module OneMsgSdk
|
|
|
668
703
|
if @api_client.config.client_side_validation && token.nil?
|
|
669
704
|
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_metadata"
|
|
670
705
|
end
|
|
706
|
+
# verify the required parameter 'patch_flows_flow_id_metadata_request' is set
|
|
707
|
+
if @api_client.config.client_side_validation && patch_flows_flow_id_metadata_request.nil?
|
|
708
|
+
fail ArgumentError, "Missing the required parameter 'patch_flows_flow_id_metadata_request' when calling FlowsApi.patch_flows_flow_id_metadata"
|
|
709
|
+
end
|
|
671
710
|
# resource path
|
|
672
711
|
local_var_path = '/flows/{flowId}/metadata'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
673
712
|
|
|
@@ -680,12 +719,17 @@ module OneMsgSdk
|
|
|
680
719
|
header_params = opts[:header_params] || {}
|
|
681
720
|
# HTTP header 'Accept' (if needed)
|
|
682
721
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
722
|
+
# HTTP header 'Content-Type'
|
|
723
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
724
|
+
if !content_type.nil?
|
|
725
|
+
header_params['Content-Type'] = content_type
|
|
726
|
+
end
|
|
683
727
|
|
|
684
728
|
# form parameters
|
|
685
729
|
form_params = opts[:form_params] || {}
|
|
686
730
|
|
|
687
731
|
# http body (model)
|
|
688
|
-
post_body = opts[:debug_body]
|
|
732
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_flows_flow_id_metadata_request)
|
|
689
733
|
|
|
690
734
|
# return_type
|
|
691
735
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
@@ -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
|
|
@@ -21,18 +21,20 @@ module OneMsgSdk
|
|
|
21
21
|
end
|
|
22
22
|
# Create Group
|
|
23
23
|
# @param token [String] JWT token or API key for authorization
|
|
24
|
+
# @param create_groups_request [CreateGroupsRequest]
|
|
24
25
|
# @param [Hash] opts the optional parameters
|
|
25
26
|
# @return [CreateGroups200Response]
|
|
26
|
-
def create_groups(token, opts = {})
|
|
27
|
-
data, _status_code, _headers = create_groups_with_http_info(token, opts)
|
|
27
|
+
def create_groups(token, create_groups_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_groups_with_http_info(token, create_groups_request, opts)
|
|
28
29
|
data
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
# Create Group
|
|
32
33
|
# @param token [String] JWT token or API key for authorization
|
|
34
|
+
# @param create_groups_request [CreateGroupsRequest]
|
|
33
35
|
# @param [Hash] opts the optional parameters
|
|
34
36
|
# @return [Array<(CreateGroups200Response, Integer, Hash)>] CreateGroups200Response data, response status code and response headers
|
|
35
|
-
def create_groups_with_http_info(token, opts = {})
|
|
37
|
+
def create_groups_with_http_info(token, create_groups_request, opts = {})
|
|
36
38
|
if @api_client.config.debugging
|
|
37
39
|
@api_client.config.logger.debug 'Calling API: GroupsApi.create_groups ...'
|
|
38
40
|
end
|
|
@@ -40,6 +42,10 @@ module OneMsgSdk
|
|
|
40
42
|
if @api_client.config.client_side_validation && token.nil?
|
|
41
43
|
fail ArgumentError, "Missing the required parameter 'token' when calling GroupsApi.create_groups"
|
|
42
44
|
end
|
|
45
|
+
# verify the required parameter 'create_groups_request' is set
|
|
46
|
+
if @api_client.config.client_side_validation && create_groups_request.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'create_groups_request' when calling GroupsApi.create_groups"
|
|
48
|
+
end
|
|
43
49
|
# resource path
|
|
44
50
|
local_var_path = '/groups'
|
|
45
51
|
|
|
@@ -51,12 +57,17 @@ module OneMsgSdk
|
|
|
51
57
|
header_params = opts[:header_params] || {}
|
|
52
58
|
# HTTP header 'Accept' (if needed)
|
|
53
59
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
60
|
+
# HTTP header 'Content-Type'
|
|
61
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
62
|
+
if !content_type.nil?
|
|
63
|
+
header_params['Content-Type'] = content_type
|
|
64
|
+
end
|
|
54
65
|
|
|
55
66
|
# form parameters
|
|
56
67
|
form_params = opts[:form_params] || {}
|
|
57
68
|
|
|
58
69
|
# http body (model)
|
|
59
|
-
post_body = opts[:debug_body]
|
|
70
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_groups_request)
|
|
60
71
|
|
|
61
72
|
# return_type
|
|
62
73
|
return_type = opts[:debug_return_type] || 'CreateGroups200Response'
|
|
@@ -82,21 +93,25 @@ module OneMsgSdk
|
|
|
82
93
|
end
|
|
83
94
|
|
|
84
95
|
# Update Group Info
|
|
96
|
+
# Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
85
97
|
# @param group_id [String]
|
|
86
98
|
# @param token [String] JWT token or API key for authorization
|
|
99
|
+
# @param create_groups_group_id_request [CreateGroupsGroupIdRequest]
|
|
87
100
|
# @param [Hash] opts the optional parameters
|
|
88
101
|
# @return [Hash<String, Object>]
|
|
89
|
-
def create_groups_group_id(group_id, token, opts = {})
|
|
90
|
-
data, _status_code, _headers = create_groups_group_id_with_http_info(group_id, token, opts)
|
|
102
|
+
def create_groups_group_id(group_id, token, create_groups_group_id_request, opts = {})
|
|
103
|
+
data, _status_code, _headers = create_groups_group_id_with_http_info(group_id, token, create_groups_group_id_request, opts)
|
|
91
104
|
data
|
|
92
105
|
end
|
|
93
106
|
|
|
94
107
|
# Update Group Info
|
|
108
|
+
# Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
95
109
|
# @param group_id [String]
|
|
96
110
|
# @param token [String] JWT token or API key for authorization
|
|
111
|
+
# @param create_groups_group_id_request [CreateGroupsGroupIdRequest]
|
|
97
112
|
# @param [Hash] opts the optional parameters
|
|
98
113
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
99
|
-
def create_groups_group_id_with_http_info(group_id, token, opts = {})
|
|
114
|
+
def create_groups_group_id_with_http_info(group_id, token, create_groups_group_id_request, opts = {})
|
|
100
115
|
if @api_client.config.debugging
|
|
101
116
|
@api_client.config.logger.debug 'Calling API: GroupsApi.create_groups_group_id ...'
|
|
102
117
|
end
|
|
@@ -108,6 +123,10 @@ module OneMsgSdk
|
|
|
108
123
|
if @api_client.config.client_side_validation && token.nil?
|
|
109
124
|
fail ArgumentError, "Missing the required parameter 'token' when calling GroupsApi.create_groups_group_id"
|
|
110
125
|
end
|
|
126
|
+
# verify the required parameter 'create_groups_group_id_request' is set
|
|
127
|
+
if @api_client.config.client_side_validation && create_groups_group_id_request.nil?
|
|
128
|
+
fail ArgumentError, "Missing the required parameter 'create_groups_group_id_request' when calling GroupsApi.create_groups_group_id"
|
|
129
|
+
end
|
|
111
130
|
# resource path
|
|
112
131
|
local_var_path = '/groups/{groupId}'.sub('{groupId}', CGI.escape(group_id.to_s))
|
|
113
132
|
|
|
@@ -119,12 +138,17 @@ module OneMsgSdk
|
|
|
119
138
|
header_params = opts[:header_params] || {}
|
|
120
139
|
# HTTP header 'Accept' (if needed)
|
|
121
140
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
141
|
+
# HTTP header 'Content-Type'
|
|
142
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
143
|
+
if !content_type.nil?
|
|
144
|
+
header_params['Content-Type'] = content_type
|
|
145
|
+
end
|
|
122
146
|
|
|
123
147
|
# form parameters
|
|
124
148
|
form_params = opts[:form_params] || {}
|
|
125
149
|
|
|
126
150
|
# http body (model)
|
|
127
|
-
post_body = opts[:debug_body]
|
|
151
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_groups_group_id_request)
|
|
128
152
|
|
|
129
153
|
# return_type
|
|
130
154
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
@@ -289,6 +313,7 @@ module OneMsgSdk
|
|
|
289
313
|
# @param group_id [String]
|
|
290
314
|
# @param token [String] JWT token or API key for authorization
|
|
291
315
|
# @param [Hash] opts the optional parameters
|
|
316
|
+
# @option opts [String] :fields Comma-separated group fields to return
|
|
292
317
|
# @return [Hash<String, Object>]
|
|
293
318
|
def get_groups_group_id(group_id, token, opts = {})
|
|
294
319
|
data, _status_code, _headers = get_groups_group_id_with_http_info(group_id, token, opts)
|
|
@@ -299,6 +324,7 @@ module OneMsgSdk
|
|
|
299
324
|
# @param group_id [String]
|
|
300
325
|
# @param token [String] JWT token or API key for authorization
|
|
301
326
|
# @param [Hash] opts the optional parameters
|
|
327
|
+
# @option opts [String] :fields Comma-separated group fields to return
|
|
302
328
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
303
329
|
def get_groups_group_id_with_http_info(group_id, token, opts = {})
|
|
304
330
|
if @api_client.config.debugging
|
|
@@ -318,6 +344,7 @@ module OneMsgSdk
|
|
|
318
344
|
# query parameters
|
|
319
345
|
query_params = opts[:query_params] || {}
|
|
320
346
|
query_params[:'token'] = token
|
|
347
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
321
348
|
|
|
322
349
|
# header parameters
|
|
323
350
|
header_params = opts[:header_params] || {}
|
|
@@ -422,8 +449,12 @@ module OneMsgSdk
|
|
|
422
449
|
end
|
|
423
450
|
|
|
424
451
|
# Get Groups List
|
|
452
|
+
# List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
425
453
|
# @param token [String] JWT token or API key for authorization
|
|
426
454
|
# @param [Hash] opts the optional parameters
|
|
455
|
+
# @option opts [Integer] :limit Max groups to return
|
|
456
|
+
# @option opts [String] :before Cursor for the previous page
|
|
457
|
+
# @option opts [String] :after Cursor for the next page
|
|
427
458
|
# @return [Hash<String, Object>]
|
|
428
459
|
def list_groups(token, opts = {})
|
|
429
460
|
data, _status_code, _headers = list_groups_with_http_info(token, opts)
|
|
@@ -431,8 +462,12 @@ module OneMsgSdk
|
|
|
431
462
|
end
|
|
432
463
|
|
|
433
464
|
# Get Groups List
|
|
465
|
+
# List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
434
466
|
# @param token [String] JWT token or API key for authorization
|
|
435
467
|
# @param [Hash] opts the optional parameters
|
|
468
|
+
# @option opts [Integer] :limit Max groups to return
|
|
469
|
+
# @option opts [String] :before Cursor for the previous page
|
|
470
|
+
# @option opts [String] :after Cursor for the next page
|
|
436
471
|
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
437
472
|
def list_groups_with_http_info(token, opts = {})
|
|
438
473
|
if @api_client.config.debugging
|
|
@@ -448,6 +483,9 @@ module OneMsgSdk
|
|
|
448
483
|
# query parameters
|
|
449
484
|
query_params = opts[:query_params] || {}
|
|
450
485
|
query_params[:'token'] = token
|
|
486
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
487
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
|
488
|
+
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
451
489
|
|
|
452
490
|
# header parameters
|
|
453
491
|
header_params = opts[:header_params] || {}
|