Class: ConnectWise::ProjectContactsApi
- Inherits:
-
Object
- Object
- ConnectWise::ProjectContactsApi
- Defined in:
- lib/connect_wise/api/project_contacts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) ⇒ nil
Delete ProjectContact.
-
#delete_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete ProjectContact.
-
#get_project_projects_by_parent_id_contacts(parent_id, client_id, opts = {}) ⇒ Array<ProjectContact>
Get List of ProjectContact.
-
#get_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) ⇒ ProjectContact
Get ProjectContact.
-
#get_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(ProjectContact, Integer, Hash)>
Get ProjectContact.
-
#get_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Array<ProjectContact>, Integer, Hash)>
Get List of ProjectContact.
-
#initialize(api_client = ApiClient.default) ⇒ ProjectContactsApi
constructor
A new instance of ProjectContactsApi.
-
#post_project_projects_by_parent_id_contacts(parent_id, client_id, project_contact, opts = {}) ⇒ ProjectContact
Post ProjectContact.
-
#post_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, project_contact, opts = {}) ⇒ Array<(ProjectContact, Integer, Hash)>
Post ProjectContact.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProjectContactsApi
Returns a new instance of ProjectContactsApi.
17 18 19 |
# File 'lib/connect_wise/api/project_contacts_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/project_contacts_api.rb', line 15 def api_client @api_client end |
Instance Method Details
#delete_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) ⇒ nil
Delete ProjectContact
27 28 29 30 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 27 def delete_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) delete_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts) nil end |
#delete_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete ProjectContact
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 38 def delete_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ProjectContactsApi.delete_project_projects_by_parent_id_contacts_by_id ...' if @api_client.config.debugging # verify the required parameter 'id' is set raise ArgumentError, "Missing the required parameter 'id' when calling ProjectContactsApi.delete_project_projects_by_parent_id_contacts_by_id" if @api_client.config.client_side_validation && id.nil? # verify the required parameter 'parent_id' is set raise ArgumentError, "Missing the required parameter 'parent_id' when calling ProjectContactsApi.delete_project_projects_by_parent_id_contacts_by_id" 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 ProjectContactsApi.delete_project_projects_by_parent_id_contacts_by_id" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/project/projects/{parentId}/contacts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ProjectContactsApi.delete_project_projects_by_parent_id_contacts_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(:DELETE, local_var_path, ) @api_client.config.logger.debug "API called: ProjectContactsApi#delete_project_projects_by_parent_id_contacts_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_project_projects_by_parent_id_contacts(parent_id, client_id, opts = {}) ⇒ Array<ProjectContact>
Get List of ProjectContact
97 98 99 100 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 97 def get_project_projects_by_parent_id_contacts(parent_id, client_id, opts = {}) data, _status_code, _headers = get_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, opts) data end |
#get_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) ⇒ ProjectContact
Get ProjectContact
183 184 185 186 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 183 def get_project_projects_by_parent_id_contacts_by_id(id, parent_id, client_id, opts = {}) data, _status_code, _headers = get_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts) data end |
#get_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(ProjectContact, Integer, Hash)>
Get ProjectContact
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 202 def get_project_projects_by_parent_id_contacts_by_id_with_http_info(id, parent_id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ProjectContactsApi.get_project_projects_by_parent_id_contacts_by_id ...' if @api_client.config.debugging # verify the required parameter 'id' is set raise ArgumentError, "Missing the required parameter 'id' when calling ProjectContactsApi.get_project_projects_by_parent_id_contacts_by_id" if @api_client.config.client_side_validation && id.nil? # verify the required parameter 'parent_id' is set raise ArgumentError, "Missing the required parameter 'parent_id' when calling ProjectContactsApi.get_project_projects_by_parent_id_contacts_by_id" 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 ProjectContactsApi.get_project_projects_by_parent_id_contacts_by_id" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/project/projects/{parentId}/contacts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).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] || 'ProjectContact' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ProjectContactsApi.get_project_projects_by_parent_id_contacts_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, ) @api_client.config.logger.debug "API called: ProjectContactsApi#get_project_projects_by_parent_id_contacts_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#get_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Array<ProjectContact>, Integer, Hash)>
Get List of ProjectContact
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 115 def get_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, opts = {}) @api_client.config.logger.debug 'Calling API: ProjectContactsApi.get_project_projects_by_parent_id_contacts ...' if @api_client.config.debugging # verify the required parameter 'parent_id' is set raise ArgumentError, "Missing the required parameter 'parent_id' when calling ProjectContactsApi.get_project_projects_by_parent_id_contacts" 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 ProjectContactsApi.get_project_projects_by_parent_id_contacts" if @api_client.config.client_side_validation && client_id.nil? # resource path local_var_path = '/project/projects/{parentId}/contacts'.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] || 'Array<ProjectContact>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ProjectContactsApi.get_project_projects_by_parent_id_contacts', 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: ProjectContactsApi#get_project_projects_by_parent_id_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |
#post_project_projects_by_parent_id_contacts(parent_id, client_id, project_contact, opts = {}) ⇒ ProjectContact
Post ProjectContact
264 265 266 267 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 264 def post_project_projects_by_parent_id_contacts(parent_id, client_id, project_contact, opts = {}) data, _status_code, _headers = post_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, project_contact, opts) data end |
#post_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, project_contact, opts = {}) ⇒ Array<(ProjectContact, Integer, Hash)>
Post ProjectContact
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/connect_wise/api/project_contacts_api.rb', line 275 def post_project_projects_by_parent_id_contacts_with_http_info(parent_id, client_id, project_contact, opts = {}) @api_client.config.logger.debug 'Calling API: ProjectContactsApi.post_project_projects_by_parent_id_contacts ...' if @api_client.config.debugging # verify the required parameter 'parent_id' is set raise ArgumentError, "Missing the required parameter 'parent_id' when calling ProjectContactsApi.post_project_projects_by_parent_id_contacts" 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 ProjectContactsApi.post_project_projects_by_parent_id_contacts" if @api_client.config.client_side_validation && client_id.nil? # verify the required parameter 'project_contact' is set raise ArgumentError, "Missing the required parameter 'project_contact' when calling ProjectContactsApi.post_project_projects_by_parent_id_contacts" if @api_client.config.client_side_validation && project_contact.nil? # resource path local_var_path = '/project/projects/{parentId}/contacts'.sub('{' + 'parentId' + '}', CGI.escape(parent_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/vnd.connectwise.com+json; version=2022.1']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) header_params['Content-Type'] = content_type unless content_type.nil? header_params[:clientId] = client_id # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(project_contact) # return_type return_type = opts[:debug_return_type] || 'ProjectContact' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( operation: :'ProjectContactsApi.post_project_projects_by_parent_id_contacts', header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) @api_client.config.logger.debug "API called: ProjectContactsApi#post_project_projects_by_parent_id_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging [data, status_code, headers] end |