Class: DotloopApi::EndPoints::Participant

Inherits:
Base
  • Object
show all
Defined in:
lib/dotloop_api/end_points/participant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#all, #create, #delete, #find, #save, #single_path

Methods included from ModelBuilder

#build_details, #build_documents

Constructor Details

#initialize(client:, profile_id: nil, loop_id: nil) ⇒ Participant

Returns a new instance of Participant.



6
7
8
9
10
# File 'lib/dotloop_api/end_points/participant.rb', line 6

def initialize(client:, profile_id: nil, loop_id: nil)
  @profile_id = profile_id
  @loop_id = loop_id
  super(client: client, path: path, type: DotloopApi::Models::Profile::Loop::Participant)
end

Instance Attribute Details

#loop_idObject

Returns the value of attribute loop_id.



4
5
6
# File 'lib/dotloop_api/end_points/participant.rb', line 4

def loop_id
  @loop_id
end

#profile_idObject

Returns the value of attribute profile_id.



4
5
6
# File 'lib/dotloop_api/end_points/participant.rb', line 4

def profile_id
  @profile_id
end

Instance Method Details

#build_model(attrs) ⇒ Object



16
17
18
# File 'lib/dotloop_api/end_points/participant.rb', line 16

def build_model(attrs)
  super(fix_hash(attrs))
end

#pathObject



12
13
14
# File 'lib/dotloop_api/end_points/participant.rb', line 12

def path
  "/profile/#{@profile_id}/loop/#{@loop_id}/participant"
end