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,22 @@
|
|
|
1
|
+
# OneMsgSdk::UpdateCallingSettings200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **success** | **Boolean** | | [optional] |
|
|
8
|
+
| **result** | **String** | | [optional] |
|
|
9
|
+
| **response** | [**UpdateCallingSettings200ResponseResponse**](UpdateCallingSettings200ResponseResponse.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'one_msg_sdk'
|
|
15
|
+
|
|
16
|
+
instance = OneMsgSdk::UpdateCallingSettings200Response.new(
|
|
17
|
+
success: true,
|
|
18
|
+
result: success,
|
|
19
|
+
response: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# OneMsgSdk::UpdateCallingSettings200ResponseResponse
|
|
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::UpdateCallingSettings200ResponseResponse.new(
|
|
15
|
+
error: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# OneMsgSdk::UpdateMe200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **result** | **String** | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'one_msg_sdk'
|
|
13
|
+
|
|
14
|
+
instance = OneMsgSdk::UpdateMe200Response.new(
|
|
15
|
+
result: success
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/UpdateMeRequest.md
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **about** | **String** | Profile About section | [optional] |
|
|
8
|
-
| **address** | **String** |
|
|
7
|
+
| **about** | **String** | Profile About section (WhatsApp status text) | [optional] |
|
|
8
|
+
| **address** | **String** | Business address shown on the profile | [optional] |
|
|
9
9
|
| **description** | **String** | Business description (max 256 characters) | [optional] |
|
|
10
|
-
| **email** | **String** |
|
|
10
|
+
| **email** | **String** | Business email shown on the profile | [optional] |
|
|
11
11
|
| **vertical** | **String** | Industry of the business | [optional] |
|
|
12
12
|
| **photo** | **String** | HTTPS URL or data:image/...;base64,... payload | [optional] |
|
|
13
|
-
| **websites** | **Array<String>** |
|
|
13
|
+
| **websites** | **Array<String>** | Business website URLs | [optional] |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
require 'one_msg_sdk'
|
|
19
19
|
|
|
20
20
|
instance = OneMsgSdk::UpdateMeRequest.new(
|
|
21
|
-
about:
|
|
21
|
+
about: Available 9–18,
|
|
22
22
|
address: null,
|
|
23
23
|
description: null,
|
|
24
|
-
email:
|
|
24
|
+
email: support@example.com,
|
|
25
25
|
vertical: null,
|
|
26
26
|
photo: null,
|
|
27
27
|
websites: null
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# OneMsgSdk::WebhookUrlStatus
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **url** | **String** | This webhook URL (same string as in `webhookUrl`) | |
|
|
8
|
+
| **circuit_state** | **String** | Delivery state for this URL only. `ok` delivering; `degraded` recent qualifying fails (still delivering, warning email on the 2nd fail); `open` skipping most deliveries pending a probe; `half_open` probe in flight (resume only on HTTP 2xx); `disabled` sticky auto-disabled until self-serve re-enable (`POST /webhook` / `POST /settings` with this URL) or a successful probe before sticky disable. | |
|
|
9
|
+
| **reason** | **String** | Last qualifying fail reason, e.g. `http_404` or `timeout_or_network` | [optional] |
|
|
10
|
+
| **fails** | **Integer** | Diagnostic only — safe for clients to ignore. Number of qualifying delivery failures in the rolling ~10 minute breaker window (not lifetime, not \"how many times the customer retried\"). Prefer `circuitState` / `disabledWebhooks`. | [optional] |
|
|
11
|
+
| **trips** | **Integer** | Diagnostic only — safe for clients to ignore. How many recovery probes already failed for this URL. Probes run on a schedule (≈15 min → 1 h → 6 h); sticky disable after 3 failed probes. The 6 h step is the last probe, not a blind \"unblock in 6 hours\" timer. | [optional] |
|
|
12
|
+
| **disabled_at** | **Integer** | Epoch milliseconds when this URL became sticky-disabled | [optional] |
|
|
13
|
+
| **first_fail_at** | **Integer** | Diagnostic only. Epoch ms of the first fail in the current ~10 minute window (pairs with `fails`; not a customer-facing period). | [optional] |
|
|
14
|
+
| **last_status** | **Integer** | Last HTTP status from this URL, when known | [optional] |
|
|
15
|
+
| **next_probe_at** | **Integer** | Epoch milliseconds of the next half-open probe, if any | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'one_msg_sdk'
|
|
21
|
+
|
|
22
|
+
instance = OneMsgSdk::WebhookUrlStatus.new(
|
|
23
|
+
url: null,
|
|
24
|
+
circuit_state: null,
|
|
25
|
+
reason: null,
|
|
26
|
+
fails: null,
|
|
27
|
+
trips: null,
|
|
28
|
+
disabled_at: null,
|
|
29
|
+
first_fail_at: null,
|
|
30
|
+
last_status: null,
|
|
31
|
+
next_probe_at: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
data/docs/WebhooksApi.md
CHANGED
|
@@ -14,7 +14,7 @@ All URIs are relative to *https://api.1msg.io*
|
|
|
14
14
|
|
|
15
15
|
Get webhook URL
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Return the webhook URL(s) currently configured for this channel, plus delivery status for each URL. `webhookUrl` is a string when a single URL is set, an array of strings when multiple URLs are configured, or `null` if none is set. **Prefer `webhookStatuses`.** The circuit breaker is per URL, not per channel. If 1 of 4 URLs is sticky-disabled, that URL is skipped; the other three still receive events. Send/receive are not affected. Channel-level `haveDisabledWebhooks`, `circuitState`, `reason`, `fails`, `trips`, and timestamps are a compatibility summary of **one** URL (the first sticky-disabled URL, else the first configured URL). They are not \"the channel is dead\". - `haveDisabledWebhooks` — `true` when **at least one** URL in `webhookUrl` is sticky auto-disabled. Live URLs still get events. - `circuitState` — compressed scalar for that same primary URL: `ok` | `degraded` | `open` | `half_open` | `disabled`. - `disabledWebhooks` — currently configured URLs that are sticky-disabled (subset of `webhookUrl`). - `webhookStatuses` — one row per currently configured URL. Use this array to see which endpoints are live vs skipped. - `fails` / `trips` / `firstFailAt` — **diagnostics for support**, not product UI. `fails` = failures in a rolling ~10 minute window (not lifetime). `trips` = failed recovery probes on the 15 min → 1 h → 6 h schedule (sticky disable after 3). Clients can ignore these and use `webhookStatuses` + `disabledWebhooks` only. Sticky disable skips delivery; it does not unconfigure the URL (it stays in `webhookUrl`). Re-enable with `POST /webhook` or `POST /settings`. Those endpoints **replace** the whole list — with multiple URLs, send the full array.
|
|
18
18
|
|
|
19
19
|
### Examples
|
|
20
20
|
|
|
@@ -81,11 +81,11 @@ end
|
|
|
81
81
|
|
|
82
82
|
## set_webhook
|
|
83
83
|
|
|
84
|
-
>
|
|
84
|
+
> <SetWebhook200Response> set_webhook(token, set_webhook_request)
|
|
85
85
|
|
|
86
86
|
Set webhook URL
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Set the client webhook URL that receives inbound events for this channel. **Replaces** the stored webhook list (it does not append). To deliver the same events to several endpoints, pass an array in `webhookUrl` (max 5) or use `POST /settings`. With several URLs already configured, posting only the disabled URL **drops the others** — send the complete array to re-enable one of many. Incoming payloads include messages, delivery ACKs, group updates, coexistence echoes, and calling events. WhatsApp Calling payloads (`type: \"calls\"`) are documented under the **Calling** tag. Call permission replies arrive on the normal messages path (`call_permission_reply`). Repeating `POST /webhook` with the same URL(s) clears an auto-disable (self-serve re-enable). Send/receive are not affected by webhook auto-disable.
|
|
89
89
|
|
|
90
90
|
### Examples
|
|
91
91
|
|
|
@@ -102,13 +102,11 @@ end
|
|
|
102
102
|
|
|
103
103
|
api_instance = OneMsgSdk::WebhooksApi.new
|
|
104
104
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
105
|
-
|
|
106
|
-
get_webhook200_response: OneMsgSdk::GetWebhook200Response.new # GetWebhook200Response |
|
|
107
|
-
}
|
|
105
|
+
set_webhook_request = OneMsgSdk::SetWebhookRequest.new({webhook_url: nil}) # SetWebhookRequest |
|
|
108
106
|
|
|
109
107
|
begin
|
|
110
108
|
# Set webhook URL
|
|
111
|
-
result = api_instance.set_webhook(token,
|
|
109
|
+
result = api_instance.set_webhook(token, set_webhook_request)
|
|
112
110
|
p result
|
|
113
111
|
rescue OneMsgSdk::ApiError => e
|
|
114
112
|
puts "Error when calling WebhooksApi->set_webhook: #{e}"
|
|
@@ -119,15 +117,15 @@ end
|
|
|
119
117
|
|
|
120
118
|
This returns an Array which contains the response data, status code and headers.
|
|
121
119
|
|
|
122
|
-
> <Array(
|
|
120
|
+
> <Array(<SetWebhook200Response>, Integer, Hash)> set_webhook_with_http_info(token, set_webhook_request)
|
|
123
121
|
|
|
124
122
|
```ruby
|
|
125
123
|
begin
|
|
126
124
|
# Set webhook URL
|
|
127
|
-
data, status_code, headers = api_instance.set_webhook_with_http_info(token,
|
|
125
|
+
data, status_code, headers = api_instance.set_webhook_with_http_info(token, set_webhook_request)
|
|
128
126
|
p status_code # => 2xx
|
|
129
127
|
p headers # => { ... }
|
|
130
|
-
p data # =>
|
|
128
|
+
p data # => <SetWebhook200Response>
|
|
131
129
|
rescue OneMsgSdk::ApiError => e
|
|
132
130
|
puts "Error when calling WebhooksApi->set_webhook_with_http_info: #{e}"
|
|
133
131
|
end
|
|
@@ -138,11 +136,11 @@ end
|
|
|
138
136
|
| Name | Type | Description | Notes |
|
|
139
137
|
| ---- | ---- | ----------- | ----- |
|
|
140
138
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
141
|
-
| **
|
|
139
|
+
| **set_webhook_request** | [**SetWebhookRequest**](SetWebhookRequest.md) | | |
|
|
142
140
|
|
|
143
141
|
### Return type
|
|
144
142
|
|
|
145
|
-
**
|
|
143
|
+
[**SetWebhook200Response**](SetWebhook200Response.md)
|
|
146
144
|
|
|
147
145
|
### Authorization
|
|
148
146
|
|
|
@@ -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,20 +20,20 @@ module OneMsgSdk
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get calling settings
|
|
23
|
-
# WhatsApp Calling API settings (beta).
|
|
23
|
+
# 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.
|
|
24
24
|
# @param token [String] JWT token or API key for authorization
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [
|
|
26
|
+
# @return [CallingSettings]
|
|
27
27
|
def get_calling_settings(token, opts = {})
|
|
28
28
|
data, _status_code, _headers = get_calling_settings_with_http_info(token, opts)
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Get calling settings
|
|
33
|
-
# WhatsApp Calling API settings (beta).
|
|
33
|
+
# 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.
|
|
34
34
|
# @param token [String] JWT token or API key for authorization
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(
|
|
36
|
+
# @return [Array<(CallingSettings, Integer, Hash)>] CallingSettings data, response status code and response headers
|
|
37
37
|
def get_calling_settings_with_http_info(token, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: CallingApi.get_calling_settings ...'
|
|
@@ -61,7 +61,7 @@ module OneMsgSdk
|
|
|
61
61
|
post_body = opts[:debug_body]
|
|
62
62
|
|
|
63
63
|
# return_type
|
|
64
|
-
return_type = opts[:debug_return_type] || '
|
|
64
|
+
return_type = opts[:debug_return_type] || 'CallingSettings'
|
|
65
65
|
|
|
66
66
|
# auth_names
|
|
67
67
|
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
@@ -83,24 +83,24 @@ module OneMsgSdk
|
|
|
83
83
|
return data, status_code, headers
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
#
|
|
87
|
-
#
|
|
86
|
+
# Call action (connect / pre_accept / accept / reject / terminate)
|
|
87
|
+
# 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`.
|
|
88
88
|
# @param token [String] JWT token or API key for authorization
|
|
89
|
+
# @param initiate_call_request [InitiateCallRequest]
|
|
89
90
|
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
data, _status_code, _headers = initiate_call_with_http_info(token, opts)
|
|
91
|
+
# @return [InitiateCallResponse]
|
|
92
|
+
def initiate_call(token, initiate_call_request, opts = {})
|
|
93
|
+
data, _status_code, _headers = initiate_call_with_http_info(token, initiate_call_request, opts)
|
|
94
94
|
data
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
#
|
|
98
|
-
#
|
|
97
|
+
# Call action (connect / pre_accept / accept / reject / terminate)
|
|
98
|
+
# 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`.
|
|
99
99
|
# @param token [String] JWT token or API key for authorization
|
|
100
|
+
# @param initiate_call_request [InitiateCallRequest]
|
|
100
101
|
# @param [Hash] opts the optional parameters
|
|
101
|
-
# @
|
|
102
|
-
|
|
103
|
-
def initiate_call_with_http_info(token, opts = {})
|
|
102
|
+
# @return [Array<(InitiateCallResponse, Integer, Hash)>] InitiateCallResponse data, response status code and response headers
|
|
103
|
+
def initiate_call_with_http_info(token, initiate_call_request, opts = {})
|
|
104
104
|
if @api_client.config.debugging
|
|
105
105
|
@api_client.config.logger.debug 'Calling API: CallingApi.initiate_call ...'
|
|
106
106
|
end
|
|
@@ -108,6 +108,10 @@ module OneMsgSdk
|
|
|
108
108
|
if @api_client.config.client_side_validation && token.nil?
|
|
109
109
|
fail ArgumentError, "Missing the required parameter 'token' when calling CallingApi.initiate_call"
|
|
110
110
|
end
|
|
111
|
+
# verify the required parameter 'initiate_call_request' is set
|
|
112
|
+
if @api_client.config.client_side_validation && initiate_call_request.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'initiate_call_request' when calling CallingApi.initiate_call"
|
|
114
|
+
end
|
|
111
115
|
# resource path
|
|
112
116
|
local_var_path = '/initiateCall'
|
|
113
117
|
|
|
@@ -129,10 +133,10 @@ module OneMsgSdk
|
|
|
129
133
|
form_params = opts[:form_params] || {}
|
|
130
134
|
|
|
131
135
|
# http body (model)
|
|
132
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
136
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(initiate_call_request)
|
|
133
137
|
|
|
134
138
|
# return_type
|
|
135
|
-
return_type = opts[:debug_return_type] || '
|
|
139
|
+
return_type = opts[:debug_return_type] || 'InitiateCallResponse'
|
|
136
140
|
|
|
137
141
|
# auth_names
|
|
138
142
|
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
@@ -155,23 +159,23 @@ module OneMsgSdk
|
|
|
155
159
|
end
|
|
156
160
|
|
|
157
161
|
# Update calling settings
|
|
158
|
-
#
|
|
162
|
+
# 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.
|
|
159
163
|
# @param token [String] JWT token or API key for authorization
|
|
164
|
+
# @param calling_settings [CallingSettings]
|
|
160
165
|
# @param [Hash] opts the optional parameters
|
|
161
|
-
# @
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
data, _status_code, _headers = update_calling_settings_with_http_info(token, opts)
|
|
166
|
+
# @return [UpdateCallingSettings200Response]
|
|
167
|
+
def update_calling_settings(token, calling_settings, opts = {})
|
|
168
|
+
data, _status_code, _headers = update_calling_settings_with_http_info(token, calling_settings, opts)
|
|
165
169
|
data
|
|
166
170
|
end
|
|
167
171
|
|
|
168
172
|
# Update calling settings
|
|
169
|
-
#
|
|
173
|
+
# 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.
|
|
170
174
|
# @param token [String] JWT token or API key for authorization
|
|
175
|
+
# @param calling_settings [CallingSettings]
|
|
171
176
|
# @param [Hash] opts the optional parameters
|
|
172
|
-
# @
|
|
173
|
-
|
|
174
|
-
def update_calling_settings_with_http_info(token, opts = {})
|
|
177
|
+
# @return [Array<(UpdateCallingSettings200Response, Integer, Hash)>] UpdateCallingSettings200Response data, response status code and response headers
|
|
178
|
+
def update_calling_settings_with_http_info(token, calling_settings, opts = {})
|
|
175
179
|
if @api_client.config.debugging
|
|
176
180
|
@api_client.config.logger.debug 'Calling API: CallingApi.update_calling_settings ...'
|
|
177
181
|
end
|
|
@@ -179,6 +183,10 @@ module OneMsgSdk
|
|
|
179
183
|
if @api_client.config.client_side_validation && token.nil?
|
|
180
184
|
fail ArgumentError, "Missing the required parameter 'token' when calling CallingApi.update_calling_settings"
|
|
181
185
|
end
|
|
186
|
+
# verify the required parameter 'calling_settings' is set
|
|
187
|
+
if @api_client.config.client_side_validation && calling_settings.nil?
|
|
188
|
+
fail ArgumentError, "Missing the required parameter 'calling_settings' when calling CallingApi.update_calling_settings"
|
|
189
|
+
end
|
|
182
190
|
# resource path
|
|
183
191
|
local_var_path = '/callingSettings'
|
|
184
192
|
|
|
@@ -200,10 +208,10 @@ module OneMsgSdk
|
|
|
200
208
|
form_params = opts[:form_params] || {}
|
|
201
209
|
|
|
202
210
|
# http body (model)
|
|
203
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
211
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(calling_settings)
|
|
204
212
|
|
|
205
213
|
# return_type
|
|
206
|
-
return_type = opts[:debug_return_type] || '
|
|
214
|
+
return_type = opts[:debug_return_type] || 'UpdateCallingSettings200Response'
|
|
207
215
|
|
|
208
216
|
# auth_names
|
|
209
217
|
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
@@ -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
|
|
@@ -95,7 +95,7 @@ module OneMsgSdk
|
|
|
95
95
|
end
|
|
96
96
|
|
|
97
97
|
# Get Commerce Settings
|
|
98
|
-
# 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`).
|
|
98
|
+
# 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`).
|
|
99
99
|
# @param token [String] JWT token or API key for authorization
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
101
101
|
# @return [Array<GetCommerce200ResponseInner>]
|
|
@@ -105,7 +105,7 @@ module OneMsgSdk
|
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
# Get Commerce Settings
|
|
108
|
-
# 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`).
|
|
108
|
+
# 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`).
|
|
109
109
|
# @param token [String] JWT token or API key for authorization
|
|
110
110
|
# @param [Hash] opts the optional parameters
|
|
111
111
|
# @return [Array<(Array<GetCommerce200ResponseInner>, Integer, Hash)>] Array<GetCommerce200ResponseInner> data, response status code and response headers
|
|
@@ -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
|
|
@@ -19,6 +19,81 @@ module OneMsgSdk
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Update channel settings
|
|
23
|
+
# 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.
|
|
24
|
+
# @param token [String] JWT token or API key for authorization
|
|
25
|
+
# @param create_settings_request [CreateSettingsRequest]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Hash<String, Object>]
|
|
28
|
+
def create_settings(token, create_settings_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = create_settings_with_http_info(token, create_settings_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Update channel settings
|
|
34
|
+
# 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.
|
|
35
|
+
# @param token [String] JWT token or API key for authorization
|
|
36
|
+
# @param create_settings_request [CreateSettingsRequest]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
39
|
+
def create_settings_with_http_info(token, create_settings_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ChannelApi.create_settings ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'token' is set
|
|
44
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.create_settings"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'create_settings_request' is set
|
|
48
|
+
if @api_client.config.client_side_validation && create_settings_request.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'create_settings_request' when calling ChannelApi.create_settings"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/settings'
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
query_params[:'token'] = token
|
|
57
|
+
|
|
58
|
+
# header parameters
|
|
59
|
+
header_params = opts[:header_params] || {}
|
|
60
|
+
# HTTP header 'Accept' (if needed)
|
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
62
|
+
# HTTP header 'Content-Type'
|
|
63
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
64
|
+
if !content_type.nil?
|
|
65
|
+
header_params['Content-Type'] = content_type
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# form parameters
|
|
69
|
+
form_params = opts[:form_params] || {}
|
|
70
|
+
|
|
71
|
+
# http body (model)
|
|
72
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_settings_request)
|
|
73
|
+
|
|
74
|
+
# return_type
|
|
75
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
76
|
+
|
|
77
|
+
# auth_names
|
|
78
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
79
|
+
|
|
80
|
+
new_options = opts.merge(
|
|
81
|
+
:operation => :"ChannelApi.create_settings",
|
|
82
|
+
:header_params => header_params,
|
|
83
|
+
:query_params => query_params,
|
|
84
|
+
:form_params => form_params,
|
|
85
|
+
:body => post_body,
|
|
86
|
+
:auth_names => auth_names,
|
|
87
|
+
:return_type => return_type
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
91
|
+
if @api_client.config.debugging
|
|
92
|
+
@api_client.config.logger.debug "API called: ChannelApi#create_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
93
|
+
end
|
|
94
|
+
return data, status_code, headers
|
|
95
|
+
end
|
|
96
|
+
|
|
22
97
|
# Get conversational automation settings
|
|
23
98
|
# 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.
|
|
24
99
|
# @param token [String] JWT token or API key for authorization
|
|
@@ -84,20 +159,20 @@ module OneMsgSdk
|
|
|
84
159
|
end
|
|
85
160
|
|
|
86
161
|
# Get channel status
|
|
87
|
-
#
|
|
162
|
+
# 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.
|
|
88
163
|
# @param token [String] JWT token or API key for authorization
|
|
89
164
|
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @return [
|
|
165
|
+
# @return [GetStatus200Response]
|
|
91
166
|
def get_status(token, opts = {})
|
|
92
167
|
data, _status_code, _headers = get_status_with_http_info(token, opts)
|
|
93
168
|
data
|
|
94
169
|
end
|
|
95
170
|
|
|
96
171
|
# Get channel status
|
|
97
|
-
#
|
|
172
|
+
# 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.
|
|
98
173
|
# @param token [String] JWT token or API key for authorization
|
|
99
174
|
# @param [Hash] opts the optional parameters
|
|
100
|
-
# @return [Array<(
|
|
175
|
+
# @return [Array<(GetStatus200Response, Integer, Hash)>] GetStatus200Response data, response status code and response headers
|
|
101
176
|
def get_status_with_http_info(token, opts = {})
|
|
102
177
|
if @api_client.config.debugging
|
|
103
178
|
@api_client.config.logger.debug 'Calling API: ChannelApi.get_status ...'
|
|
@@ -125,7 +200,7 @@ module OneMsgSdk
|
|
|
125
200
|
post_body = opts[:debug_body]
|
|
126
201
|
|
|
127
202
|
# return_type
|
|
128
|
-
return_type = opts[:debug_return_type] || '
|
|
203
|
+
return_type = opts[:debug_return_type] || 'GetStatus200Response'
|
|
129
204
|
|
|
130
205
|
# auth_names
|
|
131
206
|
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
@@ -147,6 +222,70 @@ module OneMsgSdk
|
|
|
147
222
|
return data, status_code, headers
|
|
148
223
|
end
|
|
149
224
|
|
|
225
|
+
# Get channel settings
|
|
226
|
+
# 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).
|
|
227
|
+
# @param token [String] JWT token or API key for authorization
|
|
228
|
+
# @param [Hash] opts the optional parameters
|
|
229
|
+
# @return [ListSettings200Response]
|
|
230
|
+
def list_settings(token, opts = {})
|
|
231
|
+
data, _status_code, _headers = list_settings_with_http_info(token, opts)
|
|
232
|
+
data
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Get channel settings
|
|
236
|
+
# 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).
|
|
237
|
+
# @param token [String] JWT token or API key for authorization
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @return [Array<(ListSettings200Response, Integer, Hash)>] ListSettings200Response data, response status code and response headers
|
|
240
|
+
def list_settings_with_http_info(token, opts = {})
|
|
241
|
+
if @api_client.config.debugging
|
|
242
|
+
@api_client.config.logger.debug 'Calling API: ChannelApi.list_settings ...'
|
|
243
|
+
end
|
|
244
|
+
# verify the required parameter 'token' is set
|
|
245
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
246
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling ChannelApi.list_settings"
|
|
247
|
+
end
|
|
248
|
+
# resource path
|
|
249
|
+
local_var_path = '/settings'
|
|
250
|
+
|
|
251
|
+
# query parameters
|
|
252
|
+
query_params = opts[:query_params] || {}
|
|
253
|
+
query_params[:'token'] = token
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
# HTTP header 'Accept' (if needed)
|
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
259
|
+
|
|
260
|
+
# form parameters
|
|
261
|
+
form_params = opts[:form_params] || {}
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = opts[:debug_body]
|
|
265
|
+
|
|
266
|
+
# return_type
|
|
267
|
+
return_type = opts[:debug_return_type] || 'ListSettings200Response'
|
|
268
|
+
|
|
269
|
+
# auth_names
|
|
270
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
271
|
+
|
|
272
|
+
new_options = opts.merge(
|
|
273
|
+
:operation => :"ChannelApi.list_settings",
|
|
274
|
+
:header_params => header_params,
|
|
275
|
+
:query_params => query_params,
|
|
276
|
+
:form_params => form_params,
|
|
277
|
+
:body => post_body,
|
|
278
|
+
:auth_names => auth_names,
|
|
279
|
+
:return_type => return_type
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
283
|
+
if @api_client.config.debugging
|
|
284
|
+
@api_client.config.logger.debug "API called: ChannelApi#list_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
285
|
+
end
|
|
286
|
+
return data, status_code, headers
|
|
287
|
+
end
|
|
288
|
+
|
|
150
289
|
# Set conversational automation settings
|
|
151
290
|
# 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`.
|
|
152
291
|
# @param token [String] JWT token or API key for authorization
|