Class: Paid::RefundList
- Inherits:
-
APIList
- Object
- APIResource
- APIList
- Paid::RefundList
- Defined in:
- lib/paid/refund_list.rb
Instance Attribute Summary collapse
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
Attributes inherited from APIList
Attributes inherited from APIResource
Instance Method Summary collapse
-
#create(params = {}, headers = {}) ⇒ Object
Not live on the server yet.
-
#initialize(json = {}, api_method = nil, parent_id = nil) ⇒ RefundList
constructor
A new instance of RefundList.
Methods inherited from APIList
#[], #[]=, #each, #inspect, #inspect_data, #last, #length, #refresh_from
Methods inherited from APIResource
add_api_attribute, api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, #determine_api_attribute_value, determine_api_attribute_value, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json
Constructor Details
#initialize(json = {}, api_method = nil, parent_id = nil) ⇒ RefundList
Returns a new instance of RefundList.
5 6 7 8 9 |
# File 'lib/paid/refund_list.rb', line 5 def initialize(json={}, api_method=nil, parent_id=nil) @klass = Util.constantize(:Transaction) @parent_id = parent_id refresh_from(json, api_method) end |
Instance Attribute Details
#parent_id ⇒ Object
Returns the value of attribute parent_id.
3 4 5 |
# File 'lib/paid/refund_list.rb', line 3 def parent_id @parent_id end |
Instance Method Details
#create(params = {}, headers = {}) ⇒ Object
17 18 19 20 |
# File 'lib/paid/refund_list.rb', line 17 def create(params={}, headers={}) method = APIMethod.new(:post, "/transactions/:parent_id/refunds", params, headers, self) Util.constantize(:Transaction).new(method.execute, method) end |