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
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#1MSG WhatsApp Business API (Public)
|
|
3
|
+
|
|
4
|
+
#Public client API for sending messages, managing groups, flows, and templates. This is the API exposed to end customers via platform.1msg.io **Authentication:** All requests require `token` query parameter with JWT or API key. **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@1msg.io
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module OneMsgChatApi
|
|
16
|
+
class FlowsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create Flow
|
|
23
|
+
# @param token [String] JWT token or API key for authorization
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :waba_account_id
|
|
26
|
+
# @return [CreateGroups200Response]
|
|
27
|
+
def create_flows(token, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_flows_with_http_info(token, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Flow
|
|
33
|
+
# @param token [String] JWT token or API key for authorization
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :waba_account_id
|
|
36
|
+
# @return [Array<(CreateGroups200Response, Integer, Hash)>] CreateGroups200Response data, response status code and response headers
|
|
37
|
+
def create_flows_with_http_info(token, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.create_flows ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'token' is set
|
|
42
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.create_flows"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/flows'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
query_params[:'token'] = token
|
|
51
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
52
|
+
|
|
53
|
+
# header parameters
|
|
54
|
+
header_params = opts[:header_params] || {}
|
|
55
|
+
# HTTP header 'Accept' (if needed)
|
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = opts[:form_params] || {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = opts[:debug_body]
|
|
63
|
+
|
|
64
|
+
# return_type
|
|
65
|
+
return_type = opts[:debug_return_type] || 'CreateGroups200Response'
|
|
66
|
+
|
|
67
|
+
# auth_names
|
|
68
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
69
|
+
|
|
70
|
+
new_options = opts.merge(
|
|
71
|
+
:operation => :"FlowsApi.create_flows",
|
|
72
|
+
:header_params => header_params,
|
|
73
|
+
:query_params => query_params,
|
|
74
|
+
:form_params => form_params,
|
|
75
|
+
:body => post_body,
|
|
76
|
+
:auth_names => auth_names,
|
|
77
|
+
:return_type => return_type
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
81
|
+
if @api_client.config.debugging
|
|
82
|
+
@api_client.config.logger.debug "API called: FlowsApi#create_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
83
|
+
end
|
|
84
|
+
return data, status_code, headers
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Deprecate Flow
|
|
88
|
+
# @param flow_id [String] Flow ID
|
|
89
|
+
# @param token [String] JWT token or API key for authorization
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :waba_account_id
|
|
92
|
+
# @return [Hash<String, Object>]
|
|
93
|
+
def create_flows_flow_id_deprecate(flow_id, token, opts = {})
|
|
94
|
+
data, _status_code, _headers = create_flows_flow_id_deprecate_with_http_info(flow_id, token, opts)
|
|
95
|
+
data
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Deprecate Flow
|
|
99
|
+
# @param flow_id [String] Flow ID
|
|
100
|
+
# @param token [String] JWT token or API key for authorization
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @option opts [String] :waba_account_id
|
|
103
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
104
|
+
def create_flows_flow_id_deprecate_with_http_info(flow_id, token, opts = {})
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.create_flows_flow_id_deprecate ...'
|
|
107
|
+
end
|
|
108
|
+
# verify the required parameter 'flow_id' is set
|
|
109
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
110
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.create_flows_flow_id_deprecate"
|
|
111
|
+
end
|
|
112
|
+
# verify the required parameter 'token' is set
|
|
113
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
114
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.create_flows_flow_id_deprecate"
|
|
115
|
+
end
|
|
116
|
+
# resource path
|
|
117
|
+
local_var_path = '/flows/{flowId}/deprecate'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
118
|
+
|
|
119
|
+
# query parameters
|
|
120
|
+
query_params = opts[:query_params] || {}
|
|
121
|
+
query_params[:'token'] = token
|
|
122
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
123
|
+
|
|
124
|
+
# header parameters
|
|
125
|
+
header_params = opts[:header_params] || {}
|
|
126
|
+
# HTTP header 'Accept' (if needed)
|
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body]
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"FlowsApi.create_flows_flow_id_deprecate",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: FlowsApi#create_flows_flow_id_deprecate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Publish Flow
|
|
159
|
+
# @param flow_id [String] Flow ID
|
|
160
|
+
# @param token [String] JWT token or API key for authorization
|
|
161
|
+
# @param [Hash] opts the optional parameters
|
|
162
|
+
# @option opts [String] :waba_account_id
|
|
163
|
+
# @return [Hash<String, Object>]
|
|
164
|
+
def create_flows_flow_id_publish(flow_id, token, opts = {})
|
|
165
|
+
data, _status_code, _headers = create_flows_flow_id_publish_with_http_info(flow_id, token, opts)
|
|
166
|
+
data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Publish Flow
|
|
170
|
+
# @param flow_id [String] Flow ID
|
|
171
|
+
# @param token [String] JWT token or API key for authorization
|
|
172
|
+
# @param [Hash] opts the optional parameters
|
|
173
|
+
# @option opts [String] :waba_account_id
|
|
174
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
175
|
+
def create_flows_flow_id_publish_with_http_info(flow_id, token, opts = {})
|
|
176
|
+
if @api_client.config.debugging
|
|
177
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.create_flows_flow_id_publish ...'
|
|
178
|
+
end
|
|
179
|
+
# verify the required parameter 'flow_id' is set
|
|
180
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
181
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.create_flows_flow_id_publish"
|
|
182
|
+
end
|
|
183
|
+
# verify the required parameter 'token' is set
|
|
184
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
185
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.create_flows_flow_id_publish"
|
|
186
|
+
end
|
|
187
|
+
# resource path
|
|
188
|
+
local_var_path = '/flows/{flowId}/publish'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
189
|
+
|
|
190
|
+
# query parameters
|
|
191
|
+
query_params = opts[:query_params] || {}
|
|
192
|
+
query_params[:'token'] = token
|
|
193
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
194
|
+
|
|
195
|
+
# header parameters
|
|
196
|
+
header_params = opts[:header_params] || {}
|
|
197
|
+
# HTTP header 'Accept' (if needed)
|
|
198
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:debug_body]
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:operation => :"FlowsApi.create_flows_flow_id_publish",
|
|
214
|
+
:header_params => header_params,
|
|
215
|
+
:query_params => query_params,
|
|
216
|
+
:form_params => form_params,
|
|
217
|
+
:body => post_body,
|
|
218
|
+
:auth_names => auth_names,
|
|
219
|
+
:return_type => return_type
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
223
|
+
if @api_client.config.debugging
|
|
224
|
+
@api_client.config.logger.debug "API called: FlowsApi#create_flows_flow_id_publish\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
225
|
+
end
|
|
226
|
+
return data, status_code, headers
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Delete Flow
|
|
230
|
+
# @param flow_id [String] Flow ID
|
|
231
|
+
# @param token [String] JWT token or API key for authorization
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @option opts [String] :waba_account_id
|
|
234
|
+
# @return [DeleteFlowsFlowId200Response]
|
|
235
|
+
def delete_flows_flow_id(flow_id, token, opts = {})
|
|
236
|
+
data, _status_code, _headers = delete_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
237
|
+
data
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Delete Flow
|
|
241
|
+
# @param flow_id [String] Flow ID
|
|
242
|
+
# @param token [String] JWT token or API key for authorization
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @option opts [String] :waba_account_id
|
|
245
|
+
# @return [Array<(DeleteFlowsFlowId200Response, Integer, Hash)>] DeleteFlowsFlowId200Response data, response status code and response headers
|
|
246
|
+
def delete_flows_flow_id_with_http_info(flow_id, token, opts = {})
|
|
247
|
+
if @api_client.config.debugging
|
|
248
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.delete_flows_flow_id ...'
|
|
249
|
+
end
|
|
250
|
+
# verify the required parameter 'flow_id' is set
|
|
251
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
252
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.delete_flows_flow_id"
|
|
253
|
+
end
|
|
254
|
+
# verify the required parameter 'token' is set
|
|
255
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
256
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.delete_flows_flow_id"
|
|
257
|
+
end
|
|
258
|
+
# resource path
|
|
259
|
+
local_var_path = '/flows/{flowId}'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
260
|
+
|
|
261
|
+
# query parameters
|
|
262
|
+
query_params = opts[:query_params] || {}
|
|
263
|
+
query_params[:'token'] = token
|
|
264
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
265
|
+
|
|
266
|
+
# header parameters
|
|
267
|
+
header_params = opts[:header_params] || {}
|
|
268
|
+
# HTTP header 'Accept' (if needed)
|
|
269
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
270
|
+
|
|
271
|
+
# form parameters
|
|
272
|
+
form_params = opts[:form_params] || {}
|
|
273
|
+
|
|
274
|
+
# http body (model)
|
|
275
|
+
post_body = opts[:debug_body]
|
|
276
|
+
|
|
277
|
+
# return_type
|
|
278
|
+
return_type = opts[:debug_return_type] || 'DeleteFlowsFlowId200Response'
|
|
279
|
+
|
|
280
|
+
# auth_names
|
|
281
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
282
|
+
|
|
283
|
+
new_options = opts.merge(
|
|
284
|
+
:operation => :"FlowsApi.delete_flows_flow_id",
|
|
285
|
+
:header_params => header_params,
|
|
286
|
+
:query_params => query_params,
|
|
287
|
+
:form_params => form_params,
|
|
288
|
+
:body => post_body,
|
|
289
|
+
:auth_names => auth_names,
|
|
290
|
+
:return_type => return_type
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug "API called: FlowsApi#delete_flows_flow_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
296
|
+
end
|
|
297
|
+
return data, status_code, headers
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Get Flow Details
|
|
301
|
+
# @param flow_id [String] Flow ID
|
|
302
|
+
# @param token [String] JWT token or API key for authorization
|
|
303
|
+
# @param [Hash] opts the optional parameters
|
|
304
|
+
# @option opts [String] :waba_account_id
|
|
305
|
+
# @return [CreateGroups200Response]
|
|
306
|
+
def get_flows_flow_id(flow_id, token, opts = {})
|
|
307
|
+
data, _status_code, _headers = get_flows_flow_id_with_http_info(flow_id, token, opts)
|
|
308
|
+
data
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Get Flow Details
|
|
312
|
+
# @param flow_id [String] Flow ID
|
|
313
|
+
# @param token [String] JWT token or API key for authorization
|
|
314
|
+
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @option opts [String] :waba_account_id
|
|
316
|
+
# @return [Array<(CreateGroups200Response, Integer, Hash)>] CreateGroups200Response data, response status code and response headers
|
|
317
|
+
def get_flows_flow_id_with_http_info(flow_id, token, opts = {})
|
|
318
|
+
if @api_client.config.debugging
|
|
319
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.get_flows_flow_id ...'
|
|
320
|
+
end
|
|
321
|
+
# verify the required parameter 'flow_id' is set
|
|
322
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
323
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.get_flows_flow_id"
|
|
324
|
+
end
|
|
325
|
+
# verify the required parameter 'token' is set
|
|
326
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
327
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.get_flows_flow_id"
|
|
328
|
+
end
|
|
329
|
+
# resource path
|
|
330
|
+
local_var_path = '/flows/{flowId}'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
331
|
+
|
|
332
|
+
# query parameters
|
|
333
|
+
query_params = opts[:query_params] || {}
|
|
334
|
+
query_params[:'token'] = token
|
|
335
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
336
|
+
|
|
337
|
+
# header parameters
|
|
338
|
+
header_params = opts[:header_params] || {}
|
|
339
|
+
# HTTP header 'Accept' (if needed)
|
|
340
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
341
|
+
|
|
342
|
+
# form parameters
|
|
343
|
+
form_params = opts[:form_params] || {}
|
|
344
|
+
|
|
345
|
+
# http body (model)
|
|
346
|
+
post_body = opts[:debug_body]
|
|
347
|
+
|
|
348
|
+
# return_type
|
|
349
|
+
return_type = opts[:debug_return_type] || 'CreateGroups200Response'
|
|
350
|
+
|
|
351
|
+
# auth_names
|
|
352
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
353
|
+
|
|
354
|
+
new_options = opts.merge(
|
|
355
|
+
:operation => :"FlowsApi.get_flows_flow_id",
|
|
356
|
+
:header_params => header_params,
|
|
357
|
+
:query_params => query_params,
|
|
358
|
+
:form_params => form_params,
|
|
359
|
+
:body => post_body,
|
|
360
|
+
:auth_names => auth_names,
|
|
361
|
+
:return_type => return_type
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
365
|
+
if @api_client.config.debugging
|
|
366
|
+
@api_client.config.logger.debug "API called: FlowsApi#get_flows_flow_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
367
|
+
end
|
|
368
|
+
return data, status_code, headers
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Preview Flow
|
|
372
|
+
# @param flow_id [String] Flow ID
|
|
373
|
+
# @param token [String] JWT token or API key for authorization
|
|
374
|
+
# @param [Hash] opts the optional parameters
|
|
375
|
+
# @option opts [String] :waba_account_id
|
|
376
|
+
# @return [Hash<String, Object>]
|
|
377
|
+
def get_flows_flow_id_preview(flow_id, token, opts = {})
|
|
378
|
+
data, _status_code, _headers = get_flows_flow_id_preview_with_http_info(flow_id, token, opts)
|
|
379
|
+
data
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Preview Flow
|
|
383
|
+
# @param flow_id [String] Flow ID
|
|
384
|
+
# @param token [String] JWT token or API key for authorization
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @option opts [String] :waba_account_id
|
|
387
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
388
|
+
def get_flows_flow_id_preview_with_http_info(flow_id, token, opts = {})
|
|
389
|
+
if @api_client.config.debugging
|
|
390
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.get_flows_flow_id_preview ...'
|
|
391
|
+
end
|
|
392
|
+
# verify the required parameter 'flow_id' is set
|
|
393
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
394
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.get_flows_flow_id_preview"
|
|
395
|
+
end
|
|
396
|
+
# verify the required parameter 'token' is set
|
|
397
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
398
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.get_flows_flow_id_preview"
|
|
399
|
+
end
|
|
400
|
+
# resource path
|
|
401
|
+
local_var_path = '/flows/{flowId}/preview'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
402
|
+
|
|
403
|
+
# query parameters
|
|
404
|
+
query_params = opts[:query_params] || {}
|
|
405
|
+
query_params[:'token'] = token
|
|
406
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
407
|
+
|
|
408
|
+
# header parameters
|
|
409
|
+
header_params = opts[:header_params] || {}
|
|
410
|
+
# HTTP header 'Accept' (if needed)
|
|
411
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
412
|
+
|
|
413
|
+
# form parameters
|
|
414
|
+
form_params = opts[:form_params] || {}
|
|
415
|
+
|
|
416
|
+
# http body (model)
|
|
417
|
+
post_body = opts[:debug_body]
|
|
418
|
+
|
|
419
|
+
# return_type
|
|
420
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
421
|
+
|
|
422
|
+
# auth_names
|
|
423
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
424
|
+
|
|
425
|
+
new_options = opts.merge(
|
|
426
|
+
:operation => :"FlowsApi.get_flows_flow_id_preview",
|
|
427
|
+
:header_params => header_params,
|
|
428
|
+
:query_params => query_params,
|
|
429
|
+
:form_params => form_params,
|
|
430
|
+
:body => post_body,
|
|
431
|
+
:auth_names => auth_names,
|
|
432
|
+
:return_type => return_type
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
436
|
+
if @api_client.config.debugging
|
|
437
|
+
@api_client.config.logger.debug "API called: FlowsApi#get_flows_flow_id_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
438
|
+
end
|
|
439
|
+
return data, status_code, headers
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
# Get business encryption public key
|
|
443
|
+
# 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.
|
|
444
|
+
# @param token [String] JWT token or API key for authorization
|
|
445
|
+
# @param [Hash] opts the optional parameters
|
|
446
|
+
# @return [GetWhatsappBusinessEncryption200Response]
|
|
447
|
+
def get_whatsapp_business_encryption(token, opts = {})
|
|
448
|
+
data, _status_code, _headers = get_whatsapp_business_encryption_with_http_info(token, opts)
|
|
449
|
+
data
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Get business encryption public key
|
|
453
|
+
# 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.
|
|
454
|
+
# @param token [String] JWT token or API key for authorization
|
|
455
|
+
# @param [Hash] opts the optional parameters
|
|
456
|
+
# @return [Array<(GetWhatsappBusinessEncryption200Response, Integer, Hash)>] GetWhatsappBusinessEncryption200Response data, response status code and response headers
|
|
457
|
+
def get_whatsapp_business_encryption_with_http_info(token, opts = {})
|
|
458
|
+
if @api_client.config.debugging
|
|
459
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.get_whatsapp_business_encryption ...'
|
|
460
|
+
end
|
|
461
|
+
# verify the required parameter 'token' is set
|
|
462
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
463
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.get_whatsapp_business_encryption"
|
|
464
|
+
end
|
|
465
|
+
# resource path
|
|
466
|
+
local_var_path = '/whatsapp_business_encryption'
|
|
467
|
+
|
|
468
|
+
# query parameters
|
|
469
|
+
query_params = opts[:query_params] || {}
|
|
470
|
+
query_params[:'token'] = token
|
|
471
|
+
|
|
472
|
+
# header parameters
|
|
473
|
+
header_params = opts[:header_params] || {}
|
|
474
|
+
# HTTP header 'Accept' (if needed)
|
|
475
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
476
|
+
|
|
477
|
+
# form parameters
|
|
478
|
+
form_params = opts[:form_params] || {}
|
|
479
|
+
|
|
480
|
+
# http body (model)
|
|
481
|
+
post_body = opts[:debug_body]
|
|
482
|
+
|
|
483
|
+
# return_type
|
|
484
|
+
return_type = opts[:debug_return_type] || 'GetWhatsappBusinessEncryption200Response'
|
|
485
|
+
|
|
486
|
+
# auth_names
|
|
487
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
488
|
+
|
|
489
|
+
new_options = opts.merge(
|
|
490
|
+
:operation => :"FlowsApi.get_whatsapp_business_encryption",
|
|
491
|
+
:header_params => header_params,
|
|
492
|
+
:query_params => query_params,
|
|
493
|
+
:form_params => form_params,
|
|
494
|
+
:body => post_body,
|
|
495
|
+
:auth_names => auth_names,
|
|
496
|
+
:return_type => return_type
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug "API called: FlowsApi#get_whatsapp_business_encryption\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
502
|
+
end
|
|
503
|
+
return data, status_code, headers
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
# List Flows
|
|
507
|
+
# @param token [String] JWT token or API key for authorization
|
|
508
|
+
# @param [Hash] opts the optional parameters
|
|
509
|
+
# @option opts [String] :waba_account_id
|
|
510
|
+
# @return [ListFlows200Response]
|
|
511
|
+
def list_flows(token, opts = {})
|
|
512
|
+
data, _status_code, _headers = list_flows_with_http_info(token, opts)
|
|
513
|
+
data
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# List Flows
|
|
517
|
+
# @param token [String] JWT token or API key for authorization
|
|
518
|
+
# @param [Hash] opts the optional parameters
|
|
519
|
+
# @option opts [String] :waba_account_id
|
|
520
|
+
# @return [Array<(ListFlows200Response, Integer, Hash)>] ListFlows200Response data, response status code and response headers
|
|
521
|
+
def list_flows_with_http_info(token, opts = {})
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.list_flows ...'
|
|
524
|
+
end
|
|
525
|
+
# verify the required parameter 'token' is set
|
|
526
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
527
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.list_flows"
|
|
528
|
+
end
|
|
529
|
+
# resource path
|
|
530
|
+
local_var_path = '/flows'
|
|
531
|
+
|
|
532
|
+
# query parameters
|
|
533
|
+
query_params = opts[:query_params] || {}
|
|
534
|
+
query_params[:'token'] = token
|
|
535
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
536
|
+
|
|
537
|
+
# header parameters
|
|
538
|
+
header_params = opts[:header_params] || {}
|
|
539
|
+
# HTTP header 'Accept' (if needed)
|
|
540
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
541
|
+
|
|
542
|
+
# form parameters
|
|
543
|
+
form_params = opts[:form_params] || {}
|
|
544
|
+
|
|
545
|
+
# http body (model)
|
|
546
|
+
post_body = opts[:debug_body]
|
|
547
|
+
|
|
548
|
+
# return_type
|
|
549
|
+
return_type = opts[:debug_return_type] || 'ListFlows200Response'
|
|
550
|
+
|
|
551
|
+
# auth_names
|
|
552
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
553
|
+
|
|
554
|
+
new_options = opts.merge(
|
|
555
|
+
:operation => :"FlowsApi.list_flows",
|
|
556
|
+
:header_params => header_params,
|
|
557
|
+
:query_params => query_params,
|
|
558
|
+
:form_params => form_params,
|
|
559
|
+
:body => post_body,
|
|
560
|
+
:auth_names => auth_names,
|
|
561
|
+
:return_type => return_type
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
565
|
+
if @api_client.config.debugging
|
|
566
|
+
@api_client.config.logger.debug "API called: FlowsApi#list_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
567
|
+
end
|
|
568
|
+
return data, status_code, headers
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Update Flow Structure
|
|
572
|
+
# @param flow_id [String] Flow ID
|
|
573
|
+
# @param token [String] JWT token or API key for authorization
|
|
574
|
+
# @param [Hash] opts the optional parameters
|
|
575
|
+
# @option opts [String] :waba_account_id
|
|
576
|
+
# @return [PatchFlowsFlowIdAssets200Response]
|
|
577
|
+
def patch_flows_flow_id_assets(flow_id, token, opts = {})
|
|
578
|
+
data, _status_code, _headers = patch_flows_flow_id_assets_with_http_info(flow_id, token, opts)
|
|
579
|
+
data
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
# Update Flow Structure
|
|
583
|
+
# @param flow_id [String] Flow ID
|
|
584
|
+
# @param token [String] JWT token or API key for authorization
|
|
585
|
+
# @param [Hash] opts the optional parameters
|
|
586
|
+
# @option opts [String] :waba_account_id
|
|
587
|
+
# @return [Array<(PatchFlowsFlowIdAssets200Response, Integer, Hash)>] PatchFlowsFlowIdAssets200Response data, response status code and response headers
|
|
588
|
+
def patch_flows_flow_id_assets_with_http_info(flow_id, token, opts = {})
|
|
589
|
+
if @api_client.config.debugging
|
|
590
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_assets ...'
|
|
591
|
+
end
|
|
592
|
+
# verify the required parameter 'flow_id' is set
|
|
593
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
594
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.patch_flows_flow_id_assets"
|
|
595
|
+
end
|
|
596
|
+
# verify the required parameter 'token' is set
|
|
597
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
598
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_assets"
|
|
599
|
+
end
|
|
600
|
+
# resource path
|
|
601
|
+
local_var_path = '/flows/{flowId}/assets'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
602
|
+
|
|
603
|
+
# query parameters
|
|
604
|
+
query_params = opts[:query_params] || {}
|
|
605
|
+
query_params[:'token'] = token
|
|
606
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
607
|
+
|
|
608
|
+
# header parameters
|
|
609
|
+
header_params = opts[:header_params] || {}
|
|
610
|
+
# HTTP header 'Accept' (if needed)
|
|
611
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
612
|
+
|
|
613
|
+
# form parameters
|
|
614
|
+
form_params = opts[:form_params] || {}
|
|
615
|
+
|
|
616
|
+
# http body (model)
|
|
617
|
+
post_body = opts[:debug_body]
|
|
618
|
+
|
|
619
|
+
# return_type
|
|
620
|
+
return_type = opts[:debug_return_type] || 'PatchFlowsFlowIdAssets200Response'
|
|
621
|
+
|
|
622
|
+
# auth_names
|
|
623
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
624
|
+
|
|
625
|
+
new_options = opts.merge(
|
|
626
|
+
:operation => :"FlowsApi.patch_flows_flow_id_assets",
|
|
627
|
+
:header_params => header_params,
|
|
628
|
+
:query_params => query_params,
|
|
629
|
+
:form_params => form_params,
|
|
630
|
+
:body => post_body,
|
|
631
|
+
:auth_names => auth_names,
|
|
632
|
+
:return_type => return_type
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
636
|
+
if @api_client.config.debugging
|
|
637
|
+
@api_client.config.logger.debug "API called: FlowsApi#patch_flows_flow_id_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
638
|
+
end
|
|
639
|
+
return data, status_code, headers
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# Update Flow Metadata
|
|
643
|
+
# @param flow_id [String] Flow ID
|
|
644
|
+
# @param token [String] JWT token or API key for authorization
|
|
645
|
+
# @param [Hash] opts the optional parameters
|
|
646
|
+
# @option opts [String] :waba_account_id
|
|
647
|
+
# @return [Hash<String, Object>]
|
|
648
|
+
def patch_flows_flow_id_metadata(flow_id, token, opts = {})
|
|
649
|
+
data, _status_code, _headers = patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts)
|
|
650
|
+
data
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
# Update Flow Metadata
|
|
654
|
+
# @param flow_id [String] Flow ID
|
|
655
|
+
# @param token [String] JWT token or API key for authorization
|
|
656
|
+
# @param [Hash] opts the optional parameters
|
|
657
|
+
# @option opts [String] :waba_account_id
|
|
658
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
659
|
+
def patch_flows_flow_id_metadata_with_http_info(flow_id, token, opts = {})
|
|
660
|
+
if @api_client.config.debugging
|
|
661
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.patch_flows_flow_id_metadata ...'
|
|
662
|
+
end
|
|
663
|
+
# verify the required parameter 'flow_id' is set
|
|
664
|
+
if @api_client.config.client_side_validation && flow_id.nil?
|
|
665
|
+
fail ArgumentError, "Missing the required parameter 'flow_id' when calling FlowsApi.patch_flows_flow_id_metadata"
|
|
666
|
+
end
|
|
667
|
+
# verify the required parameter 'token' is set
|
|
668
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
669
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.patch_flows_flow_id_metadata"
|
|
670
|
+
end
|
|
671
|
+
# resource path
|
|
672
|
+
local_var_path = '/flows/{flowId}/metadata'.sub('{flowId}', CGI.escape(flow_id.to_s))
|
|
673
|
+
|
|
674
|
+
# query parameters
|
|
675
|
+
query_params = opts[:query_params] || {}
|
|
676
|
+
query_params[:'token'] = token
|
|
677
|
+
query_params[:'wabaAccountId'] = opts[:'waba_account_id'] if !opts[:'waba_account_id'].nil?
|
|
678
|
+
|
|
679
|
+
# header parameters
|
|
680
|
+
header_params = opts[:header_params] || {}
|
|
681
|
+
# HTTP header 'Accept' (if needed)
|
|
682
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
683
|
+
|
|
684
|
+
# form parameters
|
|
685
|
+
form_params = opts[:form_params] || {}
|
|
686
|
+
|
|
687
|
+
# http body (model)
|
|
688
|
+
post_body = opts[:debug_body]
|
|
689
|
+
|
|
690
|
+
# return_type
|
|
691
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
692
|
+
|
|
693
|
+
# auth_names
|
|
694
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
695
|
+
|
|
696
|
+
new_options = opts.merge(
|
|
697
|
+
:operation => :"FlowsApi.patch_flows_flow_id_metadata",
|
|
698
|
+
:header_params => header_params,
|
|
699
|
+
:query_params => query_params,
|
|
700
|
+
:form_params => form_params,
|
|
701
|
+
:body => post_body,
|
|
702
|
+
:auth_names => auth_names,
|
|
703
|
+
:return_type => return_type
|
|
704
|
+
)
|
|
705
|
+
|
|
706
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
707
|
+
if @api_client.config.debugging
|
|
708
|
+
@api_client.config.logger.debug "API called: FlowsApi#patch_flows_flow_id_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
709
|
+
end
|
|
710
|
+
return data, status_code, headers
|
|
711
|
+
end
|
|
712
|
+
|
|
713
|
+
# Set business encryption public key
|
|
714
|
+
# 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.
|
|
715
|
+
# @param token [String] JWT token or API key for authorization
|
|
716
|
+
# @param set_whatsapp_business_encryption_request [SetWhatsappBusinessEncryptionRequest]
|
|
717
|
+
# @param [Hash] opts the optional parameters
|
|
718
|
+
# @return [CreateCommerce200Response]
|
|
719
|
+
def set_whatsapp_business_encryption(token, set_whatsapp_business_encryption_request, opts = {})
|
|
720
|
+
data, _status_code, _headers = set_whatsapp_business_encryption_with_http_info(token, set_whatsapp_business_encryption_request, opts)
|
|
721
|
+
data
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
# Set business encryption public key
|
|
725
|
+
# 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.
|
|
726
|
+
# @param token [String] JWT token or API key for authorization
|
|
727
|
+
# @param set_whatsapp_business_encryption_request [SetWhatsappBusinessEncryptionRequest]
|
|
728
|
+
# @param [Hash] opts the optional parameters
|
|
729
|
+
# @return [Array<(CreateCommerce200Response, Integer, Hash)>] CreateCommerce200Response data, response status code and response headers
|
|
730
|
+
def set_whatsapp_business_encryption_with_http_info(token, set_whatsapp_business_encryption_request, opts = {})
|
|
731
|
+
if @api_client.config.debugging
|
|
732
|
+
@api_client.config.logger.debug 'Calling API: FlowsApi.set_whatsapp_business_encryption ...'
|
|
733
|
+
end
|
|
734
|
+
# verify the required parameter 'token' is set
|
|
735
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
736
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling FlowsApi.set_whatsapp_business_encryption"
|
|
737
|
+
end
|
|
738
|
+
# verify the required parameter 'set_whatsapp_business_encryption_request' is set
|
|
739
|
+
if @api_client.config.client_side_validation && set_whatsapp_business_encryption_request.nil?
|
|
740
|
+
fail ArgumentError, "Missing the required parameter 'set_whatsapp_business_encryption_request' when calling FlowsApi.set_whatsapp_business_encryption"
|
|
741
|
+
end
|
|
742
|
+
# resource path
|
|
743
|
+
local_var_path = '/whatsapp_business_encryption'
|
|
744
|
+
|
|
745
|
+
# query parameters
|
|
746
|
+
query_params = opts[:query_params] || {}
|
|
747
|
+
query_params[:'token'] = token
|
|
748
|
+
|
|
749
|
+
# header parameters
|
|
750
|
+
header_params = opts[:header_params] || {}
|
|
751
|
+
# HTTP header 'Accept' (if needed)
|
|
752
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
753
|
+
# HTTP header 'Content-Type'
|
|
754
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
755
|
+
if !content_type.nil?
|
|
756
|
+
header_params['Content-Type'] = content_type
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
# form parameters
|
|
760
|
+
form_params = opts[:form_params] || {}
|
|
761
|
+
|
|
762
|
+
# http body (model)
|
|
763
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_whatsapp_business_encryption_request)
|
|
764
|
+
|
|
765
|
+
# return_type
|
|
766
|
+
return_type = opts[:debug_return_type] || 'CreateCommerce200Response'
|
|
767
|
+
|
|
768
|
+
# auth_names
|
|
769
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
770
|
+
|
|
771
|
+
new_options = opts.merge(
|
|
772
|
+
:operation => :"FlowsApi.set_whatsapp_business_encryption",
|
|
773
|
+
:header_params => header_params,
|
|
774
|
+
:query_params => query_params,
|
|
775
|
+
:form_params => form_params,
|
|
776
|
+
:body => post_body,
|
|
777
|
+
:auth_names => auth_names,
|
|
778
|
+
:return_type => return_type
|
|
779
|
+
)
|
|
780
|
+
|
|
781
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
782
|
+
if @api_client.config.debugging
|
|
783
|
+
@api_client.config.logger.debug "API called: FlowsApi#set_whatsapp_business_encryption\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
784
|
+
end
|
|
785
|
+
return data, status_code, headers
|
|
786
|
+
end
|
|
787
|
+
end
|
|
788
|
+
end
|