Class: Omise::Source

Inherits:
OmiseObject show all
Defined in:
lib/omise/source.rb

Class Method Summary collapse

Methods inherited from OmiseObject

location, resource

Methods included from Attributes

#[], #as_json, #assign_attributes, #attributes, #destroyed?, #initialize, #key?, #location, #method_missing, #predicate?, #respond_to_missing?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Omise::Attributes

Class Method Details

.create(attributes = {}) ⇒ Object



11
12
13
# File 'lib/omise/source.rb', line 11

def self.create(attributes = {})
  new resource(location, attributes).post(attributes)
end

.retrieve(id, attributes = {}) ⇒ Object



7
8
9
# File 'lib/omise/source.rb', line 7

def self.retrieve(id, attributes = {})
  new resource(location(id), attributes).get(attributes)
end