Class: GongAPI::AggregateActivityWithDates
- Inherits:
-
Object
- Object
- GongAPI::AggregateActivityWithDates
- Defined in:
- lib/gong_api/models/aggregate_activity_with_dates.rb
Overview
Aggregated activity for a user within a time period
Instance Attribute Summary collapse
-
#calls_as_host ⇒ Object
The number of recorded calls this user hosted.
-
#calls_attended ⇒ Object
The number of calls in which this user is participant (not host).
-
#calls_comments_given ⇒ Object
The number of calls in which a user gave at least one comment.
-
#calls_comments_received ⇒ Object
The number of calls in which a user received at least one comment on the users calls.
-
#calls_gave_feedback ⇒ Object
The number of recorded calls the user gave feedback on.
-
#calls_marked_as_feedback_given ⇒ Object
The number of calls in which someone pressed the "Mark as reviewed".
-
#calls_marked_as_feedback_received ⇒ Object
The number of calls in which someone pressed the “Mark as reviewed” on the users calls.
-
#calls_received_feedback ⇒ Object
The number of recorded calls the user received feedback on.
-
#calls_requested_feedback ⇒ Object
The number of recorded calls the user requested feedback on.
-
#calls_scorecards_filled ⇒ Object
The number of scorecards the user completed.
-
#calls_scorecards_received ⇒ Object
The number of calls in which someone filled a scorecard on the user’s calls.
-
#calls_shared_externally ⇒ Object
The number of calls the user shared with others outside the company.
-
#calls_shared_internally ⇒ Object
The number of calls the user shared with others inside the company.
-
#from_date ⇒ Object
The start of the period, or the request filter’s fromDate for the first period in the range, in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
-
#others_calls_listened_to ⇒ Object
The number of other users’ calls the user listened to.
-
#own_calls_listened_to ⇒ Object
The number of the user’s own calls the user listened to.
-
#to_date ⇒ Object
The end of the period, or the request filter’s toDate for the last period in the range, in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AggregateActivityWithDates
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ AggregateActivityWithDates
Initializes the object
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 122 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `GongAPI::AggregateActivityWithDates` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `GongAPI::AggregateActivityWithDates`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'calls_as_host') self.calls_as_host = attributes[:'calls_as_host'] end if attributes.key?(:'calls_attended') self.calls_attended = attributes[:'calls_attended'] end if attributes.key?(:'calls_comments_given') self.calls_comments_given = attributes[:'calls_comments_given'] end if attributes.key?(:'calls_comments_received') self.calls_comments_received = attributes[:'calls_comments_received'] end if attributes.key?(:'calls_gave_feedback') self.calls_gave_feedback = attributes[:'calls_gave_feedback'] end if attributes.key?(:'calls_marked_as_feedback_given') self.calls_marked_as_feedback_given = attributes[:'calls_marked_as_feedback_given'] end if attributes.key?(:'calls_marked_as_feedback_received') self.calls_marked_as_feedback_received = attributes[:'calls_marked_as_feedback_received'] end if attributes.key?(:'calls_received_feedback') self.calls_received_feedback = attributes[:'calls_received_feedback'] end if attributes.key?(:'calls_requested_feedback') self.calls_requested_feedback = attributes[:'calls_requested_feedback'] end if attributes.key?(:'calls_scorecards_filled') self.calls_scorecards_filled = attributes[:'calls_scorecards_filled'] end if attributes.key?(:'calls_scorecards_received') self.calls_scorecards_received = attributes[:'calls_scorecards_received'] end if attributes.key?(:'calls_shared_externally') self.calls_shared_externally = attributes[:'calls_shared_externally'] end if attributes.key?(:'calls_shared_internally') self.calls_shared_internally = attributes[:'calls_shared_internally'] end if attributes.key?(:'from_date') self.from_date = attributes[:'from_date'] end if attributes.key?(:'others_calls_listened_to') self.others_calls_listened_to = attributes[:'others_calls_listened_to'] end if attributes.key?(:'own_calls_listened_to') self.own_calls_listened_to = attributes[:'own_calls_listened_to'] end if attributes.key?(:'to_date') self.to_date = attributes[:'to_date'] end end |
Instance Attribute Details
#calls_as_host ⇒ Object
The number of recorded calls this user hosted.
18 19 20 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 18 def calls_as_host @calls_as_host end |
#calls_attended ⇒ Object
The number of calls in which this user is participant (not host).
21 22 23 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 21 def calls_attended @calls_attended end |
#calls_comments_given ⇒ Object
The number of calls in which a user gave at least one comment.
24 25 26 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 24 def calls_comments_given @calls_comments_given end |
#calls_comments_received ⇒ Object
The number of calls in which a user received at least one comment on the users calls.
27 28 29 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 27 def calls_comments_received @calls_comments_received end |
#calls_gave_feedback ⇒ Object
The number of recorded calls the user gave feedback on.
30 31 32 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 30 def calls_gave_feedback @calls_gave_feedback end |
#calls_marked_as_feedback_given ⇒ Object
The number of calls in which someone pressed the "Mark as reviewed".
33 34 35 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 33 def calls_marked_as_feedback_given @calls_marked_as_feedback_given end |
#calls_marked_as_feedback_received ⇒ Object
The number of calls in which someone pressed the “Mark as reviewed” on the users calls.
36 37 38 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 36 def calls_marked_as_feedback_received @calls_marked_as_feedback_received end |
#calls_received_feedback ⇒ Object
The number of recorded calls the user received feedback on.
39 40 41 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 39 def calls_received_feedback @calls_received_feedback end |
#calls_requested_feedback ⇒ Object
The number of recorded calls the user requested feedback on.
42 43 44 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 42 def calls_requested_feedback @calls_requested_feedback end |
#calls_scorecards_filled ⇒ Object
The number of scorecards the user completed.
45 46 47 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 45 def calls_scorecards_filled @calls_scorecards_filled end |
#calls_scorecards_received ⇒ Object
The number of calls in which someone filled a scorecard on the user’s calls.
48 49 50 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 48 def calls_scorecards_received @calls_scorecards_received end |
#calls_shared_externally ⇒ Object
The number of calls the user shared with others outside the company.
51 52 53 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 51 def calls_shared_externally @calls_shared_externally end |
#calls_shared_internally ⇒ Object
The number of calls the user shared with others inside the company.
54 55 56 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 54 def calls_shared_internally @calls_shared_internally end |
#from_date ⇒ Object
The start of the period, or the request filter’s fromDate for the first period in the range, in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
57 58 59 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 57 def from_date @from_date end |
#others_calls_listened_to ⇒ Object
The number of other users’ calls the user listened to.
60 61 62 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 60 def others_calls_listened_to @others_calls_listened_to end |
#own_calls_listened_to ⇒ Object
The number of the user’s own calls the user listened to.
63 64 65 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 63 def own_calls_listened_to @own_calls_listened_to end |
#to_date ⇒ Object
The end of the period, or the request filter’s toDate for the last period in the range, in the ISO-8601 format (e.g., ‘2018-02-18T02:30:00-07:00’ or ‘2018-02-18T08:00:00Z’, where Z stands for UTC).
66 67 68 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 66 def to_date @to_date end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 69 def self.attribute_map { :'calls_as_host' => :'callsAsHost', :'calls_attended' => :'callsAttended', :'calls_comments_given' => :'callsCommentsGiven', :'calls_comments_received' => :'callsCommentsReceived', :'calls_gave_feedback' => :'callsGaveFeedback', :'calls_marked_as_feedback_given' => :'callsMarkedAsFeedbackGiven', :'calls_marked_as_feedback_received' => :'callsMarkedAsFeedbackReceived', :'calls_received_feedback' => :'callsReceivedFeedback', :'calls_requested_feedback' => :'callsRequestedFeedback', :'calls_scorecards_filled' => :'callsScorecardsFilled', :'calls_scorecards_received' => :'callsScorecardsReceived', :'calls_shared_externally' => :'callsSharedExternally', :'calls_shared_internally' => :'callsSharedInternally', :'from_date' => :'fromDate', :'others_calls_listened_to' => :'othersCallsListenedTo', :'own_calls_listened_to' => :'ownCallsListenedTo', :'to_date' => :'toDate' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
256 257 258 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 256 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
115 116 117 118 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 115 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 92 def self.openapi_types { :'calls_as_host' => :'Object', :'calls_attended' => :'Object', :'calls_comments_given' => :'Object', :'calls_comments_received' => :'Object', :'calls_gave_feedback' => :'Object', :'calls_marked_as_feedback_given' => :'Object', :'calls_marked_as_feedback_received' => :'Object', :'calls_received_feedback' => :'Object', :'calls_requested_feedback' => :'Object', :'calls_scorecards_filled' => :'Object', :'calls_scorecards_received' => :'Object', :'calls_shared_externally' => :'Object', :'calls_shared_internally' => :'Object', :'from_date' => :'Object', :'others_calls_listened_to' => :'Object', :'own_calls_listened_to' => :'Object', :'to_date' => :'Object' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 219 def ==(o) return true if self.equal?(o) self.class == o.class && calls_as_host == o.calls_as_host && calls_attended == o.calls_attended && calls_comments_given == o.calls_comments_given && calls_comments_received == o.calls_comments_received && calls_gave_feedback == o.calls_gave_feedback && calls_marked_as_feedback_given == o.calls_marked_as_feedback_given && calls_marked_as_feedback_received == o.calls_marked_as_feedback_received && calls_received_feedback == o.calls_received_feedback && calls_requested_feedback == o.calls_requested_feedback && calls_scorecards_filled == o.calls_scorecards_filled && calls_scorecards_received == o.calls_scorecards_received && calls_shared_externally == o.calls_shared_externally && calls_shared_internally == o.calls_shared_internally && from_date == o.from_date && others_calls_listened_to == o.others_calls_listened_to && own_calls_listened_to == o.own_calls_listened_to && to_date == o.to_date end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 286 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model GongAPI.const_get(type).build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 355 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 263 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) end end self end |
#eql?(o) ⇒ Boolean
243 244 245 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 243 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
249 250 251 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 249 def hash [calls_as_host, calls_attended, calls_comments_given, calls_comments_received, calls_gave_feedback, calls_marked_as_feedback_given, calls_marked_as_feedback_received, calls_received_feedback, calls_requested_feedback, calls_scorecards_filled, calls_scorecards_received, calls_shared_externally, calls_shared_internally, from_date, others_calls_listened_to, own_calls_listened_to, to_date].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
206 207 208 209 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 206 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
331 332 333 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 331 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 337 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
325 326 327 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 325 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
213 214 215 |
# File 'lib/gong_api/models/aggregate_activity_with_dates.rb', line 213 def valid? true end |