Class: Moip2::EntryApi
- Inherits:
-
Object
- Object
- Moip2::EntryApi
- Defined in:
- lib/moip2/entry_api.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #base_path ⇒ Object
- #find_all ⇒ Object
-
#initialize(client) ⇒ EntryApi
constructor
A new instance of EntryApi.
- #show(id) ⇒ Object
Constructor Details
#initialize(client) ⇒ EntryApi
5 6 7 |
# File 'lib/moip2/entry_api.rb', line 5 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/moip2/entry_api.rb', line 3 def client @client end |
Instance Method Details
#base_path ⇒ Object
9 10 11 |
# File 'lib/moip2/entry_api.rb', line 9 def base_path "/v2/entries" end |
#find_all ⇒ Object
17 18 19 |
# File 'lib/moip2/entry_api.rb', line 17 def find_all Resource::Entry.new client, client.get("#{base_path}") end |
#show(id) ⇒ Object
13 14 15 |
# File 'lib/moip2/entry_api.rb', line 13 def show(id) Resource::Entry.new client, client.get("#{base_path}/#{id}") end |