Class: HelloSign::Proxy::ReusableForm

Inherits:
Object
  • Object
show all
Defined in:
lib/hello_sign/proxy/reusable_form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, form_id) ⇒ ReusableForm

Returns a new instance of ReusableForm.



6
7
8
9
# File 'lib/hello_sign/proxy/reusable_form.rb', line 6

def initialize(client, form_id)
  @client  = client
  @form_id = form_id
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/hello_sign/proxy/reusable_form.rb', line 4

def client
  @client
end

#form_idObject (readonly)

Returns the value of attribute form_id.



4
5
6
# File 'lib/hello_sign/proxy/reusable_form.rb', line 4

def form_id
  @form_id
end

Instance Method Details

#grant_access(params = {}) ⇒ Object



19
20
21
# File 'lib/hello_sign/proxy/reusable_form.rb', line 19

def grant_access(params = {})
  client.post("/reusable_form/add_user/#{form_id}", body: params)
end

#list(params = {}) ⇒ Object



11
12
13
# File 'lib/hello_sign/proxy/reusable_form.rb', line 11

def list(params = {})
  client.get('/reusable_form/list', params: params)
end

#revoke_access(params = {}) ⇒ Object



23
24
25
# File 'lib/hello_sign/proxy/reusable_form.rb', line 23

def revoke_access(params = {})
  client.post("/reusable_form/remove_user/#{form_id}", body: params)
end

#showObject



15
16
17
# File 'lib/hello_sign/proxy/reusable_form.rb', line 15

def show
  client.get("/reusable_form/#{form_id}")
end