Class: SendGrid::Ganalytics
- Inherits:
-
Object
- Object
- SendGrid::Ganalytics
- Defined in:
- lib/sendgrid/helpers/mail/ganalytics.rb
Instance Attribute Summary collapse
-
#enable ⇒ Object
Returns the value of attribute enable.
-
#utm_campaign ⇒ Object
Returns the value of attribute utm_campaign.
-
#utm_content ⇒ Object
Returns the value of attribute utm_content.
-
#utm_medium ⇒ Object
Returns the value of attribute utm_medium.
-
#utm_name ⇒ Object
Returns the value of attribute utm_name.
-
#utm_source ⇒ Object
Returns the value of attribute utm_source.
-
#utm_term ⇒ Object
Returns the value of attribute utm_term.
Instance Method Summary collapse
-
#initialize(enable: nil, utm_source: nil, utm_medium: nil, utm_term: nil, utm_content: nil, utm_campaign: nil, utm_name: nil) ⇒ Ganalytics
constructor
A new instance of Ganalytics.
- #to_json ⇒ Object
Constructor Details
#initialize(enable: nil, utm_source: nil, utm_medium: nil, utm_term: nil, utm_content: nil, utm_campaign: nil, utm_name: nil) ⇒ Ganalytics
Returns a new instance of Ganalytics.
7 8 9 10 11 12 13 14 15 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 7 def initialize(enable: nil, utm_source: nil, utm_medium: nil, utm_term: nil, utm_content: nil, utm_campaign: nil, utm_name: nil) @enable = enable @utm_source = utm_source @utm_medium = utm_medium @utm_term = utm_term @utm_content = utm_content @utm_campaign = utm_campaign @utm_name = utm_name end |
Instance Attribute Details
#enable ⇒ Object
Returns the value of attribute enable.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def enable @enable end |
#utm_campaign ⇒ Object
Returns the value of attribute utm_campaign.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_campaign @utm_campaign end |
#utm_content ⇒ Object
Returns the value of attribute utm_content.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_content @utm_content end |
#utm_medium ⇒ Object
Returns the value of attribute utm_medium.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_medium @utm_medium end |
#utm_name ⇒ Object
Returns the value of attribute utm_name.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_name @utm_name end |
#utm_source ⇒ Object
Returns the value of attribute utm_source.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_source @utm_source end |
#utm_term ⇒ Object
Returns the value of attribute utm_term.
5 6 7 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 5 def utm_term @utm_term end |
Instance Method Details
#to_json ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sendgrid/helpers/mail/ganalytics.rb', line 17 def to_json(*) { 'enable' => enable, 'utm_source' => utm_source, 'utm_medium' => utm_medium, 'utm_term' => utm_term, 'utm_content' => utm_content, 'utm_campaign' => utm_campaign }.delete_if { |_, value| value.to_s.strip == '' } end |