Class: Omise::Transfer
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from OmiseObject
location, resource
Methods included from Attributes
#[], #as_json, #assign_attributes, #attributes, #destroyed?, #initialize, #key?, #location, #method_missing, #respond_to?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Omise::Attributes
Class Method Details
.create(attributes = {}) ⇒ Object
8
9
10
|
# File 'lib/omise/transfer.rb', line 8
def self.create(attributes = {})
new resource(location, attributes).post(attributes)
end
|
.list(attributes = {}) ⇒ Object
16
17
18
|
# File 'lib/omise/transfer.rb', line 16
def self.list(attributes = {})
List.new resource(location, attributes).get
end
|
.retrieve(id, attributes = {}) ⇒ Object
12
13
14
|
# File 'lib/omise/transfer.rb', line 12
def self.retrieve(id, attributes = {})
new resource(location(id), attributes).get
end
|
Instance Method Details
#destroy(attributes = {}) ⇒ Object
28
29
30
|
# File 'lib/omise/transfer.rb', line 28
def destroy(attributes = {})
assign_attributes resource(attributes).delete
end
|
#reload(attributes = {}) ⇒ Object
20
21
22
|
# File 'lib/omise/transfer.rb', line 20
def reload(attributes = {})
assign_attributes resource(attributes).get
end
|
#update(attributes = {}) ⇒ Object
24
25
26
|
# File 'lib/omise/transfer.rb', line 24
def update(attributes = {})
assign_attributes resource(attributes).patch(attributes)
end
|