hubspot-api-client 17.0.0.pre.beta.2 → 17.0.0.pre.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/Gemfile.lock +1 -1
- data/lib/hubspot/codegen/crm/associations/schema/api/types_api.rb +97 -0
- data/lib/hubspot/codegen/crm/associations/schema/api_client.rb +412 -0
- data/lib/hubspot/codegen/crm/associations/schema/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/associations/schema/configuration.rb +296 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/associated_id.rb +244 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_association.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_object_id.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association.rb +328 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi.rb +328 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi_with_errors.rb +348 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_with_errors.rb +348 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/collection_response_public_association_definition_no_paging.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/error.rb +307 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/error_category.rb +278 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/error_detail.rb +273 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/next_page.rb +239 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/paging.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/previous_page.rb +239 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/public_association.rb +258 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/public_association_definition.rb +244 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/public_association_multi.rb +256 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/public_object_id.rb +231 -0
- data/lib/hubspot/codegen/crm/associations/schema/models/standard_error.rb +324 -0
- data/lib/hubspot/codegen/crm/associations/v4/api/basic_api.rb +365 -0
- data/lib/hubspot/codegen/crm/associations/v4/api/batch_api.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/api_client.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/api_error.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/configuration.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/associated_id.rb +244 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/association_spec.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/association_spec_with_label.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_archive.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_post.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_default_association_multi_post.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_fetch_associations_batch_request.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_batch_input.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_id.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_input_for_create.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_read_input_simple_public_object_id.rb +273 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair_with_errors.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label_with_errors.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_default_association.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object.rb +328 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object_with_errors.rb +348 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_associated_id.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_association_spec_with_label_no_paging.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_multi_associated_object_with_label_forward_paging.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/error.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/error_category.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/forward_paging.rb +225 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/labels_between_object_pair.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/multi_associated_object_with_label.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/paging.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/previous_page.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_create_request.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_update_request.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_archive.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_post.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_with_label.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_associations_for_object.rb +246 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association_multi_post.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_fetch_associations_batch_request.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/public_gdpr_delete_input.rb +239 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/public_object_id.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object.rb +303 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_batch_input.rb +246 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_id.rb +230 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input_for_create.rb +248 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_with_associations.rb +314 -0
- data/lib/hubspot/codegen/crm/associations/v4/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/v4/models/value_with_timestamp.rb +285 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/api/definitions_api.rb +334 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/api_client.rb +414 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/api_error.rb +65 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/configuration.rb +298 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec.rb +280 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec_with_label.rb +289 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_archive.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_post.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_default_association_multi_post.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_fetch_associations_batch_request.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair.rb +330 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair_with_errors.rb +350 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label.rb +330 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label_with_errors.rb +350 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_default_association.rb +350 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/collection_response_association_spec_with_label_no_paging.rb +234 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/error.rb +309 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_category.rb +280 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_detail.rb +275 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/labels_between_object_pair.rb +290 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/multi_associated_object_with_label.rb +248 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/next_page.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/paging.rb +236 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/previous_page.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_create_request.rb +246 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_update_request.rb +246 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_archive.rb +248 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_post.rb +262 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_with_label.rb +257 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association.rb +260 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb +246 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_fetch_associations_batch_request.rb +241 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_object_id.rb +232 -0
- data/lib/hubspot/codegen/crm/associations/v4/schema/models/standard_error.rb +326 -0
- data/lib/hubspot/codegen/crm/objects/communications/api/basic_api.rb +391 -0
- data/lib/hubspot/codegen/crm/objects/communications/api/batch_api.rb +295 -0
- data/lib/hubspot/codegen/crm/objects/communications/api/public_object_api.rb +94 -0
- data/lib/hubspot/codegen/crm/objects/communications/api/search_api.rb +92 -0
- data/lib/hubspot/codegen/crm/objects/communications/api_client.rb +412 -0
- data/lib/hubspot/codegen/crm/objects/communications/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/objects/communications/configuration.rb +296 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/associated_id.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_batch_input.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_id.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_input_for_create.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_read_input_simple_public_object_id.rb +273 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object.rb +328 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object_with_errors.rb +348 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_associated_id.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/error.rb +307 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/error_category.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/error_detail.rb +273 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/filter.rb +308 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/filter_group.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/forward_paging.rb +225 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/next_page.rb +239 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/paging.rb +234 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/previous_page.rb +239 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/public_associations_for_object.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/public_merge_input.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/public_object_id.rb +230 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/public_object_search_request.rb +301 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object.rb +303 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_batch_input.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_id.rb +230 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input_for_create.rb +248 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_with_associations.rb +314 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/standard_error.rb +324 -0
- data/lib/hubspot/codegen/crm/objects/communications/models/value_with_timestamp.rb +285 -0
- data/lib/hubspot/discovery/crm/associations/client.rb +4 -2
- data/lib/hubspot/discovery/crm/associations/schema/api/types_api.rb +15 -0
- data/lib/hubspot/discovery/crm/associations/schema/client.rb +20 -0
- data/lib/hubspot/discovery/crm/associations/v4/api/{definitions_api.rb → basic_api.rb} +1 -1
- data/lib/hubspot/discovery/crm/associations/v4/client.rb +6 -1
- data/lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb +17 -0
- data/lib/hubspot/discovery/crm/associations/v4/schema/client.rb +22 -0
- data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
- data/lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/communications/api/search_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/communications/client.rb +24 -0
- data/lib/hubspot/version.rb +1 -1
- data/spec/discovery/crm/associations/client_spec.rb +1 -0
- data/spec/discovery/crm/associations/schema/types_api_spec.rb +7 -0
- data/spec/discovery/crm/associations/v4/basic_api_spec.rb +10 -0
- data/spec/discovery/crm/associations/v4/client_spec.rb +7 -0
- data/spec/discovery/crm/associations/v4/{definitions_api_spec.rb → schema/definitions_api_spec.rb} +3 -3
- data/spec/discovery/crm/objects/client_spec.rb +1 -0
- data/spec/discovery/crm/objects/communications/basic_api_spec.rb +10 -0
- data/spec/discovery/crm/objects/communications/batch_api_spec.rb +10 -0
- data/spec/discovery/crm/objects/communications/public_object_api_spec.rb +7 -0
- data/spec/discovery/crm/objects/communications/search_api_spec.rb +7 -0
- metadata +145 -10
- data/lib/hubspot/codegen/crm/associations/api/types_api.rb +0 -95
- data/lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb +0 -332
- data/lib/hubspot/discovery/crm/associations/api/types_api.rb +0 -13
- data/spec/discovery/crm/associations/types_api_spec.rb +0 -7
@@ -1,332 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CrmPublicAssociationsServiceV4
|
3
|
-
|
4
|
-
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v4
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.2.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module Hubspot
|
16
|
-
module Crm
|
17
|
-
module Associations
|
18
|
-
module V4
|
19
|
-
class DefinitionsApi
|
20
|
-
attr_accessor :api_client
|
21
|
-
|
22
|
-
def initialize(api_client = ApiClient.default)
|
23
|
-
@api_client = api_client
|
24
|
-
end
|
25
|
-
# Delete
|
26
|
-
# Deletes an association definition
|
27
|
-
# @param from_object_type [String]
|
28
|
-
# @param to_object_type [String]
|
29
|
-
# @param association_type_id [Integer]
|
30
|
-
# @param [Hash] opts the optional parameters
|
31
|
-
# @return [nil]
|
32
|
-
def archive(from_object_type, to_object_type, association_type_id, opts = {})
|
33
|
-
archive_with_http_info(from_object_type, to_object_type, association_type_id, opts)
|
34
|
-
nil
|
35
|
-
end
|
36
|
-
|
37
|
-
# Delete
|
38
|
-
# Deletes an association definition
|
39
|
-
# @param from_object_type [String]
|
40
|
-
# @param to_object_type [String]
|
41
|
-
# @param association_type_id [Integer]
|
42
|
-
# @param [Hash] opts the optional parameters
|
43
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
44
|
-
def archive_with_http_info(from_object_type, to_object_type, association_type_id, opts = {})
|
45
|
-
if @api_client.config.debugging
|
46
|
-
@api_client.config.logger.debug 'Calling API: DefinitionsApi.archive ...'
|
47
|
-
end
|
48
|
-
# verify the required parameter 'from_object_type' is set
|
49
|
-
if @api_client.config.client_side_validation && from_object_type.nil?
|
50
|
-
fail ArgumentError, "Missing the required parameter 'from_object_type' when calling DefinitionsApi.archive"
|
51
|
-
end
|
52
|
-
# verify the required parameter 'to_object_type' is set
|
53
|
-
if @api_client.config.client_side_validation && to_object_type.nil?
|
54
|
-
fail ArgumentError, "Missing the required parameter 'to_object_type' when calling DefinitionsApi.archive"
|
55
|
-
end
|
56
|
-
# verify the required parameter 'association_type_id' is set
|
57
|
-
if @api_client.config.client_side_validation && association_type_id.nil?
|
58
|
-
fail ArgumentError, "Missing the required parameter 'association_type_id' when calling DefinitionsApi.archive"
|
59
|
-
end
|
60
|
-
# resource path
|
61
|
-
local_var_path = '/crm/v4/associations/{fromObjectType}/{toObjectType}/labels/{associationTypeId}'.sub('{' + 'fromObjectType' + '}', CGI.escape(from_object_type.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s)).sub('{' + 'associationTypeId' + '}', CGI.escape(association_type_id.to_s))
|
62
|
-
|
63
|
-
# query parameters
|
64
|
-
query_params = opts[:query_params] || {}
|
65
|
-
|
66
|
-
# header parameters
|
67
|
-
header_params = opts[:header_params] || {}
|
68
|
-
# HTTP header 'Accept' (if needed)
|
69
|
-
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
70
|
-
|
71
|
-
# form parameters
|
72
|
-
form_params = opts[:form_params] || {}
|
73
|
-
|
74
|
-
# http body (model)
|
75
|
-
post_body = opts[:debug_body]
|
76
|
-
|
77
|
-
# return_type
|
78
|
-
return_type = opts[:debug_return_type]
|
79
|
-
|
80
|
-
# auth_names
|
81
|
-
auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
|
82
|
-
|
83
|
-
new_options = opts.merge(
|
84
|
-
:operation => :"DefinitionsApi.archive",
|
85
|
-
:header_params => header_params,
|
86
|
-
:query_params => query_params,
|
87
|
-
:form_params => form_params,
|
88
|
-
:body => post_body,
|
89
|
-
:auth_names => auth_names,
|
90
|
-
:return_type => return_type
|
91
|
-
)
|
92
|
-
|
93
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
94
|
-
if @api_client.config.debugging
|
95
|
-
@api_client.config.logger.debug "API called: DefinitionsApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
96
|
-
end
|
97
|
-
return data, status_code, headers
|
98
|
-
end
|
99
|
-
|
100
|
-
# Create
|
101
|
-
# Create a user defined association definition
|
102
|
-
# @param from_object_type [String]
|
103
|
-
# @param to_object_type [String]
|
104
|
-
# @param public_association_definition_create_request [PublicAssociationDefinitionCreateRequest]
|
105
|
-
# @param [Hash] opts the optional parameters
|
106
|
-
# @return [CollectionResponseAssociationSpecWithLabelNoPaging]
|
107
|
-
def create(from_object_type, to_object_type, public_association_definition_create_request, opts = {})
|
108
|
-
data, _status_code, _headers = create_with_http_info(from_object_type, to_object_type, public_association_definition_create_request, opts)
|
109
|
-
data
|
110
|
-
end
|
111
|
-
|
112
|
-
# Create
|
113
|
-
# Create a user defined association definition
|
114
|
-
# @param from_object_type [String]
|
115
|
-
# @param to_object_type [String]
|
116
|
-
# @param public_association_definition_create_request [PublicAssociationDefinitionCreateRequest]
|
117
|
-
# @param [Hash] opts the optional parameters
|
118
|
-
# @return [Array<(CollectionResponseAssociationSpecWithLabelNoPaging, Integer, Hash)>] CollectionResponseAssociationSpecWithLabelNoPaging data, response status code and response headers
|
119
|
-
def create_with_http_info(from_object_type, to_object_type, public_association_definition_create_request, opts = {})
|
120
|
-
if @api_client.config.debugging
|
121
|
-
@api_client.config.logger.debug 'Calling API: DefinitionsApi.create ...'
|
122
|
-
end
|
123
|
-
# verify the required parameter 'from_object_type' is set
|
124
|
-
if @api_client.config.client_side_validation && from_object_type.nil?
|
125
|
-
fail ArgumentError, "Missing the required parameter 'from_object_type' when calling DefinitionsApi.create"
|
126
|
-
end
|
127
|
-
# verify the required parameter 'to_object_type' is set
|
128
|
-
if @api_client.config.client_side_validation && to_object_type.nil?
|
129
|
-
fail ArgumentError, "Missing the required parameter 'to_object_type' when calling DefinitionsApi.create"
|
130
|
-
end
|
131
|
-
# verify the required parameter 'public_association_definition_create_request' is set
|
132
|
-
if @api_client.config.client_side_validation && public_association_definition_create_request.nil?
|
133
|
-
fail ArgumentError, "Missing the required parameter 'public_association_definition_create_request' when calling DefinitionsApi.create"
|
134
|
-
end
|
135
|
-
# resource path
|
136
|
-
local_var_path = '/crm/v4/associations/{fromObjectType}/{toObjectType}/labels'.sub('{' + 'fromObjectType' + '}', CGI.escape(from_object_type.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
|
137
|
-
|
138
|
-
# query parameters
|
139
|
-
query_params = opts[:query_params] || {}
|
140
|
-
|
141
|
-
# header parameters
|
142
|
-
header_params = opts[:header_params] || {}
|
143
|
-
# HTTP header 'Accept' (if needed)
|
144
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
145
|
-
# HTTP header 'Content-Type'
|
146
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
147
|
-
if !content_type.nil?
|
148
|
-
header_params['Content-Type'] = content_type
|
149
|
-
end
|
150
|
-
|
151
|
-
# form parameters
|
152
|
-
form_params = opts[:form_params] || {}
|
153
|
-
|
154
|
-
# http body (model)
|
155
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(public_association_definition_create_request)
|
156
|
-
|
157
|
-
# return_type
|
158
|
-
return_type = opts[:debug_return_type] || 'CollectionResponseAssociationSpecWithLabelNoPaging'
|
159
|
-
|
160
|
-
# auth_names
|
161
|
-
auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
|
162
|
-
|
163
|
-
new_options = opts.merge(
|
164
|
-
:operation => :"DefinitionsApi.create",
|
165
|
-
:header_params => header_params,
|
166
|
-
:query_params => query_params,
|
167
|
-
:form_params => form_params,
|
168
|
-
:body => post_body,
|
169
|
-
:auth_names => auth_names,
|
170
|
-
:return_type => return_type
|
171
|
-
)
|
172
|
-
|
173
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
174
|
-
if @api_client.config.debugging
|
175
|
-
@api_client.config.logger.debug "API called: DefinitionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
176
|
-
end
|
177
|
-
return data, status_code, headers
|
178
|
-
end
|
179
|
-
|
180
|
-
# Read
|
181
|
-
# Returns all association types between two object types
|
182
|
-
# @param from_object_type [String]
|
183
|
-
# @param to_object_type [String]
|
184
|
-
# @param [Hash] opts the optional parameters
|
185
|
-
# @return [CollectionResponseAssociationSpecWithLabelNoPaging]
|
186
|
-
def get_all(from_object_type, to_object_type, opts = {})
|
187
|
-
data, _status_code, _headers = get_all_with_http_info(from_object_type, to_object_type, opts)
|
188
|
-
data
|
189
|
-
end
|
190
|
-
|
191
|
-
# Read
|
192
|
-
# Returns all association types between two object types
|
193
|
-
# @param from_object_type [String]
|
194
|
-
# @param to_object_type [String]
|
195
|
-
# @param [Hash] opts the optional parameters
|
196
|
-
# @return [Array<(CollectionResponseAssociationSpecWithLabelNoPaging, Integer, Hash)>] CollectionResponseAssociationSpecWithLabelNoPaging data, response status code and response headers
|
197
|
-
def get_all_with_http_info(from_object_type, to_object_type, opts = {})
|
198
|
-
if @api_client.config.debugging
|
199
|
-
@api_client.config.logger.debug 'Calling API: DefinitionsApi.get_all ...'
|
200
|
-
end
|
201
|
-
# verify the required parameter 'from_object_type' is set
|
202
|
-
if @api_client.config.client_side_validation && from_object_type.nil?
|
203
|
-
fail ArgumentError, "Missing the required parameter 'from_object_type' when calling DefinitionsApi.get_all"
|
204
|
-
end
|
205
|
-
# verify the required parameter 'to_object_type' is set
|
206
|
-
if @api_client.config.client_side_validation && to_object_type.nil?
|
207
|
-
fail ArgumentError, "Missing the required parameter 'to_object_type' when calling DefinitionsApi.get_all"
|
208
|
-
end
|
209
|
-
# resource path
|
210
|
-
local_var_path = '/crm/v4/associations/{fromObjectType}/{toObjectType}/labels'.sub('{' + 'fromObjectType' + '}', CGI.escape(from_object_type.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
|
211
|
-
|
212
|
-
# query parameters
|
213
|
-
query_params = opts[:query_params] || {}
|
214
|
-
|
215
|
-
# header parameters
|
216
|
-
header_params = opts[:header_params] || {}
|
217
|
-
# HTTP header 'Accept' (if needed)
|
218
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
219
|
-
|
220
|
-
# form parameters
|
221
|
-
form_params = opts[:form_params] || {}
|
222
|
-
|
223
|
-
# http body (model)
|
224
|
-
post_body = opts[:debug_body]
|
225
|
-
|
226
|
-
# return_type
|
227
|
-
return_type = opts[:debug_return_type] || 'CollectionResponseAssociationSpecWithLabelNoPaging'
|
228
|
-
|
229
|
-
# auth_names
|
230
|
-
auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
|
231
|
-
|
232
|
-
new_options = opts.merge(
|
233
|
-
:operation => :"DefinitionsApi.get_all",
|
234
|
-
:header_params => header_params,
|
235
|
-
:query_params => query_params,
|
236
|
-
:form_params => form_params,
|
237
|
-
:body => post_body,
|
238
|
-
:auth_names => auth_names,
|
239
|
-
:return_type => return_type
|
240
|
-
)
|
241
|
-
|
242
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
243
|
-
if @api_client.config.debugging
|
244
|
-
@api_client.config.logger.debug "API called: DefinitionsApi#get_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
245
|
-
end
|
246
|
-
return data, status_code, headers
|
247
|
-
end
|
248
|
-
|
249
|
-
# Update
|
250
|
-
# Update a user defined association definition
|
251
|
-
# @param from_object_type [String]
|
252
|
-
# @param to_object_type [String]
|
253
|
-
# @param public_association_definition_update_request [PublicAssociationDefinitionUpdateRequest]
|
254
|
-
# @param [Hash] opts the optional parameters
|
255
|
-
# @return [nil]
|
256
|
-
def update(from_object_type, to_object_type, public_association_definition_update_request, opts = {})
|
257
|
-
update_with_http_info(from_object_type, to_object_type, public_association_definition_update_request, opts)
|
258
|
-
nil
|
259
|
-
end
|
260
|
-
|
261
|
-
# Update
|
262
|
-
# Update a user defined association definition
|
263
|
-
# @param from_object_type [String]
|
264
|
-
# @param to_object_type [String]
|
265
|
-
# @param public_association_definition_update_request [PublicAssociationDefinitionUpdateRequest]
|
266
|
-
# @param [Hash] opts the optional parameters
|
267
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
268
|
-
def update_with_http_info(from_object_type, to_object_type, public_association_definition_update_request, opts = {})
|
269
|
-
if @api_client.config.debugging
|
270
|
-
@api_client.config.logger.debug 'Calling API: DefinitionsApi.update ...'
|
271
|
-
end
|
272
|
-
# verify the required parameter 'from_object_type' is set
|
273
|
-
if @api_client.config.client_side_validation && from_object_type.nil?
|
274
|
-
fail ArgumentError, "Missing the required parameter 'from_object_type' when calling DefinitionsApi.update"
|
275
|
-
end
|
276
|
-
# verify the required parameter 'to_object_type' is set
|
277
|
-
if @api_client.config.client_side_validation && to_object_type.nil?
|
278
|
-
fail ArgumentError, "Missing the required parameter 'to_object_type' when calling DefinitionsApi.update"
|
279
|
-
end
|
280
|
-
# verify the required parameter 'public_association_definition_update_request' is set
|
281
|
-
if @api_client.config.client_side_validation && public_association_definition_update_request.nil?
|
282
|
-
fail ArgumentError, "Missing the required parameter 'public_association_definition_update_request' when calling DefinitionsApi.update"
|
283
|
-
end
|
284
|
-
# resource path
|
285
|
-
local_var_path = '/crm/v4/associations/{fromObjectType}/{toObjectType}/labels'.sub('{' + 'fromObjectType' + '}', CGI.escape(from_object_type.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
|
286
|
-
|
287
|
-
# query parameters
|
288
|
-
query_params = opts[:query_params] || {}
|
289
|
-
|
290
|
-
# header parameters
|
291
|
-
header_params = opts[:header_params] || {}
|
292
|
-
# HTTP header 'Accept' (if needed)
|
293
|
-
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
294
|
-
# HTTP header 'Content-Type'
|
295
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
296
|
-
if !content_type.nil?
|
297
|
-
header_params['Content-Type'] = content_type
|
298
|
-
end
|
299
|
-
|
300
|
-
# form parameters
|
301
|
-
form_params = opts[:form_params] || {}
|
302
|
-
|
303
|
-
# http body (model)
|
304
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(public_association_definition_update_request)
|
305
|
-
|
306
|
-
# return_type
|
307
|
-
return_type = opts[:debug_return_type]
|
308
|
-
|
309
|
-
# auth_names
|
310
|
-
auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
|
311
|
-
|
312
|
-
new_options = opts.merge(
|
313
|
-
:operation => :"DefinitionsApi.update",
|
314
|
-
:header_params => header_params,
|
315
|
-
:query_params => query_params,
|
316
|
-
:form_params => form_params,
|
317
|
-
:body => post_body,
|
318
|
-
:auth_names => auth_names,
|
319
|
-
:return_type => return_type
|
320
|
-
)
|
321
|
-
|
322
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
323
|
-
if @api_client.config.debugging
|
324
|
-
@api_client.config.logger.debug "API called: DefinitionsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
325
|
-
end
|
326
|
-
return data, status_code, headers
|
327
|
-
end
|
328
|
-
end
|
329
|
-
end
|
330
|
-
end
|
331
|
-
end
|
332
|
-
end
|