Class: AgridClient::CompanyRanking

Inherits:
Object
  • Object
show all
Includes:
SwaggerModel
Defined in:
lib/agrid_client/models/company_ranking.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SwaggerModel

#_deserialize, #_to_hash, #build_from_hash, #eql?, #to_body, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ CompanyRanking

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



26
27
28
29
30
31
32
33
34
# File 'lib/agrid_client/models/company_ranking.rb', line 26

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  self.service = attributes[:'service'] if attributes[:'service']
  self.ranking = attributes[:'ranking'] if attributes[:'ranking']
end

Instance Attribute Details

#rankObject

Returns the value of attribute rank.



7
8
9
# File 'lib/agrid_client/models/company_ranking.rb', line 7

def rank
  @rank
end

#serviceObject

Returns the value of attribute service.



7
8
9
# File 'lib/agrid_client/models/company_ranking.rb', line 7

def service
  @service
end

Class Method Details

.attribute_mapObject



9
10
11
12
13
14
# File 'lib/agrid_client/models/company_ranking.rb', line 9

def self.attribute_map
  {
    :'service' => :'service',
    :'rank' => :'rank'
  }
end

.swagger_typesObject

Attribute type mapping.



17
18
19
20
21
22
# File 'lib/agrid_client/models/company_ranking.rb', line 17

def self.swagger_types
  {
    :'service' => :'Service',
    :'rank' => :'Float'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



38
39
40
41
42
43
# File 'lib/agrid_client/models/company_ranking.rb', line 38

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      service == o.service &&
      ranking == o.ranking
end