Class: Omise::RefundList
- Inherits:
-
List
- Object
- OmiseObject
- List
- Omise::RefundList
- Defined in:
- lib/omise/refund_list.rb
Instance Method Summary collapse
- #create(attributes = {}) ⇒ Object
-
#initialize(charge, attributes = {}) ⇒ RefundList
constructor
A new instance of RefundList.
- #retrieve(id, attributes = {}) ⇒ Object
Methods inherited from List
Methods inherited from OmiseObject
Methods included from Attributes
#[], #as_json, #assign_attributes, #attributes, #destroyed?, #key?, #location, #method_missing, #respond_to?
Constructor Details
#initialize(charge, attributes = {}) ⇒ RefundList
Returns a new instance of RefundList.
6 7 8 9 |
# File 'lib/omise/refund_list.rb', line 6 def initialize(charge, attributes = {}) super(attributes) @charge = charge end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Omise::Attributes
Instance Method Details
#create(attributes = {}) ⇒ Object
11 12 13 |
# File 'lib/omise/refund_list.rb', line 11 def create(attributes = {}) Refund.new self.class.resource(location, attributes).post(attributes) end |
#retrieve(id, attributes = {}) ⇒ Object
15 16 17 |
# File 'lib/omise/refund_list.rb', line 15 def retrieve(id, attributes = {}) Refund.new self.class.resource(location(id), attributes).get end |