Class: ConstantContactClient::GetEmailCampaignActivitySendHistory200ResponseInner
- Inherits:
-
Object
- Object
- ConstantContactClient::GetEmailCampaignActivitySendHistory200ResponseInner
- Defined in:
- lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb
Instance Attribute Summary collapse
-
#contact_list_ids ⇒ Object
The contacts lists that Constant Contact sent email campaign activity to as an array of contact
list_id
strings. -
#count ⇒ Object
The number of contacts that Constant Contact sent this email campaign activity to.
-
#reason_code ⇒ Object
The reason why the send attempt completed or encountered an error.
-
#run_date ⇒ Object
The system generated date and time that Constant Contact sent the email campaign activity to contacts in ISO-8601 format.
-
#segment_ids ⇒ Object
The contact segments that Constant Contact sent the email campaign activity to as an array of
segment_id
integers. -
#send_id ⇒ Object
Uniquely identifies each send history object using the number of times that you sent the email campaign activity as a sequence starting at
1
. -
#send_status ⇒ Object
The send status for the email campaign activity.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ GetEmailCampaignActivitySendHistory200ResponseInner
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 = {}) ⇒ GetEmailCampaignActivitySendHistory200ResponseInner
Initializes the object
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 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 78 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `ConstantContactClient::GetEmailCampaignActivitySendHistory200ResponseInner` 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 `ConstantContactClient::GetEmailCampaignActivitySendHistory200ResponseInner`. 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?(:'send_id') self.send_id = attributes[:'send_id'] end if attributes.key?(:'contact_list_ids') if (value = attributes[:'contact_list_ids']).is_a?(Array) self.contact_list_ids = value end end if attributes.key?(:'segment_ids') if (value = attributes[:'segment_ids']).is_a?(Array) self.segment_ids = value end end if attributes.key?(:'count') self.count = attributes[:'count'] end if attributes.key?(:'run_date') self.run_date = attributes[:'run_date'] end if attributes.key?(:'send_status') self.send_status = attributes[:'send_status'] end if attributes.key?(:'reason_code') self.reason_code = attributes[:'reason_code'] end end |
Instance Attribute Details
#contact_list_ids ⇒ Object
The contacts lists that Constant Contact sent email campaign activity to as an array of contact list_id
strings.
22 23 24 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 22 def contact_list_ids @contact_list_ids end |
#count ⇒ Object
The number of contacts that Constant Contact sent this email campaign activity to. This property is specific to each send history object. When you resend an email campaign activity, Constant Contact only sends it to new contacts in the contact lists or segments you are using.
28 29 30 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 28 def count @count end |
#reason_code ⇒ Object
The reason why the send attempt completed or encountered an error. This method returns 0
if Constant Contact successfully sent the email campaign activity to contacts. Possible reason_code
values are: <ul> <li>0 — Constant Contact successfully sent the email to contacts.</li> <li>1 — An error occurred when sending this email. Try scheduling it again, or contact <a href=‘support.constantcontact.com’ target=‘_blank’>Customer Support</a>.</li> <li>2 — We were unable to send the email. Please contact our <a href=‘knowledgebase.constantcontact.com/articles/KnowledgeBase/5782-contact-an-account-review-and-deliverability-specialist’ target=‘_blank’>Account Review Team</a> for more information.</li> <li>3 — This Constant Contact account cannot currently send emails. This can be due to billing or product expiration.</li> <li>4 — You’re not able to send the email to that many contacts. Remove contacts from the contact lists you are using or select a list with fewer contacts.</li> <li>5 — The email is currently in staging. For more information, see the <a href=‘knowledgebase.constantcontact.com/articles/KnowledgeBase/7402-email-staging’ target=‘_blank>Email Staging Knowledge Base article</a>.</li> <li>6 — Constant Contact was unable to finish sending this email to all of the contacts on your list. Please contact <a href=’support.constantcontact.com’ target=‘_blank’>Customer Support</a> for more information.</li> <li>7 — The email contains invalid images. This can be caused when one or more images in the email are longer available in your image library.</li> <li>8 — The email contains a link URL that exceeds 1005 characters.</li> <li>9 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href=‘support.constantcontact.com’ target=‘_blank’>Customer Support</a> for more information.</li> <li>10 — Constant Contact was unable to verify your authenticated Sender address. Please contact <a href=‘support.constantcontact.com’ target=‘_blank’>Customer Support</a> for more information.</li> <li>11 — This Constant Contact account cannot send survey invitations.</li> <li>12 — Constant Contact attempted to send the email, but there were no eligible contacts to send it to. This can be caused by an invalid contact list, a contact list with no contacts, or a contact list with no new contacts during a resend. This method displays reason_code
12 as a send attempt with a send_status
of COMPLETED and a count
of 0.</li> </ul>
37 38 39 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 37 def reason_code @reason_code end |
#run_date ⇒ Object
The system generated date and time that Constant Contact sent the email campaign activity to contacts in ISO-8601 format.
31 32 33 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 31 def run_date @run_date end |
#segment_ids ⇒ Object
The contact segments that Constant Contact sent the email campaign activity to as an array of segment_id
integers.
25 26 27 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 25 def segment_ids @segment_ids end |
#send_id ⇒ Object
Uniquely identifies each send history object using the number of times that you sent the email campaign activity as a sequence starting at 1
. For example, when you send a specific email campaign activity twice this method returns an object with a send_id
of 1 for the first send and an object with a send_id
of 2 for the second send.
19 20 21 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 19 def send_id @send_id end |
#send_status ⇒ Object
The send status for the email campaign activity. Valid values are: <ul> <li>COMPLETED
: Constant Contact successfully sent the email campaign activity.</li> <li>ERRORED
: Constant Contact encountered an error when sending the email campaign activity.<li> </ul>
34 35 36 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 34 def send_status @send_status end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 211 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = ConstantContactClient.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
53 54 55 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 53 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 40 def self.attribute_map { :'send_id' => :'send_id', :'contact_list_ids' => :'contact_list_ids', :'segment_ids' => :'segment_ids', :'count' => :'count', :'run_date' => :'run_date', :'send_status' => :'send_status', :'reason_code' => :'reason_code' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 187 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
71 72 73 74 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 71 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 58 def self.openapi_types { :'send_id' => :'Integer', :'contact_list_ids' => :'Array<String>', :'segment_ids' => :'Array<Integer>', :'count' => :'Integer', :'run_date' => :'Time', :'send_status' => :'String', :'reason_code' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 160 def ==(o) return true if self.equal?(o) self.class == o.class && send_id == o.send_id && contact_list_ids == o.contact_list_ids && segment_ids == o.segment_ids && count == o.count && run_date == o.run_date && send_status == o.send_status && reason_code == o.reason_code end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 282 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 |
#eql?(o) ⇒ Boolean
174 175 176 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 174 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
180 181 182 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 180 def hash [send_id, contact_list_ids, segment_ids, count, run_date, send_status, reason_code].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
126 127 128 129 130 131 132 133 134 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 126 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@send_id.nil? && @send_id < 1 invalid_properties.push('invalid value for "send_id", must be greater than or equal to 1.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
258 259 260 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 258 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 264 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
252 253 254 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 252 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
138 139 140 141 142 |
# File 'lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb', line 138 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@send_id.nil? && @send_id < 1 true end |