Class: Unit::Application::CreateBusinessApplicationRequest
- Inherits:
-
Object
- Object
- Unit::Application::CreateBusinessApplicationRequest
- Defined in:
- lib/unit/models/application/create_business_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.
-
#beneficial_owners ⇒ Object
readonly
Returns the value of attribute beneficial_owners.
-
#business_vertical ⇒ Object
readonly
Returns the value of attribute business_vertical.
-
#cash_flow ⇒ Object
readonly
Returns the value of attribute cash_flow.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#countries_of_operation ⇒ Object
readonly
Returns the value of attribute countries_of_operation.
-
#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.
-
#entity_type ⇒ Object
readonly
Returns the value of attribute entity_type.
-
#idempotency_key ⇒ Object
readonly
Returns the value of attribute idempotency_key.
-
#industry ⇒ Object
readonly
Returns the value of attribute industry.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number_of_employees ⇒ Object
readonly
Returns the value of attribute number_of_employees.
-
#officer ⇒ Object
readonly
Returns the value of attribute officer.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#state_of_incorporation ⇒ Object
readonly
Returns the value of attribute state_of_incorporation.
-
#stock_symbol ⇒ Object
readonly
Returns the value of attribute stock_symbol.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
-
#year_of_incorporation ⇒ Object
readonly
Returns the value of attribute year_of_incorporation.
Instance Method Summary collapse
-
#initialize(name, address, phone, state_of_incorporation, ein, contact, officer, beneficial_owners, entity_type, industry = nil, dba = nil, ip = nil, website = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil, annual_revenue = nil, number_of_employees = nil, cash_flow = nil, year_of_incorporation = nil, countries_of_operation = nil, stock_symbol = nil, business_vertical = nil) ⇒ CreateBusinessApplicationRequest
constructor
A new instance of CreateBusinessApplicationRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(name, address, phone, state_of_incorporation, ein, contact, officer, beneficial_owners, entity_type, industry = nil, dba = nil, ip = nil, website = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil, annual_revenue = nil, number_of_employees = nil, cash_flow = nil, year_of_incorporation = nil, countries_of_operation = nil, stock_symbol = nil, business_vertical = nil) ⇒ CreateBusinessApplicationRequest
Returns a new instance of CreateBusinessApplicationRequest.
36 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 64 65 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 36 def initialize(name, address, phone, state_of_incorporation, ein, contact, officer, beneficial_owners, entity_type, industry = nil, dba = nil, ip = nil, website = nil, = nil, idempotency_key = nil, device_fingerprints = nil, annual_revenue = nil, number_of_employees = nil, cash_flow = nil, year_of_incorporation = nil, countries_of_operation = nil, stock_symbol = nil, business_vertical = nil) @name = name @address = address @phone = phone @state_of_incorporation = state_of_incorporation @ein = ein @industry = industry @contact = contact @officer = officer @beneficial_owners = beneficial_owners.map(&:represent) @entity_type = entity_type @dba = dba @ip = ip @website = website @tags = @idempotency_key = idempotency_key @device_fingerprints = device_fingerprints @annual_revenue = annual_revenue @number_of_employees = number_of_employees @cash_flow = cash_flow @year_of_incorporation = year_of_incorporation @countries_of_operation = countries_of_operation @stock_symbol = stock_symbol @business_vertical = business_vertical @type = "businessApplication" end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/unit/models/application/create_business_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_business_application_request.rb', line 8 def annual_revenue @annual_revenue end |
#beneficial_owners ⇒ Object (readonly)
Returns the value of attribute beneficial_owners.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def beneficial_owners @beneficial_owners end |
#business_vertical ⇒ Object (readonly)
Returns the value of attribute business_vertical.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def business_vertical @business_vertical end |
#cash_flow ⇒ Object (readonly)
Returns the value of attribute cash_flow.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def cash_flow @cash_flow end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def contact @contact end |
#countries_of_operation ⇒ Object (readonly)
Returns the value of attribute countries_of_operation.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def countries_of_operation @countries_of_operation end |
#dba ⇒ Object (readonly)
Returns the value of attribute dba.
8 9 10 |
# File 'lib/unit/models/application/create_business_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_business_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_business_application_request.rb', line 8 def ein @ein end |
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def entity_type @entity_type end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def idempotency_key @idempotency_key end |
#industry ⇒ Object (readonly)
Returns the value of attribute industry.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def industry @industry end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def name @name end |
#number_of_employees ⇒ Object (readonly)
Returns the value of attribute number_of_employees.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def number_of_employees @number_of_employees end |
#officer ⇒ Object (readonly)
Returns the value of attribute officer.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def officer @officer end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def phone @phone end |
#state_of_incorporation ⇒ Object (readonly)
Returns the value of attribute state_of_incorporation.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def state_of_incorporation @state_of_incorporation end |
#stock_symbol ⇒ Object (readonly)
Returns the value of attribute stock_symbol.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def stock_symbol @stock_symbol end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def @tags end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def type @type end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def website @website end |
#year_of_incorporation ⇒ Object (readonly)
Returns the value of attribute year_of_incorporation.
8 9 10 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 8 def year_of_incorporation @year_of_incorporation end |
Instance Method Details
#to_json_api ⇒ Object
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 98 99 100 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 67 def to_json_api payload = { data: { type: type, attributes: { name: name, address: address.represent, phone: phone.represent, stateOfIncorporation: state_of_incorporation, ein: ein, industry: industry, contact: contact.represent, officer: officer.represent, beneficialOwners: beneficial_owners, entityType: entity_type, dba: dba, ip: ip, website: website, tags: , idempotencyKey: idempotency_key, deviceFingerprints: device_fingerprints, annualRevenue: annual_revenue, numberOfEmployees: number_of_employees, cashFlow: cash_flow, yearOfIncorporation: year_of_incorporation, countriesOfOperation: countries_of_operation&.join(","), stockSymbol: stock_symbol, businessVertical: business_vertical } } } payload[:data][:attributes].compact! payload.to_json end |