Class: Pingram::ListBroadcastRecipientsResponseRecipientsInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Pingram::ListBroadcastRecipientsResponseRecipientsInner
- Defined in:
- lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb
Instance Attribute Summary collapse
-
#bounce_type ⇒ Object
Returns the value of attribute bounce_type.
-
#bounced_at ⇒ Object
Returns the value of attribute bounced_at.
-
#clicked_at ⇒ Object
Returns the value of attribute clicked_at.
-
#complained_at ⇒ Object
Returns the value of attribute complained_at.
-
#delivered_at ⇒ Object
Returns the value of attribute delivered_at.
-
#email ⇒ Object
Returns the value of attribute email.
-
#fail_reason ⇒ Object
Returns the value of attribute fail_reason.
-
#failed_at ⇒ Object
Returns the value of attribute failed_at.
-
#opened_at ⇒ Object
Returns the value of attribute opened_at.
-
#sent_at ⇒ Object
Returns the value of attribute sent_at.
-
#skip_reason ⇒ Object
Returns the value of attribute skip_reason.
-
#skipped_at ⇒ Object
Returns the value of attribute skipped_at.
-
#tracking_id ⇒ Object
Returns the value of attribute tracking_id.
-
#unsubscribed_at ⇒ Object
Returns the value of attribute unsubscribed_at.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.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.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ListBroadcastRecipientsResponseRecipientsInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ListBroadcastRecipientsResponseRecipientsInner
Initializes the object
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 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 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 108 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListBroadcastRecipientsResponseRecipientsInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListBroadcastRecipientsResponseRecipientsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'tracking_id') self.tracking_id = attributes[:'tracking_id'] else self.tracking_id = nil end if attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] else self.user_id = nil end if attributes.key?(:'email') self.email = attributes[:'email'] else self.email = nil end if attributes.key?(:'sent_at') self.sent_at = attributes[:'sent_at'] end if attributes.key?(:'delivered_at') self.delivered_at = attributes[:'delivered_at'] end if attributes.key?(:'opened_at') self.opened_at = attributes[:'opened_at'] end if attributes.key?(:'clicked_at') self.clicked_at = attributes[:'clicked_at'] end if attributes.key?(:'bounced_at') self.bounced_at = attributes[:'bounced_at'] end if attributes.key?(:'bounce_type') self.bounce_type = attributes[:'bounce_type'] end if attributes.key?(:'complained_at') self.complained_at = attributes[:'complained_at'] end if attributes.key?(:'unsubscribed_at') self.unsubscribed_at = attributes[:'unsubscribed_at'] end if attributes.key?(:'skipped_at') self.skipped_at = attributes[:'skipped_at'] end if attributes.key?(:'skip_reason') self.skip_reason = attributes[:'skip_reason'] end if attributes.key?(:'failed_at') self.failed_at = attributes[:'failed_at'] end if attributes.key?(:'fail_reason') self.fail_reason = attributes[:'fail_reason'] end end |
Instance Attribute Details
#bounce_type ⇒ Object
Returns the value of attribute bounce_type.
34 35 36 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 34 def bounce_type @bounce_type end |
#bounced_at ⇒ Object
Returns the value of attribute bounced_at.
32 33 34 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 32 def bounced_at @bounced_at end |
#clicked_at ⇒ Object
Returns the value of attribute clicked_at.
30 31 32 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 30 def clicked_at @clicked_at end |
#complained_at ⇒ Object
Returns the value of attribute complained_at.
36 37 38 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 36 def complained_at @complained_at end |
#delivered_at ⇒ Object
Returns the value of attribute delivered_at.
26 27 28 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 26 def delivered_at @delivered_at end |
#email ⇒ Object
Returns the value of attribute email.
22 23 24 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 22 def email @email end |
#fail_reason ⇒ Object
Returns the value of attribute fail_reason.
46 47 48 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 46 def fail_reason @fail_reason end |
#failed_at ⇒ Object
Returns the value of attribute failed_at.
44 45 46 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 44 def failed_at @failed_at end |
#opened_at ⇒ Object
Returns the value of attribute opened_at.
28 29 30 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 28 def opened_at @opened_at end |
#sent_at ⇒ Object
Returns the value of attribute sent_at.
24 25 26 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 24 def sent_at @sent_at end |
#skip_reason ⇒ Object
Returns the value of attribute skip_reason.
42 43 44 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 42 def skip_reason @skip_reason end |
#skipped_at ⇒ Object
Returns the value of attribute skipped_at.
40 41 42 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 40 def skipped_at @skipped_at end |
#tracking_id ⇒ Object
Returns the value of attribute tracking_id.
18 19 20 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 18 def tracking_id @tracking_id end |
#unsubscribed_at ⇒ Object
Returns the value of attribute unsubscribed_at.
38 39 40 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 38 def unsubscribed_at @unsubscribed_at end |
#user_id ⇒ Object
Returns the value of attribute user_id.
20 21 22 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 20 def user_id @user_id end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
70 71 72 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 70 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
75 76 77 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 75 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 49 def self.attribute_map { :'tracking_id' => :'trackingId', :'user_id' => :'userId', :'email' => :'email', :'sent_at' => :'sentAt', :'delivered_at' => :'deliveredAt', :'opened_at' => :'openedAt', :'clicked_at' => :'clickedAt', :'bounced_at' => :'bouncedAt', :'bounce_type' => :'bounceType', :'complained_at' => :'complainedAt', :'unsubscribed_at' => :'unsubscribedAt', :'skipped_at' => :'skippedAt', :'skip_reason' => :'skipReason', :'failed_at' => :'failedAt', :'fail_reason' => :'failReason' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 286 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif 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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
101 102 103 104 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 101 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 80 def self.openapi_types { :'tracking_id' => :'String', :'user_id' => :'String', :'email' => :'String', :'sent_at' => :'String', :'delivered_at' => :'String', :'opened_at' => :'String', :'clicked_at' => :'String', :'bounced_at' => :'String', :'bounce_type' => :'String', :'complained_at' => :'String', :'unsubscribed_at' => :'String', :'skipped_at' => :'String', :'skip_reason' => :'String', :'failed_at' => :'String', :'fail_reason' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 251 def ==(o) return true if self.equal?(o) self.class == o.class && tracking_id == o.tracking_id && user_id == o.user_id && email == o.email && sent_at == o.sent_at && delivered_at == o.delivered_at && opened_at == o.opened_at && clicked_at == o.clicked_at && bounced_at == o.bounced_at && bounce_type == o.bounce_type && complained_at == o.complained_at && unsubscribed_at == o.unsubscribed_at && skipped_at == o.skipped_at && skip_reason == o.skip_reason && failed_at == o.failed_at && fail_reason == o.fail_reason end |
#eql?(o) ⇒ Boolean
273 274 275 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 273 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
279 280 281 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 279 def hash [tracking_id, user_id, email, sent_at, delivered_at, opened_at, clicked_at, bounced_at, bounce_type, complained_at, unsubscribed_at, skipped_at, skip_reason, failed_at, fail_reason].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 191 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @tracking_id.nil? invalid_properties.push('invalid value for "tracking_id", tracking_id cannot be nil.') end if @user_id.nil? invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') end if @email.nil? invalid_properties.push('invalid value for "email", email cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 308 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 |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
211 212 213 214 215 216 217 |
# File 'lib/pingram/models/list_broadcast_recipients_response_recipients_inner.rb', line 211 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @tracking_id.nil? return false if @user_id.nil? return false if @email.nil? true end |