Class: ApolloDeploySignalSdkRails::TopicPerformanceResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::TopicPerformanceResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: TopicPerformanceResponse
Instance Attribute Summary collapse
- #avg_read_time_seconds ⇒ Float?
- #bounce_rate ⇒ Float
- #bounced ⇒ Integer
- #click_rate ⇒ Float
- #clicked ⇒ Integer
- #complained ⇒ Integer
- #complaint_rate ⇒ Float
- #computed_at ⇒ String
- #delivered ⇒ Integer
- #delivery_rate ⇒ Float
- #open_rate ⇒ Float
- #opened ⇒ Integer
- #opt_in_count ⇒ Integer
- #opt_out_count ⇒ Integer
- #read_engaged ⇒ Integer
- #read_engagement_rate ⇒ Float
- #topic_id ⇒ String
- #topic_name ⇒ String
- #total_emails ⇒ Integer
- #unsubscribe_rate ⇒ Float
- #unsubscribed ⇒ Integer
- #window ⇒ MetricsWindowResponse
Class Method Summary collapse
-
.from_json(attributes) ⇒ TopicPerformanceResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(topic_id:, topic_name:, window:, total_emails:, delivered:, delivery_rate:, opened:, open_rate:, clicked:, click_rate:, bounced:, bounce_rate:, complained:, complaint_rate:, unsubscribed:, unsubscribe_rate:, read_engaged:, read_engagement_rate:, avg_read_time_seconds:, opt_in_count:, opt_out_count:, computed_at:) ⇒ TopicPerformanceResponse
constructor
A new instance of TopicPerformanceResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(topic_id:, topic_name:, window:, total_emails:, delivered:, delivery_rate:, opened:, open_rate:, clicked:, click_rate:, bounced:, bounce_rate:, complained:, complaint_rate:, unsubscribed:, unsubscribe_rate:, read_engaged:, read_engagement_rate:, avg_read_time_seconds:, opt_in_count:, opt_out_count:, computed_at:) ⇒ TopicPerformanceResponse
Returns a new instance of TopicPerformanceResponse.
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 875 def initialize(topic_id: , topic_name: , window: , total_emails: , delivered: , delivery_rate: , opened: , open_rate: , clicked: , click_rate: , bounced: , bounce_rate: , complained: , complaint_rate: , unsubscribed: , unsubscribe_rate: , read_engaged: , read_engagement_rate: , avg_read_time_seconds: , opt_in_count: , opt_out_count: , computed_at: ) @topic_id = topic_id @topic_name = topic_name @window = window @total_emails = total_emails @delivered = delivered @delivery_rate = delivery_rate @opened = opened @open_rate = open_rate @clicked = clicked @click_rate = click_rate @bounced = bounced @bounce_rate = bounce_rate @complained = complained @complaint_rate = complaint_rate @unsubscribed = unsubscribed @unsubscribe_rate = unsubscribe_rate @read_engaged = read_engaged @read_engagement_rate = read_engagement_rate @avg_read_time_seconds = avg_read_time_seconds @opt_in_count = opt_in_count @opt_out_count = opt_out_count @computed_at = computed_at end |
Instance Attribute Details
#avg_read_time_seconds ⇒ Float?
866 867 868 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 866 def avg_read_time_seconds @avg_read_time_seconds end |
#bounce_rate ⇒ Float
852 853 854 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 852 def bounce_rate @bounce_rate end |
#bounced ⇒ Integer
850 851 852 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 850 def bounced @bounced end |
#click_rate ⇒ Float
848 849 850 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 848 def click_rate @click_rate end |
#clicked ⇒ Integer
846 847 848 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 846 def clicked @clicked end |
#complained ⇒ Integer
854 855 856 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 854 def complained @complained end |
#complaint_rate ⇒ Float
856 857 858 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 856 def complaint_rate @complaint_rate end |
#computed_at ⇒ String
872 873 874 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 872 def computed_at @computed_at end |
#delivered ⇒ Integer
838 839 840 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 838 def delivered @delivered end |
#delivery_rate ⇒ Float
840 841 842 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 840 def delivery_rate @delivery_rate end |
#open_rate ⇒ Float
844 845 846 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 844 def open_rate @open_rate end |
#opened ⇒ Integer
842 843 844 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 842 def opened @opened end |
#opt_in_count ⇒ Integer
868 869 870 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 868 def opt_in_count @opt_in_count end |
#opt_out_count ⇒ Integer
870 871 872 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 870 def opt_out_count @opt_out_count end |
#read_engaged ⇒ Integer
862 863 864 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 862 def read_engaged @read_engaged end |
#read_engagement_rate ⇒ Float
864 865 866 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 864 def read_engagement_rate @read_engagement_rate end |
#topic_id ⇒ String
830 831 832 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 830 def topic_id @topic_id end |
#topic_name ⇒ String
832 833 834 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 832 def topic_name @topic_name end |
#total_emails ⇒ Integer
836 837 838 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 836 def total_emails @total_emails end |
#unsubscribe_rate ⇒ Float
860 861 862 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 860 def unsubscribe_rate @unsubscribe_rate end |
#unsubscribed ⇒ Integer
858 859 860 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 858 def unsubscribed @unsubscribed end |
#window ⇒ MetricsWindowResponse
834 835 836 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 834 def window @window end |
Class Method Details
.from_json(attributes) ⇒ TopicPerformanceResponse
Create an instance from a parsed JSON hash.
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 931 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( topic_id: attributes.key?("topicId") ? attributes["topicId"] : attributes[:topic_id], topic_name: attributes.key?("topicName") ? attributes["topicName"] : attributes[:topic_name], window: attributes.key?("window") ? attributes["window"] : attributes[:window], total_emails: attributes.key?("totalEmails") ? attributes["totalEmails"] : attributes[:total_emails], delivered: attributes.key?("delivered") ? attributes["delivered"] : attributes[:delivered], delivery_rate: attributes.key?("deliveryRate") ? attributes["deliveryRate"] : attributes[:delivery_rate], opened: attributes.key?("opened") ? attributes["opened"] : attributes[:opened], open_rate: attributes.key?("openRate") ? attributes["openRate"] : attributes[:open_rate], clicked: attributes.key?("clicked") ? attributes["clicked"] : attributes[:clicked], click_rate: attributes.key?("clickRate") ? attributes["clickRate"] : attributes[:click_rate], bounced: attributes.key?("bounced") ? attributes["bounced"] : attributes[:bounced], bounce_rate: attributes.key?("bounceRate") ? attributes["bounceRate"] : attributes[:bounce_rate], complained: attributes.key?("complained") ? attributes["complained"] : attributes[:complained], complaint_rate: attributes.key?("complaintRate") ? attributes["complaintRate"] : attributes[:complaint_rate], unsubscribed: attributes.key?("unsubscribed") ? attributes["unsubscribed"] : attributes[:unsubscribed], unsubscribe_rate: attributes.key?("unsubscribeRate") ? attributes["unsubscribeRate"] : attributes[:unsubscribe_rate], read_engaged: attributes.key?("readEngaged") ? attributes["readEngaged"] : attributes[:read_engaged], read_engagement_rate: attributes.key?("readEngagementRate") ? attributes["readEngagementRate"] : attributes[:read_engagement_rate], avg_read_time_seconds: attributes.key?("avgReadTimeSeconds") ? attributes["avgReadTimeSeconds"] : attributes[:avg_read_time_seconds], opt_in_count: attributes.key?("optInCount") ? attributes["optInCount"] : attributes[:opt_in_count], opt_out_count: attributes.key?("optOutCount") ? attributes["optOutCount"] : attributes[:opt_out_count], computed_at: attributes.key?("computedAt") ? attributes["computedAt"] : attributes[:computed_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 901 def to_h { topic_id: @topic_id, topic_name: @topic_name, window: @window, total_emails: @total_emails, delivered: @delivered, delivery_rate: @delivery_rate, opened: @opened, open_rate: @open_rate, clicked: @clicked, click_rate: @click_rate, bounced: @bounced, bounce_rate: @bounce_rate, complained: @complained, complaint_rate: @complaint_rate, unsubscribed: @unsubscribed, unsubscribe_rate: @unsubscribe_rate, read_engaged: @read_engaged, read_engagement_rate: @read_engagement_rate, avg_read_time_seconds: @avg_read_time_seconds, opt_in_count: @opt_in_count, opt_out_count: @opt_out_count, computed_at: @computed_at, }.compact end |