Class: ApolloDeploySignalSdkRails::EmailPerformanceResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::EmailPerformanceResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: EmailPerformanceResponse
Instance Attribute Summary collapse
- #bounced ⇒ Boolean
- #clicked ⇒ Boolean
- #complained ⇒ Boolean
- #computed_at ⇒ String
- #delivered ⇒ Boolean
- #email_id ⇒ String
- #from_address ⇒ String
- #last_event_at ⇒ String?
- #opened ⇒ Boolean
- #read_category ⇒ String?
- #read_engaged ⇒ Boolean
- #read_time_seconds ⇒ Float?
- #sent_at ⇒ String?
- #status ⇒ String
- #subject ⇒ String
- #topic_id ⇒ String?
- #total_clicks ⇒ Integer
- #unsubscribed ⇒ Boolean
Class Method Summary collapse
-
.from_json(attributes) ⇒ EmailPerformanceResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(email_id:, subject:, from_address:, topic_id:, status:, delivered:, opened:, clicked:, total_clicks:, bounced:, complained:, unsubscribed:, read_engaged:, read_time_seconds:, read_category:, sent_at:, last_event_at:, computed_at:) ⇒ EmailPerformanceResponse
constructor
A new instance of EmailPerformanceResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(email_id:, subject:, from_address:, topic_id:, status:, delivered:, opened:, clicked:, total_clicks:, bounced:, complained:, unsubscribed:, read_engaged:, read_time_seconds:, read_category:, sent_at:, last_event_at:, computed_at:) ⇒ EmailPerformanceResponse
Returns a new instance of EmailPerformanceResponse.
1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1001 def initialize(email_id: , subject: , from_address: , topic_id: , status: , delivered: , opened: , clicked: , total_clicks: , bounced: , complained: , unsubscribed: , read_engaged: , read_time_seconds: , read_category: , sent_at: , last_event_at: , computed_at: ) @email_id = email_id @subject = subject @from_address = from_address @topic_id = topic_id @status = status @delivered = delivered @opened = opened @clicked = clicked @total_clicks = total_clicks @bounced = bounced @complained = complained @unsubscribed = unsubscribed @read_engaged = read_engaged @read_time_seconds = read_time_seconds @read_category = read_category @sent_at = sent_at @last_event_at = last_event_at @computed_at = computed_at end |
Instance Attribute Details
#bounced ⇒ Boolean
982 983 984 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 982 def bounced @bounced end |
#clicked ⇒ Boolean
978 979 980 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 978 def clicked @clicked end |
#complained ⇒ Boolean
984 985 986 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 984 def complained @complained end |
#computed_at ⇒ String
998 999 1000 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 998 def computed_at @computed_at end |
#delivered ⇒ Boolean
974 975 976 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 974 def delivered @delivered end |
#email_id ⇒ String
964 965 966 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 964 def email_id @email_id end |
#from_address ⇒ String
968 969 970 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 968 def from_address @from_address end |
#last_event_at ⇒ String?
996 997 998 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 996 def last_event_at @last_event_at end |
#opened ⇒ Boolean
976 977 978 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 976 def opened @opened end |
#read_category ⇒ String?
992 993 994 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 992 def read_category @read_category end |
#read_engaged ⇒ Boolean
988 989 990 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 988 def read_engaged @read_engaged end |
#read_time_seconds ⇒ Float?
990 991 992 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 990 def read_time_seconds @read_time_seconds end |
#sent_at ⇒ String?
994 995 996 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 994 def sent_at @sent_at end |
#status ⇒ String
972 973 974 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 972 def status @status end |
#subject ⇒ String
966 967 968 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 966 def subject @subject end |
#topic_id ⇒ String?
970 971 972 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 970 def topic_id @topic_id end |
#total_clicks ⇒ Integer
980 981 982 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 980 def total_clicks @total_clicks end |
#unsubscribed ⇒ Boolean
986 987 988 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 986 def unsubscribed @unsubscribed end |
Class Method Details
.from_json(attributes) ⇒ EmailPerformanceResponse
Create an instance from a parsed JSON hash.
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1049 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], from_address: attributes.key?("fromAddress") ? attributes["fromAddress"] : attributes[:from_address], topic_id: attributes.key?("topicId") ? attributes["topicId"] : attributes[:topic_id], status: attributes.key?("status") ? attributes["status"] : attributes[:status], delivered: attributes.key?("delivered") ? attributes["delivered"] : attributes[:delivered], opened: attributes.key?("opened") ? attributes["opened"] : attributes[:opened], clicked: attributes.key?("clicked") ? attributes["clicked"] : attributes[:clicked], total_clicks: attributes.key?("totalClicks") ? attributes["totalClicks"] : attributes[:total_clicks], bounced: attributes.key?("bounced") ? attributes["bounced"] : attributes[:bounced], complained: attributes.key?("complained") ? attributes["complained"] : attributes[:complained], unsubscribed: attributes.key?("unsubscribed") ? attributes["unsubscribed"] : attributes[:unsubscribed], 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], sent_at: attributes.key?("sentAt") ? attributes["sentAt"] : attributes[:sent_at], last_event_at: attributes.key?("lastEventAt") ? attributes["lastEventAt"] : attributes[:last_event_at], computed_at: attributes.key?("computedAt") ? attributes["computedAt"] : attributes[:computed_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1023 def to_h { email_id: @email_id, subject: @subject, from_address: @from_address, topic_id: @topic_id, status: @status, delivered: @delivered, opened: @opened, clicked: @clicked, total_clicks: @total_clicks, bounced: @bounced, complained: @complained, unsubscribed: @unsubscribed, read_engaged: @read_engaged, read_time_seconds: @read_time_seconds, read_category: @read_category, sent_at: @sent_at, last_event_at: @last_event_at, computed_at: @computed_at, }.compact end |