Class: ApolloDeploySignalSdkRails::EmailReadScrollAnalyticsResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: EmailReadScrollAnalyticsResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(email_id:, subject:, computed_at:, read_engaged:, read_time_seconds:, read_category:, mail_client:, device_type:, os:, read_engaged_at:, short_email:, depth25_count:, depth50_count:, depth75_count:, depth100_count:, max_depth_pct:, depth25_rate:, depth50_rate:, depth75_rate:, depth100_rate:) ⇒ EmailReadScrollAnalyticsResponse

Returns a new instance of EmailReadScrollAnalyticsResponse.

Parameters:

  • email_id (String)

    , subject [String], computed_at [String], read_engaged [Boolean], read_time_seconds [Float, nil], read_category [String, nil], mail_client [String, nil], device_type [String, nil], os [String, nil], read_engaged_at [String, nil], short_email [Boolean], depth25_count [Integer], depth50_count [Integer], depth75_count [Integer], depth100_count [Integer], max_depth_pct [Integer, nil], depth25_rate [Float, nil], depth50_rate [Float, nil], depth75_rate [Float, nil], depth100_rate [Float, nil]



1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1119

def initialize(email_id: , subject: , computed_at: , read_engaged: , read_time_seconds: , read_category: , mail_client: , device_type: , os: , read_engaged_at: , short_email: , depth25_count: , depth50_count: , depth75_count: , depth100_count: , max_depth_pct: , depth25_rate: , depth50_rate: , depth75_rate: , depth100_rate: )
  @email_id = email_id
  @subject = subject
  @computed_at = computed_at
  @read_engaged = read_engaged
  @read_time_seconds = read_time_seconds
  @read_category = read_category
  @mail_client = mail_client
  @device_type = device_type
  @os = os
  @read_engaged_at = read_engaged_at
  @short_email = short_email
  @depth25_count = depth25_count
  @depth50_count = depth50_count
  @depth75_count = depth75_count
  @depth100_count = depth100_count
  @max_depth_pct = max_depth_pct
  @depth25_rate = depth25_rate
  @depth50_rate = depth50_rate
  @depth75_rate = depth75_rate
  @depth100_rate = depth100_rate
end

Instance Attribute Details

#computed_atString

Returns:

  • (String)


1082
1083
1084
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1082

def computed_at
  @computed_at
end

#depth100_countInteger

Returns:

  • (Integer)


1106
1107
1108
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1106

def depth100_count
  @depth100_count
end

#depth100_rateFloat?

Returns:

  • (Float, nil)


1116
1117
1118
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1116

def depth100_rate
  @depth100_rate
end

#depth25_countInteger

Returns:

  • (Integer)


1100
1101
1102
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1100

def depth25_count
  @depth25_count
end

#depth25_rateFloat?

Returns:

  • (Float, nil)


1110
1111
1112
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1110

def depth25_rate
  @depth25_rate
end

#depth50_countInteger

Returns:

  • (Integer)


1102
1103
1104
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1102

def depth50_count
  @depth50_count
end

#depth50_rateFloat?

Returns:

  • (Float, nil)


1112
1113
1114
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1112

def depth50_rate
  @depth50_rate
end

#depth75_countInteger

Returns:

  • (Integer)


1104
1105
1106
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1104

def depth75_count
  @depth75_count
end

#depth75_rateFloat?

Returns:

  • (Float, nil)


1114
1115
1116
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1114

def depth75_rate
  @depth75_rate
end

#device_typeString?

Returns:

  • (String, nil)


1092
1093
1094
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1092

def device_type
  @device_type
end

#email_idString

Returns:

  • (String)


1078
1079
1080
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1078

def email_id
  @email_id
end

#mail_clientString?

Returns:

  • (String, nil)


1090
1091
1092
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1090

def mail_client
  @mail_client
end

#max_depth_pctInteger?

Returns:

  • (Integer, nil)


1108
1109
1110
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1108

def max_depth_pct
  @max_depth_pct
end

#osString?

Returns:

  • (String, nil)


1094
1095
1096
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1094

def os
  @os
end

#read_categoryString?

Returns:

  • (String, nil)


1088
1089
1090
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1088

def read_category
  @read_category
end

#read_engagedBoolean

Returns:

  • (Boolean)


1084
1085
1086
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1084

def read_engaged
  @read_engaged
end

#read_engaged_atString?

Returns:

  • (String, nil)


1096
1097
1098
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1096

def read_engaged_at
  @read_engaged_at
end

#read_time_secondsFloat?

Returns:

  • (Float, nil)


1086
1087
1088
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1086

def read_time_seconds
  @read_time_seconds
end

#short_emailBoolean

Returns:

  • (Boolean)


1098
1099
1100
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1098

def short_email
  @short_email
end

#subjectString

Returns:

  • (String)


1080
1081
1082
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1080

def subject
  @subject
end

Class Method Details

.from_json(attributes) ⇒ EmailReadScrollAnalyticsResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1171

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    email_id: attributes.key?("emailId") ? attributes["emailId"] : attributes[:email_id],
    subject: attributes.key?("subject") ? attributes["subject"] : attributes[:subject],
    computed_at: attributes.key?("computedAt") ? attributes["computedAt"] : attributes[:computed_at],
    read_engaged: attributes.key?("readEngaged") ? attributes["readEngaged"] : attributes[:read_engaged],
    read_time_seconds: attributes.key?("readTimeSeconds") ? attributes["readTimeSeconds"] : attributes[:read_time_seconds],
    read_category: attributes.key?("readCategory") ? attributes["readCategory"] : attributes[:read_category],
    mail_client: attributes.key?("mailClient") ? attributes["mailClient"] : attributes[:mail_client],
    device_type: attributes.key?("deviceType") ? attributes["deviceType"] : attributes[:device_type],
    os: attributes.key?("os") ? attributes["os"] : attributes[:os],
    read_engaged_at: attributes.key?("readEngagedAt") ? attributes["readEngagedAt"] : attributes[:read_engaged_at],
    short_email: attributes.key?("shortEmail") ? attributes["shortEmail"] : attributes[:short_email],
    depth25_count: attributes.key?("depth25Count") ? attributes["depth25Count"] : attributes[:depth25_count],
    depth50_count: attributes.key?("depth50Count") ? attributes["depth50Count"] : attributes[:depth50_count],
    depth75_count: attributes.key?("depth75Count") ? attributes["depth75Count"] : attributes[:depth75_count],
    depth100_count: attributes.key?("depth100Count") ? attributes["depth100Count"] : attributes[:depth100_count],
    max_depth_pct: attributes.key?("maxDepthPct") ? attributes["maxDepthPct"] : attributes[:max_depth_pct],
    depth25_rate: attributes.key?("depth25Rate") ? attributes["depth25Rate"] : attributes[:depth25_rate],
    depth50_rate: attributes.key?("depth50Rate") ? attributes["depth50Rate"] : attributes[:depth50_rate],
    depth75_rate: attributes.key?("depth75Rate") ? attributes["depth75Rate"] : attributes[:depth75_rate],
    depth100_rate: attributes.key?("depth100Rate") ? attributes["depth100Rate"] : attributes[:depth100_rate],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1143

def to_h
  {
    email_id: @email_id,
    subject: @subject,
    computed_at: @computed_at,
    read_engaged: @read_engaged,
    read_time_seconds: @read_time_seconds,
    read_category: @read_category,
    mail_client: @mail_client,
    device_type: @device_type,
    os: @os,
    read_engaged_at: @read_engaged_at,
    short_email: @short_email,
    depth25_count: @depth25_count,
    depth50_count: @depth50_count,
    depth75_count: @depth75_count,
    depth100_count: @depth100_count,
    max_depth_pct: @max_depth_pct,
    depth25_rate: @depth25_rate,
    depth50_rate: @depth50_rate,
    depth75_rate: @depth75_rate,
    depth100_rate: @depth100_rate,
  }.compact
end