Class: Iugu::APIChildResource
- Inherits:
-
Object
- Object
- Iugu::APIChildResource
- Defined in:
- lib/iugu/api_child_resource.rb
Instance Method Summary collapse
- #create(attributes = {}) ⇒ Object
- #fetch(options = nil) ⇒ Object
-
#initialize(parent_keys = {}, fabricator) ⇒ APIChildResource
constructor
A new instance of APIChildResource.
- #search(options = {}) ⇒ Object
Constructor Details
#initialize(parent_keys = {}, fabricator) ⇒ APIChildResource
Returns a new instance of APIChildResource.
6 7 8 9 |
# File 'lib/iugu/api_child_resource.rb', line 6 def initialize(parent_keys = {}, fabricator) @parent_keys = parent_keys @fabricator = fabricator end |
Instance Method Details
#create(attributes = {}) ⇒ Object
11 12 13 |
# File 'lib/iugu/api_child_resource.rb', line 11 def create(attributes = {}) @fabricator.send "create", merge_params(attributes) end |
#fetch(options = nil) ⇒ Object
19 20 21 |
# File 'lib/iugu/api_child_resource.rb', line 19 def fetch( = nil) @fabricator.send "fetch", merge_params({ id: }) end |
#search(options = {}) ⇒ Object
15 16 17 |
# File 'lib/iugu/api_child_resource.rb', line 15 def search( = {}) @fabricator.send "search", merge_params() end |