Class: PayjpMock::Response::Resource::Event

Inherits:
Base
  • Object
show all
Defined in:
lib/payjp_mock/response/resource/event.rb

Constant Summary collapse

PREFIX =
'evnt'.freeze
OBJECT =
'event'.freeze

Instance Attribute Summary

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

#canonicalize, #initialize, #set, #status

Methods included from Util

#generate_fingerprint, #generate_resource_id

Methods inherited from Base

#body, #exception, #status, #to_h

Constructor Details

This class inherits a constructor from PayjpMock::Response::Resource::Base

Instance Method Details

#default_attributesObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/payjp_mock/response/resource/event.rb', line 7

def default_attributes
  {
    created:          Time.now.to_i,
    data:             Customer.new.to_h,
    id:               generate_resource_id(PREFIX),
    livemode:         false,
    object:           OBJECT,
    pending_webhooks: 1,
    type:             'customer.updated'
  }
end