diff --git a/lib/hubspot/codegen/marketing/events/api/basic_api.rb b/lib/hubspot/codegen/marketing/events/api/basic_api.rb index c789b7f2..a7a044ca 100644 --- a/lib/hubspot/codegen/marketing/events/api/basic_api.rb +++ b/lib/hubspot/codegen/marketing/events/api/basic_api.rb @@ -16,7 +16,6 @@ module Hubspot module Marketing module Events class BasicApi - include Hubspot::Helpers::GetAllHelper attr_accessor :api_client diff --git a/lib/hubspot/codegen/marketing/events/api/list_associations_api.rb b/lib/hubspot/codegen/marketing/events/api/list_associations_api.rb index 422430a2..ba7033d4 100644 --- a/lib/hubspot/codegen/marketing/events/api/list_associations_api.rb +++ b/lib/hubspot/codegen/marketing/events/api/list_associations_api.rb @@ -21,40 +21,40 @@ class ListAssociationsApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Disassociate a list from a marketing event - # Disassociates a list from a marketing event by external account id, external event id, and ILS list id + # Associate a list with a marketing event + # Associates a list with a marketing event by external account id, external event id, and ILS list id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters # @return [nil] - def delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id(external_account_id, external_event_id, list_id, opts = {}) - delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id_with_http_info(external_account_id, external_event_id, list_id, opts) + def associate_by_external_account_and_event_ids(external_account_id, external_event_id, list_id, opts = {}) + associate_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, list_id, opts) nil end - # Disassociate a list from a marketing event - # Disassociates a list from a marketing event by external account id, external event id, and ILS list id + # Associate a list with a marketing event + # Associates a list with a marketing event by external account id, external event id, and ILS list id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id_with_http_info(external_account_id, external_event_id, list_id, opts = {}) + def associate_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, list_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.associate_by_external_account_and_event_ids ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? - fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.associate_by_external_account_and_event_ids" end # verify the required parameter 'external_event_id' is set if @api_client.config.client_side_validation && external_event_id.nil? - fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.associate_by_external_account_and_event_ids" end # verify the required parameter 'list_id' is set if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.associate_by_external_account_and_event_ids" end # resource path local_var_path = '/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}'.sub('{' + 'externalAccountId' + '}', CGI.escape(external_account_id.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) @@ -80,7 +80,7 @@ def delete_marketing_v3_marketing_events_associations_external_account_id_extern auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id", + :operation => :"ListAssociationsApi.associate_by_external_account_and_event_ids", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -89,41 +89,41 @@ def delete_marketing_v3_marketing_events_associations_external_account_id_extern :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#delete_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#associate_by_external_account_and_event_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Disassociate a list from a marketing event - # Disassociates a list from a marketing event by marketing event id and ILS list id + # Associate a list with a marketing event + # Associates a list with a marketing event by marketing event id and ILS list id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters # @return [nil] - def delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id(marketing_event_id, list_id, opts = {}) - delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id_with_http_info(marketing_event_id, list_id, opts) + def associate_by_marketing_event_id(marketing_event_id, list_id, opts = {}) + associate_by_marketing_event_id_with_http_info(marketing_event_id, list_id, opts) nil end - # Disassociate a list from a marketing event - # Disassociates a list from a marketing event by marketing event id and ILS list id + # Associate a list with a marketing event + # Associates a list with a marketing event by marketing event id and ILS list id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id_with_http_info(marketing_event_id, list_id, opts = {}) + def associate_by_marketing_event_id_with_http_info(marketing_event_id, list_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.associate_by_marketing_event_id ...' end # verify the required parameter 'marketing_event_id' is set if @api_client.config.client_side_validation && marketing_event_id.nil? - fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.associate_by_marketing_event_id" end # verify the required parameter 'list_id' is set if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.associate_by_marketing_event_id" end # resource path local_var_path = '/marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) @@ -149,7 +149,7 @@ def delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_l auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id", + :operation => :"ListAssociationsApi.associate_by_marketing_event_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -158,44 +158,50 @@ def delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_l :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#delete_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#associate_by_marketing_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get lists associated with a marketing event - # Gets lists associated with a marketing event by external account id and external event id + # Disassociate a list from a marketing event + # Disassociates a list from a marketing event by external account id, external event id, and ILS list id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. + # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [CollectionResponseWithTotalPublicListNoPaging] - def get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists(external_account_id, external_event_id, opts = {}) - data, _status_code, _headers = get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_with_http_info(external_account_id, external_event_id, opts) - data + # @return [nil] + def disassociate_by_external_account_and_event_ids(external_account_id, external_event_id, list_id, opts = {}) + disassociate_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, list_id, opts) + nil end - # Get lists associated with a marketing event - # Gets lists associated with a marketing event by external account id and external event id + # Disassociate a list from a marketing event + # Disassociates a list from a marketing event by external account id, external event id, and ILS list id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. + # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [Array<(CollectionResponseWithTotalPublicListNoPaging, Integer, Hash)>] CollectionResponseWithTotalPublicListNoPaging data, response status code and response headers - def get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_with_http_info(external_account_id, external_event_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def disassociate_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, list_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.disassociate_by_external_account_and_event_ids ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? - fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists" + fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.disassociate_by_external_account_and_event_ids" end # verify the required parameter 'external_event_id' is set if @api_client.config.client_side_validation && external_event_id.nil? - fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists" + fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.disassociate_by_external_account_and_event_ids" + end + # verify the required parameter 'list_id' is set + if @api_client.config.client_side_validation && list_id.nil? + fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.disassociate_by_external_account_and_event_ids" end # resource path - local_var_path = '/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists'.sub('{' + 'externalAccountId' + '}', CGI.escape(external_account_id.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s)) + local_var_path = '/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}'.sub('{' + 'externalAccountId' + '}', CGI.escape(external_account_id.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -203,7 +209,7 @@ def get_marketing_v3_marketing_events_associations_external_account_id_external_ # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -212,13 +218,13 @@ def get_marketing_v3_marketing_events_associations_external_account_id_external_ post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPublicListNoPaging' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists", + :operation => :"ListAssociationsApi.disassociate_by_external_account_and_event_ids", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -227,38 +233,44 @@ def get_marketing_v3_marketing_events_associations_external_account_id_external_ :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#get_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#disassociate_by_external_account_and_event_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get lists associated with a marketing event - # Gets lists associated with a marketing event by marketing event id + # Disassociate a list from a marketing event + # Disassociates a list from a marketing event by marketing event id and ILS list id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. + # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [CollectionResponseWithTotalPublicListNoPaging] - def get_marketing_v3_marketing_events_associations_marketing_event_id_lists(marketing_event_id, opts = {}) - data, _status_code, _headers = get_marketing_v3_marketing_events_associations_marketing_event_id_lists_with_http_info(marketing_event_id, opts) - data + # @return [nil] + def disassociate_by_marketing_event_id(marketing_event_id, list_id, opts = {}) + disassociate_by_marketing_event_id_with_http_info(marketing_event_id, list_id, opts) + nil end - # Get lists associated with a marketing event - # Gets lists associated with a marketing event by marketing event id + # Disassociate a list from a marketing event + # Disassociates a list from a marketing event by marketing event id and ILS list id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. + # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [Array<(CollectionResponseWithTotalPublicListNoPaging, Integer, Hash)>] CollectionResponseWithTotalPublicListNoPaging data, response status code and response headers - def get_marketing_v3_marketing_events_associations_marketing_event_id_lists_with_http_info(marketing_event_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def disassociate_by_marketing_event_id_with_http_info(marketing_event_id, list_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.get_marketing_v3_marketing_events_associations_marketing_event_id_lists ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.disassociate_by_marketing_event_id ...' end # verify the required parameter 'marketing_event_id' is set if @api_client.config.client_side_validation && marketing_event_id.nil? - fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.get_marketing_v3_marketing_events_associations_marketing_event_id_lists" + fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.disassociate_by_marketing_event_id" + end + # verify the required parameter 'list_id' is set + if @api_client.config.client_side_validation && list_id.nil? + fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.disassociate_by_marketing_event_id" end # resource path - local_var_path = '/marketing/v3/marketing-events/associations/{marketingEventId}/lists'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s)) + local_var_path = '/marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -266,7 +278,7 @@ def get_marketing_v3_marketing_events_associations_marketing_event_id_lists_with # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -275,13 +287,13 @@ def get_marketing_v3_marketing_events_associations_marketing_event_id_lists_with post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPublicListNoPaging' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.get_marketing_v3_marketing_events_associations_marketing_event_id_lists", + :operation => :"ListAssociationsApi.disassociate_by_marketing_event_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -290,50 +302,44 @@ def get_marketing_v3_marketing_events_associations_marketing_event_id_lists_with :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#get_marketing_v3_marketing_events_associations_marketing_event_id_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#disassociate_by_marketing_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Associate a list with a marketing event - # Associates a list with a marketing event by external account id, external event id, and ILS list id + # Get lists associated with a marketing event + # Gets lists associated with a marketing event by external account id and external event id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. - # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [nil] - def put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id(external_account_id, external_event_id, list_id, opts = {}) - put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id_with_http_info(external_account_id, external_event_id, list_id, opts) - nil + # @return [CollectionResponseWithTotalPublicListNoPaging] + def get_all_by_external_account_and_event_ids(external_account_id, external_event_id, opts = {}) + data, _status_code, _headers = get_all_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, opts) + data end - # Associate a list with a marketing event - # Associates a list with a marketing event by external account id, external event id, and ILS list id + # Get lists associated with a marketing event + # Gets lists associated with a marketing event by external account id and external event id # @param external_account_id [String] The accountId that is associated with this marketing event in the external event application. # @param external_event_id [String] The id of the marketing event in the external event application. - # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id_with_http_info(external_account_id, external_event_id, list_id, opts = {}) + # @return [Array<(CollectionResponseWithTotalPublicListNoPaging, Integer, Hash)>] CollectionResponseWithTotalPublicListNoPaging data, response status code and response headers + def get_all_by_external_account_and_event_ids_with_http_info(external_account_id, external_event_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.get_all_by_external_account_and_event_ids ...' end # verify the required parameter 'external_account_id' is set if @api_client.config.client_side_validation && external_account_id.nil? - fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'external_account_id' when calling ListAssociationsApi.get_all_by_external_account_and_event_ids" end # verify the required parameter 'external_event_id' is set if @api_client.config.client_side_validation && external_event_id.nil? - fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'external_event_id' when calling ListAssociationsApi.get_all_by_external_account_and_event_ids" end # resource path - local_var_path = '/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}'.sub('{' + 'externalAccountId' + '}', CGI.escape(external_account_id.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) + local_var_path = '/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists'.sub('{' + 'externalAccountId' + '}', CGI.escape(external_account_id.to_s)).sub('{' + 'externalEventId' + '}', CGI.escape(external_event_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -341,7 +347,7 @@ def put_marketing_v3_marketing_events_associations_external_account_id_external_ # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} @@ -350,13 +356,13 @@ def put_marketing_v3_marketing_events_associations_external_account_id_external_ post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPublicListNoPaging' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id", + :operation => :"ListAssociationsApi.get_all_by_external_account_and_event_ids", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -365,44 +371,38 @@ def put_marketing_v3_marketing_events_associations_external_account_id_external_ :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#put_marketing_v3_marketing_events_associations_external_account_id_external_event_id_lists_list_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#get_all_by_external_account_and_event_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Associate a list with a marketing event - # Associates a list with a marketing event by marketing event id and ILS list id + # Get lists associated with a marketing event + # Gets lists associated with a marketing event by marketing event id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. - # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [nil] - def put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id(marketing_event_id, list_id, opts = {}) - put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id_with_http_info(marketing_event_id, list_id, opts) - nil + # @return [CollectionResponseWithTotalPublicListNoPaging] + def get_all_by_marketing_event_id(marketing_event_id, opts = {}) + data, _status_code, _headers = get_all_by_marketing_event_id_with_http_info(marketing_event_id, opts) + data end - # Associate a list with a marketing event - # Associates a list with a marketing event by marketing event id and ILS list id + # Get lists associated with a marketing event + # Gets lists associated with a marketing event by marketing event id # @param marketing_event_id [String] The internal id of the marketing event in HubSpot. - # @param list_id [String] The ILS ID of the list. # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id_with_http_info(marketing_event_id, list_id, opts = {}) + # @return [Array<(CollectionResponseWithTotalPublicListNoPaging, Integer, Hash)>] CollectionResponseWithTotalPublicListNoPaging data, response status code and response headers + def get_all_by_marketing_event_id_with_http_info(marketing_event_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: ListAssociationsApi.put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id ...' + @api_client.config.logger.debug 'Calling API: ListAssociationsApi.get_all_by_marketing_event_id ...' end # verify the required parameter 'marketing_event_id' is set if @api_client.config.client_side_validation && marketing_event_id.nil? - fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id" - end - # verify the required parameter 'list_id' is set - if @api_client.config.client_side_validation && list_id.nil? - fail ArgumentError, "Missing the required parameter 'list_id' when calling ListAssociationsApi.put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id" + fail ArgumentError, "Missing the required parameter 'marketing_event_id' when calling ListAssociationsApi.get_all_by_marketing_event_id" end # resource path - local_var_path = '/marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s)).sub('{' + 'listId' + '}', CGI.escape(list_id.to_s)) + local_var_path = '/marketing/v3/marketing-events/associations/{marketingEventId}/lists'.sub('{' + 'marketingEventId' + '}', CGI.escape(marketing_event_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -410,7 +410,7 @@ def put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # form parameters form_params = opts[:form_params] || {} @@ -419,13 +419,13 @@ def put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalPublicListNoPaging' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"ListAssociationsApi.put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id", + :operation => :"ListAssociationsApi.get_all_by_marketing_event_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -434,9 +434,9 @@ def put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ListAssociationsApi#put_marketing_v3_marketing_events_associations_marketing_event_id_lists_list_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ListAssociationsApi#get_all_by_marketing_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end