Class: GoogleCheckout::NewOrderNotification

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

Instance Method Summary collapse

Methods inherited from Notification

#acknowledgment_xml, #doc, #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

#billing_address1Object

Returns billing address1



210
211
212
# File 'lib/google-checkout/notification.rb', line 210

def billing_address1
  (doc/"buyer-billing-address"/"address1").inner_html
end

#billing_cityObject

Returns billing city



217
218
219
# File 'lib/google-checkout/notification.rb', line 217

def billing_city
  (doc/"buyer-billing-address"/"city").inner_html
end

#billing_country_codeObject

Returns billing country code



238
239
240
# File 'lib/google-checkout/notification.rb', line 238

def billing_country_code
  (doc/"buyer-billing-address"/"country-code").inner_html
end

#billing_emailObject

Returns billing email



203
204
205
# File 'lib/google-checkout/notification.rb', line 203

def billing_email
  (doc/"buyer-billing-address"/"email").inner_html
end

#billing_first_nameObject

Returns billing first name



252
253
254
# File 'lib/google-checkout/notification.rb', line 252

def billing_first_name
  (doc/"buyer-billing-address"/"structured-name"/"first-name").inner_html
end

#billing_last_nameObject

Returns billing last name



259
260
261
# File 'lib/google-checkout/notification.rb', line 259

def billing_last_name
  (doc/"buyer-billing-address"/"structured-name"/"last-name").inner_html
end

#billing_nameObject

Returns billing name.



196
197
198
# File 'lib/google-checkout/notification.rb', line 196

def billing_name
  (doc/"buyer-billing-address"/"contact-name").inner_html
end

#billing_phoneObject

Returns billing phone



245
246
247
# File 'lib/google-checkout/notification.rb', line 245

def billing_phone
  (doc/"buyer-billing-address"/"phone").inner_html
end

#billing_postal_codeObject

Returns billing postal code



231
232
233
# File 'lib/google-checkout/notification.rb', line 231

def billing_postal_code
  (doc/"buyer-billing-address"/"postal-code").inner_html
end

#billing_regionObject

Returns billing region



224
225
226
# File 'lib/google-checkout/notification.rb', line 224

def billing_region
  (doc/"buyer-billing-address"/"region").inner_html
end

#email_allowedObject

Returns true if the buyer wants to received marketing emails.



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

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.



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

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

#shipping_address1Object

Returns shipping address1



280
281
282
# File 'lib/google-checkout/notification.rb', line 280

def shipping_address1
  (doc/"buyer-shipping-address"/"address1").inner_html
end

#shipping_cityObject

Returns shipping city



287
288
289
# File 'lib/google-checkout/notification.rb', line 287

def shipping_city
  (doc/"buyer-shipping-address"/"city").inner_html
end

#shipping_country_codeObject

Returns shipping country code



308
309
310
# File 'lib/google-checkout/notification.rb', line 308

def shipping_country_code
  (doc/"buyer-shipping-address"/"country-code").inner_html
end

#shipping_emailObject

Returns shipping email



273
274
275
# File 'lib/google-checkout/notification.rb', line 273

def shipping_email
  (doc/"buyer-shipping-address"/"email").inner_html
end

#shipping_first_nameObject

Returns shipping first name



322
323
324
# File 'lib/google-checkout/notification.rb', line 322

def shipping_first_name
  (doc/"buyer-shipping-address"/"structured-name"/"first-name").inner_html
end

#shipping_last_nameObject

Returns shipping last name



329
330
331
# File 'lib/google-checkout/notification.rb', line 329

def shipping_last_name
  (doc/"buyer-shipping-address"/"structured-name"/"last-name").inner_html
end

#shipping_nameObject

Returns shipping contact name



266
267
268
# File 'lib/google-checkout/notification.rb', line 266

def shipping_name
  (doc/"buyer-shipping-address"/"contact-name").inner_html
end

#shipping_phoneObject

Returns shipping phone



315
316
317
# File 'lib/google-checkout/notification.rb', line 315

def shipping_phone
  (doc/"buyer-shipping-address"/"phone").inner_html
end

#shipping_postal_codeObject

Returns shipping postal code



301
302
303
# File 'lib/google-checkout/notification.rb', line 301

def shipping_postal_code
  (doc/"buyer-shipping-address"/"postal-code").inner_html
end

#shipping_regionObject

Returns shipping region



294
295
296
# File 'lib/google-checkout/notification.rb', line 294

def shipping_region
  (doc/"buyer-shipping-address"/"region").inner_html
end

#total_taxObject

Returns a Money object representing the total tax added.



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

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