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
data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb
ADDED
@@ -0,0 +1,246 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Hubspot
|
17
|
+
module Crm
|
18
|
+
module Associations
|
19
|
+
module V4
|
20
|
+
module Schema
|
21
|
+
class PublicDefaultAssociationMultiPost
|
22
|
+
attr_accessor :from
|
23
|
+
|
24
|
+
attr_accessor :to
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'from' => :'from',
|
30
|
+
:'to' => :'to'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'from' => :'PublicObjectId',
|
43
|
+
:'to' => :'PublicObjectId'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::V4::PublicDefaultAssociationMultiPost` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::V4::PublicDefaultAssociationMultiPost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'from')
|
69
|
+
self.from = attributes[:'from']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'to')
|
73
|
+
self.to = attributes[:'to']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if @from.nil?
|
82
|
+
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
if @to.nil?
|
86
|
+
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
87
|
+
end
|
88
|
+
|
89
|
+
invalid_properties
|
90
|
+
end
|
91
|
+
|
92
|
+
# Check to see if the all the properties in the model are valid
|
93
|
+
# @return true if the model is valid
|
94
|
+
def valid?
|
95
|
+
return false if @from.nil?
|
96
|
+
return false if @to.nil?
|
97
|
+
true
|
98
|
+
end
|
99
|
+
|
100
|
+
# Checks equality by comparing each attribute.
|
101
|
+
# @param [Object] Object to be compared
|
102
|
+
def ==(o)
|
103
|
+
return true if self.equal?(o)
|
104
|
+
self.class == o.class &&
|
105
|
+
from == o.from &&
|
106
|
+
to == o.to
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def eql?(o)
|
112
|
+
self == o
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Integer] Hash code
|
117
|
+
def hash
|
118
|
+
[from, to].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def self.build_from_hash(attributes)
|
125
|
+
new.build_from_hash(attributes)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def build_from_hash(attributes)
|
132
|
+
return nil unless attributes.is_a?(Hash)
|
133
|
+
attributes = attributes.transform_keys(&:to_sym)
|
134
|
+
self.class.openapi_types.each_pair do |key, type|
|
135
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
136
|
+
self.send("#{key}=", nil)
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
138
|
+
# check to ensure the input is an array given that the attribute
|
139
|
+
# is documented as an array but the input is not
|
140
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
141
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
142
|
+
end
|
143
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
144
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
self
|
149
|
+
end
|
150
|
+
|
151
|
+
# Deserializes the data based on type
|
152
|
+
# @param string type Data type
|
153
|
+
# @param string value Value to be deserialized
|
154
|
+
# @return [Object] Deserialized data
|
155
|
+
def _deserialize(type, value)
|
156
|
+
case type.to_sym
|
157
|
+
when :Time
|
158
|
+
Time.parse(value)
|
159
|
+
when :Date
|
160
|
+
Date.parse(value)
|
161
|
+
when :String
|
162
|
+
value.to_s
|
163
|
+
when :Integer
|
164
|
+
value.to_i
|
165
|
+
when :Float
|
166
|
+
value.to_f
|
167
|
+
when :Boolean
|
168
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
169
|
+
true
|
170
|
+
else
|
171
|
+
false
|
172
|
+
end
|
173
|
+
when :Object
|
174
|
+
# generic object (usually a Hash), return directly
|
175
|
+
value
|
176
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
177
|
+
inner_type = Regexp.last_match[:inner_type]
|
178
|
+
value.map { |v| _deserialize(inner_type, v) }
|
179
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
180
|
+
k_type = Regexp.last_match[:k_type]
|
181
|
+
v_type = Regexp.last_match[:v_type]
|
182
|
+
{}.tap do |hash|
|
183
|
+
value.each do |k, v|
|
184
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
185
|
+
end
|
186
|
+
end
|
187
|
+
else # model
|
188
|
+
# models (e.g. Pet) or oneOf
|
189
|
+
klass = Hubspot::Crm::Associations::V4.const_get(type)
|
190
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the string representation of the object
|
195
|
+
# @return [String] String presentation of the object
|
196
|
+
def to_s
|
197
|
+
to_hash.to_s
|
198
|
+
end
|
199
|
+
|
200
|
+
# to_body is an alias to to_hash (backward compatibility)
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
202
|
+
def to_body
|
203
|
+
to_hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns the object in the form of hash
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_hash
|
209
|
+
hash = {}
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
211
|
+
value = self.send(attr)
|
212
|
+
if value.nil?
|
213
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
214
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
215
|
+
end
|
216
|
+
|
217
|
+
hash[param] = _to_hash(value)
|
218
|
+
end
|
219
|
+
hash
|
220
|
+
end
|
221
|
+
|
222
|
+
# Outputs non-array value in the form of hash
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
224
|
+
# @param [Object] value Any valid value
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
226
|
+
def _to_hash(value)
|
227
|
+
if value.is_a?(Array)
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
229
|
+
elsif value.is_a?(Hash)
|
230
|
+
{}.tap do |hash|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
232
|
+
end
|
233
|
+
elsif value.respond_to? :to_hash
|
234
|
+
value.to_hash
|
235
|
+
else
|
236
|
+
value
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
end
|
@@ -0,0 +1,241 @@
|
|
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 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Hubspot
|
17
|
+
module Crm
|
18
|
+
module Associations
|
19
|
+
module V4
|
20
|
+
module Schema
|
21
|
+
class PublicFetchAssociationsBatchRequest
|
22
|
+
attr_accessor :id
|
23
|
+
|
24
|
+
attr_accessor :after
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'id' => :'id',
|
30
|
+
:'after' => :'after'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Returns all the JSON keys this model knows about
|
35
|
+
def self.acceptable_attributes
|
36
|
+
attribute_map.values
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.openapi_types
|
41
|
+
{
|
42
|
+
:'id' => :'String',
|
43
|
+
:'after' => :'String'
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
# List of attributes with nullable: true
|
48
|
+
def self.openapi_nullable
|
49
|
+
Set.new([
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Associations::V4::PublicFetchAssociationsBatchRequest` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Associations::V4::PublicFetchAssociationsBatchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'id')
|
69
|
+
self.id = attributes[:'id']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'after')
|
73
|
+
self.after = attributes[:'after']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
if @id.nil?
|
82
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
invalid_properties
|
86
|
+
end
|
87
|
+
|
88
|
+
# Check to see if the all the properties in the model are valid
|
89
|
+
# @return true if the model is valid
|
90
|
+
def valid?
|
91
|
+
return false if @id.nil?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
id == o.id &&
|
101
|
+
after == o.after
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
def hash
|
113
|
+
[id, after].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def self.build_from_hash(attributes)
|
120
|
+
new.build_from_hash(attributes)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
131
|
+
self.send("#{key}=", nil)
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
133
|
+
# check to ensure the input is an array given that the attribute
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
137
|
+
end
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
self
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deserializes the data based on type
|
147
|
+
# @param string type Data type
|
148
|
+
# @param string value Value to be deserialized
|
149
|
+
# @return [Object] Deserialized data
|
150
|
+
def _deserialize(type, value)
|
151
|
+
case type.to_sym
|
152
|
+
when :Time
|
153
|
+
Time.parse(value)
|
154
|
+
when :Date
|
155
|
+
Date.parse(value)
|
156
|
+
when :String
|
157
|
+
value.to_s
|
158
|
+
when :Integer
|
159
|
+
value.to_i
|
160
|
+
when :Float
|
161
|
+
value.to_f
|
162
|
+
when :Boolean
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
164
|
+
true
|
165
|
+
else
|
166
|
+
false
|
167
|
+
end
|
168
|
+
when :Object
|
169
|
+
# generic object (usually a Hash), return directly
|
170
|
+
value
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each do |k, v|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
else # model
|
183
|
+
# models (e.g. Pet) or oneOf
|
184
|
+
klass = Hubspot::Crm::Associations::V4.const_get(type)
|
185
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
if value.nil?
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
210
|
+
end
|
211
|
+
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|