Class: Cadenya::Types::AddWorkspaceMemberRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(workspace_id: nil, profile_id: nil, email: nil) ⇒ AddWorkspaceMemberRequest

Returns a new instance of AddWorkspaceMemberRequest.



360
361
362
363
364
# File 'lib/cadenya/types.rb', line 360

def initialize(workspace_id: nil, profile_id: nil, email: nil)
  @workspace_id = workspace_id
  @profile_id = profile_id
  @email = email
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



358
359
360
# File 'lib/cadenya/types.rb', line 358

def email
  @email
end

#profile_idObject (readonly)

Returns the value of attribute profile_id.



358
359
360
# File 'lib/cadenya/types.rb', line 358

def profile_id
  @profile_id
end

#workspace_idObject (readonly)

Returns the value of attribute workspace_id.



358
359
360
# File 'lib/cadenya/types.rb', line 358

def workspace_id
  @workspace_id
end

Class Method Details

.from_json(data) ⇒ Object



366
367
368
369
370
371
372
# File 'lib/cadenya/types.rb', line 366

def self.from_json(data)
  new(
    workspace_id: data["workspaceId"],
    profile_id: data["profileId"],
    email: data["email"],
  )
end

Instance Method Details

#to_hObject



374
375
376
377
378
379
380
# File 'lib/cadenya/types.rb', line 374

def to_h
  {
    workspace_id: Util.plain(@workspace_id),
    profile_id: Util.plain(@profile_id),
    email: Util.plain(@email),
  }.reject { |_k, v| v.nil? }
end