Class: Ribose::JoinSpaceRequest

Inherits:
Base
  • Object
show all
Includes:
Actions::All, Actions::Create, Actions::Fetch, Actions::Update
Defined in:
lib/ribose/join_space_request.rb

Class Method Summary collapse

Methods included from Actions::Update

#update

Methods included from Actions::Base

#included

Methods included from Actions::Create

#create

Methods included from Actions::Fetch

#fetch

Methods included from Actions::All

#all

Methods inherited from Base

#initialize

Methods included from ResourceHelper

#resource_id, #resource_path, #resources

Constructor Details

This class inherits a constructor from Ribose::Base

Class Method Details

.accept(invitation_id, options = {}) ⇒ Object



8
9
10
# File 'lib/ribose/join_space_request.rb', line 8

def self.accept(invitation_id, options = {})
  new(resource_id: invitation_id, state: 1, **options).update
end

.reject(invitation_id, options = {}) ⇒ Object



12
13
14
# File 'lib/ribose/join_space_request.rb', line 12

def self.reject(invitation_id, options = {})
  new(resource_id: invitation_id, state: 2, **options).update
end

.update(invitation_id, attributes) ⇒ Object



16
17
18
# File 'lib/ribose/join_space_request.rb', line 16

def self.update(invitation_id, attributes)
  new(attributes.merge(resource_id: invitation_id)).update
end