Module: Unit::ApplicationForm

Defined in:
lib/unit/models/application_form/create_application_form_request.rb,
lib/unit/models/application_form/application_form.rb,
lib/unit/models/application_form/list_application_form_params.rb

Overview

Create application form request

Defined Under Namespace

Classes: CreateApplicationFormRequest, ListApplicationFormParams

Constant Summary collapse

APPLICATION_FORM_LIST_LIMIT =
100
APPLICATION_FORM_LIST_OFFSET =
0

Class Method Summary collapse

Class Method Details

.create_application_form(tags: nil, applicant_details: nil, allowed_application_types: nil, lang: nil, settings_override: nil, require_id_verification: nil, hide_application_progress_tracker: nil) ⇒ Object

Create an application form by calling Unit’s API

Parameters:

  • tags (Hash) (defaults to: nil)
    • optional

  • applicant_details (ApplicationFormPrefill) (defaults to: nil)
    • optional

  • lang (String) (defaults to: nil)
    • optional

  • settings_override (ApplicationFormSettingsOverride) (defaults to: nil)
    • optional

  • require_id_verification (RequireIdVerification) (defaults to: nil)
    • optional

  • hide_application_progress_tracker (Boolean) (defaults to: nil)
    • optional

See Also:



19
20
21
22
# File 'lib/unit/models/application_form/application_form.rb', line 19

def create_application_form(tags: nil, applicant_details: nil, allowed_application_types: nil, lang: nil, settings_override: nil, require_id_verification: nil, hide_application_progress_tracker: nil)
  request = Unit::ApplicationForm::CreateApplicationFormRequest.new(tags, applicant_details, allowed_application_types, lang, settings_override, require_id_verification, hide_application_progress_tracker)
  Unit::Resource::ApplicationFormResource.create_application_form(request)
end

.get_application_form(application_form_id) ⇒ Object

Get an application form by calling Unit’s API

Parameters:

  • application_form_id (String)

See Also:



27
28
29
# File 'lib/unit/models/application_form/application_form.rb', line 27

def get_application_form(application_form_id)
  Unit::Resource::ApplicationFormResource.get_application_form(application_form_id)
end

.list_application_forms(limit: APPLICATION_FORM_LIST_LIMIT, offset: APPLICATION_FORM_LIST_OFFSET, tags: nil, sort: nil) ⇒ Object

List application forms by calling Unit’s API

Parameters:

  • limit (Integer) (defaults to: APPLICATION_FORM_LIST_LIMIT)
    • optional

  • offset (Integer) (defaults to: APPLICATION_FORM_LIST_OFFSET)
    • optional

  • tags (Hash) (defaults to: nil)
    • optional

  • sort (String) (defaults to: nil)
    • optional

See Also:



37
38
39
40
# File 'lib/unit/models/application_form/application_form.rb', line 37

def list_application_forms(limit: APPLICATION_FORM_LIST_LIMIT, offset: APPLICATION_FORM_LIST_OFFSET, tags: nil, sort: nil)
  request = Unit::ApplicationForm::ListApplicationFormParams.new(limit, offset, tags, sort)
  Unit::Resource::ApplicationFormResource.list_application_forms(request)
end