Class: HookSniff::Portal

Inherits:
Object
  • Object
show all
Defined in:
lib/hooksniff/api/portal.rb

Instance Method Summary collapse

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_notificationsObject



25
26
27
# File 'lib/hooksniff/api/portal.rb', line 25

def get_notifications
  @client.execute_request("GET", "/v1/portal/notifications")
end

#get_planObject



21
22
23
# File 'lib/hooksniff/api/portal.rb', line 21

def get_plan
  @client.execute_request("GET", "/v1/portal/plan")
end

#get_profileObject



9
10
11
# File 'lib/hooksniff/api/portal.rb', line 9

def get_profile
  @client.execute_request("GET", "/v1/portal/me")
end

#get_usageObject



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