Class: HookSniff::Portal
- Inherits:
-
Object
- Object
- HookSniff::Portal
- Defined in:
- lib/hooksniff/api/portal.rb
Instance Method Summary collapse
- #get_notifications ⇒ Object
- #get_plan ⇒ Object
- #get_profile ⇒ Object
- #get_usage ⇒ Object
-
#initialize(client) ⇒ Portal
constructor
A new instance of Portal.
- #update_notifications(attrs) ⇒ Object
- #update_profile(attrs) ⇒ Object
Constructor Details
#initialize(client) ⇒ Portal
Returns a new instance of Portal.
5 6 7 |
# File 'lib/hooksniff/api/portal.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#get_notifications ⇒ Object
25 26 27 |
# File 'lib/hooksniff/api/portal.rb', line 25 def get_notifications @client.execute_request("GET", "/v1/portal/notifications") end |
#get_plan ⇒ Object
21 22 23 |
# File 'lib/hooksniff/api/portal.rb', line 21 def get_plan @client.execute_request("GET", "/v1/portal/plan") end |
#get_profile ⇒ Object
9 10 11 |
# File 'lib/hooksniff/api/portal.rb', line 9 def get_profile @client.execute_request("GET", "/v1/portal/me") end |
#get_usage ⇒ Object
17 18 19 |
# File 'lib/hooksniff/api/portal.rb', line 17 def get_usage @client.execute_request("GET", "/v1/portal/usage") end |
#update_notifications(attrs) ⇒ Object
29 30 31 |
# File 'lib/hooksniff/api/portal.rb', line 29 def update_notifications(attrs) @client.execute_request("PUT", "/v1/portal/notifications", body: attrs) end |
#update_profile(attrs) ⇒ Object
13 14 15 |
# File 'lib/hooksniff/api/portal.rb', line 13 def update_profile(attrs) @client.execute_request("PUT", "/v1/portal/me", body: attrs) end |