Class: Stripe::ThinEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/stripe/thin_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_payload = {}) ⇒ ThinEvent

Returns a new instance of ThinEvent.



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/stripe/thin_event.rb', line 25

def initialize(event_payload = {})
  @id = event_payload[:id]
  @type = event_payload[:type]
  @created = event_payload[:created]
  @context = event_payload[:context]
  @livemode = event_payload[:livemode]
  @related_object = event_payload[:related_object]
  return if event_payload[:reason].nil?

  @reason = EventReason.new(event_payload[:reason])
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def context
  @context
end

#createdObject (readonly)

Returns the value of attribute created.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def created
  @created
end

#idObject (readonly)

Returns the value of attribute id.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def livemode
  @livemode
end

#reasonObject (readonly)

Returns the value of attribute reason.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def reason
  @reason
end

Returns the value of attribute related_object.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def related_object
  @related_object
end

#typeObject (readonly)

Returns the value of attribute type.



23
24
25
# File 'lib/stripe/thin_event.rb', line 23

def type
  @type
end