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.
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 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 |
# File 'lib/purecloud/models/twitter_expression.rb', line 161 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
11 12 13 |
# File 'lib/purecloud/models/twitter_expression.rb', line 11 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
14 15 16 |
# File 'lib/purecloud/models/twitter_expression.rb', line 14 def date_modified @date_modified end |
#gistener ⇒ Object
The Gistener that generated this expression
23 24 25 |
# File 'lib/purecloud/models/twitter_expression.rb', line 23 def gistener @gistener end |
#group_tags ⇒ Object
The Group Tags applied by the generating Gistener
68 69 70 |
# File 'lib/purecloud/models/twitter_expression.rb', line 68 def @group_tags end |
#id ⇒ Object
The globally unique identifier for the object.
6 7 8 |
# File 'lib/purecloud/models/twitter_expression.rb', line 6 def id @id end |
#is_dispositioned ⇒ Object
True once the expression has been dispositioned by an agent through the ACD process
17 18 19 |
# File 'lib/purecloud/models/twitter_expression.rb', line 17 def is_dispositioned @is_dispositioned end |
#is_noise ⇒ Object
Indicates if a user/agent found this expression to be undesirable
20 21 22 |
# File 'lib/purecloud/models/twitter_expression.rb', line 20 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)
47 48 49 |
# File 'lib/purecloud/models/twitter_expression.rb', line 47 def is_quoted_tweet @is_quoted_tweet end |
#is_reply ⇒ Object
Twitter: indicates this tweet as a reply to another tweet
35 36 37 |
# File 'lib/purecloud/models/twitter_expression.rb', line 35 def is_reply @is_reply end |
#is_retweet ⇒ Object
Twitter: indicates this tweet as a ‘retweet’ of another tweet
38 39 40 |
# File 'lib/purecloud/models/twitter_expression.rb', line 38 def is_retweet @is_retweet end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/purecloud/models/twitter_expression.rb', line 8 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)
50 51 52 |
# File 'lib/purecloud/models/twitter_expression.rb', line 50 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
44 45 46 |
# File 'lib/purecloud/models/twitter_expression.rb', line 44 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
41 42 43 |
# File 'lib/purecloud/models/twitter_expression.rb', line 41 def retweet_parent_id @retweet_parent_id end |
#routed ⇒ Object
Returns the value of attribute routed.
70 71 72 |
# File 'lib/purecloud/models/twitter_expression.rb', line 70 def routed @routed end |
#self_uri ⇒ Object
The URI for this object
73 74 75 |
# File 'lib/purecloud/models/twitter_expression.rb', line 73 def self_uri @self_uri end |
#text ⇒ Object
Twitter: the tweets full text
29 30 31 |
# File 'lib/purecloud/models/twitter_expression.rb', line 29 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
32 33 34 |
# File 'lib/purecloud/models/twitter_expression.rb', line 32 def tweet_created @tweet_created end |
#tweet_id ⇒ Object
Twitter: the tweet’s unique id
26 27 28 |
# File 'lib/purecloud/models/twitter_expression.rb', line 26 def tweet_id @tweet_id end |
#user_followers_count ⇒ Object
Twitter: the number of followers this user has at the time of this expression
65 66 67 |
# File 'lib/purecloud/models/twitter_expression.rb', line 65 def user_followers_count @user_followers_count end |
#user_id ⇒ Object
Twitter: the expressing user’s Twitter id
53 54 55 |
# File 'lib/purecloud/models/twitter_expression.rb', line 53 def user_id @user_id end |
#user_name ⇒ Object
Twitter: the user’s account name for the core service
56 57 58 |
# File 'lib/purecloud/models/twitter_expression.rb', line 56 def user_name @user_name end |
#user_screen_name ⇒ Object
Twitter: the user’s custom ‘branding’ name (allowed to change over time)
59 60 61 |
# File 'lib/purecloud/models/twitter_expression.rb', line 59 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)
62 63 64 |
# File 'lib/purecloud/models/twitter_expression.rb', line 62 def user_tweet_count @user_tweet_count end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 |
# File 'lib/purecloud/models/twitter_expression.rb', line 76 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.
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 |
# File 'lib/purecloud/models/twitter_expression.rb', line 131 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.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/purecloud/models/twitter_expression.rb', line 281 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
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/purecloud/models/twitter_expression.rb', line 340 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 =~ /^(true|t|yes|y|1)$/i true else false end 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
397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/purecloud/models/twitter_expression.rb', line 397 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
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/purecloud/models/twitter_expression.rb', line 321 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
311 312 313 |
# File 'lib/purecloud/models/twitter_expression.rb', line 311 def eql?(o) self == o end |
#hash ⇒ Object
Calculate hash code according to all attributes.
316 317 318 |
# File 'lib/purecloud/models/twitter_expression.rb', line 316 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))
380 381 382 |
# File 'lib/purecloud/models/twitter_expression.rb', line 380 def to_body to_hash end |
#to_hash ⇒ Object
return the object in the form of hash
385 386 387 388 389 390 391 392 393 |
# File 'lib/purecloud/models/twitter_expression.rb', line 385 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
375 376 377 |
# File 'lib/purecloud/models/twitter_expression.rb', line 375 def to_s to_hash.to_s end |