hubspot-api-client 16.0.3 → 16.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +1 -1
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
- data/lib/hubspot/codegen/cms/domains/configuration.rb +7 -0
- data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/companies/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/companies/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/companies/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/companies/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/contacts/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/contacts/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/contacts/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/contacts/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/deals/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/deals/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/deals/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/deals/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
- data/lib/hubspot/codegen/crm/imports/api/public_imports_api.rb +1 -1
- data/lib/hubspot/codegen/crm/imports/models/import_row_core.rb +34 -18
- data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +19 -19
- data/lib/hubspot/codegen/crm/imports/models/public_import_response.rb +2 -2
- data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/line_items/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/line_items/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/line_items/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/line_items/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/line_items/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/calls/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/objects/calls/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/calls/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/calls/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/calls/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/calls/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/emails/api/associations_api.rb +48 -43
- data/lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/emails/api/batch_api.rb +1 -1
- data/lib/hubspot/codegen/crm/objects/emails/api/search_api.rb +1 -1
- data/lib/hubspot/codegen/crm/objects/emails/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/emails/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/emails/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/emails/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/emails/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/meetings/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/objects/meetings/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/meetings/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/meetings/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/meetings/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/meetings/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/notes/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/objects/notes/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/notes/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/notes/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/notes/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/notes/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api/associations_api.rb +264 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api/basic_api.rb +391 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api/batch_api.rb +295 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api/public_object_api.rb +94 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api/search_api.rb +92 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api_client.rb +412 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/configuration.rb +296 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/associated_id.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_input_simple_public_object_batch_input.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_input_simple_public_object_id.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_input_simple_public_object_input.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_read_input_simple_public_object_id.rb +273 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_response_simple_public_object.rb +328 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/batch_response_simple_public_object_with_errors.rb +348 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/collection_response_associated_id.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/collection_response_multi_associated_object_with_label_forward_paging.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/error.rb +307 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/error_category.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/error_detail.rb +273 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/filter.rb +299 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/filter_group.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/forward_paging.rb +225 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/next_page.rb +239 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/paging.rb +234 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/previous_page.rb +239 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/public_merge_input.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/public_object_search_request.rb +301 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/simple_public_object.rb +303 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/simple_public_object_batch_input.rb +246 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/simple_public_object_id.rb +230 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/simple_public_object_input.rb +232 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/simple_public_object_with_associations.rb +314 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/standard_error.rb +324 -0
- data/lib/hubspot/codegen/crm/objects/postal_mail/models/value_with_timestamp.rb +285 -0
- data/lib/hubspot/codegen/crm/objects/tasks/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/objects/tasks/models/association_spec.rb +278 -0
- data/lib/hubspot/codegen/crm/objects/tasks/models/association_spec_with_label.rb +287 -0
- data/lib/hubspot/codegen/crm/objects/tasks/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/tasks/models/labels_between_object_pair.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/tasks/models/multi_associated_object_with_label.rb +246 -0
- data/lib/hubspot/codegen/crm/products/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/products/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/products/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/products/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/products/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/products/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/quotes/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/quotes/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/quotes/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/quotes/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/quotes/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +47 -42
- data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +276 -0
- data/lib/hubspot/codegen/crm/tickets/models/association_spec_with_label.rb +285 -0
- data/lib/hubspot/codegen/crm/tickets/models/{collection_response_associated_id_forward_paging.rb → collection_response_multi_associated_object_with_label_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/models/labels_between_object_pair.rb +286 -0
- data/lib/hubspot/codegen/crm/tickets/models/multi_associated_object_with_label.rb +244 -0
- data/lib/hubspot/codegen/marketing/events/api/attendance_subscriber_state_changes_api.rb +2 -2
- data/lib/hubspot/codegen/marketing/events/api/marketing_events_external_api.rb +12 -12
- data/lib/hubspot/codegen/marketing/events/models/property_value.rb +13 -4
- data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/api/associations_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/api/basic_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/api/batch_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/api/public_object_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/api/search_api.rb +15 -0
- data/lib/hubspot/discovery/crm/objects/postal_mail/client.rb +25 -0
- data/lib/hubspot/version.rb +1 -1
- data/spec/discovery/crm/objects/postal_mail/associations_api_spec.rb +9 -0
- data/spec/discovery/crm/objects/postal_mail/basic_api_spec.rb +10 -0
- data/spec/discovery/crm/objects/postal_mail/batch_api_spec.rb +10 -0
- data/spec/discovery/crm/objects/postal_mail/public_object_api_spec.rb +7 -0
- data/spec/discovery/crm/objects/postal_mail/search_api_spec.rb +7 -0
- metadata +125 -16
@@ -0,0 +1,244 @@
|
|
1
|
+
=begin
|
2
|
+
#Tickets
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
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 Tickets
|
19
|
+
class MultiAssociatedObjectWithLabel
|
20
|
+
attr_accessor :to_object_id
|
21
|
+
|
22
|
+
attr_accessor :association_types
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'to_object_id' => :'toObjectId',
|
28
|
+
:'association_types' => :'associationTypes'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'to_object_id' => :'Integer',
|
41
|
+
:'association_types' => :'Array<AssociationSpecWithLabel>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Tickets::MultiAssociatedObjectWithLabel` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Tickets::MultiAssociatedObjectWithLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'to_object_id')
|
67
|
+
self.to_object_id = attributes[:'to_object_id']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'association_types')
|
71
|
+
if (value = attributes[:'association_types']).is_a?(Array)
|
72
|
+
self.association_types = value
|
73
|
+
end
|
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 @to_object_id.nil?
|
82
|
+
invalid_properties.push('invalid value for "to_object_id", to_object_id cannot be nil.')
|
83
|
+
end
|
84
|
+
|
85
|
+
if @association_types.nil?
|
86
|
+
invalid_properties.push('invalid value for "association_types", association_types 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 @to_object_id.nil?
|
96
|
+
return false if @association_types.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
|
+
to_object_id == o.to_object_id &&
|
106
|
+
association_types == o.association_types
|
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
|
+
[to_object_id, association_types].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::Tickets.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
|
@@ -85,7 +85,7 @@ module Hubspot
|
|
85
85
|
return_type = opts[:debug_return_type] || 'BatchResponseSubscriberVidResponse'
|
86
86
|
|
87
87
|
# auth_names
|
88
|
-
auth_names = opts[:debug_auth_names] || ['
|
88
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
89
89
|
|
90
90
|
new_options = opts.merge(
|
91
91
|
:operation => :"AttendanceSubscriberStateChangesApi.create",
|
@@ -168,7 +168,7 @@ module Hubspot
|
|
168
168
|
return_type = opts[:debug_return_type] || 'BatchResponseSubscriberEmailResponse'
|
169
169
|
|
170
170
|
# auth_names
|
171
|
-
auth_names = opts[:debug_auth_names] || ['
|
171
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
172
172
|
|
173
173
|
new_options = opts.merge(
|
174
174
|
:operation => :"AttendanceSubscriberStateChangesApi.create_by_email",
|
@@ -68,7 +68,7 @@ module Hubspot
|
|
68
68
|
return_type = opts[:debug_return_type]
|
69
69
|
|
70
70
|
# auth_names
|
71
|
-
auth_names = opts[:debug_auth_names] || ['
|
71
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
72
72
|
|
73
73
|
new_options = opts.merge(
|
74
74
|
:operation => :"MarketingEventsExternalApi.archive",
|
@@ -132,7 +132,7 @@ module Hubspot
|
|
132
132
|
return_type = opts[:debug_return_type] || 'Error'
|
133
133
|
|
134
134
|
# auth_names
|
135
|
-
auth_names = opts[:debug_auth_names] || ['
|
135
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
136
136
|
|
137
137
|
new_options = opts.merge(
|
138
138
|
:operation => :"MarketingEventsExternalApi.archive_batch",
|
@@ -209,7 +209,7 @@ module Hubspot
|
|
209
209
|
return_type = opts[:debug_return_type] || 'MarketingEventDefaultResponse'
|
210
210
|
|
211
211
|
# auth_names
|
212
|
-
auth_names = opts[:debug_auth_names] || ['
|
212
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
213
213
|
|
214
214
|
new_options = opts.merge(
|
215
215
|
:operation => :"MarketingEventsExternalApi.complete",
|
@@ -273,7 +273,7 @@ module Hubspot
|
|
273
273
|
return_type = opts[:debug_return_type] || 'MarketingEventDefaultResponse'
|
274
274
|
|
275
275
|
# auth_names
|
276
|
-
auth_names = opts[:debug_auth_names] || ['
|
276
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
277
277
|
|
278
278
|
new_options = opts.merge(
|
279
279
|
:operation => :"MarketingEventsExternalApi.create",
|
@@ -339,7 +339,7 @@ module Hubspot
|
|
339
339
|
return_type = opts[:debug_return_type] || 'MarketingEventDefaultResponse'
|
340
340
|
|
341
341
|
# auth_names
|
342
|
-
auth_names = opts[:debug_auth_names] || ['
|
342
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
343
343
|
|
344
344
|
new_options = opts.merge(
|
345
345
|
:operation => :"MarketingEventsExternalApi.do_cancel",
|
@@ -422,7 +422,7 @@ module Hubspot
|
|
422
422
|
return_type = opts[:debug_return_type] || 'Error'
|
423
423
|
|
424
424
|
# auth_names
|
425
|
-
auth_names = opts[:debug_auth_names] || ['
|
425
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
426
426
|
|
427
427
|
new_options = opts.merge(
|
428
428
|
:operation => :"MarketingEventsExternalApi.do_email_upsert_by_id",
|
@@ -482,7 +482,7 @@ module Hubspot
|
|
482
482
|
return_type = opts[:debug_return_type] || 'CollectionResponseMarketingEventExternalUniqueIdentifierNoPaging'
|
483
483
|
|
484
484
|
# auth_names
|
485
|
-
auth_names = opts[:debug_auth_names] || ['
|
485
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
486
486
|
|
487
487
|
new_options = opts.merge(
|
488
488
|
:operation => :"MarketingEventsExternalApi.do_search",
|
@@ -546,7 +546,7 @@ module Hubspot
|
|
546
546
|
return_type = opts[:debug_return_type] || 'BatchResponseMarketingEventPublicDefaultResponse'
|
547
547
|
|
548
548
|
# auth_names
|
549
|
-
auth_names = opts[:debug_auth_names] || ['
|
549
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
550
550
|
|
551
551
|
new_options = opts.merge(
|
552
552
|
:operation => :"MarketingEventsExternalApi.do_upsert",
|
@@ -629,7 +629,7 @@ module Hubspot
|
|
629
629
|
return_type = opts[:debug_return_type] || 'Error'
|
630
630
|
|
631
631
|
# auth_names
|
632
|
-
auth_names = opts[:debug_auth_names] || ['
|
632
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
633
633
|
|
634
634
|
new_options = opts.merge(
|
635
635
|
:operation => :"MarketingEventsExternalApi.do_upsert_by_id",
|
@@ -695,7 +695,7 @@ module Hubspot
|
|
695
695
|
return_type = opts[:debug_return_type] || 'MarketingEventPublicReadResponse'
|
696
696
|
|
697
697
|
# auth_names
|
698
|
-
auth_names = opts[:debug_auth_names] || ['
|
698
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
699
699
|
|
700
700
|
new_options = opts.merge(
|
701
701
|
:operation => :"MarketingEventsExternalApi.get_by_id",
|
@@ -765,7 +765,7 @@ module Hubspot
|
|
765
765
|
return_type = opts[:debug_return_type] || 'MarketingEventPublicDefaultResponse'
|
766
766
|
|
767
767
|
# auth_names
|
768
|
-
auth_names = opts[:debug_auth_names] || ['
|
768
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
769
769
|
|
770
770
|
new_options = opts.merge(
|
771
771
|
:operation => :"MarketingEventsExternalApi.replace",
|
@@ -842,7 +842,7 @@ module Hubspot
|
|
842
842
|
return_type = opts[:debug_return_type] || 'MarketingEventPublicDefaultResponse'
|
843
843
|
|
844
844
|
# auth_names
|
845
|
-
auth_names = opts[:debug_auth_names] || ['
|
845
|
+
auth_names = opts[:debug_auth_names] || ['oauth2']
|
846
846
|
|
847
847
|
new_options = opts.merge(
|
848
848
|
:operation => :"MarketingEventsExternalApi.update",
|
@@ -42,6 +42,8 @@ module Hubspot
|
|
42
42
|
|
43
43
|
attr_accessor :updated_by_user_id
|
44
44
|
|
45
|
+
attr_accessor :persistence_timestamp
|
46
|
+
|
45
47
|
class EnumAttributeValidator
|
46
48
|
attr_reader :datatype
|
47
49
|
attr_reader :allowable_values
|
@@ -78,7 +80,8 @@ module Hubspot
|
|
78
80
|
:'source_vid' => :'sourceVid',
|
79
81
|
:'source_metadata' => :'sourceMetadata',
|
80
82
|
:'request_id' => :'requestId',
|
81
|
-
:'updated_by_user_id' => :'updatedByUserId'
|
83
|
+
:'updated_by_user_id' => :'updatedByUserId',
|
84
|
+
:'persistence_timestamp' => :'persistenceTimestamp'
|
82
85
|
}
|
83
86
|
end
|
84
87
|
|
@@ -101,7 +104,8 @@ module Hubspot
|
|
101
104
|
:'source_vid' => :'Array<Integer>',
|
102
105
|
:'source_metadata' => :'String',
|
103
106
|
:'request_id' => :'String',
|
104
|
-
:'updated_by_user_id' => :'Integer'
|
107
|
+
:'updated_by_user_id' => :'Integer',
|
108
|
+
:'persistence_timestamp' => :'Integer'
|
105
109
|
}
|
106
110
|
end
|
107
111
|
|
@@ -175,6 +179,10 @@ module Hubspot
|
|
175
179
|
if attributes.key?(:'updated_by_user_id')
|
176
180
|
self.updated_by_user_id = attributes[:'updated_by_user_id']
|
177
181
|
end
|
182
|
+
|
183
|
+
if attributes.key?(:'persistence_timestamp')
|
184
|
+
self.persistence_timestamp = attributes[:'persistence_timestamp']
|
185
|
+
end
|
178
186
|
end
|
179
187
|
|
180
188
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -273,7 +281,8 @@ module Hubspot
|
|
273
281
|
source_vid == o.source_vid &&
|
274
282
|
source_metadata == o.source_metadata &&
|
275
283
|
request_id == o.request_id &&
|
276
|
-
updated_by_user_id == o.updated_by_user_id
|
284
|
+
updated_by_user_id == o.updated_by_user_id &&
|
285
|
+
persistence_timestamp == o.persistence_timestamp
|
277
286
|
end
|
278
287
|
|
279
288
|
# @see the `==` method
|
@@ -285,7 +294,7 @@ module Hubspot
|
|
285
294
|
# Calculates hash code according to all attributes.
|
286
295
|
# @return [Integer] Hash code
|
287
296
|
def hash
|
288
|
-
[name, value, timestamp, source_id, source_label, source, selected_by_user, selected_by_user_timestamp, source_vid, source_metadata, request_id, updated_by_user_id].hash
|
297
|
+
[name, value, timestamp, source_id, source_label, source, selected_by_user, selected_by_user_timestamp, source_vid, source_metadata, request_id, updated_by_user_id, persistence_timestamp].hash
|
289
298
|
end
|
290
299
|
|
291
300
|
# Builds the object from hash
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../../../base_module_client'
|
2
|
+
|
3
|
+
module Hubspot
|
4
|
+
module Discovery
|
5
|
+
module Crm
|
6
|
+
module Objects
|
7
|
+
module PostalMail
|
8
|
+
class Client
|
9
|
+
include Hubspot::Discovery::BaseModuleClient
|
10
|
+
|
11
|
+
def api_classes
|
12
|
+
%i[
|
13
|
+
associations
|
14
|
+
basic
|
15
|
+
batch
|
16
|
+
public_object
|
17
|
+
search
|
18
|
+
].freeze
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/hubspot/version.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Hubspot::Discovery::Crm::Objects::PostalMail::AssociationsApi' do
|
4
|
+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.associations_api }
|
5
|
+
|
6
|
+
it { is_expected.to respond_to(:archive) }
|
7
|
+
it { is_expected.to respond_to(:create) }
|
8
|
+
it { is_expected.to respond_to(:get_all) }
|
9
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Hubspot::Discovery::Crm::Objects::PostalMail::BasicApi' do
|
4
|
+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.basic_api }
|
5
|
+
|
6
|
+
it { is_expected.to respond_to(:archive) }
|
7
|
+
it { is_expected.to respond_to(:create) }
|
8
|
+
it { is_expected.to respond_to(:get_by_id) }
|
9
|
+
it { is_expected.to respond_to(:get_page) }
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Hubspot::Discovery::Crm::Objects::PostalMail::BatchApi' do
|
4
|
+
subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.postal_mail.batch_api }
|
5
|
+
|
6
|
+
it { is_expected.to respond_to(:archive) }
|
7
|
+
it { is_expected.to respond_to(:create) }
|
8
|
+
it { is_expected.to respond_to(:read) }
|
9
|
+
it { is_expected.to respond_to(:update) }
|
10
|
+
end
|