Class: Posthubify::AccountGroupsResource
- Inherits:
-
Object
- Object
- Posthubify::AccountGroupsResource
- Defined in:
- lib/posthubify/resources/platform.rb
Overview
Account groups (Node sdk .accountGroups).
Instance Method Summary collapse
-
#create(input) ⇒ Object
Create a new account group.
-
#delete(id) ⇒ Object
Delete an account group.
-
#initialize(http) ⇒ AccountGroupsResource
constructor
A new instance of AccountGroupsResource.
-
#list ⇒ Object
List account groups.
-
#update(id, input) ⇒ Object
Update an account group (name/accountIds).
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 |
#list ⇒ Object
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 |