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.



190
191
192
# File 'lib/google-checkout/notification.rb', line 190

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.



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

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

#total_taxObject

Returns a Money object representing the total tax added.



183
184
185
# File 'lib/google-checkout/notification.rb', line 183

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