Class: Unit::Application::CreateSoleProprietorApplicationRequest
- Inherits:
-
Object
- Object
- Unit::Application::CreateSoleProprietorApplicationRequest
- Defined in:
- lib/unit/models/application/create_sole_proprietor_application_request.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#annual_revenue ⇒ Object
readonly
Returns the value of attribute annual_revenue.
-
#business_vertical ⇒ Object
readonly
Returns the value of attribute business_vertical.
-
#date_of_birth ⇒ Object
readonly
Returns the value of attribute date_of_birth.
-
#dba ⇒ Object
readonly
Returns the value of attribute dba.
-
#device_fingerprints ⇒ Object
readonly
Returns the value of attribute device_fingerprints.
-
#ein ⇒ Object
readonly
Returns the value of attribute ein.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#evaluation_params ⇒ Object
readonly
Returns the value of attribute evaluation_params.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#jwt_subject ⇒ Object
readonly
Returns the value of attribute jwt_subject.
-
#nationality ⇒ Object
readonly
Returns the value of attribute nationality.
-
#number_of_employees ⇒ Object
readonly
Returns the value of attribute number_of_employees.
-
#passport ⇒ Object
readonly
Returns the value of attribute passport.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#power_of_attorney_agent ⇒ Object
readonly
Returns the value of attribute power_of_attorney_agent.
-
#sole_proprietorship ⇒ Object
readonly
Returns the value of attribute sole_proprietorship.
-
#ssn ⇒ Object
readonly
Returns the value of attribute ssn.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
Instance Method Summary collapse
-
#initialize(nationality, full_name, date_of_birth, address, phone, email, ssn = nil, passport = nil, ein = nil, dba = nil, power_of_attorney_agent = nil, evaluation_params = nil, annual_revenue = nil, number_of_employees = nil, business_vertical = nil, website = nil, ip = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil, jwt_subject = nil, sole_proprietorship: true) ⇒ CreateSoleProprietorApplicationRequest
constructor
A new instance of CreateSoleProprietorApplicationRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(nationality, full_name, date_of_birth, address, phone, email, ssn = nil, passport = nil, ein = nil, dba = nil, power_of_attorney_agent = nil, evaluation_params = nil, annual_revenue = nil, number_of_employees = nil, business_vertical = nil, website = nil, ip = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil, jwt_subject = nil, sole_proprietorship: true) ⇒ CreateSoleProprietorApplicationRequest
Returns a new instance of CreateSoleProprietorApplicationRequest.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 37 def initialize(nationality, full_name, date_of_birth, address, phone, email, ssn = nil, passport = nil, ein = nil, dba = nil, power_of_attorney_agent = nil, evaluation_params = nil, annual_revenue = nil, number_of_employees = nil, business_vertical = nil, website = nil, ip = nil, = nil, idempotency_key = nil, device_fingerprints = nil, jwt_subject = nil, sole_proprietorship: true) @ssn = ssn @passport = passport @nationality = nationality @full_name = full_name @date_of_birth = date_of_birth @address = address @phone = phone @email = email @sole_proprietorship = sole_proprietorship @ein = ein @dba = dba @power_of_attorney_agent = power_of_attorney_agent @evaluation_params = evaluation_params @annual_revenue = annual_revenue @number_of_employees = number_of_employees @business_vertical = business_vertical @website = website @ip = ip @tags = @idempotency_key = idempotency_key @device_fingerprints = device_fingerprints @jwt_subject = jwt_subject end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def address @address end |
#annual_revenue ⇒ Object (readonly)
Returns the value of attribute annual_revenue.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def annual_revenue @annual_revenue end |
#business_vertical ⇒ Object (readonly)
Returns the value of attribute business_vertical.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def business_vertical @business_vertical end |
#date_of_birth ⇒ Object (readonly)
Returns the value of attribute date_of_birth.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def date_of_birth @date_of_birth end |
#dba ⇒ Object (readonly)
Returns the value of attribute dba.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def dba @dba end |
#device_fingerprints ⇒ Object (readonly)
Returns the value of attribute device_fingerprints.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def device_fingerprints @device_fingerprints end |
#ein ⇒ Object (readonly)
Returns the value of attribute ein.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def ein @ein end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def email @email end |
#evaluation_params ⇒ Object (readonly)
Returns the value of attribute evaluation_params.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def evaluation_params @evaluation_params end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def full_name @full_name end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def idempotency_key @idempotency_key end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def ip @ip end |
#jwt_subject ⇒ Object (readonly)
Returns the value of attribute jwt_subject.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def jwt_subject @jwt_subject end |
#nationality ⇒ Object (readonly)
Returns the value of attribute nationality.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def nationality @nationality end |
#number_of_employees ⇒ Object (readonly)
Returns the value of attribute number_of_employees.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def number_of_employees @number_of_employees end |
#passport ⇒ Object (readonly)
Returns the value of attribute passport.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def passport @passport end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def phone @phone end |
#power_of_attorney_agent ⇒ Object (readonly)
Returns the value of attribute power_of_attorney_agent.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def power_of_attorney_agent @power_of_attorney_agent end |
#sole_proprietorship ⇒ Object (readonly)
Returns the value of attribute sole_proprietorship.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def sole_proprietorship @sole_proprietorship end |
#ssn ⇒ Object (readonly)
Returns the value of attribute ssn.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def ssn @ssn end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def @tags end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
8 9 10 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 8 def website @website end |
Instance Method Details
#to_json_api ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/unit/models/application/create_sole_proprietor_application_request.rb', line 65 def to_json_api payload = { data: { type: "individualApplication", attributes: { ssn: ssn, passport: passport, nationality: nationality, fullName: full_name.represent, dateOfBirth: date_of_birth, address: address.represent, phone: phone&.represent, email: email, soleProprietorship: sole_proprietorship, ein: ein, dba: dba, powerOfAttorneyAgent: power_of_attorney_agent&.represent, evaluationParams: evaluation_params&.represent, annualRevenue: annual_revenue, numberOfEmployees: number_of_employees, businessVertical: business_vertical, website: website, ip: ip, tags: , idempotencyKey: idempotency_key, deviceFingerprints: device_fingerprints&.map(&:represent), jwtSubject: jwt_subject } } } payload[:data][:attributes].compact! payload.to_json end |