Class: Unit::ApplicationForm::CreateApplicationFormRequest
- Inherits:
-
Object
- Object
- Unit::ApplicationForm::CreateApplicationFormRequest
- Defined in:
- lib/unit/models/application_form/create_application_form_request.rb
Instance Attribute Summary collapse
-
#allowed_application_types ⇒ Object
readonly
Returns the value of attribute allowed_application_types.
-
#applicant_details ⇒ Object
readonly
Returns the value of attribute applicant_details.
-
#hide_application_progress_tracker ⇒ Object
readonly
Returns the value of attribute hide_application_progress_tracker.
-
#lang ⇒ Object
readonly
Returns the value of attribute lang.
-
#require_id_verification ⇒ Object
readonly
Returns the value of attribute require_id_verification.
-
#settings_override ⇒ Object
readonly
Returns the value of attribute settings_override.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(tags = nil, applicant_details = nil, allowed_application_types = nil, lang = nil, settings_override = nil, require_id_verification = nil, hide_application_progress_tracker = nil) ⇒ CreateApplicationFormRequest
constructor
A new instance of CreateApplicationFormRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(tags = nil, applicant_details = nil, allowed_application_types = nil, lang = nil, settings_override = nil, require_id_verification = nil, hide_application_progress_tracker = nil) ⇒ CreateApplicationFormRequest
Returns a new instance of CreateApplicationFormRequest.
18 19 20 21 22 23 24 25 26 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 18 def initialize( = nil, applicant_details = nil, allowed_application_types = nil, lang = nil, settings_override = nil, require_id_verification = nil, hide_application_progress_tracker = nil) @tags = @applicant_details = applicant_details&.represent @allowed_application_types = allowed_application_types @lang = lang @settings_override = settings_override&.represent @require_id_verification = require_id_verification&.represent @hide_application_progress_tracker = hide_application_progress_tracker end |
Instance Attribute Details
#allowed_application_types ⇒ Object (readonly)
Returns the value of attribute allowed_application_types.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def allowed_application_types @allowed_application_types end |
#applicant_details ⇒ Object (readonly)
Returns the value of attribute applicant_details.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def applicant_details @applicant_details end |
#hide_application_progress_tracker ⇒ Object (readonly)
Returns the value of attribute hide_application_progress_tracker.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def hide_application_progress_tracker @hide_application_progress_tracker end |
#lang ⇒ Object (readonly)
Returns the value of attribute lang.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def lang @lang end |
#require_id_verification ⇒ Object (readonly)
Returns the value of attribute require_id_verification.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def require_id_verification @require_id_verification end |
#settings_override ⇒ Object (readonly)
Returns the value of attribute settings_override.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def settings_override @settings_override end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 8 def @tags end |
Instance Method Details
#to_json_api ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/unit/models/application_form/create_application_form_request.rb', line 28 def to_json_api payload = { data: { type: "applicationForm", attributes: { tags: , applicantDetails: applicant_details, allowedApplicationTypes: allowed_application_types, lang: lang, settingsOverride: settings_override, requireIdVerification: require_id_verification, hideApplicationProgressTracker: hide_application_progress_tracker } } } payload[:data][:attributes].compact! payload.to_json end |