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.
-
#beneficial_owners ⇒ Object
readonly
Returns the value of attribute beneficial_owners.
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#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.
-
#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.
-
#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.
Instance Method Summary collapse
-
#initialize(name, address, phone, state_of_incorporation, ein, industry, contact, officer, beneficial_owners, entity_type, dba = nil, ip = nil, website = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil) ⇒ CreateBusinessApplicationRequest
constructor
A new instance of CreateBusinessApplicationRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(name, address, phone, state_of_incorporation, ein, industry, contact, officer, beneficial_owners, entity_type, dba = nil, ip = nil, website = nil, tags = nil, idempotency_key = nil, device_fingerprints = nil) ⇒ CreateBusinessApplicationRequest
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 34 def initialize(name, address, phone, state_of_incorporation, ein, industry, contact, officer, beneficial_owners, entity_type, dba = nil, ip = nil, website = nil, = nil, idempotency_key = nil, device_fingerprints = 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 = @idempotency_key = idempotency_key @device_fingerprints = device_fingerprints @type = "businessApplication" end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def address @address end |
#beneficial_owners ⇒ Object (readonly)
Returns the value of attribute beneficial_owners.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def beneficial_owners @beneficial_owners end |
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def contact @contact end |
#dba ⇒ Object (readonly)
Returns the value of attribute dba.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def dba @dba end |
#device_fingerprints ⇒ Object (readonly)
Returns the value of attribute device_fingerprints.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def device_fingerprints @device_fingerprints end |
#ein ⇒ Object (readonly)
Returns the value of attribute ein.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def ein @ein end |
#entity_type ⇒ Object (readonly)
Returns the value of attribute entity_type.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def entity_type @entity_type end |
#idempotency_key ⇒ Object (readonly)
Returns the value of attribute idempotency_key.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def idempotency_key @idempotency_key end |
#industry ⇒ Object (readonly)
Returns the value of attribute industry.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def industry @industry end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def name @name end |
#officer ⇒ Object (readonly)
Returns the value of attribute officer.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def officer @officer end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def phone @phone end |
#state_of_incorporation ⇒ Object (readonly)
Returns the value of attribute state_of_incorporation.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def state_of_incorporation @state_of_incorporation end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def type @type end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
15 16 17 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 15 def website @website end |
Instance Method Details
#to_json_api ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/unit/models/application/create_business_application_request.rb', line 56 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 } } } payload[:data][:attributes].compact! payload.to_json end |