Class: Google4R::Checkout::MarketingPreferences
- Inherits:
-
Object
- Object
- Google4R::Checkout::MarketingPreferences
- Defined in:
- lib/google4r/checkout/notifications.rb
Overview
The marketing preferences of a customer.
Instance Attribute Summary collapse
-
#email_allowed ⇒ Object
Boolean, true if the customer wants to receive emails.
Class Method Summary collapse
-
.create_from_element(element) ⇒ Object
Creates a new MarketingPreferences object from a given REXML::Element instance.
Instance Attribute Details
#email_allowed ⇒ Object
Boolean, true if the customer wants to receive emails.
585 586 587 |
# File 'lib/google4r/checkout/notifications.rb', line 585 def email_allowed @email_allowed end |
Class Method Details
.create_from_element(element) ⇒ Object
Creates a new MarketingPreferences object from a given REXML::Element instance.
588 589 590 591 592 593 594 |
# File 'lib/google4r/checkout/notifications.rb', line 588 def self.create_from_element(element) result = MarketingPreferences.new result.email_allowed = (element.elements['email-allowed'].text.downcase == 'true') return result end |