Class: Ebay::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/ebay/notification.rb

Instance Method Summary collapse

Constructor Details

#initialize(post_data) ⇒ 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

#bodyObject



22
23
24
# File 'lib/ebay/notification.rb', line 22

def body
  @body ||= parse_body
end

#documentObject



34
35
36
# File 'lib/ebay/notification.rb', line 34

def document
  @document ||= load_document
end

#event_nameObject



42
43
44
# File 'lib/ebay/notification.rb', line 42

def event_name
  @event_name ||= parse_event_name
end

#signatureObject



26
27
28
# File 'lib/ebay/notification.rb', line 26

def signature
  @signature ||= parse_signature
end

#timestampObject



30
31
32
# File 'lib/ebay/notification.rb', line 30

def timestamp
  @timestamp ||= parse_timestamp
end

#valid?Boolean



18
19
20
# File 'lib/ebay/notification.rb', line 18

def valid?
  signature == generated_signature
end

#xml_bodyObject



38
39
40
# File 'lib/ebay/notification.rb', line 38

def xml_body
  @xml_body ||= parse_xml_body
end