Class: AgridClient::Company

Inherits:
Object
  • Object
show all
Includes:
SwaggerModel
Defined in:
lib/agrid_client/models/company.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 = {}) ⇒ Company

Initializes the object

Parameters:

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

    Model attributes in the form of hash



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# 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

Instance Attribute Details

#addressesObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def addresses
  @addresses
end

#comission_rateObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def comission_rate
  @comission_rate
end

#coverObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def cover
  @cover
end

#data_checksObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def data_checks
  @data_checks
end

#descriptionObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def description
  @description
end

#emailObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def email
  @email
end

#idObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def id
  @id
end

#locationObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def location
  @location
end

#logoObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def 
  @logo
end

#nameObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def name
  @name
end

#person_in_chargeObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def person_in_charge
  @person_in_charge
end

#phonesObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def phones
  @phones
end

#rankingsObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def rankings
  @rankings
end

#ratingObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def rating
  @rating
end

#websiteObject

Unique id



9
10
11
# File 'lib/agrid_client/models/company.rb', line 9

def website
  @website
end

Class Method Details

.attribute_mapObject

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



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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

.swagger_typesObject

Attribute type mapping.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



103
104
105
106
107
# 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