Module: Epay::Model

Included in:
Subscription, Transaction
Defined in:
lib/epay/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



3
4
5
# File 'lib/epay/model.rb', line 3

def data
  @data
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/epay/model.rb', line 3

def id
  @id
end

Class Method Details

.inspectObject



19
20
21
# File 'lib/epay/model.rb', line 19

def self.inspect
  "inspect via class"
end

Instance Method Details

#initialize(id, data = {}) ⇒ Object



5
6
7
8
# File 'lib/epay/model.rb', line 5

def initialize(id, data = {})
  @id = id
  @data = data
end

#inspectObject



10
11
12
13
14
15
16
17
# File 'lib/epay/model.rb', line 10

def inspect
  inspection = self.class.inspectable_attributes.collect do |name|
    #"#{name}: #{selfsend(name)}"
    "#{name}: #{send(name).inspect}" if respond_to?(name)
  end.join(", ")
  
  "#<#{self.class} #{inspection}>"
end