Class: Posthubify::AccountGroupsResource

Inherits:
Object
  • Object
show all
Defined in:
lib/posthubify/resources/platform.rb

Overview

Account groups (Node sdk .accountGroups).

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ AccountGroupsResource

Returns a new instance of AccountGroupsResource.



117
118
119
# File 'lib/posthubify/resources/platform.rb', line 117

def initialize(http)
  @http = http
end

Instance Method Details

#create(input) ⇒ Object

Create a new account group.



127
128
129
# File 'lib/posthubify/resources/platform.rb', line 127

def create(input)
  @http.data('POST', '/account-groups', body: input)
end

#delete(id) ⇒ Object

Delete an account group.



137
138
139
# File 'lib/posthubify/resources/platform.rb', line 137

def delete(id)
  @http.data('DELETE', "/account-groups/#{id}")
end

#listObject

List account groups.



122
123
124
# File 'lib/posthubify/resources/platform.rb', line 122

def list
  @http.data('GET', '/account-groups')
end

#update(id, input) ⇒ Object

Update an account group (name/accountIds).



132
133
134
# File 'lib/posthubify/resources/platform.rb', line 132

def update(id, input)
  @http.data('PATCH', "/account-groups/#{id}", body: input)
end