Class: PaylineSDK::Object::Base

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

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/payline_sdk/object/base.rb', line 5

def initialize(opts = {})
  set_attributes(opts)
end

Instance Method Details

#set_attributes(attributes) ⇒ Object



9
10
11
12
13
# File 'lib/payline_sdk/object/base.rb', line 9

def set_attributes(attributes)
  attributes.each do |k,v|
    instance_variable_set("@#{k}", v)
  end
end

#to_hObject



15
16
17
# File 'lib/payline_sdk/object/base.rb', line 15

def to_h
  {}
end