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
Archive a function for a definition.
-
#archive_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ nil
Delete a function for a definition.
-
#archive_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a function for a definition.
-
#archive_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Archive a function for a definition.
-
#create_or_replace(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ PublicActionFunctionIdentifier
Insert a function for a definition.
-
#create_or_replace_by_function_type(definition_id, function_type, app_id, body, opts = {}) ⇒ PublicActionFunctionIdentifier
Insert a function for a definition.
-
#create_or_replace_by_function_type_with_http_info(definition_id, function_type, app_id, body, opts = {}) ⇒ Array<(PublicActionFunctionIdentifier, Integer, Hash)>
Insert a function for a definition.
-
#create_or_replace_with_http_info(definition_id, function_type, function_id, app_id, body, opts = {}) ⇒ Array<(PublicActionFunctionIdentifier, Integer, Hash)>
Insert a function for a definition.
-
#get_by_function_type(definition_id, function_type, app_id, opts = {}) ⇒ PublicActionFunction
Get all functions by a type for a given definition.
-
#get_by_function_type_with_http_info(definition_id, function_type, app_id, opts = {}) ⇒ Array<(PublicActionFunction, Integer, Hash)>
Get all functions by a type for a given definition.
-
#get_by_id(definition_id, function_type, function_id, app_id, opts = {}) ⇒ PublicActionFunction
Get a function for a given definition.
-
#get_by_id_with_http_info(definition_id, function_type, function_id, app_id, opts = {}) ⇒ Array<(PublicActionFunction, Integer, Hash)>
Get a function for a given definition.
-
#get_page(definition_id, app_id, opts = {}) ⇒ CollectionResponsePublicActionFunctionIdentifierNoPaging
Get all functions for a given definition.
-
#get_page_with_http_info(definition_id, app_id, opts = {}) ⇒ Array<(CollectionResponsePublicActionFunctionIdentifierNoPaging, Integer, Hash)>
Get all functions for a given definition.
-
#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
Archive a function for a definition
31 32 33 34 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 31 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 function for a definition
114 115 116 117 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 114 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 function for a definition
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 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 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 125 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", "POST_ACTION_EXECUTION"] 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)>
Archive a function for a definition
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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 43 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", "POST_ACTION_EXECUTION"] 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 = {}) ⇒ PublicActionFunctionIdentifier
Insert a function for a definition
194 195 196 197 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 194 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 = {}) ⇒ PublicActionFunctionIdentifier
Insert a function for a definition
288 289 290 291 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 288 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<(PublicActionFunctionIdentifier, Integer, Hash)>
Insert a function for a definition
300 301 302 303 304 305 306 307 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 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 300 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", "POST_ACTION_EXECUTION"] 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] || 'PublicActionFunctionIdentifier' # 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<(PublicActionFunctionIdentifier, Integer, Hash)>
Insert a function for a definition
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 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 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 207 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", "POST_ACTION_EXECUTION"] 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] || 'PublicActionFunctionIdentifier' # 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 = {}) ⇒ PublicActionFunction
Get all functions by a type for a given definition
376 377 378 379 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 376 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<(PublicActionFunction, Integer, Hash)>
Get all functions by a type for a given definition
387 388 389 390 391 392 393 394 395 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 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 387 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", "POST_ACTION_EXECUTION"] 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] || 'PublicActionFunction' # 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 = {}) ⇒ PublicActionFunction
Get a function for a given definition
455 456 457 458 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 455 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<(PublicActionFunction, Integer, Hash)>
Get a function for a given definition
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 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 467 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", "POST_ACTION_EXECUTION"] 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] || 'PublicActionFunction' # 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 = {}) ⇒ CollectionResponsePublicActionFunctionIdentifierNoPaging
Get all functions for a given definition
537 538 539 540 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 537 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<(CollectionResponsePublicActionFunctionIdentifierNoPaging, Integer, Hash)>
Get all functions for a given definition
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 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/hubspot/codegen/automation/actions/api/functions_api.rb', line 547 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] || 'CollectionResponsePublicActionFunctionIdentifierNoPaging' # 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 |