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
data/docs/FlowsApi.md
CHANGED
|
@@ -19,10 +19,12 @@ All URIs are relative to *https://api.1msg.io*
|
|
|
19
19
|
|
|
20
20
|
## create_flows
|
|
21
21
|
|
|
22
|
-
> <CreateGroups200Response> create_flows(token, opts)
|
|
22
|
+
> <CreateGroups200Response> create_flows(token, create_flows_request, opts)
|
|
23
23
|
|
|
24
24
|
Create Flow
|
|
25
25
|
|
|
26
|
+
Create a WhatsApp Flow (`name` + `categories` required). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
27
|
+
|
|
26
28
|
### Examples
|
|
27
29
|
|
|
28
30
|
```ruby
|
|
@@ -38,13 +40,14 @@ end
|
|
|
38
40
|
|
|
39
41
|
api_instance = OneMsgSdk::FlowsApi.new
|
|
40
42
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
43
|
+
create_flows_request = OneMsgSdk::CreateFlowsRequest.new({name: 'name_example', categories: ['SIGN_UP']}) # CreateFlowsRequest |
|
|
41
44
|
opts = {
|
|
42
45
|
waba_account_id: '{{wabaAccountId}}' # String |
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
begin
|
|
46
49
|
# Create Flow
|
|
47
|
-
result = api_instance.create_flows(token, opts)
|
|
50
|
+
result = api_instance.create_flows(token, create_flows_request, opts)
|
|
48
51
|
p result
|
|
49
52
|
rescue OneMsgSdk::ApiError => e
|
|
50
53
|
puts "Error when calling FlowsApi->create_flows: #{e}"
|
|
@@ -55,12 +58,12 @@ end
|
|
|
55
58
|
|
|
56
59
|
This returns an Array which contains the response data, status code and headers.
|
|
57
60
|
|
|
58
|
-
> <Array(<CreateGroups200Response>, Integer, Hash)> create_flows_with_http_info(token, opts)
|
|
61
|
+
> <Array(<CreateGroups200Response>, Integer, Hash)> create_flows_with_http_info(token, create_flows_request, opts)
|
|
59
62
|
|
|
60
63
|
```ruby
|
|
61
64
|
begin
|
|
62
65
|
# Create Flow
|
|
63
|
-
data, status_code, headers = api_instance.create_flows_with_http_info(token, opts)
|
|
66
|
+
data, status_code, headers = api_instance.create_flows_with_http_info(token, create_flows_request, opts)
|
|
64
67
|
p status_code # => 2xx
|
|
65
68
|
p headers # => { ... }
|
|
66
69
|
p data # => <CreateGroups200Response>
|
|
@@ -74,6 +77,7 @@ end
|
|
|
74
77
|
| Name | Type | Description | Notes |
|
|
75
78
|
| ---- | ---- | ----------- | ----- |
|
|
76
79
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
80
|
+
| **create_flows_request** | [**CreateFlowsRequest**](CreateFlowsRequest.md) | | |
|
|
77
81
|
| **waba_account_id** | **String** | | [optional] |
|
|
78
82
|
|
|
79
83
|
### Return type
|
|
@@ -86,7 +90,7 @@ end
|
|
|
86
90
|
|
|
87
91
|
### HTTP request headers
|
|
88
92
|
|
|
89
|
-
- **Content-Type**:
|
|
93
|
+
- **Content-Type**: application/json
|
|
90
94
|
- **Accept**: application/json
|
|
91
95
|
|
|
92
96
|
|
|
@@ -542,6 +546,8 @@ end
|
|
|
542
546
|
|
|
543
547
|
List Flows
|
|
544
548
|
|
|
549
|
+
List WhatsApp Flows for the WABA. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
550
|
+
|
|
545
551
|
### Examples
|
|
546
552
|
|
|
547
553
|
```ruby
|
|
@@ -558,7 +564,8 @@ end
|
|
|
558
564
|
api_instance = OneMsgSdk::FlowsApi.new
|
|
559
565
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
560
566
|
opts = {
|
|
561
|
-
waba_account_id: '{{wabaAccountId}}' # String |
|
|
567
|
+
waba_account_id: '{{wabaAccountId}}', # String |
|
|
568
|
+
fields: 'fields_example' # String | Comma-separated Flow fields to return
|
|
562
569
|
}
|
|
563
570
|
|
|
564
571
|
begin
|
|
@@ -594,6 +601,7 @@ end
|
|
|
594
601
|
| ---- | ---- | ----------- | ----- |
|
|
595
602
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
596
603
|
| **waba_account_id** | **String** | | [optional] |
|
|
604
|
+
| **fields** | **String** | Comma-separated Flow fields to return | [optional] |
|
|
597
605
|
|
|
598
606
|
### Return type
|
|
599
607
|
|
|
@@ -611,10 +619,12 @@ end
|
|
|
611
619
|
|
|
612
620
|
## patch_flows_flow_id_assets
|
|
613
621
|
|
|
614
|
-
> <PatchFlowsFlowIdAssets200Response> patch_flows_flow_id_assets(flow_id, token, opts)
|
|
622
|
+
> <PatchFlowsFlowIdAssets200Response> patch_flows_flow_id_assets(flow_id, token, patch_flows_flow_id_assets_request, opts)
|
|
615
623
|
|
|
616
624
|
Update Flow Structure
|
|
617
625
|
|
|
626
|
+
Replace the Flow JSON document (`flowJson`). Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
627
|
+
|
|
618
628
|
### Examples
|
|
619
629
|
|
|
620
630
|
```ruby
|
|
@@ -631,13 +641,14 @@ end
|
|
|
631
641
|
api_instance = OneMsgSdk::FlowsApi.new
|
|
632
642
|
flow_id = 'flow_id_example' # String | Flow ID
|
|
633
643
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
644
|
+
patch_flows_flow_id_assets_request = OneMsgSdk::PatchFlowsFlowIdAssetsRequest.new({flow_json: { key: 3.56}}) # PatchFlowsFlowIdAssetsRequest |
|
|
634
645
|
opts = {
|
|
635
646
|
waba_account_id: '{{wabaAccountId}}' # String |
|
|
636
647
|
}
|
|
637
648
|
|
|
638
649
|
begin
|
|
639
650
|
# Update Flow Structure
|
|
640
|
-
result = api_instance.patch_flows_flow_id_assets(flow_id, token, opts)
|
|
651
|
+
result = api_instance.patch_flows_flow_id_assets(flow_id, token, patch_flows_flow_id_assets_request, opts)
|
|
641
652
|
p result
|
|
642
653
|
rescue OneMsgSdk::ApiError => e
|
|
643
654
|
puts "Error when calling FlowsApi->patch_flows_flow_id_assets: #{e}"
|
|
@@ -648,12 +659,12 @@ end
|
|
|
648
659
|
|
|
649
660
|
This returns an Array which contains the response data, status code and headers.
|
|
650
661
|
|
|
651
|
-
> <Array(<PatchFlowsFlowIdAssets200Response>, Integer, Hash)> patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
662
|
+
> <Array(<PatchFlowsFlowIdAssets200Response>, Integer, Hash)> patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts)
|
|
652
663
|
|
|
653
664
|
```ruby
|
|
654
665
|
begin
|
|
655
666
|
# Update Flow Structure
|
|
656
|
-
data, status_code, headers = api_instance.patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
667
|
+
data, status_code, headers = api_instance.patch_flows_flow_id_assets_with_http_info(flow_id, token, patch_flows_flow_id_assets_request, opts)
|
|
657
668
|
p status_code # => 2xx
|
|
658
669
|
p headers # => { ... }
|
|
659
670
|
p data # => <PatchFlowsFlowIdAssets200Response>
|
|
@@ -668,6 +679,7 @@ end
|
|
|
668
679
|
| ---- | ---- | ----------- | ----- |
|
|
669
680
|
| **flow_id** | **String** | Flow ID | |
|
|
670
681
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
682
|
+
| **patch_flows_flow_id_assets_request** | [**PatchFlowsFlowIdAssetsRequest**](PatchFlowsFlowIdAssetsRequest.md) | | |
|
|
671
683
|
| **waba_account_id** | **String** | | [optional] |
|
|
672
684
|
|
|
673
685
|
### Return type
|
|
@@ -680,16 +692,18 @@ end
|
|
|
680
692
|
|
|
681
693
|
### HTTP request headers
|
|
682
694
|
|
|
683
|
-
- **Content-Type**:
|
|
695
|
+
- **Content-Type**: application/json
|
|
684
696
|
- **Accept**: application/json
|
|
685
697
|
|
|
686
698
|
|
|
687
699
|
## patch_flows_flow_id_metadata
|
|
688
700
|
|
|
689
|
-
> Hash<String, Object> patch_flows_flow_id_metadata(flow_id, token, opts)
|
|
701
|
+
> Hash<String, Object> patch_flows_flow_id_metadata(flow_id, token, patch_flows_flow_id_metadata_request, opts)
|
|
690
702
|
|
|
691
703
|
Update Flow Metadata
|
|
692
704
|
|
|
705
|
+
Update Flow `name`, `categories`, and/or `endpointUri`. Currently returns HTTP 501 until the Meta Graph Flows rewrite is available.
|
|
706
|
+
|
|
693
707
|
### Examples
|
|
694
708
|
|
|
695
709
|
```ruby
|
|
@@ -706,13 +720,14 @@ end
|
|
|
706
720
|
api_instance = OneMsgSdk::FlowsApi.new
|
|
707
721
|
flow_id = 'flow_id_example' # String | Flow ID
|
|
708
722
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
723
|
+
patch_flows_flow_id_metadata_request = OneMsgSdk::PatchFlowsFlowIdMetadataRequest.new # PatchFlowsFlowIdMetadataRequest |
|
|
709
724
|
opts = {
|
|
710
725
|
waba_account_id: '{{wabaAccountId}}' # String |
|
|
711
726
|
}
|
|
712
727
|
|
|
713
728
|
begin
|
|
714
729
|
# Update Flow Metadata
|
|
715
|
-
result = api_instance.patch_flows_flow_id_metadata(flow_id, token, opts)
|
|
730
|
+
result = api_instance.patch_flows_flow_id_metadata(flow_id, token, patch_flows_flow_id_metadata_request, opts)
|
|
716
731
|
p result
|
|
717
732
|
rescue OneMsgSdk::ApiError => e
|
|
718
733
|
puts "Error when calling FlowsApi->patch_flows_flow_id_metadata: #{e}"
|
|
@@ -723,12 +738,12 @@ end
|
|
|
723
738
|
|
|
724
739
|
This returns an Array which contains the response data, status code and headers.
|
|
725
740
|
|
|
726
|
-
> <Array(Hash<String, Object>, Integer, Hash)> patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
741
|
+
> <Array(Hash<String, Object>, Integer, Hash)> patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts)
|
|
727
742
|
|
|
728
743
|
```ruby
|
|
729
744
|
begin
|
|
730
745
|
# Update Flow Metadata
|
|
731
|
-
data, status_code, headers = api_instance.patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
746
|
+
data, status_code, headers = api_instance.patch_flows_flow_id_metadata_with_http_info(flow_id, token, patch_flows_flow_id_metadata_request, opts)
|
|
732
747
|
p status_code # => 2xx
|
|
733
748
|
p headers # => { ... }
|
|
734
749
|
p data # => Hash<String, Object>
|
|
@@ -743,6 +758,7 @@ end
|
|
|
743
758
|
| ---- | ---- | ----------- | ----- |
|
|
744
759
|
| **flow_id** | **String** | Flow ID | |
|
|
745
760
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
761
|
+
| **patch_flows_flow_id_metadata_request** | [**PatchFlowsFlowIdMetadataRequest**](PatchFlowsFlowIdMetadataRequest.md) | | |
|
|
746
762
|
| **waba_account_id** | **String** | | [optional] |
|
|
747
763
|
|
|
748
764
|
### Return type
|
|
@@ -755,7 +771,7 @@ end
|
|
|
755
771
|
|
|
756
772
|
### HTTP request headers
|
|
757
773
|
|
|
758
|
-
- **Content-Type**:
|
|
774
|
+
- **Content-Type**: application/json
|
|
759
775
|
- **Accept**: application/json
|
|
760
776
|
|
|
761
777
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OneMsgSdk::GetStatus200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **is_cloud** | **Boolean** | | [optional] |
|
|
8
|
+
| **status** | **String** | typically `connected` when the number can send | [optional] |
|
|
9
|
+
| **account_status** | **String** | | [optional] |
|
|
10
|
+
| **mm_lite_available** | **Boolean** | | [optional] |
|
|
11
|
+
| **health_status_warning** | **String** | Optional soft-fail warning when Meta Graph health_status could not be loaded. Never includes internal provider names. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'one_msg_sdk'
|
|
17
|
+
|
|
18
|
+
instance = OneMsgSdk::GetStatus200Response.new(
|
|
19
|
+
is_cloud: true,
|
|
20
|
+
status: connected,
|
|
21
|
+
account_status: authenticated,
|
|
22
|
+
mm_lite_available: null,
|
|
23
|
+
health_status_warning: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -4,7 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **webhook_url** | **
|
|
7
|
+
| **webhook_url** | [**GetWebhook200ResponseWebhookUrl**](GetWebhook200ResponseWebhookUrl.md) | | [optional] |
|
|
8
|
+
| **have_disabled_webhooks** | **Boolean** | `true` when at least one URL in `webhookUrl` is sticky auto-disabled. Not \"the channel is dead\": other configured URLs still receive events. Send/receive are unaffected. | [optional] |
|
|
9
|
+
| **circuit_state** | **String** | Compatibility scalar for **one** URL (first sticky-disabled, else first configured). Not the channel as a whole. Prefer `webhookStatuses[].circuitState`. | [optional] |
|
|
10
|
+
| **reason** | **String** | Last qualifying fail reason of the summary URL (same URL as `circuitState`) | [optional] |
|
|
11
|
+
| **fails** | **Integer** | Diagnostic only (summary URL). Qualifying failures in the rolling ~10 minute breaker window — not lifetime and not customer retries. Prefer `webhookStatuses` / `disabledWebhooks`. | [optional] |
|
|
12
|
+
| **trips** | **Integer** | Diagnostic only (summary URL). Failed recovery probes (≈15 min → 1 h → 6 h). Sticky disable after 3. Not a blind unblock timer. | [optional] |
|
|
13
|
+
| **disabled_at** | **Integer** | Epoch milliseconds when the summary URL became sticky-disabled | [optional] |
|
|
14
|
+
| **first_fail_at** | **Integer** | Diagnostic only (summary URL). Epoch ms of the first fail in the current ~10 minute window (pairs with `fails`). | [optional] |
|
|
15
|
+
| **last_status** | **Integer** | Last HTTP status from the summary URL, when known | [optional] |
|
|
16
|
+
| **next_probe_at** | **Integer** | Epoch milliseconds of the next half-open probe for the summary URL, if any | [optional] |
|
|
17
|
+
| **disabled_webhooks** | **Array<Hash<String, Object>>** | Currently configured URLs that are sticky auto-disabled (subset of `webhookUrl`). Does not include leftover URLs that are no longer configured. | [optional] |
|
|
18
|
+
| **webhook_statuses** | [**Array<WebhookUrlStatus>**](WebhookUrlStatus.md) | One entry per currently configured URL. Prefer this over top-level `haveDisabledWebhooks` / `circuitState` when more than one webhook is set. | [optional] |
|
|
8
19
|
|
|
9
20
|
## Example
|
|
10
21
|
|
|
@@ -12,7 +23,18 @@
|
|
|
12
23
|
require 'one_msg_sdk'
|
|
13
24
|
|
|
14
25
|
instance = OneMsgSdk::GetWebhook200Response.new(
|
|
15
|
-
webhook_url: null
|
|
26
|
+
webhook_url: null,
|
|
27
|
+
have_disabled_webhooks: null,
|
|
28
|
+
circuit_state: null,
|
|
29
|
+
reason: null,
|
|
30
|
+
fails: null,
|
|
31
|
+
trips: null,
|
|
32
|
+
disabled_at: null,
|
|
33
|
+
first_fail_at: null,
|
|
34
|
+
last_status: null,
|
|
35
|
+
next_probe_at: null,
|
|
36
|
+
disabled_webhooks: null,
|
|
37
|
+
webhook_statuses: null
|
|
16
38
|
)
|
|
17
39
|
```
|
|
18
40
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OneMsgSdk::GetWebhook200ResponseWebhookUrl
|
|
2
|
+
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'one_msg_sdk'
|
|
13
|
+
|
|
14
|
+
OneMsgSdk::GetWebhook200ResponseWebhookUrl.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'Array<String>',
|
|
18
|
+
# :'String'
|
|
19
|
+
# ]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### build
|
|
23
|
+
|
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'one_msg_sdk'
|
|
30
|
+
|
|
31
|
+
OneMsgSdk::GetWebhook200ResponseWebhookUrl.build(data)
|
|
32
|
+
# => #<Array<String>:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
OneMsgSdk::GetWebhook200ResponseWebhookUrl.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| ---- | ---- | ----------- |
|
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
43
|
+
|
|
44
|
+
#### Return type
|
|
45
|
+
|
|
46
|
+
- `Array<String>`
|
|
47
|
+
- `String`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
data/docs/GroupsApi.md
CHANGED
|
@@ -15,7 +15,7 @@ All URIs are relative to *https://api.1msg.io*
|
|
|
15
15
|
|
|
16
16
|
## create_groups
|
|
17
17
|
|
|
18
|
-
> <CreateGroups200Response> create_groups(token)
|
|
18
|
+
> <CreateGroups200Response> create_groups(token, create_groups_request)
|
|
19
19
|
|
|
20
20
|
Create Group
|
|
21
21
|
|
|
@@ -34,10 +34,11 @@ end
|
|
|
34
34
|
|
|
35
35
|
api_instance = OneMsgSdk::GroupsApi.new
|
|
36
36
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
37
|
+
create_groups_request = OneMsgSdk::CreateGroupsRequest.new({group_name: 'group_name_example'}) # CreateGroupsRequest |
|
|
37
38
|
|
|
38
39
|
begin
|
|
39
40
|
# Create Group
|
|
40
|
-
result = api_instance.create_groups(token)
|
|
41
|
+
result = api_instance.create_groups(token, create_groups_request)
|
|
41
42
|
p result
|
|
42
43
|
rescue OneMsgSdk::ApiError => e
|
|
43
44
|
puts "Error when calling GroupsApi->create_groups: #{e}"
|
|
@@ -48,12 +49,12 @@ end
|
|
|
48
49
|
|
|
49
50
|
This returns an Array which contains the response data, status code and headers.
|
|
50
51
|
|
|
51
|
-
> <Array(<CreateGroups200Response>, Integer, Hash)> create_groups_with_http_info(token)
|
|
52
|
+
> <Array(<CreateGroups200Response>, Integer, Hash)> create_groups_with_http_info(token, create_groups_request)
|
|
52
53
|
|
|
53
54
|
```ruby
|
|
54
55
|
begin
|
|
55
56
|
# Create Group
|
|
56
|
-
data, status_code, headers = api_instance.create_groups_with_http_info(token)
|
|
57
|
+
data, status_code, headers = api_instance.create_groups_with_http_info(token, create_groups_request)
|
|
57
58
|
p status_code # => 2xx
|
|
58
59
|
p headers # => { ... }
|
|
59
60
|
p data # => <CreateGroups200Response>
|
|
@@ -67,6 +68,7 @@ end
|
|
|
67
68
|
| Name | Type | Description | Notes |
|
|
68
69
|
| ---- | ---- | ----------- | ----- |
|
|
69
70
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
71
|
+
| **create_groups_request** | [**CreateGroupsRequest**](CreateGroupsRequest.md) | | |
|
|
70
72
|
|
|
71
73
|
### Return type
|
|
72
74
|
|
|
@@ -78,16 +80,18 @@ end
|
|
|
78
80
|
|
|
79
81
|
### HTTP request headers
|
|
80
82
|
|
|
81
|
-
- **Content-Type**:
|
|
83
|
+
- **Content-Type**: application/json
|
|
82
84
|
- **Accept**: application/json
|
|
83
85
|
|
|
84
86
|
|
|
85
87
|
## create_groups_group_id
|
|
86
88
|
|
|
87
|
-
> Hash<String, Object> create_groups_group_id(group_id, token)
|
|
89
|
+
> Hash<String, Object> create_groups_group_id(group_id, token, create_groups_group_id_request)
|
|
88
90
|
|
|
89
91
|
Update Group Info
|
|
90
92
|
|
|
93
|
+
Update group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).
|
|
94
|
+
|
|
91
95
|
### Examples
|
|
92
96
|
|
|
93
97
|
```ruby
|
|
@@ -104,10 +108,11 @@ end
|
|
|
104
108
|
api_instance = OneMsgSdk::GroupsApi.new
|
|
105
109
|
group_id = '{{createdGroupId}}' # String |
|
|
106
110
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
111
|
+
create_groups_group_id_request = OneMsgSdk::CreateGroupsGroupIdRequest.new # CreateGroupsGroupIdRequest |
|
|
107
112
|
|
|
108
113
|
begin
|
|
109
114
|
# Update Group Info
|
|
110
|
-
result = api_instance.create_groups_group_id(group_id, token)
|
|
115
|
+
result = api_instance.create_groups_group_id(group_id, token, create_groups_group_id_request)
|
|
111
116
|
p result
|
|
112
117
|
rescue OneMsgSdk::ApiError => e
|
|
113
118
|
puts "Error when calling GroupsApi->create_groups_group_id: #{e}"
|
|
@@ -118,12 +123,12 @@ end
|
|
|
118
123
|
|
|
119
124
|
This returns an Array which contains the response data, status code and headers.
|
|
120
125
|
|
|
121
|
-
> <Array(Hash<String, Object>, Integer, Hash)> create_groups_group_id_with_http_info(group_id, token)
|
|
126
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_groups_group_id_with_http_info(group_id, token, create_groups_group_id_request)
|
|
122
127
|
|
|
123
128
|
```ruby
|
|
124
129
|
begin
|
|
125
130
|
# Update Group Info
|
|
126
|
-
data, status_code, headers = api_instance.create_groups_group_id_with_http_info(group_id, token)
|
|
131
|
+
data, status_code, headers = api_instance.create_groups_group_id_with_http_info(group_id, token, create_groups_group_id_request)
|
|
127
132
|
p status_code # => 2xx
|
|
128
133
|
p headers # => { ... }
|
|
129
134
|
p data # => Hash<String, Object>
|
|
@@ -138,6 +143,7 @@ end
|
|
|
138
143
|
| ---- | ---- | ----------- | ----- |
|
|
139
144
|
| **group_id** | **String** | | |
|
|
140
145
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
146
|
+
| **create_groups_group_id_request** | [**CreateGroupsGroupIdRequest**](CreateGroupsGroupIdRequest.md) | | |
|
|
141
147
|
|
|
142
148
|
### Return type
|
|
143
149
|
|
|
@@ -149,7 +155,7 @@ end
|
|
|
149
155
|
|
|
150
156
|
### HTTP request headers
|
|
151
157
|
|
|
152
|
-
- **Content-Type**:
|
|
158
|
+
- **Content-Type**: application/json
|
|
153
159
|
- **Accept**: application/json
|
|
154
160
|
|
|
155
161
|
|
|
@@ -297,7 +303,7 @@ end
|
|
|
297
303
|
|
|
298
304
|
## get_groups_group_id
|
|
299
305
|
|
|
300
|
-
> Hash<String, Object> get_groups_group_id(group_id, token)
|
|
306
|
+
> Hash<String, Object> get_groups_group_id(group_id, token, opts)
|
|
301
307
|
|
|
302
308
|
Get Group Info
|
|
303
309
|
|
|
@@ -317,10 +323,13 @@ end
|
|
|
317
323
|
api_instance = OneMsgSdk::GroupsApi.new
|
|
318
324
|
group_id = '{{createdGroupId}}' # String |
|
|
319
325
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
326
|
+
opts = {
|
|
327
|
+
fields: 'fields_example' # String | Comma-separated group fields to return
|
|
328
|
+
}
|
|
320
329
|
|
|
321
330
|
begin
|
|
322
331
|
# Get Group Info
|
|
323
|
-
result = api_instance.get_groups_group_id(group_id, token)
|
|
332
|
+
result = api_instance.get_groups_group_id(group_id, token, opts)
|
|
324
333
|
p result
|
|
325
334
|
rescue OneMsgSdk::ApiError => e
|
|
326
335
|
puts "Error when calling GroupsApi->get_groups_group_id: #{e}"
|
|
@@ -331,12 +340,12 @@ end
|
|
|
331
340
|
|
|
332
341
|
This returns an Array which contains the response data, status code and headers.
|
|
333
342
|
|
|
334
|
-
> <Array(Hash<String, Object>, Integer, Hash)> get_groups_group_id_with_http_info(group_id, token)
|
|
343
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_groups_group_id_with_http_info(group_id, token, opts)
|
|
335
344
|
|
|
336
345
|
```ruby
|
|
337
346
|
begin
|
|
338
347
|
# Get Group Info
|
|
339
|
-
data, status_code, headers = api_instance.get_groups_group_id_with_http_info(group_id, token)
|
|
348
|
+
data, status_code, headers = api_instance.get_groups_group_id_with_http_info(group_id, token, opts)
|
|
340
349
|
p status_code # => 2xx
|
|
341
350
|
p headers # => { ... }
|
|
342
351
|
p data # => Hash<String, Object>
|
|
@@ -351,6 +360,7 @@ end
|
|
|
351
360
|
| ---- | ---- | ----------- | ----- |
|
|
352
361
|
| **group_id** | **String** | | |
|
|
353
362
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
363
|
+
| **fields** | **String** | Comma-separated group fields to return | [optional] |
|
|
354
364
|
|
|
355
365
|
### Return type
|
|
356
366
|
|
|
@@ -439,10 +449,12 @@ end
|
|
|
439
449
|
|
|
440
450
|
## list_groups
|
|
441
451
|
|
|
442
|
-
> Hash<String, Object> list_groups(token)
|
|
452
|
+
> Hash<String, Object> list_groups(token, opts)
|
|
443
453
|
|
|
444
454
|
Get Groups List
|
|
445
455
|
|
|
456
|
+
List WhatsApp groups for this channel. Paginate with `limit`, `before`, and `after`.
|
|
457
|
+
|
|
446
458
|
### Examples
|
|
447
459
|
|
|
448
460
|
```ruby
|
|
@@ -458,10 +470,15 @@ end
|
|
|
458
470
|
|
|
459
471
|
api_instance = OneMsgSdk::GroupsApi.new
|
|
460
472
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
473
|
+
opts = {
|
|
474
|
+
limit: 56, # Integer | Max groups to return
|
|
475
|
+
before: 'before_example', # String | Cursor for the previous page
|
|
476
|
+
after: 'after_example' # String | Cursor for the next page
|
|
477
|
+
}
|
|
461
478
|
|
|
462
479
|
begin
|
|
463
480
|
# Get Groups List
|
|
464
|
-
result = api_instance.list_groups(token)
|
|
481
|
+
result = api_instance.list_groups(token, opts)
|
|
465
482
|
p result
|
|
466
483
|
rescue OneMsgSdk::ApiError => e
|
|
467
484
|
puts "Error when calling GroupsApi->list_groups: #{e}"
|
|
@@ -472,12 +489,12 @@ end
|
|
|
472
489
|
|
|
473
490
|
This returns an Array which contains the response data, status code and headers.
|
|
474
491
|
|
|
475
|
-
> <Array(Hash<String, Object>, Integer, Hash)> list_groups_with_http_info(token)
|
|
492
|
+
> <Array(Hash<String, Object>, Integer, Hash)> list_groups_with_http_info(token, opts)
|
|
476
493
|
|
|
477
494
|
```ruby
|
|
478
495
|
begin
|
|
479
496
|
# Get Groups List
|
|
480
|
-
data, status_code, headers = api_instance.list_groups_with_http_info(token)
|
|
497
|
+
data, status_code, headers = api_instance.list_groups_with_http_info(token, opts)
|
|
481
498
|
p status_code # => 2xx
|
|
482
499
|
p headers # => { ... }
|
|
483
500
|
p data # => Hash<String, Object>
|
|
@@ -491,6 +508,9 @@ end
|
|
|
491
508
|
| Name | Type | Description | Notes |
|
|
492
509
|
| ---- | ---- | ----------- | ----- |
|
|
493
510
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
511
|
+
| **limit** | **Integer** | Max groups to return | [optional] |
|
|
512
|
+
| **before** | **String** | Cursor for the previous page | [optional] |
|
|
513
|
+
| **after** | **String** | Cursor for the next page | [optional] |
|
|
494
514
|
|
|
495
515
|
### Return type
|
|
496
516
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# OneMsgSdk::InitiateCallRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **messaging_product** | **String** | Must be `whatsapp` | |
|
|
8
|
+
| **action** | **String** | Call control action | |
|
|
9
|
+
| **call_id** | **String** | WhatsApp call id from the inbound/outbound calls webhook (`calls[].id`). Required for `pre_accept`, `accept`, `reject`, `terminate`. | [optional] |
|
|
10
|
+
| **to** | **String** | Recipient WhatsApp user phone (digits, country code, no +). Required for outbound `connect`. | [optional] |
|
|
11
|
+
| **biz_opaque_callback_data** | **String** | Optional opaque string echoed on later call webhooks for correlation | [optional] |
|
|
12
|
+
| **session** | [**InitiateCallRequestSession**](InitiateCallRequestSession.md) | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'one_msg_sdk'
|
|
18
|
+
|
|
19
|
+
instance = OneMsgSdk::InitiateCallRequest.new(
|
|
20
|
+
messaging_product: whatsapp,
|
|
21
|
+
action: connect,
|
|
22
|
+
call_id: wacid.ABGGFjFVU2AfAgo6V-Hc5eCgK5Gh,
|
|
23
|
+
to: 12185552828,
|
|
24
|
+
biz_opaque_callback_data: order-123-callback,
|
|
25
|
+
session: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# OneMsgSdk::InitiateCallRequestSession
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **sdp_type** | **String** | offer for outbound connect; answer for pre_accept/accept | |
|
|
8
|
+
| **sdp** | **String** | Full SDP (RFC 8866). Replace placeholders with SDP from your WebRTC stack. Must negotiate ICE, DTLS-SRTP, and OPUS for WhatsApp media. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'one_msg_sdk'
|
|
14
|
+
|
|
15
|
+
instance = OneMsgSdk::InitiateCallRequestSession.new(
|
|
16
|
+
sdp_type: offer,
|
|
17
|
+
sdp: [REPLACE_WITH_WEBRTC_SDP]
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OneMsgSdk::InitiateCallResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **messaging_product** | **String** | | [optional] |
|
|
8
|
+
| **success** | **Boolean** | | [optional] |
|
|
9
|
+
| **calls** | [**Array<InitiateCallResponseCallsInner>**](InitiateCallResponseCallsInner.md) | Present on outbound `connect` — contains the new call id | [optional] |
|
|
10
|
+
| **result** | **String** | Legacy success marker when upstream returns an empty body | [optional] |
|
|
11
|
+
| **response** | [**InitiateCallResponseResponse**](InitiateCallResponseResponse.md) | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'one_msg_sdk'
|
|
17
|
+
|
|
18
|
+
instance = OneMsgSdk::InitiateCallResponse.new(
|
|
19
|
+
messaging_product: whatsapp,
|
|
20
|
+
success: true,
|
|
21
|
+
calls: null,
|
|
22
|
+
result: success,
|
|
23
|
+
response: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# OneMsgSdk::InitiateCallResponseCallsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'one_msg_sdk'
|
|
13
|
+
|
|
14
|
+
instance = OneMsgSdk::InitiateCallResponseCallsInner.new(
|
|
15
|
+
id: wacid.HBgLMTIxODU1NTI4MjgVAgARGCAyODRQIAFRoA
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# OneMsgSdk::InitiateCallResponseResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'one_msg_sdk'
|
|
13
|
+
|
|
14
|
+
instance = OneMsgSdk::InitiateCallResponseResponse.new(
|
|
15
|
+
error: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|