Class: FinancialEntityObject

Inherits:
Object
  • Object
show all
Includes:
DataFactory, Foundry, Navigation, StringFactory
Defined in:
lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Navigation

#doc_search, #fill_out, #fill_out_item, #on_document?, #on_page?, #open_document, #window_cleanup

Methods included from Utilities

#get, #make_role, #make_user, #random_percentage, #set, #snake_case

Constructor Details

#initialize(browser, opts = {}) ⇒ FinancialEntityObject

Returns a new instance of FinancialEntityObject.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 12

def initialize(browser, opts={})
  @browser=browser
  defaults = {
    entity_name:        random_alphanums,
    type:               '::random::',
    address_line_1:     random_alphanums,
    sponsor_research:   'Y',
    status_code:        '::random::',
    held:               '::random::',
    city:               random_alphanums,
    country:            '::random::',
    postal_code:        '85028',
    principal_activity: random_multiline
  }
  set_options(defaults.merge(opts))
end

Instance Attribute Details

#address_line_1Object

Returns the value of attribute address_line_1.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def address_line_1
  @address_line_1
end

#cityObject

Returns the value of attribute city.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def city
  @city
end

#countryObject

Returns the value of attribute country.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def country
  @country
end

#entity_nameObject

Returns the value of attribute entity_name.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def entity_name
  @entity_name
end

#heldObject

Returns the value of attribute held.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def held
  @held
end

#postal_codeObject

Returns the value of attribute postal_code.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def postal_code
  @postal_code
end

#principal_activityObject

Returns the value of attribute principal_activity.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def principal_activity
  @principal_activity
end

Returns the value of attribute sponsor_code.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def sponsor_code
  @sponsor_code
end

Returns the value of attribute sponsor_research.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def sponsor_research
  @sponsor_research
end

#status_codeObject

Returns the value of attribute status_code.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def status_code
  @status_code
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 8

def type
  @type
end

Instance Method Details

#createObject



29
30
31
32
33
34
35
36
37
38
# File 'lib/kuality-coeus/data_objects/conflict_of_interest/financial_entity.rb', line 29

def create
  navigate
  on NewFinancialEntity do |page|
    fill_out page, :entity_name, :type, :address_line_1, :sponsor_research,
             :status_code, :city, :postal_code, :principal_activity, :held,
             :sponsor_research
    page.country_code.pick! @country
    page.submit
  end
end