Class: Typeform::Form

Inherits:
Object
  • Object
show all
Defined in:
lib/typeform/form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(form_id) ⇒ Form

Returns a new instance of Form.



9
10
11
# File 'lib/typeform/form.rb', line 9

def initialize(form_id)
  @form_id = form_id
end

Instance Attribute Details

#form_idObject (readonly)

Returns the value of attribute form_id.



7
8
9
# File 'lib/typeform/form.rb', line 7

def form_id
  @form_id
end

Instance Method Details

#all_entriesObject



13
14
15
16
# File 'lib/typeform/form.rb', line 13

def all_entries
  response = get
  Hashie::Mash.new(response)
end

#complete_entries(params = {}) ⇒ Object



18
19
20
21
# File 'lib/typeform/form.rb', line 18

def complete_entries(params = {})
  response = get(params.merge(completed: true))
  Hashie::Mash.new(response)
end

#incomplete_entries(params = {}) ⇒ Object



23
24
25
26
# File 'lib/typeform/form.rb', line 23

def incomplete_entries(params = {})
  response = get(params.merge(completed: false))
  Hashie::Mash.new(response)
end