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.
514 515 516 |
# File 'lib/google4r/checkout/notifications.rb', line 514 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.
517 518 519 520 521 522 523 |
# File 'lib/google4r/checkout/notifications.rb', line 517 def self.create_from_element(element) result = MarketingPreferences.new result.email_allowed = (element.elements['email-allowed'].text.downcase == 'true') return result end |