Class: SendGrid::TrackingSettingsDto
- Inherits:
-
Object
- Object
- SendGrid::TrackingSettingsDto
- Defined in:
- lib/sendgrid/helpers/settings/tracking_settings_dto.rb
Instance Attribute Summary collapse
-
#click ⇒ Object
(also: #click_tracking)
readonly
Returns the value of attribute click.
-
#google_analytics ⇒ Object
readonly
Returns the value of attribute google_analytics.
-
#open ⇒ Object
(also: #open_tracking)
readonly
Returns the value of attribute open.
-
#subscription ⇒ Object
(also: #subscription_tracking)
readonly
Returns the value of attribute subscription.
Class Method Summary collapse
- .fetch(sendgrid_client:, name:, query_params:) ⇒ Object
- .scrub_alias_names(name) ⇒ Object
- .update(sendgrid_client:, name:, request_body:) ⇒ Object
Instance Attribute Details
#click ⇒ Object (readonly) Also known as: click_tracking
Returns the value of attribute click.
3 4 5 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 3 def click @click end |
#google_analytics ⇒ Object (readonly)
Returns the value of attribute google_analytics.
3 4 5 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 3 def google_analytics @google_analytics end |
#open ⇒ Object (readonly) Also known as: open_tracking
Returns the value of attribute open.
3 4 5 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 3 def open @open end |
#subscription ⇒ Object (readonly) Also known as: subscription_tracking
Returns the value of attribute subscription.
3 4 5 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 3 def subscription @subscription end |
Class Method Details
.fetch(sendgrid_client:, name:, query_params:) ⇒ Object
8 9 10 11 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 8 def self.fetch(sendgrid_client:, name:, query_params:) name = scrub_alias_names(name.to_s) sendgrid_client.tracking_settings.public_send(name).get(query_params: query_params) end |
.scrub_alias_names(name) ⇒ Object
18 19 20 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 18 def self.scrub_alias_names(name) name.gsub(/_tracking/, '') end |
.update(sendgrid_client:, name:, request_body:) ⇒ Object
13 14 15 16 |
# File 'lib/sendgrid/helpers/settings/tracking_settings_dto.rb', line 13 def self.update(sendgrid_client:, name:, request_body:) name = scrub_alias_names(name.to_s) sendgrid_client.tracking_settings.public_send(name).patch(request_body: request_body) end |