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
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **body** | **String** |
|
|
8
|
-
| **
|
|
7
|
+
| **body** | **String** | Text shown above the carousel | [optional] |
|
|
8
|
+
| **cards** | **Array<Hash<String, Object>>** | Preferred. 2–10 carousel cards. | [optional] |
|
|
9
|
+
| **params** | **Array<Object>** | Template-like alternative — include a CAROUSEL component with cards | [optional] |
|
|
9
10
|
| **quoted_msg_id** | **String** | | [optional] |
|
|
10
11
|
| **chat_id** | **String** | | [optional] |
|
|
11
12
|
| **phone** | **Integer** | | [optional] |
|
|
@@ -17,6 +18,7 @@ require 'one_msg_sdk'
|
|
|
17
18
|
|
|
18
19
|
instance = OneMsgSdk::SendCarouselRequest1.new(
|
|
19
20
|
body: null,
|
|
21
|
+
cards: null,
|
|
20
22
|
params: null,
|
|
21
23
|
quoted_msg_id: null,
|
|
22
24
|
chat_id: null,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OneMsgSdk::SendContactInfoRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone, chatId, or bsuid. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, BSUID `@lid`, or username `@username`). | [optional] |
|
|
9
|
+
| **bsuid** | **String** | Business-scoped user id, for example `US.13491208655302741918`. | [optional] |
|
|
10
|
+
| **quoted_msg_id** | **String** | | [optional] |
|
|
11
|
+
| **body** | **String** | Text shown above the share-contact button. WhatsApp sets the button label; do not send button text. | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'one_msg_sdk'
|
|
17
|
+
|
|
18
|
+
instance = OneMsgSdk::SendContactInfoRequest.new(
|
|
19
|
+
phone: null,
|
|
20
|
+
chat_id: null,
|
|
21
|
+
bsuid: null,
|
|
22
|
+
quoted_msg_id: null,
|
|
23
|
+
body: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
data/docs/SendContactRequest.md
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone** | **String** |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone or chatId. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
9
|
+
| **quoted_msg_id** | **String** | | [optional] |
|
|
10
|
+
| **contact** | [**SendContactRequestContact**](SendContactRequestContact.md) | | [optional] |
|
|
8
11
|
| **contacts** | [**Array<SendContactRequestContactsInner>**](SendContactRequestContactsInner.md) | | [optional] |
|
|
9
12
|
|
|
10
13
|
## Example
|
|
@@ -14,6 +17,9 @@ require 'one_msg_sdk'
|
|
|
14
17
|
|
|
15
18
|
instance = OneMsgSdk::SendContactRequest.new(
|
|
16
19
|
phone: null,
|
|
20
|
+
chat_id: null,
|
|
21
|
+
quoted_msg_id: null,
|
|
22
|
+
contact: null,
|
|
17
23
|
contacts: null
|
|
18
24
|
)
|
|
19
25
|
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# OneMsgSdk::SendContactRequestContact
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | [**SendContactRequestContactName**](SendContactRequestContactName.md) | | |
|
|
8
|
+
| **phone** | **String** | Contact phone in E.164 (`+79181976551`), not a timestamp | |
|
|
9
|
+
| **email** | **String** | | [optional] |
|
|
10
|
+
| **org** | **Hash<String, Object>** | | [optional] |
|
|
11
|
+
| **url** | **String** | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'one_msg_sdk'
|
|
17
|
+
|
|
18
|
+
instance = OneMsgSdk::SendContactRequestContact.new(
|
|
19
|
+
name: null,
|
|
20
|
+
phone: null,
|
|
21
|
+
email: null,
|
|
22
|
+
org: null,
|
|
23
|
+
url: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OneMsgSdk::SendContactRequestContactName
|
|
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::SendContactRequestContactName.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'Hash<String, Object>',
|
|
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::SendContactRequestContactName.build(data)
|
|
32
|
+
# => #<Hash<String, Object>:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
OneMsgSdk::SendContactRequestContactName.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
|
+
- `Hash<String, Object>`
|
|
47
|
+
- `String`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **name** | [**SendContactRequestContactsInnerName**](SendContactRequestContactsInnerName.md) | | [optional] |
|
|
8
8
|
| **birthday** | **String** | | [optional] |
|
|
9
|
-
| **addresses** | **Array<Object>** | | [optional] |
|
|
10
|
-
| **emails** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **addresses** | **Array<Hash<String, Object>>** | | [optional] |
|
|
10
|
+
| **emails** | **Array<Hash<String, Object>>** | | [optional] |
|
|
11
11
|
| **org** | [**SendContactRequestContactsInnerOrg**](SendContactRequestContactsInnerOrg.md) | | [optional] |
|
|
12
12
|
| **phones** | [**Array<SendContactRequestContactsInnerPhonesInner>**](SendContactRequestContactsInnerPhonesInner.md) | | [optional] |
|
|
13
|
-
| **urls** | **Array<Object>** | | [optional] |
|
|
13
|
+
| **urls** | **Array<Hash<String, Object>>** | | [optional] |
|
|
14
14
|
|
|
15
15
|
## Example
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone** | **String** |
|
|
7
|
+
| **phone** | **String** | E.164 phone (`+79181976551`). Not a timestamp. | [optional] |
|
|
8
8
|
| **type** | **String** | | [optional] |
|
|
9
9
|
| **wa_id** | **String** | | [optional] |
|
|
10
10
|
|
data/docs/SendListRequest.md
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone** | **String** |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone or chatId. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
9
|
+
| **quoted_msg_id** | **String** | | [optional] |
|
|
8
10
|
| **body** | **String** | | [optional] |
|
|
9
11
|
| **button_text** | **String** | | [optional] |
|
|
10
12
|
| **action** | **String** | | [optional] |
|
|
@@ -17,6 +19,8 @@ require 'one_msg_sdk'
|
|
|
17
19
|
|
|
18
20
|
instance = OneMsgSdk::SendListRequest.new(
|
|
19
21
|
phone: null,
|
|
22
|
+
chat_id: null,
|
|
23
|
+
quoted_msg_id: null,
|
|
20
24
|
body: null,
|
|
21
25
|
button_text: null,
|
|
22
26
|
action: null,
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone** | **String** |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone or chatId. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
9
|
+
| **quoted_msg_id** | **String** | | [optional] |
|
|
8
10
|
| **body** | **String** | | [optional] |
|
|
9
11
|
|
|
10
12
|
## Example
|
|
@@ -14,6 +16,8 @@ require 'one_msg_sdk'
|
|
|
14
16
|
|
|
15
17
|
instance = OneMsgSdk::SendLocationRequestRequest.new(
|
|
16
18
|
phone: null,
|
|
19
|
+
chat_id: null,
|
|
20
|
+
quoted_msg_id: null,
|
|
17
21
|
body: null
|
|
18
22
|
)
|
|
19
23
|
```
|
data/docs/SendMessageRequest.md
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **body** | **String** | Message text, UTF-8 or UTF-16 string with emoji | |
|
|
8
8
|
| **quoted_msg_id** | **String** | Message ID to quote/reply to (Cloud API wamid) | [optional] |
|
|
9
|
-
| **chat_id** | **String** |
|
|
9
|
+
| **chat_id** | **String** | Recipient chat ID: phone@c.us, group@g.us, or BSUID@lid | [optional] |
|
|
10
10
|
| **phone** | **Integer** | Phone number starting with country code (alternative to chatId) | [optional] |
|
|
11
|
+
| **category** | **String** | Optional Direct Send category. Direct Send is in beta: Meta has not enabled it on every business portfolio. `utility` or `authentication` enables it. `authentication` is part of that beta and is not recommended. Omit or `service` keeps a normal service message (and the marketing auto-template outside the 24-hour window). `marketing` is rejected. | [optional] |
|
|
12
|
+
| **direct_send** | [**SendMessageRequestDirectSend**](SendMessageRequestDirectSend.md) | | [optional] |
|
|
11
13
|
|
|
12
14
|
## Example
|
|
13
15
|
|
|
@@ -18,7 +20,9 @@ instance = OneMsgSdk::SendMessageRequest.new(
|
|
|
18
20
|
body: Hello World 🌍,
|
|
19
21
|
quoted_msg_id: wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA,
|
|
20
22
|
chat_id: 12020721369@c.us,
|
|
21
|
-
phone: 12020721369
|
|
23
|
+
phone: 12020721369,
|
|
24
|
+
category: utility,
|
|
25
|
+
direct_send: null
|
|
22
26
|
)
|
|
23
27
|
```
|
|
24
28
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# OneMsgSdk::SendMessageRequestDirectSend
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **service_first** | **Boolean** | When true, send a service message first. Success stops there. A closed-window error (131047) retries as Direct Send. Any other error is returned and Direct Send is not attempted. Omit or false to send Direct Send immediately, even inside an open window. | [optional] |
|
|
8
|
+
| **template_name** | **String** | Utility only. Meta creates or reuses a Direct Send template with this exact name (`^[a-z0-9_]+$`, max 512). Do not reuse a template created by hand. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'one_msg_sdk'
|
|
14
|
+
|
|
15
|
+
instance = OneMsgSdk::SendMessageRequestDirectSend.new(
|
|
16
|
+
service_first: null,
|
|
17
|
+
template_name: order_shipped
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# OneMsgSdk::SendProductRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone or chatId. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
9
|
+
| **quoted_msg_id** | **String** | | [optional] |
|
|
10
|
+
| **body** | **String** | Optional message text shown with the product | [optional] |
|
|
11
|
+
| **footer** | **String** | | [optional] |
|
|
12
|
+
| **header** | **String** | Text header (product list only) | [optional] |
|
|
13
|
+
| **action** | **Hash<String, Object>** | Catalog action (`catalog_id` + `product_retailer_id`, or `sections` for a list) | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'one_msg_sdk'
|
|
19
|
+
|
|
20
|
+
instance = OneMsgSdk::SendProductRequest.new(
|
|
21
|
+
phone: null,
|
|
22
|
+
chat_id: null,
|
|
23
|
+
quoted_msg_id: null,
|
|
24
|
+
body: null,
|
|
25
|
+
footer: null,
|
|
26
|
+
header: null,
|
|
27
|
+
action: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
data/docs/SendReactionRequest.md
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone** | **String** |
|
|
7
|
+
| **phone** | **String** | Recipient phone with country code. Use phone or chatId. | [optional] |
|
|
8
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
8
9
|
| **body** | **String** | | [optional] |
|
|
9
10
|
| **quoted_msg_id** | **String** | | [optional] |
|
|
10
11
|
|
|
@@ -15,6 +16,7 @@ require 'one_msg_sdk'
|
|
|
15
16
|
|
|
16
17
|
instance = OneMsgSdk::SendReactionRequest.new(
|
|
17
18
|
phone: null,
|
|
19
|
+
chat_id: null,
|
|
18
20
|
body: null,
|
|
19
21
|
quoted_msg_id: null
|
|
20
22
|
)
|
data/docs/SendTemplateRequest.md
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **template** | **String** |
|
|
7
|
+
| **template** | **String** | Approved template name (template `name`, not the old HSM `element_name`) | [optional] |
|
|
8
8
|
| **language** | [**SendTemplateRequestLanguage**](SendTemplateRequestLanguage.md) | | [optional] |
|
|
9
|
-
| **namespace** | **String** |
|
|
10
|
-
| **params** | **Array<Object>** | | [optional] |
|
|
11
|
-
| **phone** | **String** |
|
|
12
|
-
| **
|
|
9
|
+
| **namespace** | **String** | Template namespace from `list_templates` | [optional] |
|
|
10
|
+
| **params** | **Array<Hash<String, Object>>** | Template components in WhatsApp Cloud API format. Each item is an object with `type` (`body`, `header`, `button`) and `parameters` (objects with `type` + `text` / media / action). Never a list of strings. Never HSM `localizable_params`. | [optional] |
|
|
11
|
+
| **phone** | **String** | Recipient phone with country code (use phone or chatId) | [optional] |
|
|
12
|
+
| **chat_id** | **String** | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. | [optional] |
|
|
13
|
+
| **quoted_msg_id** | **String** | Optional Cloud API wamid to quote | [optional] |
|
|
14
|
+
| **use_m_mlite** | **Boolean** | Force Marketing Messages API (POST marketing_messages). If omitted, and the channel has mm_lite_enabled and mm_lite_available: MARKETING templates and templates with an unknown category use marketing_messages. An unknown category falls back to messages (mmLiteFallback) when Meta rejects it. Known AUTHENTICATION and UTILITY templates stay on messages. useMMlite:false forces messages. | [optional] |
|
|
13
15
|
| **message_activity_sharing** | **Boolean** | Sets message_activity_sharing on WABA payload. Enables click tracking webhooks. Requires MM Lite path. Ignored on Cloud API fallback. | [optional] |
|
|
14
16
|
| **message_send_ttl_seconds** | **Integer** | Template message TTL in seconds (message_send_ttl_seconds). MARKETING via MM Lite: 43200–2592000. AUTHENTICATION: 30–900. UTILITY: 30–43200. AUTH/UTILITY also accept -1 (30-day custom TTL). | [optional] |
|
|
15
17
|
|
|
@@ -24,6 +26,8 @@ instance = OneMsgSdk::SendTemplateRequest.new(
|
|
|
24
26
|
namespace: null,
|
|
25
27
|
params: null,
|
|
26
28
|
phone: null,
|
|
29
|
+
chat_id: null,
|
|
30
|
+
quoted_msg_id: null,
|
|
27
31
|
use_m_mlite: null,
|
|
28
32
|
message_activity_sharing: null,
|
|
29
33
|
message_send_ttl_seconds: null
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **policy** | **String** |
|
|
7
|
+
| **policy** | **String** | Must be `deterministic` | [optional][default to 'deterministic'] |
|
|
8
8
|
| **code** | **String** | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
require 'one_msg_sdk'
|
|
14
14
|
|
|
15
15
|
instance = OneMsgSdk::SendTemplateRequestLanguage.new(
|
|
16
|
-
policy:
|
|
17
|
-
code:
|
|
16
|
+
policy: deterministic,
|
|
17
|
+
code: en
|
|
18
18
|
)
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# OneMsgSdk::SetWebhook200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **set** | **Boolean** | True when the stored webhook URL(s) match the request | [optional] |
|
|
8
|
+
| **webhook_url** | [**SetWebhook200ResponseWebhookUrl**](SetWebhook200ResponseWebhookUrl.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'one_msg_sdk'
|
|
14
|
+
|
|
15
|
+
instance = OneMsgSdk::SetWebhook200Response.new(
|
|
16
|
+
set: null,
|
|
17
|
+
webhook_url: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OneMsgSdk::SetWebhook200ResponseWebhookUrl
|
|
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::SetWebhook200ResponseWebhookUrl.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::SetWebhook200ResponseWebhookUrl.build(data)
|
|
32
|
+
# => #<Array<String>:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
OneMsgSdk::SetWebhook200ResponseWebhookUrl.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
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# OneMsgSdk::SetWebhookRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **webhook_url** | [**SetWebhookRequestWebhookUrl**](SetWebhookRequestWebhookUrl.md) | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'one_msg_sdk'
|
|
13
|
+
|
|
14
|
+
instance = OneMsgSdk::SetWebhookRequest.new(
|
|
15
|
+
webhook_url: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OneMsgSdk::SetWebhookRequestWebhookUrl
|
|
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::SetWebhookRequestWebhookUrl.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::SetWebhookRequestWebhookUrl.build(data)
|
|
32
|
+
# => #<Array<String>:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
OneMsgSdk::SetWebhookRequestWebhookUrl.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/TemplatesApi.md
CHANGED
|
@@ -12,10 +12,12 @@ All URIs are relative to *https://api.1msg.io*
|
|
|
12
12
|
|
|
13
13
|
## add_template
|
|
14
14
|
|
|
15
|
-
>
|
|
15
|
+
> <AddTemplate200Response> add_template(token, opts)
|
|
16
16
|
|
|
17
17
|
Create message template
|
|
18
18
|
|
|
19
|
+
Create a WABA message template (`name`, `category`, `language`, `components`). After create, Meta reviews the template; list it with `GET /templates`. Authentication OTP templates (`category: AUTHENTICATION`, copy-code / OTP button) can later be sent only to a phone number. Meta does not accept a BSUID recipient for them (error 131062). If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — that template cannot be sent. To ask a BSUID user for their phone number, add a `REQUEST_CONTACT_INFO` button on a `UTILITY` or `MARKETING` template. Do not send `text` on that button — WhatsApp sets the label (and rejects a custom one). The button also has no send-time parameters: `POST /sendTemplate` does not take a button component for it. Inside an open 24-hour window, call `POST /sendContactInfo` instead of a template. When the user shares the number, the inbound webhook is a `contacts` message with `origin: contact_request`. The phone is stored on that BSUID automatically. See `POST /sendContactInfo`. ```json { \"name\": \"request_phone\", \"category\": \"UTILITY\", \"language\": \"en_US\", \"components\": [ { \"type\": \"BODY\", \"text\": \"Please share your phone number so we can continue.\" }, { \"type\": \"BUTTONS\", \"buttons\": [{ \"type\": \"REQUEST_CONTACT_INFO\" }] } ] } ```
|
|
20
|
+
|
|
19
21
|
### Examples
|
|
20
22
|
|
|
21
23
|
```ruby
|
|
@@ -48,7 +50,7 @@ end
|
|
|
48
50
|
|
|
49
51
|
This returns an Array which contains the response data, status code and headers.
|
|
50
52
|
|
|
51
|
-
> <Array(
|
|
53
|
+
> <Array(<AddTemplate200Response>, Integer, Hash)> add_template_with_http_info(token, opts)
|
|
52
54
|
|
|
53
55
|
```ruby
|
|
54
56
|
begin
|
|
@@ -56,7 +58,7 @@ begin
|
|
|
56
58
|
data, status_code, headers = api_instance.add_template_with_http_info(token, opts)
|
|
57
59
|
p status_code # => 2xx
|
|
58
60
|
p headers # => { ... }
|
|
59
|
-
p data # =>
|
|
61
|
+
p data # => <AddTemplate200Response>
|
|
60
62
|
rescue OneMsgSdk::ApiError => e
|
|
61
63
|
puts "Error when calling TemplatesApi->add_template_with_http_info: #{e}"
|
|
62
64
|
end
|
|
@@ -71,7 +73,7 @@ end
|
|
|
71
73
|
|
|
72
74
|
### Return type
|
|
73
75
|
|
|
74
|
-
**
|
|
76
|
+
[**AddTemplate200Response**](AddTemplate200Response.md)
|
|
75
77
|
|
|
76
78
|
### Authorization
|
|
77
79
|
|
|
@@ -85,10 +87,12 @@ end
|
|
|
85
87
|
|
|
86
88
|
## list_templates
|
|
87
89
|
|
|
88
|
-
> <ListTemplates200Response> list_templates(token)
|
|
90
|
+
> <ListTemplates200Response> list_templates(token, opts)
|
|
89
91
|
|
|
90
92
|
Get templates list
|
|
91
93
|
|
|
94
|
+
List message templates. Paginate with `limit` / `offset`; sort by `id`, `name`, or `status`.
|
|
95
|
+
|
|
92
96
|
### Examples
|
|
93
97
|
|
|
94
98
|
```ruby
|
|
@@ -104,10 +108,15 @@ end
|
|
|
104
108
|
|
|
105
109
|
api_instance = OneMsgSdk::TemplatesApi.new
|
|
106
110
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
111
|
+
opts = {
|
|
112
|
+
limit: 56, # Integer |
|
|
113
|
+
offset: 56, # Integer |
|
|
114
|
+
sort: 'id' # String | Sort field (`id`, `name`, or `status`)
|
|
115
|
+
}
|
|
107
116
|
|
|
108
117
|
begin
|
|
109
118
|
# Get templates list
|
|
110
|
-
result = api_instance.list_templates(token)
|
|
119
|
+
result = api_instance.list_templates(token, opts)
|
|
111
120
|
p result
|
|
112
121
|
rescue OneMsgSdk::ApiError => e
|
|
113
122
|
puts "Error when calling TemplatesApi->list_templates: #{e}"
|
|
@@ -118,12 +127,12 @@ end
|
|
|
118
127
|
|
|
119
128
|
This returns an Array which contains the response data, status code and headers.
|
|
120
129
|
|
|
121
|
-
> <Array(<ListTemplates200Response>, Integer, Hash)> list_templates_with_http_info(token)
|
|
130
|
+
> <Array(<ListTemplates200Response>, Integer, Hash)> list_templates_with_http_info(token, opts)
|
|
122
131
|
|
|
123
132
|
```ruby
|
|
124
133
|
begin
|
|
125
134
|
# Get templates list
|
|
126
|
-
data, status_code, headers = api_instance.list_templates_with_http_info(token)
|
|
135
|
+
data, status_code, headers = api_instance.list_templates_with_http_info(token, opts)
|
|
127
136
|
p status_code # => 2xx
|
|
128
137
|
p headers # => { ... }
|
|
129
138
|
p data # => <ListTemplates200Response>
|
|
@@ -137,6 +146,9 @@ end
|
|
|
137
146
|
| Name | Type | Description | Notes |
|
|
138
147
|
| ---- | ---- | ----------- | ----- |
|
|
139
148
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
149
|
+
| **limit** | **Integer** | | [optional] |
|
|
150
|
+
| **offset** | **Integer** | | [optional] |
|
|
151
|
+
| **sort** | **String** | Sort field (`id`, `name`, or `status`) | [optional] |
|
|
140
152
|
|
|
141
153
|
### Return type
|
|
142
154
|
|
|
@@ -154,10 +166,12 @@ end
|
|
|
154
166
|
|
|
155
167
|
## remove_template
|
|
156
168
|
|
|
157
|
-
> Hash<String, Object> remove_template(token,
|
|
169
|
+
> Hash<String, Object> remove_template(token, remove_template_request)
|
|
158
170
|
|
|
159
171
|
Remove message template
|
|
160
172
|
|
|
173
|
+
Delete a message template by `name` (all language versions of that name).
|
|
174
|
+
|
|
161
175
|
### Examples
|
|
162
176
|
|
|
163
177
|
```ruby
|
|
@@ -173,13 +187,11 @@ end
|
|
|
173
187
|
|
|
174
188
|
api_instance = OneMsgSdk::TemplatesApi.new
|
|
175
189
|
token = 'token_example' # String | JWT token or API key for authorization
|
|
176
|
-
|
|
177
|
-
request_body: { key: 3.56} # Hash<String, Object> |
|
|
178
|
-
}
|
|
190
|
+
remove_template_request = OneMsgSdk::RemoveTemplateRequest.new({name: 'name_example'}) # RemoveTemplateRequest |
|
|
179
191
|
|
|
180
192
|
begin
|
|
181
193
|
# Remove message template
|
|
182
|
-
result = api_instance.remove_template(token,
|
|
194
|
+
result = api_instance.remove_template(token, remove_template_request)
|
|
183
195
|
p result
|
|
184
196
|
rescue OneMsgSdk::ApiError => e
|
|
185
197
|
puts "Error when calling TemplatesApi->remove_template: #{e}"
|
|
@@ -190,12 +202,12 @@ end
|
|
|
190
202
|
|
|
191
203
|
This returns an Array which contains the response data, status code and headers.
|
|
192
204
|
|
|
193
|
-
> <Array(Hash<String, Object>, Integer, Hash)> remove_template_with_http_info(token,
|
|
205
|
+
> <Array(Hash<String, Object>, Integer, Hash)> remove_template_with_http_info(token, remove_template_request)
|
|
194
206
|
|
|
195
207
|
```ruby
|
|
196
208
|
begin
|
|
197
209
|
# Remove message template
|
|
198
|
-
data, status_code, headers = api_instance.remove_template_with_http_info(token,
|
|
210
|
+
data, status_code, headers = api_instance.remove_template_with_http_info(token, remove_template_request)
|
|
199
211
|
p status_code # => 2xx
|
|
200
212
|
p headers # => { ... }
|
|
201
213
|
p data # => Hash<String, Object>
|
|
@@ -209,7 +221,7 @@ end
|
|
|
209
221
|
| Name | Type | Description | Notes |
|
|
210
222
|
| ---- | ---- | ----------- | ----- |
|
|
211
223
|
| **token** | **String** | JWT token or API key for authorization | |
|
|
212
|
-
| **
|
|
224
|
+
| **remove_template_request** | [**RemoveTemplateRequest**](RemoveTemplateRequest.md) | | |
|
|
213
225
|
|
|
214
226
|
### Return type
|
|
215
227
|
|
|
@@ -231,7 +243,7 @@ end
|
|
|
231
243
|
|
|
232
244
|
Send Template Message
|
|
233
245
|
|
|
234
|
-
Send a WhatsApp template message (works outside the 24-hour session window). Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button).
|
|
246
|
+
Send a WhatsApp **template** message (works outside the 24-hour session window). Use this tool — not `send_message` — when the 24h session is closed. `params` MUST be Cloud API **component objects**, never a flat list of strings and never the old On-Prem `hsm` / `localizable_params` format. Example body variable `{{1}}`: ```json { \"type\": \"body\", \"parameters\": [{ \"type\": \"text\", \"text\": \"Ivan\" }] } ``` Do not send `\"type\": \"hsm\"` and do not send `params: [\"Ivan\", \"123\"]`. Supported `params` button `sub_type` values include: `url`, `quick_reply`, `copy_code` / `coupon_code`, `catalog`, `flow`, `limited_time_offer`, and **`order_details`** (WhatsApp Payments **India only** — requires an approved Utility template with an ORDER_DETAILS button). Convenience wrapper with structured fields: `POST /sendOrderDetails`. Authentication OTP templates (category `AUTHENTICATION`, or a template with an OTP / copy-code button) can only be sent to a phone number (`phone` or a phone `chatId`). Meta rejects a BSUID `recipient` for these templates with error 131062. If the recipient is known only by BSUID — for example they use a username and their phone number is not in your Business Portfolio — the template cannot be sent. A `REQUEST_CONTACT_INFO` button (UTILITY or MARKETING only) has no send-time parameters. Do not add a button component for it in `params`, and do not send button text — WhatsApp sets that label on the template. Create the button with `POST /addTemplate` as `{ \"type\": \"REQUEST_CONTACT_INFO\" }` with no `text`. Inside an open 24-hour window, `POST /sendContactInfo` asks for the number without a template.
|
|
235
247
|
|
|
236
248
|
### Examples
|
|
237
249
|
|