class Formstack::Client

Attributes

connection[R]

Public Class Methods

new(connection: Connection.new) click to toggle source
# File lib/formstack/client.rb, line 11
def initialize(connection: Connection.new)
  @connection = connection
end

Public Instance Methods

confirmation_email(confirmation_id) click to toggle source
# File lib/formstack/client.rb, line 83
def confirmation_email(confirmation_id)
  get("confirmation/#{confirmation_id}")
end
confirmation_emails(form_id) click to toggle source
# File lib/formstack/client.rb, line 79
def confirmation_emails(form_id)
  get("form/#{form_id}/confirmation")
end
copy_form(form_id) click to toggle source
# File lib/formstack/client.rb, line 35
def copy_form(form_id)
  post("form/#{form_id}/copy")
end
create_confirmation_email(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 87
def create_confirmation_email(form_id, args={})
  post("form/#{form_id}/confirmation", args)
end
create_field(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 47
def create_field(form_id, args={})
  post("form/#{form_id}/field", args)
end
create_form(args={}) click to toggle source
# File lib/formstack/client.rb, line 23
def create_form(args={})
  post("form", args)
end
create_notification_email(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 107
def create_notification_email(form_id, args={})
  post("form/#{form_id}/notification", args)
end
create_submission(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 67
def create_submission(form_id, args={})
  post("form/#{form_id}/submission", args)
end
create_webhook(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 127
def create_webhook(form_id, args={})
  post("form/#{form_id}/webhook", args)
end
delete_confirmation_email(confirmation_id) click to toggle source
# File lib/formstack/client.rb, line 95
def delete_confirmation_email(confirmation_id)
  delete("confirmation/#{confirmation_id}")
end
delete_field(field_id) click to toggle source
# File lib/formstack/client.rb, line 55
def delete_field(field_id)
  delete("field/#{field_id}")
end
delete_form(form_id) click to toggle source
# File lib/formstack/client.rb, line 31
def delete_form(form_id)
  delete("form/#{form_id}")
end
delete_notification_email(notification_id) click to toggle source
# File lib/formstack/client.rb, line 115
def delete_notification_email(notification_id)
  delete("notification/#{notification_id}")
end
delete_submission(submission_id) click to toggle source
# File lib/formstack/client.rb, line 75
def delete_submission(submission_id)
  delete("submission/#{submission_id}")
end
delete_webhook(webhook_id) click to toggle source
# File lib/formstack/client.rb, line 135
def delete_webhook(webhook_id)
  delete("webhook/#{webhook_id}")
end
field(field_id) click to toggle source
# File lib/formstack/client.rb, line 43
def field(field_id)
  get("field/#{field_id}")
end
fields(form_id) click to toggle source
# File lib/formstack/client.rb, line 39
def fields(form_id)
  get("form/#{form_id}/field")
end
form(form_id) click to toggle source
# File lib/formstack/client.rb, line 19
def form(form_id)
  get("form/#{form_id}")
end
forms(args={}) click to toggle source
# File lib/formstack/client.rb, line 15
def forms(args={})
  get("form", args)
end
notification_email(notification_id) click to toggle source
# File lib/formstack/client.rb, line 103
def notification_email(notification_id)
  get("notification/#{notification_id}")
end
notification_emails(form_id) click to toggle source
# File lib/formstack/client.rb, line 99
def notification_emails(form_id)
  get("form/#{form_id}/notification")
end
submission(submission_id) click to toggle source
# File lib/formstack/client.rb, line 63
def submission(submission_id)
  get("submission/#{submission_id}")
end
submissions(form_id) click to toggle source
# File lib/formstack/client.rb, line 59
def submissions(form_id)
  get("form/#{form_id}/submission")
end
update_confirmation_email(confirmation_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 91
def update_confirmation_email(confirmation_id, args={})
  put("confirmation/#{confirmation_id}", args)
end
update_field(field_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 51
def update_field(field_id, args={})
  put("field/#{field_id}", args)
end
update_form(form_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 27
def update_form(form_id, args={})
  put("form/#{form_id}", args)
end
update_notification_email(notification_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 111
def update_notification_email(notification_id, args={})
  put("notification/#{notification_id}", args)
end
update_submission(submission_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 71
def update_submission(submission_id, args={})
  put("submission/#{submission_id}", args)
end
update_webhook(webhook_id, args={}) click to toggle source
# File lib/formstack/client.rb, line 131
def update_webhook(webhook_id, args={})
  put("webhook/#{webhook_id}", args)
end
webhook(webhook_id) click to toggle source
# File lib/formstack/client.rb, line 123
def webhook(webhook_id)
  get("webhook/#{webhook_id}")
end
webhooks(form_id) click to toggle source
# File lib/formstack/client.rb, line 119
def webhooks(form_id)
  get("form/#{form_id}/webhook")
end