Class: Zernio::WhatsAppFlowsApi
- Inherits:
-
Object
- Object
- Zernio::WhatsAppFlowsApi
- Defined in:
- lib/zernio-sdk/api/whats_app_flows_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_whats_app_flow(create_whats_app_flow_request, opts = {}) ⇒ CreateWhatsAppFlow200Response
Create flow Create a new WhatsApp Flow in DRAFT status.
-
#create_whats_app_flow_with_http_info(create_whats_app_flow_request, opts = {}) ⇒ Array<(CreateWhatsAppFlow200Response, Integer, Hash)>
Create flow Create a new WhatsApp Flow in DRAFT status.
-
#delete_whats_app_flow(flow_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete flow Delete a DRAFT flow.
-
#delete_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete flow Delete a DRAFT flow.
-
#deprecate_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Deprecate flow Deprecate a PUBLISHED flow.
-
#deprecate_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Deprecate flow Deprecate a PUBLISHED flow.
-
#get_whats_app_flow(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlow200Response
Get flow Get details for a specific flow, including status, categories, validation errors, and preview URL.
-
#get_whats_app_flow_json(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlowJson200Response
Get flow JSON asset Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.
-
#get_whats_app_flow_json_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowJson200Response, Integer, Hash)>
Get flow JSON asset Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.
-
#get_whats_app_flow_preview(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlowPreview200Response
Get flow preview URL Get Meta's public web-preview URL for a flow (drafts included), embeddable as an interactive iframe.
-
#get_whats_app_flow_preview_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowPreview200Response, Integer, Hash)>
Get flow preview URL Get Meta's public web-preview URL for a flow (drafts included), embeddable as an interactive iframe.
-
#get_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlow200Response, Integer, Hash)>
Get flow Get details for a specific flow, including status, categories, validation errors, and preview URL.
-
#get_whats_app_flows_encryption_key(account_id, opts = {}) ⇒ GetWhatsAppFlowsEncryptionKey200Response
Get Flows encryption key status Read the RSA business public key registered on the phone number for WhatsApp Flows endpoint encryption.
-
#get_whats_app_flows_encryption_key_with_http_info(account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowsEncryptionKey200Response, Integer, Hash)>
Get Flows encryption key status Read the RSA business public key registered on the phone number for WhatsApp Flows endpoint encryption.
-
#initialize(api_client = ApiClient.default) ⇒ WhatsAppFlowsApi
constructor
A new instance of WhatsAppFlowsApi.
-
#list_whats_app_flow_responses(account_id, opts = {}) ⇒ ListWhatsAppFlowResponses200Response
List flow responses List the responses customers submitted when completing a flow (parsed from the nfm_reply messages received via webhook), newest first.
-
#list_whats_app_flow_responses_with_http_info(account_id, opts = {}) ⇒ Array<(ListWhatsAppFlowResponses200Response, Integer, Hash)>
List flow responses List the responses customers submitted when completing a flow (parsed from the nfm_reply messages received via webhook), newest first.
-
#list_whats_app_flow_versions(flow_id, account_id, opts = {}) ⇒ ListWhatsAppFlowVersions200Response
List flow versions List the flow's version history (the clone lineage Zernio tracks, since Meta has no native versioning), newest version first.
-
#list_whats_app_flow_versions_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(ListWhatsAppFlowVersions200Response, Integer, Hash)>
List flow versions List the flow's version history (the clone lineage Zernio tracks, since Meta has no native versioning), newest version first.
-
#list_whats_app_flows(account_id, opts = {}) ⇒ ListWhatsAppFlows200Response
List flows List all WhatsApp Flows for the Business Account (WABA) associated with the given account.
-
#list_whats_app_flows_with_http_info(account_id, opts = {}) ⇒ Array<(ListWhatsAppFlows200Response, Integer, Hash)>
List flows List all WhatsApp Flows for the Business Account (WABA) associated with the given account.
-
#publish_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Publish flow Publish a DRAFT flow.
-
#publish_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Publish flow Publish a DRAFT flow.
-
#send_whats_app_flow_message(send_whats_app_flow_message_request, opts = {}) ⇒ SendWhatsAppFlowMessage200Response
Send flow message Send a published flow as an interactive message with a CTA button.
-
#send_whats_app_flow_message_with_http_info(send_whats_app_flow_message_request, opts = {}) ⇒ Array<(SendWhatsAppFlowMessage200Response, Integer, Hash)>
Send flow message Send a published flow as an interactive message with a CTA button.
-
#set_whats_app_flows_encryption_key(set_whats_app_flows_encryption_key_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Register a Flows encryption key Register (or replace) the RSA business public key for WhatsApp Flows endpoint encryption on the phone number.
-
#set_whats_app_flows_encryption_key_with_http_info(set_whats_app_flows_encryption_key_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Register a Flows encryption key Register (or replace) the RSA business public key for WhatsApp Flows endpoint encryption on the phone number.
-
#update_whats_app_flow(flow_id, update_whats_app_flow_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Update flow Update metadata (name, categories, endpointUri) of a DRAFT flow.
-
#update_whats_app_flow_with_http_info(flow_id, update_whats_app_flow_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Update flow Update metadata (name, categories, endpointUri) of a DRAFT flow.
-
#upload_whats_app_flow_json(flow_id, upload_whats_app_flow_json_request, opts = {}) ⇒ UploadWhatsAppFlowJson200Response
Upload flow JSON Upload or update the Flow JSON for a DRAFT flow.
-
#upload_whats_app_flow_json_with_http_info(flow_id, upload_whats_app_flow_json_request, opts = {}) ⇒ Array<(UploadWhatsAppFlowJson200Response, Integer, Hash)>
Upload flow JSON Upload or update the Flow JSON for a DRAFT flow.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WhatsAppFlowsApi
Returns a new instance of WhatsAppFlowsApi.
19 20 21 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_whats_app_flow(create_whats_app_flow_request, opts = {}) ⇒ CreateWhatsAppFlow200Response
Create flow Create a new WhatsApp Flow in DRAFT status. Optionally clone an existing flow. After creating, upload a Flow JSON definition, then publish to make it sendable.
27 28 29 30 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 27 def create_whats_app_flow(create_whats_app_flow_request, opts = {}) data, _status_code, _headers = create_whats_app_flow_with_http_info(create_whats_app_flow_request, opts) data end |
#create_whats_app_flow_with_http_info(create_whats_app_flow_request, opts = {}) ⇒ Array<(CreateWhatsAppFlow200Response, Integer, Hash)>
Create flow Create a new WhatsApp Flow in DRAFT status. Optionally clone an existing flow. After creating, upload a Flow JSON definition, then publish to make it sendable.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 37 def create_whats_app_flow_with_http_info(create_whats_app_flow_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.create_whats_app_flow ...' end # verify the required parameter 'create_whats_app_flow_request' is set if @api_client.config.client_side_validation && create_whats_app_flow_request.nil? fail ArgumentError, "Missing the required parameter 'create_whats_app_flow_request' when calling WhatsAppFlowsApi.create_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_whats_app_flow_request) # return_type return_type = opts[:debug_return_type] || 'CreateWhatsAppFlow200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.create_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#create_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_whats_app_flow(flow_id, account_id, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Delete flow Delete a DRAFT flow. This is irreversible. Only flows in DRAFT status can be deleted.
96 97 98 99 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 96 def delete_whats_app_flow(flow_id, account_id, opts = {}) data, _status_code, _headers = delete_whats_app_flow_with_http_info(flow_id, account_id, opts) data end |
#delete_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Delete flow Delete a DRAFT flow. This is irreversible. Only flows in DRAFT status can be deleted.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 107 def delete_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.delete_whats_app_flow ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.delete_whats_app_flow" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.delete_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.delete_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#delete_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#deprecate_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Deprecate flow Deprecate a PUBLISHED flow. This is irreversible. Deprecated flows cannot be sent or opened, but existing active sessions may continue until they complete.
166 167 168 169 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 166 def deprecate_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) data, _status_code, _headers = deprecate_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts) data end |
#deprecate_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Deprecate flow Deprecate a PUBLISHED flow. This is irreversible. Deprecated flows cannot be sent or opened, but existing active sessions may continue until they complete.
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 177 def deprecate_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.deprecate_whats_app_flow ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.deprecate_whats_app_flow" end # verify the required parameter 'delete_whatsapp_business_username_request' is set if @api_client.config.client_side_validation && delete_whatsapp_business_username_request.nil? fail ArgumentError, "Missing the required parameter 'delete_whatsapp_business_username_request' when calling WhatsAppFlowsApi.deprecate_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/deprecate'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_whatsapp_business_username_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.deprecate_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#deprecate_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_whats_app_flow(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlow200Response
Get flow Get details for a specific flow, including status, categories, validation errors, and preview URL.
241 242 243 244 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 241 def get_whats_app_flow(flow_id, account_id, opts = {}) data, _status_code, _headers = get_whats_app_flow_with_http_info(flow_id, account_id, opts) data end |
#get_whats_app_flow_json(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlowJson200Response
Get flow JSON asset Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.
313 314 315 316 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 313 def get_whats_app_flow_json(flow_id, account_id, opts = {}) data, _status_code, _headers = get_whats_app_flow_json_with_http_info(flow_id, account_id, opts) data end |
#get_whats_app_flow_json_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowJson200Response, Integer, Hash)>
Get flow JSON asset Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 324 def get_whats_app_flow_json_with_http_info(flow_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.get_whats_app_flow_json ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.get_whats_app_flow_json" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.get_whats_app_flow_json" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/json'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetWhatsAppFlowJson200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.get_whats_app_flow_json", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#get_whats_app_flow_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_whats_app_flow_preview(flow_id, account_id, opts = {}) ⇒ GetWhatsAppFlowPreview200Response
Get flow preview URL Get Meta's public web-preview URL for a flow (drafts included), embeddable as an interactive iframe. The link is reused across calls (valid ~30 days); pass invalidate=true to mint a fresh one (the previous link stops working).
384 385 386 387 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 384 def get_whats_app_flow_preview(flow_id, account_id, opts = {}) data, _status_code, _headers = get_whats_app_flow_preview_with_http_info(flow_id, account_id, opts) data end |
#get_whats_app_flow_preview_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowPreview200Response, Integer, Hash)>
Get flow preview URL Get Meta's public web-preview URL for a flow (drafts included), embeddable as an interactive iframe. The link is reused across calls (valid ~30 days); pass invalidate=true to mint a fresh one (the previous link stops working).
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 396 def get_whats_app_flow_preview_with_http_info(flow_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.get_whats_app_flow_preview ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.get_whats_app_flow_preview" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.get_whats_app_flow_preview" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/preview'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'invalidate'] = opts[:'invalidate'] if !opts[:'invalidate'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetWhatsAppFlowPreview200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.get_whats_app_flow_preview", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#get_whats_app_flow_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(GetWhatsAppFlow200Response, Integer, Hash)>
Get flow Get details for a specific flow, including status, categories, validation errors, and preview URL.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 253 def get_whats_app_flow_with_http_info(flow_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.get_whats_app_flow ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.get_whats_app_flow" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.get_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetWhatsAppFlow200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.get_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#get_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_whats_app_flows_encryption_key(account_id, opts = {}) ⇒ GetWhatsAppFlowsEncryptionKey200Response
Get Flows encryption key status
Read the RSA business public key registered on the phone number for WhatsApp Flows endpoint encryption. Only one key is active per phone number at a time. Flows that use flow_action: data_exchange (an endpoint-backed flow) stop working at runtime until the endpoint serves the matching private key, and Meta rejects publish with error code 139002 ("Missing Flows Signed Public Key") when no key is registered. registered reflects whether a key is present, never signatureStatus alone: Meta reports an unregistered key as MISMATCH rather than a null/absent value.
455 456 457 458 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 455 def get_whats_app_flows_encryption_key(account_id, opts = {}) data, _status_code, _headers = get_whats_app_flows_encryption_key_with_http_info(account_id, opts) data end |
#get_whats_app_flows_encryption_key_with_http_info(account_id, opts = {}) ⇒ Array<(GetWhatsAppFlowsEncryptionKey200Response, Integer, Hash)>
Get Flows encryption key status Read the RSA business public key registered on the phone number for WhatsApp Flows endpoint encryption. Only one key is active per phone number at a time. Flows that use flow_action: data_exchange (an endpoint-backed flow) stop working at runtime until the endpoint serves the matching private key, and Meta rejects publish with error code 139002 ("Missing Flows Signed Public Key") when no key is registered. `registered` reflects whether a key is present, never `signatureStatus` alone: Meta reports an unregistered key as MISMATCH rather than a null/absent value.
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 465 def get_whats_app_flows_encryption_key_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.get_whats_app_flows_encryption_key ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.get_whats_app_flows_encryption_key" end # resource path local_var_path = '/v1/whatsapp/flows/encryption-key' # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetWhatsAppFlowsEncryptionKey200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.get_whats_app_flows_encryption_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#get_whats_app_flows_encryption_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_whats_app_flow_responses(account_id, opts = {}) ⇒ ListWhatsAppFlowResponses200Response
List flow responses
List the responses customers submitted when completing a flow (parsed from the nfm_reply messages received via webhook), newest first. Scope to a single flow with flowId, which matches responses whose flow_token carries the <flowId>: prefix that Zernio stamps on auto-generated tokens at send time. Responses sent with a custom integrator-supplied flow_token are not attributed to a flow.
521 522 523 524 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 521 def list_whats_app_flow_responses(account_id, opts = {}) data, _status_code, _headers = list_whats_app_flow_responses_with_http_info(account_id, opts) data end |
#list_whats_app_flow_responses_with_http_info(account_id, opts = {}) ⇒ Array<(ListWhatsAppFlowResponses200Response, Integer, Hash)>
List flow responses List the responses customers submitted when completing a flow (parsed from the nfm_reply messages received via webhook), newest first. Scope to a single flow with `flowId`, which matches responses whose flow_token carries the `<flowId>:` prefix that Zernio stamps on auto-generated tokens at send time. Responses sent with a custom integrator-supplied flow_token are not attributed to a flow.
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 533 def list_whats_app_flow_responses_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.list_whats_app_flow_responses ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.list_whats_app_flow_responses" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling WhatsAppFlowsApi.list_whats_app_flow_responses, must be smaller than or equal to 200.' end # resource path local_var_path = '/v1/whatsapp/flow-responses' # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id query_params[:'flowId'] = opts[:'flow_id'] if !opts[:'flow_id'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWhatsAppFlowResponses200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.list_whats_app_flow_responses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#list_whats_app_flow_responses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_whats_app_flow_versions(flow_id, account_id, opts = {}) ⇒ ListWhatsAppFlowVersions200Response
List flow versions List the flow's version history (the clone lineage Zernio tracks, since Meta has no native versioning), newest version first. Each entry is enriched with the version's live name and status from Meta. A flow with no lineage returns only itself as version 1.
594 595 596 597 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 594 def list_whats_app_flow_versions(flow_id, account_id, opts = {}) data, _status_code, _headers = list_whats_app_flow_versions_with_http_info(flow_id, account_id, opts) data end |
#list_whats_app_flow_versions_with_http_info(flow_id, account_id, opts = {}) ⇒ Array<(ListWhatsAppFlowVersions200Response, Integer, Hash)>
List flow versions List the flow's version history (the clone lineage Zernio tracks, since Meta has no native versioning), newest version first. Each entry is enriched with the version's live name and status from Meta. A flow with no lineage returns only itself as version 1.
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 605 def list_whats_app_flow_versions_with_http_info(flow_id, account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.list_whats_app_flow_versions ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.list_whats_app_flow_versions" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.list_whats_app_flow_versions" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/versions'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWhatsAppFlowVersions200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.list_whats_app_flow_versions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#list_whats_app_flow_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_whats_app_flows(account_id, opts = {}) ⇒ ListWhatsAppFlows200Response
List flows List all WhatsApp Flows for the Business Account (WABA) associated with the given account.
663 664 665 666 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 663 def list_whats_app_flows(account_id, opts = {}) data, _status_code, _headers = list_whats_app_flows_with_http_info(account_id, opts) data end |
#list_whats_app_flows_with_http_info(account_id, opts = {}) ⇒ Array<(ListWhatsAppFlows200Response, Integer, Hash)>
List flows List all WhatsApp Flows for the Business Account (WABA) associated with the given account.
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 673 def list_whats_app_flows_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.list_whats_app_flows ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling WhatsAppFlowsApi.list_whats_app_flows" end # resource path local_var_path = '/v1/whatsapp/flows' # query parameters query_params = opts[:query_params] || {} query_params[:'accountId'] = account_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListWhatsAppFlows200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.list_whats_app_flows", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#list_whats_app_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#publish_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Publish flow Publish a DRAFT flow. This is irreversible. Once published, the flow and its JSON become immutable and the flow can be sent to users. To update a published flow, create a new flow (optionally cloning this one via cloneFlowId).
728 729 730 731 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 728 def publish_whats_app_flow(flow_id, delete_whatsapp_business_username_request, opts = {}) data, _status_code, _headers = publish_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts) data end |
#publish_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Publish flow Publish a DRAFT flow. This is irreversible. Once published, the flow and its JSON become immutable and the flow can be sent to users. To update a published flow, create a new flow (optionally cloning this one via cloneFlowId).
739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 739 def publish_whats_app_flow_with_http_info(flow_id, delete_whatsapp_business_username_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.publish_whats_app_flow ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.publish_whats_app_flow" end # verify the required parameter 'delete_whatsapp_business_username_request' is set if @api_client.config.client_side_validation && delete_whatsapp_business_username_request.nil? fail ArgumentError, "Missing the required parameter 'delete_whatsapp_business_username_request' when calling WhatsAppFlowsApi.publish_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/publish'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_whatsapp_business_username_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.publish_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#publish_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_whats_app_flow_message(send_whats_app_flow_message_request, opts = {}) ⇒ SendWhatsAppFlowMessage200Response
Send flow message Send a published flow as an interactive message with a CTA button. When the recipient taps the button, the flow opens natively in WhatsApp. Flow responses are received via webhooks.
801 802 803 804 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 801 def (, opts = {}) data, _status_code, _headers = (, opts) data end |
#send_whats_app_flow_message_with_http_info(send_whats_app_flow_message_request, opts = {}) ⇒ Array<(SendWhatsAppFlowMessage200Response, Integer, Hash)>
Send flow message Send a published flow as an interactive message with a CTA button. When the recipient taps the button, the flow opens natively in WhatsApp. Flow responses are received via webhooks.
811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 811 def (, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.send_whats_app_flow_message ...' end # verify the required parameter 'send_whats_app_flow_message_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'send_whats_app_flow_message_request' when calling WhatsAppFlowsApi.send_whats_app_flow_message" end # resource path local_var_path = '/v1/whatsapp/flows/send' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'SendWhatsAppFlowMessage200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.send_whats_app_flow_message", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#send_whats_app_flow_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_whats_app_flows_encryption_key(set_whats_app_flows_encryption_key_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Register a Flows encryption key Register (or replace) the RSA business public key for WhatsApp Flows endpoint encryption on the phone number. Uploading a new key replaces the previous one: only one key is active per phone number. The corresponding private key must be served by the flow's endpoint, or endpoint-backed flows (flow_action: data_exchange) will fail at runtime even though the key is registered.
869 870 871 872 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 869 def set_whats_app_flows_encryption_key(set_whats_app_flows_encryption_key_request, opts = {}) data, _status_code, _headers = set_whats_app_flows_encryption_key_with_http_info(set_whats_app_flows_encryption_key_request, opts) data end |
#set_whats_app_flows_encryption_key_with_http_info(set_whats_app_flows_encryption_key_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Register a Flows encryption key Register (or replace) the RSA business public key for WhatsApp Flows endpoint encryption on the phone number. Uploading a new key replaces the previous one: only one key is active per phone number. The corresponding private key must be served by the flow's endpoint, or endpoint-backed flows (flow_action: data_exchange) will fail at runtime even though the key is registered.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 879 def set_whats_app_flows_encryption_key_with_http_info(set_whats_app_flows_encryption_key_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.set_whats_app_flows_encryption_key ...' end # verify the required parameter 'set_whats_app_flows_encryption_key_request' is set if @api_client.config.client_side_validation && set_whats_app_flows_encryption_key_request.nil? fail ArgumentError, "Missing the required parameter 'set_whats_app_flows_encryption_key_request' when calling WhatsAppFlowsApi.set_whats_app_flows_encryption_key" end # resource path local_var_path = '/v1/whatsapp/flows/encryption-key' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(set_whats_app_flows_encryption_key_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.set_whats_app_flows_encryption_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#set_whats_app_flows_encryption_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_whats_app_flow(flow_id, update_whats_app_flow_request, opts = {}) ⇒ UpdateYoutubeDefaultPlaylist200Response
Update flow Update metadata (name, categories, endpointUri) of a DRAFT flow. Published flows are immutable.
938 939 940 941 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 938 def update_whats_app_flow(flow_id, update_whats_app_flow_request, opts = {}) data, _status_code, _headers = update_whats_app_flow_with_http_info(flow_id, update_whats_app_flow_request, opts) data end |
#update_whats_app_flow_with_http_info(flow_id, update_whats_app_flow_request, opts = {}) ⇒ Array<(UpdateYoutubeDefaultPlaylist200Response, Integer, Hash)>
Update flow Update metadata (name, categories, endpointUri) of a DRAFT flow. Published flows are immutable.
949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 949 def update_whats_app_flow_with_http_info(flow_id, update_whats_app_flow_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.update_whats_app_flow ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.update_whats_app_flow" end # verify the required parameter 'update_whats_app_flow_request' is set if @api_client.config.client_side_validation && update_whats_app_flow_request.nil? fail ArgumentError, "Missing the required parameter 'update_whats_app_flow_request' when calling WhatsAppFlowsApi.update_whats_app_flow" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_whats_app_flow_request) # return_type return_type = opts[:debug_return_type] || 'UpdateYoutubeDefaultPlaylist200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.update_whats_app_flow", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#update_whats_app_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_whats_app_flow_json(flow_id, upload_whats_app_flow_json_request, opts = {}) ⇒ UploadWhatsAppFlowJson200Response
Upload flow JSON Upload or update the Flow JSON for a DRAFT flow. The Flow JSON defines all screens, components (text inputs, dropdowns, date pickers, etc.), and navigation. Meta validates the JSON on upload and returns any validation errors. See: https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson
1012 1013 1014 1015 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 1012 def upload_whats_app_flow_json(flow_id, upload_whats_app_flow_json_request, opts = {}) data, _status_code, _headers = upload_whats_app_flow_json_with_http_info(flow_id, upload_whats_app_flow_json_request, opts) data end |
#upload_whats_app_flow_json_with_http_info(flow_id, upload_whats_app_flow_json_request, opts = {}) ⇒ Array<(UploadWhatsAppFlowJson200Response, Integer, Hash)>
Upload flow JSON Upload or update the Flow JSON for a DRAFT flow. The Flow JSON defines all screens, components (text inputs, dropdowns, date pickers, etc.), and navigation. Meta validates the JSON on upload and returns any validation errors. See: https://developers.facebook.com/docs/whatsapp/flows/reference/flowjson
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'lib/zernio-sdk/api/whats_app_flows_api.rb', line 1023 def upload_whats_app_flow_json_with_http_info(flow_id, upload_whats_app_flow_json_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WhatsAppFlowsApi.upload_whats_app_flow_json ...' end # verify the required parameter 'flow_id' is set if @api_client.config.client_side_validation && flow_id.nil? fail ArgumentError, "Missing the required parameter 'flow_id' when calling WhatsAppFlowsApi.upload_whats_app_flow_json" end # verify the required parameter 'upload_whats_app_flow_json_request' is set if @api_client.config.client_side_validation && upload_whats_app_flow_json_request.nil? fail ArgumentError, "Missing the required parameter 'upload_whats_app_flow_json_request' when calling WhatsAppFlowsApi.upload_whats_app_flow_json" end # resource path local_var_path = '/v1/whatsapp/flows/{flowId}/json'.sub('{' + 'flowId' + '}', CGI.escape(flow_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(upload_whats_app_flow_json_request) # return_type return_type = opts[:debug_return_type] || 'UploadWhatsAppFlowJson200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"WhatsAppFlowsApi.upload_whats_app_flow_json", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WhatsAppFlowsApi#upload_whats_app_flow_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |