Class: Xendify::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/xendify/base.rb

Direct Known Subclasses

Invoice

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Base

Returns a new instance of Base.



25
26
27
# File 'lib/xendify/base.rb', line 25

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/xendify/base.rb', line 3

def client
  @client
end

Class Method Details

.allowed_methodsObject



14
15
16
# File 'lib/xendify/base.rb', line 14

def allowed_methods
  @allowed_methods ||= []
end

.model_classObject



10
11
12
# File 'lib/xendify/base.rb', line 10

def model_class
  Object.const_get(model_name)
end

.model_nameObject



6
7
8
# File 'lib/xendify/base.rb', line 6

def model_name
  name.sub('Api', 'Model')
end