Class: Omise::Dispute
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
.list(attributes = {}) ⇒ Object
9
10
11
12
|
# File 'lib/omise/dispute.rb', line 9
def self.list(attributes = {})
status = attributes.delete(:status)
List.new resource(location(status), attributes).get(attributes)
end
|
.retrieve(id = nil, attributes = {}) ⇒ Object
14
15
16
|
# File 'lib/omise/dispute.rb', line 14
def self.retrieve(id = nil, attributes = {})
new resource(location(id), attributes).get(attributes)
end
|
Instance Method Details
#charge(options = {}) ⇒ Object
26
27
28
29
30
|
# File 'lib/omise/dispute.rb', line 26
def charge(options = {})
if @attributes["charge"]
@charge ||= Charge.retrieve(@attributes["charge"], options)
end
end
|
#reload(attributes = {}) ⇒ Object
18
19
20
|
# File 'lib/omise/dispute.rb', line 18
def reload(attributes = {})
assign_attributes resource(attributes).get(attributes)
end
|
#update(attributes = {}) ⇒ Object
22
23
24
|
# File 'lib/omise/dispute.rb', line 22
def update(attributes = {})
assign_attributes resource(attributes).patch(attributes)
end
|