class AgridClient::Company

Attributes

addresses[RW]

Unique id

comission_rate[RW]

Unique id

cover[RW]

Unique id

data_checks[RW]

Unique id

description[RW]

Unique id

email[RW]

Unique id

id[RW]

Unique id

location[RW]

Unique id

name[RW]

Unique id

person_in_charge[RW]

Unique id

phones[RW]

Unique id

rankings[RW]

Unique id

rating[RW]

Unique id

website[RW]

Unique id

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/agrid_client/models/company.rb, line 14
def self.attribute_map
  {
    :'id' => :'id',
    :'email' => :'email',
    :'name' => :'name',
    :'person_in_charge' => :'person_in_charge',
    :'website' => :'website',
    :'location' => :'location',
    :'addresses' => :'addresses',
    :'phones' => :'phones',
    :'logo' => :'logo',
    :'cover' => :'cover',
    :'data_checks' => :'data_checks',
    :'rankings' => :'company_rankings',
    :'rating' => :'rating',
    :'description' => :'description',
    :'comission_rate' => :'comission_rate'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/agrid_client/models/company.rb, line 57
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}

  if attributes[:'id']
    self.id = attributes[:'id']
  end
  if attributes[:'email']
    self.email = attributes[:'email']
  end
  if attributes[:'name']
    self.name = attributes[:'name']
  end
  if attributes[:'person_in_charge']
    self.person_in_charge = attributes[:'person_in_charge']
  end
  if attributes[:'website']
    self.website = attributes[:'website']
  end
  if attributes[:'location']
    self.location = attributes[:'location']
  end
  if attributes[:'addresses']
    self.addresses = attributes[:'addresses']
  end
  if attributes[:'phones']
    self.phones = attributes[:'phones']
  end
  if attributes[:'data_checks']
    self.data_checks = attributes[:'data_checks']
  end
  if attributes[:'rankings']
    self.rankings = attributes[:'rankings']
  end
  if attributes[:'description']
    self.description = attributes[:'description']
  end
  if attributes[:'comission_rate']
    self.comission_rate = attributes[:'comission_rate']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/agrid_client/models/company.rb, line 35
def self.swagger_types
  {
    :'id' => :'String',
    :'email' => :'String',
    :'name' => :'String',
    :'person_in_charge' => :'String',
    :'website' => :'String',
    :'location' => :'Location',
    :'addresses' => :'Array<Address>',
    :'phones' => :'Array<Phone>',
    :'logo' => :'String',
    :'cover' => :'String',
    :'data_checks' => :'Array<DataCheck>',
    :'rankings' => :'Array<CompanyRanking>',
    :'rating' => 'Float',
    :'description' => :'String',
    :'comission_rate' => :'Float'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/agrid_client/models/company.rb, line 103
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id
end