Class: Ebay::Notification
- Inherits:
-
Object
- Object
- Ebay::Notification
- Defined in:
- lib/ebay/notification.rb
Instance Method Summary collapse
- #body ⇒ Object
- #document ⇒ Object
- #event_name ⇒ Object
-
#initialize(post_data) ⇒ Notification
constructor
A new instance of Notification.
- #signature ⇒ Object
- #timestamp ⇒ Object
- #valid? ⇒ Boolean
- #xml_body ⇒ Object
Constructor Details
#initialize(post_data) ⇒ Notification
Returns a new instance of Notification.
13 14 15 16 |
# File 'lib/ebay/notification.rb', line 13 def initialize(post_data) @raw_data = post_data parse end |
Instance Method Details
#body ⇒ Object
22 23 24 |
# File 'lib/ebay/notification.rb', line 22 def body @body ||= parse_body end |
#document ⇒ Object
34 35 36 |
# File 'lib/ebay/notification.rb', line 34 def document @document ||= load_document end |
#event_name ⇒ Object
42 43 44 |
# File 'lib/ebay/notification.rb', line 42 def event_name @event_name ||= parse_event_name end |
#signature ⇒ Object
26 27 28 |
# File 'lib/ebay/notification.rb', line 26 def signature @signature ||= parse_signature end |
#timestamp ⇒ Object
30 31 32 |
# File 'lib/ebay/notification.rb', line 30 def @timestamp ||= end |
#valid? ⇒ Boolean
18 19 20 |
# File 'lib/ebay/notification.rb', line 18 def valid? signature == generated_signature end |
#xml_body ⇒ Object
38 39 40 |
# File 'lib/ebay/notification.rb', line 38 def xml_body @xml_body ||= parse_xml_body end |