Class: PaylineSDK::Object::Base
- Inherits:
-
Object
- Object
- PaylineSDK::Object::Base
- Defined in:
- lib/payline_sdk/object/base.rb
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Base
constructor
A new instance of Base.
- #set_attributes(attributes) ⇒ Object
- #to_h ⇒ Object
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_h ⇒ Object
15 16 17 |
# File 'lib/payline_sdk/object/base.rb', line 15 def to_h {} end |