Class: TheCompaniesAPI::Generated::Requests::ToggleCompaniesInListRequest
- Inherits:
-
Object
- Object
- TheCompaniesAPI::Generated::Requests::ToggleCompaniesInListRequest
- Defined in:
- lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb
Overview
ToggleCompaniesInListRequest - API request class
Instance Attribute Summary collapse
-
#action ⇒ String
Action.
-
#company_ids ⇒ Array
CompanyIds.
-
#domains ⇒ Array
Domains.
-
#refresh ⇒ Boolean
Refresh.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ ToggleCompaniesInListRequest
constructor
Initialize a new ToggleCompaniesInListRequest.
-
#to_hash ⇒ Hash
(also: #to_h)
Convert to hash for API request.
Constructor Details
#initialize(data = {}) ⇒ ToggleCompaniesInListRequest
Initialize a new ToggleCompaniesInListRequest
26 27 28 29 30 31 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 26 def initialize(data = {}) @action = data['action'] || data[:action] @company_ids = data['companyIds'] || data[:company_ids] @domains = data['domains'] || data[:domains] @refresh = data['refresh'] || data[:refresh] end |
Instance Attribute Details
#action ⇒ String
Returns action.
11 12 13 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 11 def action @action end |
#company_ids ⇒ Array
Returns companyIds.
14 15 16 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 14 def company_ids @company_ids end |
#domains ⇒ Array
Returns domains.
17 18 19 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 17 def domains @domains end |
#refresh ⇒ Boolean
Returns refresh.
20 21 22 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 20 def refresh @refresh end |
Instance Method Details
#to_hash ⇒ Hash Also known as: to_h
Convert to hash for API request
37 38 39 40 41 42 43 44 |
# File 'lib/thecompaniesapi/generated/requests/toggle_companies_in_list_request.rb', line 37 def to_hash { 'action' => @action, 'companyIds' => @company_ids, 'domains' => @domains, 'refresh' => @refresh, }.compact end |