one_msg_chat_api 1.0.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +10 -0
- data/docs/AddTemplateRequest.md +24 -0
- data/docs/BlockUserRequest.md +18 -0
- data/docs/CallingApi.md +231 -0
- data/docs/CatalogApi.md +153 -0
- data/docs/ChannelApi.md +225 -0
- data/docs/ConversationalAutomation.md +22 -0
- data/docs/ConversationalAutomationCommandsInner.md +20 -0
- data/docs/CreateCommerce200Response.md +18 -0
- data/docs/CreateCommerceRequest.md +18 -0
- data/docs/CreateCommerceRequestParams.md +20 -0
- data/docs/CreateGroups200Response.md +18 -0
- data/docs/CreateReadMessage200Response.md +18 -0
- data/docs/CreateReadMessage401Response.md +18 -0
- data/docs/CreateReadMessageRequest.md +22 -0
- data/docs/DeleteFlowsFlowId200Response.md +20 -0
- data/docs/DeleteGroupsGroupId200Response.md +20 -0
- data/docs/DeleteMediaLegacyRequest.md +18 -0
- data/docs/ErrorResponse.md +18 -0
- data/docs/FlowsApi.md +836 -0
- data/docs/GetCommerce200ResponseInner.md +22 -0
- data/docs/GetMmLiteStatus200Response.md +22 -0
- data/docs/GetWebhook200Response.md +18 -0
- data/docs/GetWhatsappBusinessEncryption200Response.md +22 -0
- data/docs/GroupsApi.md +507 -0
- data/docs/ListBlockedUsers200Response.md +18 -0
- data/docs/ListFlows200Response.md +26 -0
- data/docs/ListMessages200Response.md +20 -0
- data/docs/ListTemplates200Response.md +22 -0
- data/docs/MessageSentResponse.md +24 -0
- data/docs/MessagingApi.md +1784 -0
- data/docs/PatchFlowsFlowIdAssets200Response.md +22 -0
- data/docs/ProfileApi.md +155 -0
- data/docs/ProfileInfo.md +32 -0
- data/docs/RetrieveMedia200Response.md +26 -0
- data/docs/SendAddressMessageRequest.md +32 -0
- data/docs/SendButtonRequest.md +24 -0
- data/docs/SendButtonRequestSectionsInner.md +20 -0
- data/docs/SendButtonRequestSectionsInnerReply.md +20 -0
- data/docs/SendCarouselRequest1.md +26 -0
- data/docs/SendContactRequest.md +20 -0
- data/docs/SendContactRequestContactsInner.md +30 -0
- data/docs/SendContactRequestContactsInnerName.md +28 -0
- data/docs/SendContactRequestContactsInnerOrg.md +22 -0
- data/docs/SendContactRequestContactsInnerPhonesInner.md +22 -0
- data/docs/SendCtaUrlRequest.md +32 -0
- data/docs/SendFileRequest.md +34 -0
- data/docs/SendFlowRequest1.md +46 -0
- data/docs/SendFlowRequest1Header.md +49 -0
- data/docs/SendFlowRequestHeader.md +49 -0
- data/docs/SendListRequest.md +26 -0
- data/docs/SendListRequestSectionsInner.md +20 -0
- data/docs/SendListRequestSectionsInnerRowsInner.md +22 -0
- data/docs/SendLocationRequest1.md +30 -0
- data/docs/SendLocationRequestRequest.md +20 -0
- data/docs/SendMessageRequest.md +24 -0
- data/docs/SendOrderDetailsRequest.md +36 -0
- data/docs/SendOrderDetailsRequestLanguage.md +20 -0
- data/docs/SendOrderDetailsRequestOrder.md +28 -0
- data/docs/SendOrderDetailsRequestOrderItemsInner.md +24 -0
- data/docs/SendOrderDetailsRequestOrderItemsInnerAmount.md +20 -0
- data/docs/SendPaymentRequestRequest.md +26 -0
- data/docs/SendReactionRequest.md +22 -0
- data/docs/SendStickerRequest.md +26 -0
- data/docs/SendTemplateRequest.md +32 -0
- data/docs/SendTemplateRequestLanguage.md +20 -0
- data/docs/SetWhatsappBusinessEncryptionRequest.md +21 -0
- data/docs/SuccessResponse.md +18 -0
- data/docs/TemplatesApi.md +301 -0
- data/docs/UpdateMeRequest.md +30 -0
- data/docs/UsersApi.md +223 -0
- data/docs/WebhooksApi.md +155 -0
- data/git_push.sh +57 -0
- data/lib/one_msg_chat_api/api/calling_api.rb +228 -0
- data/lib/one_msg_chat_api/api/catalog_api.rb +161 -0
- data/lib/one_msg_chat_api/api/channel_api.rb +225 -0
- data/lib/one_msg_chat_api/api/flows_api.rb +788 -0
- data/lib/one_msg_chat_api/api/groups_api.rb +486 -0
- data/lib/one_msg_chat_api/api/messaging_api.rb +1833 -0
- data/lib/one_msg_chat_api/api/profile_api.rb +157 -0
- data/lib/one_msg_chat_api/api/templates_api.rb +293 -0
- data/lib/one_msg_chat_api/api/users_api.rb +232 -0
- data/lib/one_msg_chat_api/api/webhooks_api.rb +157 -0
- data/lib/one_msg_chat_api/api_client.rb +441 -0
- data/lib/one_msg_chat_api/api_error.rb +58 -0
- data/lib/one_msg_chat_api/api_model_base.rb +88 -0
- data/lib/one_msg_chat_api/configuration.rb +400 -0
- data/lib/one_msg_chat_api/models/add_template_request.rb +176 -0
- data/lib/one_msg_chat_api/models/block_user_request.rb +164 -0
- data/lib/one_msg_chat_api/models/conversational_automation.rb +210 -0
- data/lib/one_msg_chat_api/models/conversational_automation_commands_inner.rb +208 -0
- data/lib/one_msg_chat_api/models/create_commerce200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_commerce_request.rb +164 -0
- data/lib/one_msg_chat_api/models/create_commerce_request_params.rb +192 -0
- data/lib/one_msg_chat_api/models/create_groups200_response.rb +149 -0
- data/lib/one_msg_chat_api/models/create_read_message200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_read_message401_response.rb +147 -0
- data/lib/one_msg_chat_api/models/create_read_message_request.rb +168 -0
- data/lib/one_msg_chat_api/models/delete_flows_flow_id200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/delete_groups_group_id200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/delete_media_legacy_request.rb +165 -0
- data/lib/one_msg_chat_api/models/error_response.rb +149 -0
- data/lib/one_msg_chat_api/models/get_commerce200_response_inner.rb +168 -0
- data/lib/one_msg_chat_api/models/get_mm_lite_status200_response.rb +165 -0
- data/lib/one_msg_chat_api/models/get_webhook200_response.rb +147 -0
- data/lib/one_msg_chat_api/models/get_whatsapp_business_encryption200_response.rb +202 -0
- data/lib/one_msg_chat_api/models/list_blocked_users200_response.rb +149 -0
- data/lib/one_msg_chat_api/models/list_flows200_response.rb +189 -0
- data/lib/one_msg_chat_api/models/list_messages200_response.rb +158 -0
- data/lib/one_msg_chat_api/models/list_templates200_response.rb +169 -0
- data/lib/one_msg_chat_api/models/message_sent_response.rb +179 -0
- data/lib/one_msg_chat_api/models/patch_flows_flow_id_assets200_response.rb +169 -0
- data/lib/one_msg_chat_api/models/profile_info.rb +254 -0
- data/lib/one_msg_chat_api/models/retrieve_media200_response.rb +183 -0
- data/lib/one_msg_chat_api/models/send_address_message_request.rb +273 -0
- data/lib/one_msg_chat_api/models/send_button_request.rb +176 -0
- data/lib/one_msg_chat_api/models/send_button_request_sections_inner.rb +156 -0
- data/lib/one_msg_chat_api/models/send_button_request_sections_inner_reply.rb +156 -0
- data/lib/one_msg_chat_api/models/send_carousel_request1.rb +202 -0
- data/lib/one_msg_chat_api/models/send_contact_request.rb +158 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner.rb +209 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_name.rb +192 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_org.rb +165 -0
- data/lib/one_msg_chat_api/models/send_contact_request_contacts_inner_phones_inner.rb +165 -0
- data/lib/one_msg_chat_api/models/send_cta_url_request.rb +264 -0
- data/lib/one_msg_chat_api/models/send_file_request.rb +278 -0
- data/lib/one_msg_chat_api/models/send_flow_request1.rb +387 -0
- data/lib/one_msg_chat_api/models/send_flow_request1_header.rb +104 -0
- data/lib/one_msg_chat_api/models/send_flow_request_header.rb +105 -0
- data/lib/one_msg_chat_api/models/send_list_request.rb +185 -0
- data/lib/one_msg_chat_api/models/send_list_request_sections_inner.rb +158 -0
- data/lib/one_msg_chat_api/models/send_list_request_sections_inner_rows_inner.rb +165 -0
- data/lib/one_msg_chat_api/models/send_location_request1.rb +235 -0
- data/lib/one_msg_chat_api/models/send_location_request_request.rb +156 -0
- data/lib/one_msg_chat_api/models/send_message_request.rb +284 -0
- data/lib/one_msg_chat_api/models/send_order_details_request.rb +308 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_language.rb +176 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order.rb +220 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner.rb +174 -0
- data/lib/one_msg_chat_api/models/send_order_details_request_order_items_inner_amount.rb +156 -0
- data/lib/one_msg_chat_api/models/send_payment_request_request.rb +245 -0
- data/lib/one_msg_chat_api/models/send_reaction_request.rb +165 -0
- data/lib/one_msg_chat_api/models/send_sticker_request.rb +185 -0
- data/lib/one_msg_chat_api/models/send_template_request.rb +215 -0
- data/lib/one_msg_chat_api/models/send_template_request_language.rb +156 -0
- data/lib/one_msg_chat_api/models/set_whatsapp_business_encryption_request.rb +165 -0
- data/lib/one_msg_chat_api/models/success_response.rb +149 -0
- data/lib/one_msg_chat_api/models/update_me_request.rb +207 -0
- data/lib/one_msg_chat_api/version.rb +15 -0
- data/lib/one_msg_chat_api.rb +111 -0
- data/one_msg_chat_api.gemspec +41 -0
- data/spec/api/calling_api_spec.rb +73 -0
- data/spec/api/catalog_api_spec.rb +60 -0
- data/spec/api/channel_api_spec.rb +72 -0
- data/spec/api/flows_api_spec.rb +175 -0
- data/spec/api/groups_api_spec.rb +117 -0
- data/spec/api/messaging_api_spec.rb +359 -0
- data/spec/api/profile_api_spec.rb +60 -0
- data/spec/api/templates_api_spec.rb +83 -0
- data/spec/api/users_api_spec.rb +71 -0
- data/spec/api/webhooks_api_spec.rb +60 -0
- data/spec/models/add_template_request_spec.rb +54 -0
- data/spec/models/block_user_request_spec.rb +36 -0
- data/spec/models/conversational_automation_commands_inner_spec.rb +42 -0
- data/spec/models/conversational_automation_spec.rb +48 -0
- data/spec/models/create_commerce200_response_spec.rb +36 -0
- data/spec/models/create_commerce_request_params_spec.rb +42 -0
- data/spec/models/create_commerce_request_spec.rb +36 -0
- data/spec/models/create_groups200_response_spec.rb +36 -0
- data/spec/models/create_read_message200_response_spec.rb +36 -0
- data/spec/models/create_read_message401_response_spec.rb +36 -0
- data/spec/models/create_read_message_request_spec.rb +48 -0
- data/spec/models/delete_flows_flow_id200_response_spec.rb +42 -0
- data/spec/models/delete_groups_group_id200_response_spec.rb +42 -0
- data/spec/models/delete_media_legacy_request_spec.rb +36 -0
- data/spec/models/error_response_spec.rb +36 -0
- data/spec/models/get_commerce200_response_inner_spec.rb +48 -0
- data/spec/models/get_mm_lite_status200_response_spec.rb +48 -0
- data/spec/models/get_webhook200_response_spec.rb +36 -0
- data/spec/models/get_whatsapp_business_encryption200_response_spec.rb +52 -0
- data/spec/models/list_blocked_users200_response_spec.rb +36 -0
- data/spec/models/list_flows200_response_spec.rb +60 -0
- data/spec/models/list_messages200_response_spec.rb +42 -0
- data/spec/models/list_templates200_response_spec.rb +48 -0
- data/spec/models/message_sent_response_spec.rb +54 -0
- data/spec/models/patch_flows_flow_id_assets200_response_spec.rb +48 -0
- data/spec/models/profile_info_spec.rb +82 -0
- data/spec/models/retrieve_media200_response_spec.rb +60 -0
- data/spec/models/send_address_message_request_spec.rb +82 -0
- data/spec/models/send_button_request_sections_inner_reply_spec.rb +42 -0
- data/spec/models/send_button_request_sections_inner_spec.rb +42 -0
- data/spec/models/send_button_request_spec.rb +54 -0
- data/spec/models/send_carousel_request1_spec.rb +60 -0
- data/spec/models/send_contact_request_contacts_inner_name_spec.rb +66 -0
- data/spec/models/send_contact_request_contacts_inner_org_spec.rb +48 -0
- data/spec/models/send_contact_request_contacts_inner_phones_inner_spec.rb +48 -0
- data/spec/models/send_contact_request_contacts_inner_spec.rb +72 -0
- data/spec/models/send_contact_request_spec.rb +42 -0
- data/spec/models/send_cta_url_request_spec.rb +78 -0
- data/spec/models/send_file_request_spec.rb +88 -0
- data/spec/models/send_flow_request1_header_spec.rb +32 -0
- data/spec/models/send_flow_request1_spec.rb +128 -0
- data/spec/models/send_flow_request_header_spec.rb +32 -0
- data/spec/models/send_list_request_sections_inner_rows_inner_spec.rb +48 -0
- data/spec/models/send_list_request_sections_inner_spec.rb +42 -0
- data/spec/models/send_list_request_spec.rb +60 -0
- data/spec/models/send_location_request1_spec.rb +72 -0
- data/spec/models/send_location_request_request_spec.rb +42 -0
- data/spec/models/send_message_request_spec.rb +54 -0
- data/spec/models/send_order_details_request_language_spec.rb +42 -0
- data/spec/models/send_order_details_request_order_items_inner_amount_spec.rb +42 -0
- data/spec/models/send_order_details_request_order_items_inner_spec.rb +54 -0
- data/spec/models/send_order_details_request_order_spec.rb +66 -0
- data/spec/models/send_order_details_request_spec.rb +90 -0
- data/spec/models/send_payment_request_request_spec.rb +64 -0
- data/spec/models/send_reaction_request_spec.rb +48 -0
- data/spec/models/send_sticker_request_spec.rb +60 -0
- data/spec/models/send_template_request_language_spec.rb +42 -0
- data/spec/models/send_template_request_spec.rb +78 -0
- data/spec/models/set_whatsapp_business_encryption_request_spec.rb +36 -0
- data/spec/models/success_response_spec.rb +36 -0
- data/spec/models/update_me_request_spec.rb +72 -0
- data/spec/spec_helper.rb +111 -0
- metadata +408 -0
data/docs/FlowsApi.md
ADDED
|
@@ -0,0 +1,836 @@
|
|
|
1
|
+
# OneMsgChatApi::FlowsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.1msg.io*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_flows**](FlowsApi.md#create_flows) | **POST** /flows | Create Flow |
|
|
8
|
+
| [**create_flows_flow_id_deprecate**](FlowsApi.md#create_flows_flow_id_deprecate) | **POST** /flows/{flowId}/deprecate | Deprecate Flow |
|
|
9
|
+
| [**create_flows_flow_id_publish**](FlowsApi.md#create_flows_flow_id_publish) | **POST** /flows/{flowId}/publish | Publish Flow |
|
|
10
|
+
| [**delete_flows_flow_id**](FlowsApi.md#delete_flows_flow_id) | **DELETE** /flows/{flowId} | Delete Flow |
|
|
11
|
+
| [**get_flows_flow_id**](FlowsApi.md#get_flows_flow_id) | **GET** /flows/{flowId} | Get Flow Details |
|
|
12
|
+
| [**get_flows_flow_id_preview**](FlowsApi.md#get_flows_flow_id_preview) | **GET** /flows/{flowId}/preview | Preview Flow |
|
|
13
|
+
| [**get_whatsapp_business_encryption**](FlowsApi.md#get_whatsapp_business_encryption) | **GET** /whatsapp_business_encryption | Get business encryption public key |
|
|
14
|
+
| [**list_flows**](FlowsApi.md#list_flows) | **GET** /flows | List Flows |
|
|
15
|
+
| [**patch_flows_flow_id_assets**](FlowsApi.md#patch_flows_flow_id_assets) | **PATCH** /flows/{flowId}/assets | Update Flow Structure |
|
|
16
|
+
| [**patch_flows_flow_id_metadata**](FlowsApi.md#patch_flows_flow_id_metadata) | **PATCH** /flows/{flowId}/metadata | Update Flow Metadata |
|
|
17
|
+
| [**set_whatsapp_business_encryption**](FlowsApi.md#set_whatsapp_business_encryption) | **POST** /whatsapp_business_encryption | Set business encryption public key |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## create_flows
|
|
21
|
+
|
|
22
|
+
> <CreateGroups200Response> create_flows(token, opts)
|
|
23
|
+
|
|
24
|
+
Create Flow
|
|
25
|
+
|
|
26
|
+
### Examples
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'time'
|
|
30
|
+
require 'one_msg_chat_api'
|
|
31
|
+
# setup authorization
|
|
32
|
+
OneMsgChatApi.configure do |config|
|
|
33
|
+
# Configure API key authorization: tokenAuth
|
|
34
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
35
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
36
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
40
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
41
|
+
opts = {
|
|
42
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
begin
|
|
46
|
+
# Create Flow
|
|
47
|
+
result = api_instance.create_flows(token, opts)
|
|
48
|
+
p result
|
|
49
|
+
rescue OneMsgChatApi::ApiError => e
|
|
50
|
+
puts "Error when calling FlowsApi->create_flows: #{e}"
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Using the create_flows_with_http_info variant
|
|
55
|
+
|
|
56
|
+
This returns an Array which contains the response data, status code and headers.
|
|
57
|
+
|
|
58
|
+
> <Array(<CreateGroups200Response>, Integer, Hash)> create_flows_with_http_info(token, opts)
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
begin
|
|
62
|
+
# Create Flow
|
|
63
|
+
data, status_code, headers = api_instance.create_flows_with_http_info(token, opts)
|
|
64
|
+
p status_code # => 2xx
|
|
65
|
+
p headers # => { ... }
|
|
66
|
+
p data # => <CreateGroups200Response>
|
|
67
|
+
rescue OneMsgChatApi::ApiError => e
|
|
68
|
+
puts "Error when calling FlowsApi->create_flows_with_http_info: #{e}"
|
|
69
|
+
end
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Parameters
|
|
73
|
+
|
|
74
|
+
| Name | Type | Description | Notes |
|
|
75
|
+
| ---- | ---- | ----------- | ----- |
|
|
76
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
77
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
78
|
+
|
|
79
|
+
### Return type
|
|
80
|
+
|
|
81
|
+
[**CreateGroups200Response**](CreateGroups200Response.md)
|
|
82
|
+
|
|
83
|
+
### Authorization
|
|
84
|
+
|
|
85
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
86
|
+
|
|
87
|
+
### HTTP request headers
|
|
88
|
+
|
|
89
|
+
- **Content-Type**: Not defined
|
|
90
|
+
- **Accept**: application/json
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## create_flows_flow_id_deprecate
|
|
94
|
+
|
|
95
|
+
> Hash<String, Object> create_flows_flow_id_deprecate(flow_id, token, opts)
|
|
96
|
+
|
|
97
|
+
Deprecate Flow
|
|
98
|
+
|
|
99
|
+
### Examples
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
require 'time'
|
|
103
|
+
require 'one_msg_chat_api'
|
|
104
|
+
# setup authorization
|
|
105
|
+
OneMsgChatApi.configure do |config|
|
|
106
|
+
# Configure API key authorization: tokenAuth
|
|
107
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
108
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
109
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
113
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
114
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
115
|
+
opts = {
|
|
116
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
begin
|
|
120
|
+
# Deprecate Flow
|
|
121
|
+
result = api_instance.create_flows_flow_id_deprecate(flow_id, token, opts)
|
|
122
|
+
p result
|
|
123
|
+
rescue OneMsgChatApi::ApiError => e
|
|
124
|
+
puts "Error when calling FlowsApi->create_flows_flow_id_deprecate: #{e}"
|
|
125
|
+
end
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Using the create_flows_flow_id_deprecate_with_http_info variant
|
|
129
|
+
|
|
130
|
+
This returns an Array which contains the response data, status code and headers.
|
|
131
|
+
|
|
132
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_flows_flow_id_deprecate_with_http_info(flow_id, token, opts)
|
|
133
|
+
|
|
134
|
+
```ruby
|
|
135
|
+
begin
|
|
136
|
+
# Deprecate Flow
|
|
137
|
+
data, status_code, headers = api_instance.create_flows_flow_id_deprecate_with_http_info(flow_id, token, opts)
|
|
138
|
+
p status_code # => 2xx
|
|
139
|
+
p headers # => { ... }
|
|
140
|
+
p data # => Hash<String, Object>
|
|
141
|
+
rescue OneMsgChatApi::ApiError => e
|
|
142
|
+
puts "Error when calling FlowsApi->create_flows_flow_id_deprecate_with_http_info: #{e}"
|
|
143
|
+
end
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
| Name | Type | Description | Notes |
|
|
149
|
+
| ---- | ---- | ----------- | ----- |
|
|
150
|
+
| **flow_id** | **String** | Flow ID | |
|
|
151
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
152
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
153
|
+
|
|
154
|
+
### Return type
|
|
155
|
+
|
|
156
|
+
**Hash<String, Object>**
|
|
157
|
+
|
|
158
|
+
### Authorization
|
|
159
|
+
|
|
160
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
161
|
+
|
|
162
|
+
### HTTP request headers
|
|
163
|
+
|
|
164
|
+
- **Content-Type**: Not defined
|
|
165
|
+
- **Accept**: application/json
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## create_flows_flow_id_publish
|
|
169
|
+
|
|
170
|
+
> Hash<String, Object> create_flows_flow_id_publish(flow_id, token, opts)
|
|
171
|
+
|
|
172
|
+
Publish Flow
|
|
173
|
+
|
|
174
|
+
### Examples
|
|
175
|
+
|
|
176
|
+
```ruby
|
|
177
|
+
require 'time'
|
|
178
|
+
require 'one_msg_chat_api'
|
|
179
|
+
# setup authorization
|
|
180
|
+
OneMsgChatApi.configure do |config|
|
|
181
|
+
# Configure API key authorization: tokenAuth
|
|
182
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
183
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
184
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
188
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
189
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
190
|
+
opts = {
|
|
191
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
begin
|
|
195
|
+
# Publish Flow
|
|
196
|
+
result = api_instance.create_flows_flow_id_publish(flow_id, token, opts)
|
|
197
|
+
p result
|
|
198
|
+
rescue OneMsgChatApi::ApiError => e
|
|
199
|
+
puts "Error when calling FlowsApi->create_flows_flow_id_publish: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### Using the create_flows_flow_id_publish_with_http_info variant
|
|
204
|
+
|
|
205
|
+
This returns an Array which contains the response data, status code and headers.
|
|
206
|
+
|
|
207
|
+
> <Array(Hash<String, Object>, Integer, Hash)> create_flows_flow_id_publish_with_http_info(flow_id, token, opts)
|
|
208
|
+
|
|
209
|
+
```ruby
|
|
210
|
+
begin
|
|
211
|
+
# Publish Flow
|
|
212
|
+
data, status_code, headers = api_instance.create_flows_flow_id_publish_with_http_info(flow_id, token, opts)
|
|
213
|
+
p status_code # => 2xx
|
|
214
|
+
p headers # => { ... }
|
|
215
|
+
p data # => Hash<String, Object>
|
|
216
|
+
rescue OneMsgChatApi::ApiError => e
|
|
217
|
+
puts "Error when calling FlowsApi->create_flows_flow_id_publish_with_http_info: #{e}"
|
|
218
|
+
end
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Parameters
|
|
222
|
+
|
|
223
|
+
| Name | Type | Description | Notes |
|
|
224
|
+
| ---- | ---- | ----------- | ----- |
|
|
225
|
+
| **flow_id** | **String** | Flow ID | |
|
|
226
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
227
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
228
|
+
|
|
229
|
+
### Return type
|
|
230
|
+
|
|
231
|
+
**Hash<String, Object>**
|
|
232
|
+
|
|
233
|
+
### Authorization
|
|
234
|
+
|
|
235
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
236
|
+
|
|
237
|
+
### HTTP request headers
|
|
238
|
+
|
|
239
|
+
- **Content-Type**: Not defined
|
|
240
|
+
- **Accept**: application/json
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
## delete_flows_flow_id
|
|
244
|
+
|
|
245
|
+
> <DeleteFlowsFlowId200Response> delete_flows_flow_id(flow_id, token, opts)
|
|
246
|
+
|
|
247
|
+
Delete Flow
|
|
248
|
+
|
|
249
|
+
### Examples
|
|
250
|
+
|
|
251
|
+
```ruby
|
|
252
|
+
require 'time'
|
|
253
|
+
require 'one_msg_chat_api'
|
|
254
|
+
# setup authorization
|
|
255
|
+
OneMsgChatApi.configure do |config|
|
|
256
|
+
# Configure API key authorization: tokenAuth
|
|
257
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
258
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
259
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
263
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
264
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
265
|
+
opts = {
|
|
266
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
begin
|
|
270
|
+
# Delete Flow
|
|
271
|
+
result = api_instance.delete_flows_flow_id(flow_id, token, opts)
|
|
272
|
+
p result
|
|
273
|
+
rescue OneMsgChatApi::ApiError => e
|
|
274
|
+
puts "Error when calling FlowsApi->delete_flows_flow_id: #{e}"
|
|
275
|
+
end
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
#### Using the delete_flows_flow_id_with_http_info variant
|
|
279
|
+
|
|
280
|
+
This returns an Array which contains the response data, status code and headers.
|
|
281
|
+
|
|
282
|
+
> <Array(<DeleteFlowsFlowId200Response>, Integer, Hash)> delete_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
283
|
+
|
|
284
|
+
```ruby
|
|
285
|
+
begin
|
|
286
|
+
# Delete Flow
|
|
287
|
+
data, status_code, headers = api_instance.delete_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
288
|
+
p status_code # => 2xx
|
|
289
|
+
p headers # => { ... }
|
|
290
|
+
p data # => <DeleteFlowsFlowId200Response>
|
|
291
|
+
rescue OneMsgChatApi::ApiError => e
|
|
292
|
+
puts "Error when calling FlowsApi->delete_flows_flow_id_with_http_info: #{e}"
|
|
293
|
+
end
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Parameters
|
|
297
|
+
|
|
298
|
+
| Name | Type | Description | Notes |
|
|
299
|
+
| ---- | ---- | ----------- | ----- |
|
|
300
|
+
| **flow_id** | **String** | Flow ID | |
|
|
301
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
302
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
303
|
+
|
|
304
|
+
### Return type
|
|
305
|
+
|
|
306
|
+
[**DeleteFlowsFlowId200Response**](DeleteFlowsFlowId200Response.md)
|
|
307
|
+
|
|
308
|
+
### Authorization
|
|
309
|
+
|
|
310
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
311
|
+
|
|
312
|
+
### HTTP request headers
|
|
313
|
+
|
|
314
|
+
- **Content-Type**: Not defined
|
|
315
|
+
- **Accept**: application/json
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
## get_flows_flow_id
|
|
319
|
+
|
|
320
|
+
> <CreateGroups200Response> get_flows_flow_id(flow_id, token, opts)
|
|
321
|
+
|
|
322
|
+
Get Flow Details
|
|
323
|
+
|
|
324
|
+
### Examples
|
|
325
|
+
|
|
326
|
+
```ruby
|
|
327
|
+
require 'time'
|
|
328
|
+
require 'one_msg_chat_api'
|
|
329
|
+
# setup authorization
|
|
330
|
+
OneMsgChatApi.configure do |config|
|
|
331
|
+
# Configure API key authorization: tokenAuth
|
|
332
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
333
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
334
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
338
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
339
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
340
|
+
opts = {
|
|
341
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
begin
|
|
345
|
+
# Get Flow Details
|
|
346
|
+
result = api_instance.get_flows_flow_id(flow_id, token, opts)
|
|
347
|
+
p result
|
|
348
|
+
rescue OneMsgChatApi::ApiError => e
|
|
349
|
+
puts "Error when calling FlowsApi->get_flows_flow_id: #{e}"
|
|
350
|
+
end
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
#### Using the get_flows_flow_id_with_http_info variant
|
|
354
|
+
|
|
355
|
+
This returns an Array which contains the response data, status code and headers.
|
|
356
|
+
|
|
357
|
+
> <Array(<CreateGroups200Response>, Integer, Hash)> get_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
358
|
+
|
|
359
|
+
```ruby
|
|
360
|
+
begin
|
|
361
|
+
# Get Flow Details
|
|
362
|
+
data, status_code, headers = api_instance.get_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
363
|
+
p status_code # => 2xx
|
|
364
|
+
p headers # => { ... }
|
|
365
|
+
p data # => <CreateGroups200Response>
|
|
366
|
+
rescue OneMsgChatApi::ApiError => e
|
|
367
|
+
puts "Error when calling FlowsApi->get_flows_flow_id_with_http_info: #{e}"
|
|
368
|
+
end
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Parameters
|
|
372
|
+
|
|
373
|
+
| Name | Type | Description | Notes |
|
|
374
|
+
| ---- | ---- | ----------- | ----- |
|
|
375
|
+
| **flow_id** | **String** | Flow ID | |
|
|
376
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
377
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
378
|
+
|
|
379
|
+
### Return type
|
|
380
|
+
|
|
381
|
+
[**CreateGroups200Response**](CreateGroups200Response.md)
|
|
382
|
+
|
|
383
|
+
### Authorization
|
|
384
|
+
|
|
385
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
386
|
+
|
|
387
|
+
### HTTP request headers
|
|
388
|
+
|
|
389
|
+
- **Content-Type**: Not defined
|
|
390
|
+
- **Accept**: application/json
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
## get_flows_flow_id_preview
|
|
394
|
+
|
|
395
|
+
> Hash<String, Object> get_flows_flow_id_preview(flow_id, token, opts)
|
|
396
|
+
|
|
397
|
+
Preview Flow
|
|
398
|
+
|
|
399
|
+
### Examples
|
|
400
|
+
|
|
401
|
+
```ruby
|
|
402
|
+
require 'time'
|
|
403
|
+
require 'one_msg_chat_api'
|
|
404
|
+
# setup authorization
|
|
405
|
+
OneMsgChatApi.configure do |config|
|
|
406
|
+
# Configure API key authorization: tokenAuth
|
|
407
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
408
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
409
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
413
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
414
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
415
|
+
opts = {
|
|
416
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
begin
|
|
420
|
+
# Preview Flow
|
|
421
|
+
result = api_instance.get_flows_flow_id_preview(flow_id, token, opts)
|
|
422
|
+
p result
|
|
423
|
+
rescue OneMsgChatApi::ApiError => e
|
|
424
|
+
puts "Error when calling FlowsApi->get_flows_flow_id_preview: #{e}"
|
|
425
|
+
end
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
#### Using the get_flows_flow_id_preview_with_http_info variant
|
|
429
|
+
|
|
430
|
+
This returns an Array which contains the response data, status code and headers.
|
|
431
|
+
|
|
432
|
+
> <Array(Hash<String, Object>, Integer, Hash)> get_flows_flow_id_preview_with_http_info(flow_id, token, opts)
|
|
433
|
+
|
|
434
|
+
```ruby
|
|
435
|
+
begin
|
|
436
|
+
# Preview Flow
|
|
437
|
+
data, status_code, headers = api_instance.get_flows_flow_id_preview_with_http_info(flow_id, token, opts)
|
|
438
|
+
p status_code # => 2xx
|
|
439
|
+
p headers # => { ... }
|
|
440
|
+
p data # => Hash<String, Object>
|
|
441
|
+
rescue OneMsgChatApi::ApiError => e
|
|
442
|
+
puts "Error when calling FlowsApi->get_flows_flow_id_preview_with_http_info: #{e}"
|
|
443
|
+
end
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### Parameters
|
|
447
|
+
|
|
448
|
+
| Name | Type | Description | Notes |
|
|
449
|
+
| ---- | ---- | ----------- | ----- |
|
|
450
|
+
| **flow_id** | **String** | Flow ID | |
|
|
451
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
452
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
453
|
+
|
|
454
|
+
### Return type
|
|
455
|
+
|
|
456
|
+
**Hash<String, Object>**
|
|
457
|
+
|
|
458
|
+
### Authorization
|
|
459
|
+
|
|
460
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
461
|
+
|
|
462
|
+
### HTTP request headers
|
|
463
|
+
|
|
464
|
+
- **Content-Type**: Not defined
|
|
465
|
+
- **Accept**: application/json
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
## get_whatsapp_business_encryption
|
|
469
|
+
|
|
470
|
+
> <GetWhatsappBusinessEncryption200Response> get_whatsapp_business_encryption(token)
|
|
471
|
+
|
|
472
|
+
Get business encryption public key
|
|
473
|
+
|
|
474
|
+
Retrieve the WhatsApp business public key and signature status for this channel's phone number. Required before publishing or sending Flows that use data encryption.
|
|
475
|
+
|
|
476
|
+
### Examples
|
|
477
|
+
|
|
478
|
+
```ruby
|
|
479
|
+
require 'time'
|
|
480
|
+
require 'one_msg_chat_api'
|
|
481
|
+
# setup authorization
|
|
482
|
+
OneMsgChatApi.configure do |config|
|
|
483
|
+
# Configure API key authorization: tokenAuth
|
|
484
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
485
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
486
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
490
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
491
|
+
|
|
492
|
+
begin
|
|
493
|
+
# Get business encryption public key
|
|
494
|
+
result = api_instance.get_whatsapp_business_encryption(token)
|
|
495
|
+
p result
|
|
496
|
+
rescue OneMsgChatApi::ApiError => e
|
|
497
|
+
puts "Error when calling FlowsApi->get_whatsapp_business_encryption: #{e}"
|
|
498
|
+
end
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
#### Using the get_whatsapp_business_encryption_with_http_info variant
|
|
502
|
+
|
|
503
|
+
This returns an Array which contains the response data, status code and headers.
|
|
504
|
+
|
|
505
|
+
> <Array(<GetWhatsappBusinessEncryption200Response>, Integer, Hash)> get_whatsapp_business_encryption_with_http_info(token)
|
|
506
|
+
|
|
507
|
+
```ruby
|
|
508
|
+
begin
|
|
509
|
+
# Get business encryption public key
|
|
510
|
+
data, status_code, headers = api_instance.get_whatsapp_business_encryption_with_http_info(token)
|
|
511
|
+
p status_code # => 2xx
|
|
512
|
+
p headers # => { ... }
|
|
513
|
+
p data # => <GetWhatsappBusinessEncryption200Response>
|
|
514
|
+
rescue OneMsgChatApi::ApiError => e
|
|
515
|
+
puts "Error when calling FlowsApi->get_whatsapp_business_encryption_with_http_info: #{e}"
|
|
516
|
+
end
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### Parameters
|
|
520
|
+
|
|
521
|
+
| Name | Type | Description | Notes |
|
|
522
|
+
| ---- | ---- | ----------- | ----- |
|
|
523
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
524
|
+
|
|
525
|
+
### Return type
|
|
526
|
+
|
|
527
|
+
[**GetWhatsappBusinessEncryption200Response**](GetWhatsappBusinessEncryption200Response.md)
|
|
528
|
+
|
|
529
|
+
### Authorization
|
|
530
|
+
|
|
531
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
532
|
+
|
|
533
|
+
### HTTP request headers
|
|
534
|
+
|
|
535
|
+
- **Content-Type**: Not defined
|
|
536
|
+
- **Accept**: application/json
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
## list_flows
|
|
540
|
+
|
|
541
|
+
> <ListFlows200Response> list_flows(token, opts)
|
|
542
|
+
|
|
543
|
+
List Flows
|
|
544
|
+
|
|
545
|
+
### Examples
|
|
546
|
+
|
|
547
|
+
```ruby
|
|
548
|
+
require 'time'
|
|
549
|
+
require 'one_msg_chat_api'
|
|
550
|
+
# setup authorization
|
|
551
|
+
OneMsgChatApi.configure do |config|
|
|
552
|
+
# Configure API key authorization: tokenAuth
|
|
553
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
554
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
555
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
559
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
560
|
+
opts = {
|
|
561
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
begin
|
|
565
|
+
# List Flows
|
|
566
|
+
result = api_instance.list_flows(token, opts)
|
|
567
|
+
p result
|
|
568
|
+
rescue OneMsgChatApi::ApiError => e
|
|
569
|
+
puts "Error when calling FlowsApi->list_flows: #{e}"
|
|
570
|
+
end
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
#### Using the list_flows_with_http_info variant
|
|
574
|
+
|
|
575
|
+
This returns an Array which contains the response data, status code and headers.
|
|
576
|
+
|
|
577
|
+
> <Array(<ListFlows200Response>, Integer, Hash)> list_flows_with_http_info(token, opts)
|
|
578
|
+
|
|
579
|
+
```ruby
|
|
580
|
+
begin
|
|
581
|
+
# List Flows
|
|
582
|
+
data, status_code, headers = api_instance.list_flows_with_http_info(token, opts)
|
|
583
|
+
p status_code # => 2xx
|
|
584
|
+
p headers # => { ... }
|
|
585
|
+
p data # => <ListFlows200Response>
|
|
586
|
+
rescue OneMsgChatApi::ApiError => e
|
|
587
|
+
puts "Error when calling FlowsApi->list_flows_with_http_info: #{e}"
|
|
588
|
+
end
|
|
589
|
+
```
|
|
590
|
+
|
|
591
|
+
### Parameters
|
|
592
|
+
|
|
593
|
+
| Name | Type | Description | Notes |
|
|
594
|
+
| ---- | ---- | ----------- | ----- |
|
|
595
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
596
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
597
|
+
|
|
598
|
+
### Return type
|
|
599
|
+
|
|
600
|
+
[**ListFlows200Response**](ListFlows200Response.md)
|
|
601
|
+
|
|
602
|
+
### Authorization
|
|
603
|
+
|
|
604
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
605
|
+
|
|
606
|
+
### HTTP request headers
|
|
607
|
+
|
|
608
|
+
- **Content-Type**: Not defined
|
|
609
|
+
- **Accept**: application/json
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
## patch_flows_flow_id_assets
|
|
613
|
+
|
|
614
|
+
> <PatchFlowsFlowIdAssets200Response> patch_flows_flow_id_assets(flow_id, token, opts)
|
|
615
|
+
|
|
616
|
+
Update Flow Structure
|
|
617
|
+
|
|
618
|
+
### Examples
|
|
619
|
+
|
|
620
|
+
```ruby
|
|
621
|
+
require 'time'
|
|
622
|
+
require 'one_msg_chat_api'
|
|
623
|
+
# setup authorization
|
|
624
|
+
OneMsgChatApi.configure do |config|
|
|
625
|
+
# Configure API key authorization: tokenAuth
|
|
626
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
627
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
628
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
629
|
+
end
|
|
630
|
+
|
|
631
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
632
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
633
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
634
|
+
opts = {
|
|
635
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
begin
|
|
639
|
+
# Update Flow Structure
|
|
640
|
+
result = api_instance.patch_flows_flow_id_assets(flow_id, token, opts)
|
|
641
|
+
p result
|
|
642
|
+
rescue OneMsgChatApi::ApiError => e
|
|
643
|
+
puts "Error when calling FlowsApi->patch_flows_flow_id_assets: #{e}"
|
|
644
|
+
end
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
#### Using the patch_flows_flow_id_assets_with_http_info variant
|
|
648
|
+
|
|
649
|
+
This returns an Array which contains the response data, status code and headers.
|
|
650
|
+
|
|
651
|
+
> <Array(<PatchFlowsFlowIdAssets200Response>, Integer, Hash)> patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
652
|
+
|
|
653
|
+
```ruby
|
|
654
|
+
begin
|
|
655
|
+
# Update Flow Structure
|
|
656
|
+
data, status_code, headers = api_instance.patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
657
|
+
p status_code # => 2xx
|
|
658
|
+
p headers # => { ... }
|
|
659
|
+
p data # => <PatchFlowsFlowIdAssets200Response>
|
|
660
|
+
rescue OneMsgChatApi::ApiError => e
|
|
661
|
+
puts "Error when calling FlowsApi->patch_flows_flow_id_assets_with_http_info: #{e}"
|
|
662
|
+
end
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
### Parameters
|
|
666
|
+
|
|
667
|
+
| Name | Type | Description | Notes |
|
|
668
|
+
| ---- | ---- | ----------- | ----- |
|
|
669
|
+
| **flow_id** | **String** | Flow ID | |
|
|
670
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
671
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
672
|
+
|
|
673
|
+
### Return type
|
|
674
|
+
|
|
675
|
+
[**PatchFlowsFlowIdAssets200Response**](PatchFlowsFlowIdAssets200Response.md)
|
|
676
|
+
|
|
677
|
+
### Authorization
|
|
678
|
+
|
|
679
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
680
|
+
|
|
681
|
+
### HTTP request headers
|
|
682
|
+
|
|
683
|
+
- **Content-Type**: Not defined
|
|
684
|
+
- **Accept**: application/json
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
## patch_flows_flow_id_metadata
|
|
688
|
+
|
|
689
|
+
> Hash<String, Object> patch_flows_flow_id_metadata(flow_id, token, opts)
|
|
690
|
+
|
|
691
|
+
Update Flow Metadata
|
|
692
|
+
|
|
693
|
+
### Examples
|
|
694
|
+
|
|
695
|
+
```ruby
|
|
696
|
+
require 'time'
|
|
697
|
+
require 'one_msg_chat_api'
|
|
698
|
+
# setup authorization
|
|
699
|
+
OneMsgChatApi.configure do |config|
|
|
700
|
+
# Configure API key authorization: tokenAuth
|
|
701
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
702
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
703
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
707
|
+
flow_id = 'flow_id_example' # String | Flow ID
|
|
708
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
709
|
+
opts = {
|
|
710
|
+
waba_account_id: '{{wabaAccountId}}' # String |
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
begin
|
|
714
|
+
# Update Flow Metadata
|
|
715
|
+
result = api_instance.patch_flows_flow_id_metadata(flow_id, token, opts)
|
|
716
|
+
p result
|
|
717
|
+
rescue OneMsgChatApi::ApiError => e
|
|
718
|
+
puts "Error when calling FlowsApi->patch_flows_flow_id_metadata: #{e}"
|
|
719
|
+
end
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
#### Using the patch_flows_flow_id_metadata_with_http_info variant
|
|
723
|
+
|
|
724
|
+
This returns an Array which contains the response data, status code and headers.
|
|
725
|
+
|
|
726
|
+
> <Array(Hash<String, Object>, Integer, Hash)> patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
727
|
+
|
|
728
|
+
```ruby
|
|
729
|
+
begin
|
|
730
|
+
# Update Flow Metadata
|
|
731
|
+
data, status_code, headers = api_instance.patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
732
|
+
p status_code # => 2xx
|
|
733
|
+
p headers # => { ... }
|
|
734
|
+
p data # => Hash<String, Object>
|
|
735
|
+
rescue OneMsgChatApi::ApiError => e
|
|
736
|
+
puts "Error when calling FlowsApi->patch_flows_flow_id_metadata_with_http_info: #{e}"
|
|
737
|
+
end
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
### Parameters
|
|
741
|
+
|
|
742
|
+
| Name | Type | Description | Notes |
|
|
743
|
+
| ---- | ---- | ----------- | ----- |
|
|
744
|
+
| **flow_id** | **String** | Flow ID | |
|
|
745
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
746
|
+
| **waba_account_id** | **String** | | [optional] |
|
|
747
|
+
|
|
748
|
+
### Return type
|
|
749
|
+
|
|
750
|
+
**Hash<String, Object>**
|
|
751
|
+
|
|
752
|
+
### Authorization
|
|
753
|
+
|
|
754
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
755
|
+
|
|
756
|
+
### HTTP request headers
|
|
757
|
+
|
|
758
|
+
- **Content-Type**: Not defined
|
|
759
|
+
- **Accept**: application/json
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
## set_whatsapp_business_encryption
|
|
763
|
+
|
|
764
|
+
> <CreateCommerce200Response> set_whatsapp_business_encryption(token, set_whatsapp_business_encryption_request)
|
|
765
|
+
|
|
766
|
+
Set business encryption public key
|
|
767
|
+
|
|
768
|
+
Upload and sign a 2048-bit RSA business public key (PEM) for this channel's phone number. Meta requires a signed key before Flow publish/send. Only one active key per number; a new upload replaces the previous key.
|
|
769
|
+
|
|
770
|
+
### Examples
|
|
771
|
+
|
|
772
|
+
```ruby
|
|
773
|
+
require 'time'
|
|
774
|
+
require 'one_msg_chat_api'
|
|
775
|
+
# setup authorization
|
|
776
|
+
OneMsgChatApi.configure do |config|
|
|
777
|
+
# Configure API key authorization: tokenAuth
|
|
778
|
+
config.api_key['token'] = 'YOUR API KEY'
|
|
779
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
780
|
+
# config.api_key_prefix['token'] = 'Bearer'
|
|
781
|
+
end
|
|
782
|
+
|
|
783
|
+
api_instance = OneMsgChatApi::FlowsApi.new
|
|
784
|
+
token = 'token_example' # String | JWT token or API key for authorization
|
|
785
|
+
set_whatsapp_business_encryption_request = OneMsgChatApi::SetWhatsappBusinessEncryptionRequest.new({business_public_key: '-----BEGIN PUBLIC KEY-----
|
|
786
|
+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
|
|
787
|
+
-----END PUBLIC KEY-----
|
|
788
|
+
'}) # SetWhatsappBusinessEncryptionRequest |
|
|
789
|
+
|
|
790
|
+
begin
|
|
791
|
+
# Set business encryption public key
|
|
792
|
+
result = api_instance.set_whatsapp_business_encryption(token, set_whatsapp_business_encryption_request)
|
|
793
|
+
p result
|
|
794
|
+
rescue OneMsgChatApi::ApiError => e
|
|
795
|
+
puts "Error when calling FlowsApi->set_whatsapp_business_encryption: #{e}"
|
|
796
|
+
end
|
|
797
|
+
```
|
|
798
|
+
|
|
799
|
+
#### Using the set_whatsapp_business_encryption_with_http_info variant
|
|
800
|
+
|
|
801
|
+
This returns an Array which contains the response data, status code and headers.
|
|
802
|
+
|
|
803
|
+
> <Array(<CreateCommerce200Response>, Integer, Hash)> set_whatsapp_business_encryption_with_http_info(token, set_whatsapp_business_encryption_request)
|
|
804
|
+
|
|
805
|
+
```ruby
|
|
806
|
+
begin
|
|
807
|
+
# Set business encryption public key
|
|
808
|
+
data, status_code, headers = api_instance.set_whatsapp_business_encryption_with_http_info(token, set_whatsapp_business_encryption_request)
|
|
809
|
+
p status_code # => 2xx
|
|
810
|
+
p headers # => { ... }
|
|
811
|
+
p data # => <CreateCommerce200Response>
|
|
812
|
+
rescue OneMsgChatApi::ApiError => e
|
|
813
|
+
puts "Error when calling FlowsApi->set_whatsapp_business_encryption_with_http_info: #{e}"
|
|
814
|
+
end
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
### Parameters
|
|
818
|
+
|
|
819
|
+
| Name | Type | Description | Notes |
|
|
820
|
+
| ---- | ---- | ----------- | ----- |
|
|
821
|
+
| **token** | **String** | JWT token or API key for authorization | |
|
|
822
|
+
| **set_whatsapp_business_encryption_request** | [**SetWhatsappBusinessEncryptionRequest**](SetWhatsappBusinessEncryptionRequest.md) | | |
|
|
823
|
+
|
|
824
|
+
### Return type
|
|
825
|
+
|
|
826
|
+
[**CreateCommerce200Response**](CreateCommerce200Response.md)
|
|
827
|
+
|
|
828
|
+
### Authorization
|
|
829
|
+
|
|
830
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
831
|
+
|
|
832
|
+
### HTTP request headers
|
|
833
|
+
|
|
834
|
+
- **Content-Type**: application/json
|
|
835
|
+
- **Accept**: application/json
|
|
836
|
+
|