Class: SibApiV3Sdk::CompaniesApi
- Inherits:
-
Object
- Object
- SibApiV3Sdk::CompaniesApi
- Defined in:
- lib/sib-api-v3-sdk/api/companies_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#companies_attributes_get(opts = {}) ⇒ CompanyAttributes
Get company attributes.
-
#companies_attributes_get_with_http_info(opts = {}) ⇒ Array<(CompanyAttributes, Fixnum, Hash)>
Get company attributes.
-
#companies_get(opts = {}) ⇒ CompaniesList
Get all companies.
-
#companies_get_with_http_info(opts = {}) ⇒ Array<(CompaniesList, Fixnum, Hash)>
Get all companies.
-
#companies_id_delete(id, opts = {}) ⇒ nil
Delete a company.
-
#companies_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a company.
-
#companies_id_get(id, opts = {}) ⇒ Company
Get a company.
-
#companies_id_get_with_http_info(id, opts = {}) ⇒ Array<(Company, Fixnum, Hash)>
Get a company.
-
#companies_id_patch(id, body, opts = {}) ⇒ Company
Update a company.
-
#companies_id_patch_with_http_info(id, body, opts = {}) ⇒ Array<(Company, Fixnum, Hash)>
Update a company.
-
#companies_link_unlink_id_patch(id, body, opts = {}) ⇒ nil
Link and Unlink company with contacts and deals.
-
#companies_link_unlink_id_patch_with_http_info(id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Link and Unlink company with contacts and deals.
-
#companies_post(body, opts = {}) ⇒ InlineResponse200
Create a company.
-
#companies_post_with_http_info(body, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Create a company.
-
#initialize(api_client = ApiClient.default) ⇒ CompaniesApi
constructor
A new instance of CompaniesApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ CompaniesApi
Returns a new instance of CompaniesApi.
19 20 21 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#companies_attributes_get(opts = {}) ⇒ CompanyAttributes
Get company attributes
25 26 27 28 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 25 def companies_attributes_get(opts = {}) data, _status_code, _headers = companies_attributes_get_with_http_info(opts) data end |
#companies_attributes_get_with_http_info(opts = {}) ⇒ Array<(CompanyAttributes, Fixnum, Hash)>
Get company attributes
33 34 35 36 37 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 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 33 def companies_attributes_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_attributes_get ...' end # resource path local_var_path = '/companies/attributes' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CompanyAttributes') if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_attributes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_get(opts = {}) ⇒ CompaniesList
Get all companies
78 79 80 81 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 78 def companies_get(opts = {}) data, _status_code, _headers = companies_get_with_http_info(opts) data end |
#companies_get_with_http_info(opts = {}) ⇒ Array<(CompaniesList, Fixnum, Hash)>
Get all companies
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 93 def companies_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_get ...' end if @api_client.config.client_side_validation && opts[:'sort'] && !['asc', 'desc'].include?(opts[:'sort']) fail ArgumentError, 'invalid value for "sort", must be one of asc, desc' end # resource path local_var_path = '/companies' # query parameters query_params = {} query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? query_params[:'linkedContactsIds'] = opts[:'linked_contacts_ids'] if !opts[:'linked_contacts_ids'].nil? query_params[:'linkedDealsIds'] = opts[:'linked_deals_ids'] if !opts[:'linked_deals_ids'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CompaniesList') if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_id_delete(id, opts = {}) ⇒ nil
Delete a company
142 143 144 145 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 142 def companies_id_delete(id, opts = {}) companies_id_delete_with_http_info(id, opts) nil end |
#companies_id_delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a company
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/sib-api-v3-sdk/api/companies_api.rb', line 151 def companies_id_delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_delete ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CompaniesApi.companies_id_delete" end # resource path local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_id_get(id, opts = {}) ⇒ Company
Get a company
193 194 195 196 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 193 def companies_id_get(id, opts = {}) data, _status_code, _headers = companies_id_get_with_http_info(id, opts) data end |
#companies_id_get_with_http_info(id, opts = {}) ⇒ Array<(Company, Fixnum, Hash)>
Get a company
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 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 202 def companies_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CompaniesApi.companies_id_get" end # resource path local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Company') if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_id_patch(id, body, opts = {}) ⇒ Company
Update a company
246 247 248 249 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 246 def companies_id_patch(id, body, opts = {}) data, _status_code, _headers = companies_id_patch_with_http_info(id, body, opts) data end |
#companies_id_patch_with_http_info(id, body, opts = {}) ⇒ Array<(Company, Fixnum, Hash)>
Update a company
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 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 256 def companies_id_patch_with_http_info(id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_id_patch ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CompaniesApi.companies_id_patch" 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 CompaniesApi.companies_id_patch" end # resource path local_var_path = '/companies/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Company') if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_link_unlink_id_patch(id, body, opts = {}) ⇒ nil
Link and Unlink company with contacts and deals
304 305 306 307 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 304 def companies_link_unlink_id_patch(id, body, opts = {}) companies_link_unlink_id_patch_with_http_info(id, body, opts) nil end |
#companies_link_unlink_id_patch_with_http_info(id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Link and Unlink company with contacts and deals
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 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 314 def companies_link_unlink_id_patch_with_http_info(id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_link_unlink_id_patch ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling CompaniesApi.companies_link_unlink_id_patch" 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 CompaniesApi.companies_link_unlink_id_patch" end # resource path local_var_path = '/companies/link-unlink/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_link_unlink_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#companies_post(body, opts = {}) ⇒ InlineResponse200
Create a company
360 361 362 363 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 360 def companies_post(body, opts = {}) data, _status_code, _headers = companies_post_with_http_info(body, opts) data end |
#companies_post_with_http_info(body, opts = {}) ⇒ Array<(InlineResponse200, Fixnum, Hash)>
Create a company
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/sib-api-v3-sdk/api/companies_api.rb', line 369 def companies_post_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CompaniesApi.companies_post ...' 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 CompaniesApi.companies_post" end # resource path local_var_path = '/companies' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'InlineResponse200') if @api_client.config.debugging @api_client.config.logger.debug "API called: CompaniesApi#companies_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |