Class: PureCloud::TwitterExpression
- Inherits:
-
Object
- Object
- PureCloud::TwitterExpression
- Defined in:
- lib/purecloud/models/twitter_expression.rb
Instance Attribute Summary collapse
-
#date_created ⇒ Object
Creation date for the entity.
-
#date_modified ⇒ Object
Date the entity was last modified.
-
#gistener ⇒ Object
The Gistener that generated this expression.
-
#group_tags ⇒ Object
The Group Tags applied by the generating Gistener.
-
#id ⇒ Object
The globally unique identifier for the object.
-
#is_dispositioned ⇒ Object
True once the expression has been dispositioned by an agent through the ACD process.
-
#is_noise ⇒ Object
Indicates if a user/agent found this expression to be undesirable.
-
#is_quoted_tweet ⇒ Object
Twitter: indicates this expression as a quoted tweet (a tweet with an addendum as the primary text).
-
#is_reply ⇒ Object
Twitter: indicates this tweet as a reply to another tweet.
-
#is_retweet ⇒ Object
Twitter: indicates this tweet as a ‘retweet’ of another tweet.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quoted_parent_id ⇒ Object
Twitter: when the expression is a quoted tweet, this is Twitter’s id of the original tweet (may not be immediately functional).
-
#retweet_count ⇒ Object
Twitter: the number of times the parent tweet was retweeted - at the time this expression was created.
-
#retweet_parent_id ⇒ Object
Twitter: when the expression is a retweet, this is Twitter’s id of the original tweet.
-
#routed ⇒ Object
Returns the value of attribute routed.
-
#self_uri ⇒ Object
The URI for this object.
-
#text ⇒ Object
Twitter: the tweets full text.
-
#tweet_created ⇒ Object
Twitter: the date the tweet was created.
-
#tweet_id ⇒ Object
Twitter: the tweet’s unique id.
-
#user_followers_count ⇒ Object
Twitter: the number of followers this user has at the time of this expression.
-
#user_id ⇒ Object
Twitter: the expressing user’s Twitter id.
-
#user_name ⇒ Object
Twitter: the user’s account name for the core service.
-
#user_screen_name ⇒ Object
Twitter: the user’s custom ‘branding’ name (allowed to change over time).
-
#user_tweet_count ⇒ Object
Twitter: the number of times this user has tweeted (includes all forms of expression replies/quotes/retweets).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Check equality by comparing each attribute.
- #_deserialize(type, value) ⇒ Object
-
#_to_hash(value) ⇒ Object
Method to output non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
build the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Object
Calculate hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TwitterExpression
constructor
A new instance of TwitterExpression.
-
#to_body ⇒ Object
to_body is an alias to to_body (backward compatibility)).
-
#to_hash ⇒ Object
return the object in the form of hash.
- #to_s ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ TwitterExpression
Returns a new instance of TwitterExpression.
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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/purecloud/models/twitter_expression.rb', line 177 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'dateCreated'] self.date_created = attributes[:'dateCreated'] end if attributes[:'dateModified'] self.date_modified = attributes[:'dateModified'] end if attributes[:'isDispositioned'] self.is_dispositioned = attributes[:'isDispositioned'] else self.is_dispositioned = false end if attributes[:'isNoise'] self.is_noise = attributes[:'isNoise'] else self.is_noise = false end if attributes[:'gistener'] self.gistener = attributes[:'gistener'] end if attributes[:'tweetId'] self.tweet_id = attributes[:'tweetId'] end if attributes[:'text'] self.text = attributes[:'text'] end if attributes[:'tweetCreated'] self.tweet_created = attributes[:'tweetCreated'] end if attributes[:'isReply'] self.is_reply = attributes[:'isReply'] else self.is_reply = false end if attributes[:'isRetweet'] self.is_retweet = attributes[:'isRetweet'] else self.is_retweet = false end if attributes[:'retweetParentId'] self.retweet_parent_id = attributes[:'retweetParentId'] end if attributes[:'retweetCount'] self.retweet_count = attributes[:'retweetCount'] end if attributes[:'isQuotedTweet'] self.is_quoted_tweet = attributes[:'isQuotedTweet'] else self.is_quoted_tweet = false end if attributes[:'quotedParentId'] self.quoted_parent_id = attributes[:'quotedParentId'] end if attributes[:'userId'] self.user_id = attributes[:'userId'] end if attributes[:'userName'] self.user_name = attributes[:'userName'] end if attributes[:'userScreenName'] self.user_screen_name = attributes[:'userScreenName'] end if attributes[:'userTweetCount'] self.user_tweet_count = attributes[:'userTweetCount'] end if attributes[:'userFollowersCount'] self.user_followers_count = attributes[:'userFollowersCount'] end if attributes[:'groupTags'] if (value = attributes[:'groupTags']).is_a?(Array) self. = value end end if attributes[:'routed'] self.routed = attributes[:'routed'] else self.routed = false end if attributes[:'selfUri'] self.self_uri = attributes[:'selfUri'] end end |
Instance Attribute Details
#date_created ⇒ Object
Creation date for the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
27 28 29 |
# File 'lib/purecloud/models/twitter_expression.rb', line 27 def date_created @date_created end |
#date_modified ⇒ Object
Date the entity was last modified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
30 31 32 |
# File 'lib/purecloud/models/twitter_expression.rb', line 30 def date_modified @date_modified end |
#gistener ⇒ Object
The Gistener that generated this expression
39 40 41 |
# File 'lib/purecloud/models/twitter_expression.rb', line 39 def gistener @gistener end |
#group_tags ⇒ Object
The Group Tags applied by the generating Gistener
84 85 86 |
# File 'lib/purecloud/models/twitter_expression.rb', line 84 def @group_tags end |
#id ⇒ Object
The globally unique identifier for the object.
22 23 24 |
# File 'lib/purecloud/models/twitter_expression.rb', line 22 def id @id end |
#is_dispositioned ⇒ Object
True once the expression has been dispositioned by an agent through the ACD process
33 34 35 |
# File 'lib/purecloud/models/twitter_expression.rb', line 33 def is_dispositioned @is_dispositioned end |
#is_noise ⇒ Object
Indicates if a user/agent found this expression to be undesirable
36 37 38 |
# File 'lib/purecloud/models/twitter_expression.rb', line 36 def is_noise @is_noise end |
#is_quoted_tweet ⇒ Object
Twitter: indicates this expression as a quoted tweet (a tweet with an addendum as the primary text)
63 64 65 |
# File 'lib/purecloud/models/twitter_expression.rb', line 63 def is_quoted_tweet @is_quoted_tweet end |
#is_reply ⇒ Object
Twitter: indicates this tweet as a reply to another tweet
51 52 53 |
# File 'lib/purecloud/models/twitter_expression.rb', line 51 def is_reply @is_reply end |
#is_retweet ⇒ Object
Twitter: indicates this tweet as a ‘retweet’ of another tweet
54 55 56 |
# File 'lib/purecloud/models/twitter_expression.rb', line 54 def is_retweet @is_retweet end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/purecloud/models/twitter_expression.rb', line 24 def name @name end |
#quoted_parent_id ⇒ Object
Twitter: when the expression is a quoted tweet, this is Twitter’s id of the original tweet (may not be immediately functional)
66 67 68 |
# File 'lib/purecloud/models/twitter_expression.rb', line 66 def quoted_parent_id @quoted_parent_id end |
#retweet_count ⇒ Object
Twitter: the number of times the parent tweet was retweeted - at the time this expression was created
60 61 62 |
# File 'lib/purecloud/models/twitter_expression.rb', line 60 def retweet_count @retweet_count end |
#retweet_parent_id ⇒ Object
Twitter: when the expression is a retweet, this is Twitter’s id of the original tweet
57 58 59 |
# File 'lib/purecloud/models/twitter_expression.rb', line 57 def retweet_parent_id @retweet_parent_id end |
#routed ⇒ Object
Returns the value of attribute routed.
86 87 88 |
# File 'lib/purecloud/models/twitter_expression.rb', line 86 def routed @routed end |
#self_uri ⇒ Object
The URI for this object
89 90 91 |
# File 'lib/purecloud/models/twitter_expression.rb', line 89 def self_uri @self_uri end |
#text ⇒ Object
Twitter: the tweets full text
45 46 47 |
# File 'lib/purecloud/models/twitter_expression.rb', line 45 def text @text end |
#tweet_created ⇒ Object
Twitter: the date the tweet was created. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
48 49 50 |
# File 'lib/purecloud/models/twitter_expression.rb', line 48 def tweet_created @tweet_created end |
#tweet_id ⇒ Object
Twitter: the tweet’s unique id
42 43 44 |
# File 'lib/purecloud/models/twitter_expression.rb', line 42 def tweet_id @tweet_id end |
#user_followers_count ⇒ Object
Twitter: the number of followers this user has at the time of this expression
81 82 83 |
# File 'lib/purecloud/models/twitter_expression.rb', line 81 def user_followers_count @user_followers_count end |
#user_id ⇒ Object
Twitter: the expressing user’s Twitter id
69 70 71 |
# File 'lib/purecloud/models/twitter_expression.rb', line 69 def user_id @user_id end |
#user_name ⇒ Object
Twitter: the user’s account name for the core service
72 73 74 |
# File 'lib/purecloud/models/twitter_expression.rb', line 72 def user_name @user_name end |
#user_screen_name ⇒ Object
Twitter: the user’s custom ‘branding’ name (allowed to change over time)
75 76 77 |
# File 'lib/purecloud/models/twitter_expression.rb', line 75 def user_screen_name @user_screen_name end |
#user_tweet_count ⇒ Object
Twitter: the number of times this user has tweeted (includes all forms of expression replies/quotes/retweets)
78 79 80 |
# File 'lib/purecloud/models/twitter_expression.rb', line 78 def user_tweet_count @user_tweet_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/purecloud/models/twitter_expression.rb', line 92 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'date_created' => :'dateCreated', :'date_modified' => :'dateModified', :'is_dispositioned' => :'isDispositioned', :'is_noise' => :'isNoise', :'gistener' => :'gistener', :'tweet_id' => :'tweetId', :'text' => :'text', :'tweet_created' => :'tweetCreated', :'is_reply' => :'isReply', :'is_retweet' => :'isRetweet', :'retweet_parent_id' => :'retweetParentId', :'retweet_count' => :'retweetCount', :'is_quoted_tweet' => :'isQuotedTweet', :'quoted_parent_id' => :'quotedParentId', :'user_id' => :'userId', :'user_name' => :'userName', :'user_screen_name' => :'userScreenName', :'user_tweet_count' => :'userTweetCount', :'user_followers_count' => :'userFollowersCount', :'group_tags' => :'groupTags', :'routed' => :'routed', :'self_uri' => :'selfUri' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/purecloud/models/twitter_expression.rb', line 147 def self.swagger_types { :'id' => :'String', :'name' => :'String', :'date_created' => :'DateTime', :'date_modified' => :'DateTime', :'is_dispositioned' => :'BOOLEAN', :'is_noise' => :'BOOLEAN', :'gistener' => :'Gistener', :'tweet_id' => :'String', :'text' => :'String', :'tweet_created' => :'DateTime', :'is_reply' => :'BOOLEAN', :'is_retweet' => :'BOOLEAN', :'retweet_parent_id' => :'String', :'retweet_count' => :'Integer', :'is_quoted_tweet' => :'BOOLEAN', :'quoted_parent_id' => :'String', :'user_id' => :'String', :'user_name' => :'String', :'user_screen_name' => :'String', :'user_tweet_count' => :'Integer', :'user_followers_count' => :'Integer', :'group_tags' => :'Array<GroupTag>', :'routed' => :'BOOLEAN', :'self_uri' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Check equality by comparing each attribute.
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 322 323 324 |
# File 'lib/purecloud/models/twitter_expression.rb', line 297 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && date_created == o.date_created && date_modified == o.date_modified && is_dispositioned == o.is_dispositioned && is_noise == o.is_noise && gistener == o.gistener && tweet_id == o.tweet_id && text == o.text && tweet_created == o.tweet_created && is_reply == o.is_reply && is_retweet == o.is_retweet && retweet_parent_id == o.retweet_parent_id && retweet_count == o.retweet_count && is_quoted_tweet == o.is_quoted_tweet && quoted_parent_id == o.quoted_parent_id && user_id == o.user_id && user_name == o.user_name && user_screen_name == o.user_screen_name && user_tweet_count == o.user_tweet_count && user_followers_count == o.user_followers_count && == o. && routed == o.routed && self_uri == o.self_uri end |
#_deserialize(type, value) ⇒ Object
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/purecloud/models/twitter_expression.rb', line 356 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 =~ /^(true|t|yes|y|1)$/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 _model = Object.const_get("PureCloud").const_get(type).new _model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Object
Method to output non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/purecloud/models/twitter_expression.rb', line 416 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
build the object from hash
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'lib/purecloud/models/twitter_expression.rb', line 337 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) else #TODO show warning in debug mode end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) else # data not found in attributes(hash), not an issue as the data can be optional end end self end |
#eql?(o) ⇒ Boolean
327 328 329 |
# File 'lib/purecloud/models/twitter_expression.rb', line 327 def eql?(o) self == o end |
#hash ⇒ Object
Calculate hash code according to all attributes.
332 333 334 |
# File 'lib/purecloud/models/twitter_expression.rb', line 332 def hash [id, name, date_created, date_modified, is_dispositioned, is_noise, gistener, tweet_id, text, tweet_created, is_reply, is_retweet, retweet_parent_id, retweet_count, is_quoted_tweet, quoted_parent_id, user_id, user_name, user_screen_name, user_tweet_count, user_followers_count, , routed, self_uri].hash end |
#to_body ⇒ Object
to_body is an alias to to_body (backward compatibility))
399 400 401 |
# File 'lib/purecloud/models/twitter_expression.rb', line 399 def to_body to_hash end |
#to_hash ⇒ Object
return the object in the form of hash
404 405 406 407 408 409 410 411 412 |
# File 'lib/purecloud/models/twitter_expression.rb', line 404 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ Object
394 395 396 |
# File 'lib/purecloud/models/twitter_expression.rb', line 394 def to_s to_hash.to_s end |