Class: ApolloDeploySignalSdkRails::ProjectMetricsSummaryResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ProjectMetricsSummaryResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ProjectMetricsSummaryResponse
Instance Attribute Summary collapse
- #bounce_rate ⇒ Float
- #bounced ⇒ Integer
- #click_rate ⇒ Float
- #clicked ⇒ Integer
- #complained ⇒ Integer
- #complaint_rate ⇒ Float
- #delivered ⇒ Integer
- #delivery_rate ⇒ Float
- #failed ⇒ Integer
- #open_rate ⇒ Float
- #opened ⇒ Integer
- #project_id ⇒ String
- #read_engaged ⇒ Integer
- #read_engagement_rate ⇒ Float
- #sent ⇒ Integer
- #unsubscribed ⇒ Integer
- #window ⇒ MetricsWindowResponse
Class Method Summary collapse
-
.from_json(attributes) ⇒ ProjectMetricsSummaryResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(project_id:, window:, sent:, delivered:, opened:, clicked:, bounced:, complained:, failed:, unsubscribed:, read_engaged:, delivery_rate:, open_rate:, click_rate:, bounce_rate:, complaint_rate:, read_engagement_rate:) ⇒ ProjectMetricsSummaryResponse
constructor
A new instance of ProjectMetricsSummaryResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(project_id:, window:, sent:, delivered:, opened:, clicked:, bounced:, complained:, failed:, unsubscribed:, read_engaged:, delivery_rate:, open_rate:, click_rate:, bounce_rate:, complaint_rate:, read_engagement_rate:) ⇒ ProjectMetricsSummaryResponse
Returns a new instance of ProjectMetricsSummaryResponse.
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1237 def initialize(project_id: , window: , sent: , delivered: , opened: , clicked: , bounced: , complained: , failed: , unsubscribed: , read_engaged: , delivery_rate: , open_rate: , click_rate: , bounce_rate: , complaint_rate: , read_engagement_rate: ) @project_id = project_id @window = window @sent = sent @delivered = delivered @opened = opened @clicked = clicked @bounced = bounced @complained = complained @failed = failed @unsubscribed = unsubscribed @read_engaged = read_engaged @delivery_rate = delivery_rate @open_rate = open_rate @click_rate = click_rate @bounce_rate = bounce_rate @complaint_rate = complaint_rate @read_engagement_rate = read_engagement_rate end |
Instance Attribute Details
#bounce_rate ⇒ Float
1230 1231 1232 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1230 def bounce_rate @bounce_rate end |
#bounced ⇒ Integer
1214 1215 1216 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1214 def bounced @bounced end |
#click_rate ⇒ Float
1228 1229 1230 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1228 def click_rate @click_rate end |
#clicked ⇒ Integer
1212 1213 1214 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1212 def clicked @clicked end |
#complained ⇒ Integer
1216 1217 1218 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1216 def complained @complained end |
#complaint_rate ⇒ Float
1232 1233 1234 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1232 def complaint_rate @complaint_rate end |
#delivered ⇒ Integer
1208 1209 1210 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1208 def delivered @delivered end |
#delivery_rate ⇒ Float
1224 1225 1226 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1224 def delivery_rate @delivery_rate end |
#failed ⇒ Integer
1218 1219 1220 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1218 def failed @failed end |
#open_rate ⇒ Float
1226 1227 1228 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1226 def open_rate @open_rate end |
#opened ⇒ Integer
1210 1211 1212 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1210 def opened @opened end |
#project_id ⇒ String
1202 1203 1204 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1202 def project_id @project_id end |
#read_engaged ⇒ Integer
1222 1223 1224 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1222 def read_engaged @read_engaged end |
#read_engagement_rate ⇒ Float
1234 1235 1236 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1234 def read_engagement_rate @read_engagement_rate end |
#sent ⇒ Integer
1206 1207 1208 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1206 def sent @sent end |
#unsubscribed ⇒ Integer
1220 1221 1222 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1220 def unsubscribed @unsubscribed end |
#window ⇒ MetricsWindowResponse
1204 1205 1206 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1204 def window @window end |
Class Method Details
.from_json(attributes) ⇒ ProjectMetricsSummaryResponse
Create an instance from a parsed JSON hash.
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1283 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], window: attributes.key?("window") ? attributes["window"] : attributes[:window], sent: attributes.key?("sent") ? attributes["sent"] : attributes[:sent], delivered: attributes.key?("delivered") ? attributes["delivered"] : attributes[:delivered], opened: attributes.key?("opened") ? attributes["opened"] : attributes[:opened], clicked: attributes.key?("clicked") ? attributes["clicked"] : attributes[:clicked], bounced: attributes.key?("bounced") ? attributes["bounced"] : attributes[:bounced], complained: attributes.key?("complained") ? attributes["complained"] : attributes[:complained], failed: attributes.key?("failed") ? attributes["failed"] : attributes[:failed], unsubscribed: attributes.key?("unsubscribed") ? attributes["unsubscribed"] : attributes[:unsubscribed], read_engaged: attributes.key?("readEngaged") ? attributes["readEngaged"] : attributes[:read_engaged], delivery_rate: attributes.key?("deliveryRate") ? attributes["deliveryRate"] : attributes[:delivery_rate], open_rate: attributes.key?("openRate") ? attributes["openRate"] : attributes[:open_rate], click_rate: attributes.key?("clickRate") ? attributes["clickRate"] : attributes[:click_rate], bounce_rate: attributes.key?("bounceRate") ? attributes["bounceRate"] : attributes[:bounce_rate], complaint_rate: attributes.key?("complaintRate") ? attributes["complaintRate"] : attributes[:complaint_rate], read_engagement_rate: attributes.key?("readEngagementRate") ? attributes["readEngagementRate"] : attributes[:read_engagement_rate], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1258 def to_h { project_id: @project_id, window: @window, sent: @sent, delivered: @delivered, opened: @opened, clicked: @clicked, bounced: @bounced, complained: @complained, failed: @failed, unsubscribed: @unsubscribed, read_engaged: @read_engaged, delivery_rate: @delivery_rate, open_rate: @open_rate, click_rate: @click_rate, bounce_rate: @bounce_rate, complaint_rate: @complaint_rate, read_engagement_rate: @read_engagement_rate, }.compact end |