Class: GoogleCheckout::NewOrderNotification

Inherits:
Notification show all
Defined in:
lib/google-checkout/notification.rb

Instance Attribute Summary

Attributes inherited from Notification

#doc

Instance Method Summary collapse

Methods inherited from Notification

#acknowledgment_xml, #error?, #initialize, #method_missing, parse, #serial_number, #state

Constructor Details

This class inherits a constructor from GoogleCheckout::Notification

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GoogleCheckout::Notification

Instance Method Details

#email_allowedObject

Returns true if the buyer wants to received marketing emails.



176
177
178
# File 'lib/google-checkout/notification.rb', line 176

def email_allowed
  (@doc/"buyer-marketing-preferences"/"email-allowed").to_boolean
end

#order_totalObject

Returns a Money object representing the total price of the order.



162
163
164
# File 'lib/google-checkout/notification.rb', line 162

def order_total
  (@doc/"order-total").to_money
end

#total_taxObject

Returns a Money object representing the total tax added.



169
170
171
# File 'lib/google-checkout/notification.rb', line 169

def total_tax
  (@doc/"total-tax").to_money
end