Class: Formstack::Form
- Inherits:
-
Object
show all
- Includes:
- Model
- Defined in:
- lib/formstack/form.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Model
#[], #delete, included, #initialize, #load, #update
Class Method Details
.client_method ⇒ Object
35
36
37
|
# File 'lib/formstack/form.rb', line 35
def self.client_method
:form
end
|
.response_nesting ⇒ Object
39
40
41
|
# File 'lib/formstack/form.rb', line 39
def self.response_nesting
"forms"
end
|
Instance Method Details
#confirmation_emails ⇒ Object
23
24
25
|
# File 'lib/formstack/form.rb', line 23
def confirmation_emails
@confirmation_emails ||= ConfirmationEmail.all(self[:id])
end
|
#copy ⇒ Object
7
8
9
|
# File 'lib/formstack/form.rb', line 7
def copy
new_from_response client.copy_form self[:id]
end
|
#fields ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/formstack/form.rb', line 11
def fields
@fields ||= if self[:fields]
self[:fields].map { |f| Field.new(f) }
else
Field.all(self[:id])
end
end
|
#notification_emails ⇒ Object
27
28
29
|
# File 'lib/formstack/form.rb', line 27
def notification_emails
@notification_emails ||= NotificationEmail.all(self[:id])
end
|
#submissions ⇒ Object
19
20
21
|
# File 'lib/formstack/form.rb', line 19
def submissions
@submissions ||= Submission.all(self[:id])
end
|
#webhooks ⇒ Object
31
32
33
|
# File 'lib/formstack/form.rb', line 31
def webhooks
@webhooks ||= Webhook.all(self[:id])
end
|