Class: Omise::Refund

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

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

Instance Method Details

#charge(options = {}) ⇒ Object



13
14
15
16
17
# File 'lib/omise/refund.rb', line 13

def charge(options = {})
  if @attributes["charge"]
    @charge ||= Charge.retrieve(@attributes["charge"], options)
  end
end

#reload(attributes = {}) ⇒ Object



9
10
11
# File 'lib/omise/refund.rb', line 9

def reload(attributes = {})
  assign_attributes resource(attributes).get
end

#transaction(options = {}) ⇒ Object



19
20
21
22
23
# File 'lib/omise/refund.rb', line 19

def transaction(options = {})
  if @attributes["transaction"]
    @transaction ||= Transaction.retrieve(@attributes["transaction"], options)
  end
end