Class: Hubspot::Automation::Actions::FunctionsApi
- Inherits:
-
Object
- Object
- Hubspot::Automation::Actions::FunctionsApi
- Defined in:
- lib/hubspot/codegen/automation/actions/api/functions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive(definition_id, function_type, function_id, app_id, opts = {}) ⇒ nil
Delete a custom action function Delete a function for a custom workflow action.
-
#archive_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ nil
Delete a custom action function Delete a function for a custom workflow action.
-
#archive_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a custom action function Delete a function for a custom workflow action.
-
#archive_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a custom action function Delete a function for a custom workflow action.
-
#create_or_replace(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ ActionFunctionIdentifier
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
-
#create_or_replace_by_function_type(definition_id, function_type, app_id, body, opts = {}) ⇒ ActionFunctionIdentifier
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
-
#create_or_replace_by_function_type_with_http_info(definition_id, function_type, app_id, body, opts = {}) ⇒ Array<(ActionFunctionIdentifier, Integer, Hash)>
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
-
#create_or_replace_with_http_info(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ Array<(ActionFunctionIdentifier, Integer, Hash)>
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
-
#get_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ ActionFunction
Get a custom action function Returns the given function for a custom workflow action.
-
#get_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(ActionFunction, Integer, Hash)>
Get a custom action function Returns the given function for a custom workflow action.
-
#get_by_id(definition_id, function_type, function_id, app_id, opts = {}) ⇒ ActionFunction
Get a custom action function Returns the given function for a custom workflow action.
-
#get_by_id_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(ActionFunction, Integer, Hash)>
Get a custom action function Returns the given function for a custom workflow action.
-
#get_page(definition_id, app_id, opts = {}) ⇒ CollectionResponseActionFunctionIdentifierNoPaging
Get all custom action functions Returns a list of all functions that are associated with the given custom workflow action.
-
#get_page_with_http_info(definition_id, app_id, opts = {}) ⇒ Array<(CollectionResponseActionFunctionIdentifierNoPaging, Integer, Hash)>
Get all custom action functions Returns a list of all functions that are associated with the given custom workflow action.
-
#initialize(api_client = ApiClient.default) ⇒ FunctionsApi
constructor
A new instance of FunctionsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FunctionsApi
Returns a new instance of FunctionsApi.
21 22 23 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 21 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
19 20 21 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 19 def api_client @api_client end |
Instance Method Details
#archive(definition_id, function_type, function_id, app_id, opts = {}) ⇒ nil
Delete a custom action function Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can’t be undone.
32 33 34 35 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 32 def archive(definition_id, function_type, function_id, app_id, opts = {}) archive_with_http_info(definition_id, function_type, function_id, app_id, opts) nil end |
#archive_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ nil
Delete a custom action function Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can’t be undone.
117 118 119 120 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 117 def archive_by_function_type(definition_id, function_type, app_id, opts = {}) archive_by_function_type_with_http_info(definition_id, function_type, app_id, opts) nil end |
#archive_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a custom action function Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can't be undone.
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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 129 def archive_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.archive_by_function_type ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.archive_by_function_type" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.archive_by_function_type" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.archive_by_function_type" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.archive_by_function_type", :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: FunctionsApi#archive_by_function_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#archive_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a custom action function Delete a function for a custom workflow action. This will remove the function itself as well as removing the association between the function and the custom action. This can't be undone.
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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 45 def archive_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.archive ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.archive" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.archive" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'function_id' is set if @api_client.config.client_side_validation && function_id.nil? fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.archive" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.archive" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}/{functionId}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.archive", :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: FunctionsApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_or_replace(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ ActionFunctionIdentifier
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
199 200 201 202 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 199 def create_or_replace(definition_id, function_type, function_id, app_id, body, opts = {}) data, _status_code, _headers = create_or_replace_with_http_info(definition_id, function_type, function_id, app_id, body, opts) data end |
#create_or_replace_by_function_type(definition_id, function_type, app_id, body, opts = {}) ⇒ ActionFunctionIdentifier
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
295 296 297 298 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 295 def create_or_replace_by_function_type(definition_id, function_type, app_id, body, opts = {}) data, _status_code, _headers = create_or_replace_by_function_type_with_http_info(definition_id, function_type, app_id, body, opts) data end |
#create_or_replace_by_function_type_with_http_info(definition_id, function_type, app_id, body, opts = {}) ⇒ Array<(ActionFunctionIdentifier, Integer, Hash)>
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 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 376 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 308 def create_or_replace_by_function_type_with_http_info(definition_id, function_type, app_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.create_or_replace_by_function_type ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.create_or_replace_by_function_type" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.create_or_replace_by_function_type" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.create_or_replace_by_function_type" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FunctionsApi.create_or_replace_by_function_type" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['text/plain']) 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(body) # return_type return_type = opts[:debug_return_type] || 'ActionFunctionIdentifier' # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.create_or_replace_by_function_type", :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: FunctionsApi#create_or_replace_by_function_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_or_replace_with_http_info(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ Array<(ActionFunctionIdentifier, Integer, Hash)>
Create or replace a custom action function Creates or replaces a function for a custom workflow action.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 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 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 213 def create_or_replace_with_http_info(definition_id, function_type, function_id, app_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.create_or_replace ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.create_or_replace" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.create_or_replace" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'function_id' is set if @api_client.config.client_side_validation && function_id.nil? fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.create_or_replace" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.create_or_replace" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FunctionsApi.create_or_replace" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}/{functionId}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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', '*/*']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['text/plain']) 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(body) # return_type return_type = opts[:debug_return_type] || 'ActionFunctionIdentifier' # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.create_or_replace", :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: FunctionsApi#create_or_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ ActionFunction
Get a custom action function Returns the given function for a custom workflow action.
385 386 387 388 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 385 def get_by_function_type(definition_id, function_type, app_id, opts = {}) data, _status_code, _headers = get_by_function_type_with_http_info(definition_id, function_type, app_id, opts) data end |
#get_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(ActionFunction, Integer, Hash)>
Get a custom action function Returns the given function for a custom workflow action.
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 449 450 451 452 453 454 455 456 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 397 def get_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.get_by_function_type ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.get_by_function_type" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.get_by_function_type" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.get_by_function_type" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionFunction' # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.get_by_function_type", :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: FunctionsApi#get_by_function_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_by_id(definition_id, function_type, function_id, app_id, opts = {}) ⇒ ActionFunction
Get a custom action function Returns the given function for a custom workflow action.
466 467 468 469 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 466 def get_by_id(definition_id, function_type, function_id, app_id, opts = {}) data, _status_code, _headers = get_by_id_with_http_info(definition_id, function_type, function_id, app_id, opts) data end |
#get_by_id_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(ActionFunction, Integer, Hash)>
Get a custom action function Returns the given function for a custom workflow action.
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 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 479 def get_by_id_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.get_by_id ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.get_by_id" end # verify the required parameter 'function_type' is set if @api_client.config.client_side_validation && function_type.nil? fail ArgumentError, "Missing the required parameter 'function_type' when calling FunctionsApi.get_by_id" end # verify enum value allowable_values = ["PRE_ACTION_EXECUTION", "PRE_FETCH_OPTIONS", "POST_FETCH_OPTIONS"] if @api_client.config.client_side_validation && !allowable_values.include?(function_type) fail ArgumentError, "invalid value for \"function_type\", must be one of #{allowable_values}" end # verify the required parameter 'function_id' is set if @api_client.config.client_side_validation && function_id.nil? fail ArgumentError, "Missing the required parameter 'function_id' when calling FunctionsApi.get_by_id" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.get_by_id" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}/{functionId}'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'functionType' + '}', CGI.escape(function_type.to_s)).sub('{' + 'functionId' + '}', CGI.escape(function_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionFunction' # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.get_by_id", :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: FunctionsApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_page(definition_id, app_id, opts = {}) ⇒ CollectionResponseActionFunctionIdentifierNoPaging
Get all custom action functions Returns a list of all functions that are associated with the given custom workflow action.
550 551 552 553 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 550 def get_page(definition_id, app_id, opts = {}) data, _status_code, _headers = get_page_with_http_info(definition_id, app_id, opts) data end |
#get_page_with_http_info(definition_id, app_id, opts = {}) ⇒ Array<(CollectionResponseActionFunctionIdentifierNoPaging, Integer, Hash)>
Get all custom action functions Returns a list of all functions that are associated with the given custom workflow action.
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 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 561 def get_page_with_http_info(definition_id, app_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FunctionsApi.get_page ...' end # verify the required parameter 'definition_id' is set if @api_client.config.client_side_validation && definition_id.nil? fail ArgumentError, "Missing the required parameter 'definition_id' when calling FunctionsApi.get_page" end # verify the required parameter 'app_id' is set if @api_client.config.client_side_validation && app_id.nil? fail ArgumentError, "Missing the required parameter 'app_id' when calling FunctionsApi.get_page" end # resource path local_var_path = '/automation/v4/actions/{appId}/{definitionId}/functions'.sub('{' + 'definitionId' + '}', CGI.escape(definition_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseActionFunctionIdentifierNoPaging' # auth_names auth_names = opts[:debug_auth_names] || ['developer_hapikey'] = opts.merge( :operation => :"FunctionsApi.get_page", :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: FunctionsApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |