Class: ConnectWise::CompanySurveysApi
- Inherits:
-
Object
- Object
- ConnectWise::CompanySurveysApi
- Defined in:
- lib/connect_wise/api/company_surveys_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_company_companies_by_parent_id_surveys_count(parent_id, client_id, opts = {}) ⇒ Count
Get Count of.
-
#get_company_companies_by_parent_id_surveys_count_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Count, Integer, Hash)>
Get Count of.
-
#initialize(api_client = ApiClient.default) ⇒ CompanySurveysApi
constructor
A new instance of CompanySurveysApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CompanySurveysApi
Returns a new instance of CompanySurveysApi.
17 18 19 |
# File 'lib/connect_wise/api/company_surveys_api.rb', line 17 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
15 16 17 |
# File 'lib/connect_wise/api/company_surveys_api.rb', line 15 def api_client @api_client end |
Instance Method Details
#get_company_companies_by_parent_id_surveys_count(parent_id, client_id, opts = {}) ⇒ Count
Get Count of
34 35 36 37 |
# File 'lib/connect_wise/api/company_surveys_api.rb', line 34 def get_company_companies_by_parent_id_surveys_count(parent_id, client_id, opts = {}) data, _status_code, _headers = get_company_companies_by_parent_id_surveys_count_with_http_info(parent_id, client_id, opts) data end |
#get_company_companies_by_parent_id_surveys_count_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Count, Integer, Hash)>
Get Count of
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 |
# File 'lib/connect_wise/api/company_surveys_api.rb', line 52 def get_company_companies_by_parent_id_surveys_count_with_http_info(parent_id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: CompanySurveysApi.get_company_companies_by_parent_id_surveys_count ...' if @api_client.config.debugging # verify the required parameter 'parent_id' is set raise ArgumentError, "Missing the required parameter 'parent_id' when calling CompanySurveysApi.get_company_companies_by_parent_id_surveys_count" if @api_client.config.client_side_validation && parent_id.nil? # verify the required parameter 'client_id' is set raise ArgumentError, "Missing the required parameter 'client_id' when calling CompanySurveysApi.get_company_companies_by_parent_id_surveys_count" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/company/companies/{parentId}/surveys/count'.sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil? query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil? query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil? query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil? query_params[:fields] = opts[:fields] unless opts[:fields].nil? query_params[:page] = opts[:page] unless opts[:page].nil? query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil? query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1']) header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Count' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'CompanySurveysApi.get_company_companies_by_parent_id_surveys_count', 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, ) @api_client.config.logger.debug "API called: CompanySurveysApi#get_company_companies_by_parent_id_surveys_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |