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 iff 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 iff the customer wants to receive emails.
327 328 329 |
# File 'lib/google4r/checkout/notifications.rb', line 327 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.
330 331 332 333 334 335 336 |
# File 'lib/google4r/checkout/notifications.rb', line 330 def self.create_from_element(element) result = MarketingPreferences.new result.email_allowed = (element.elements['email-allowed'].text.downcase == 'true') return result end |