Class: Spaceship::ConnectAPI::Device

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/device.rb

Defined Under Namespace

Modules: DeviceClass, Status

Instance Attribute Summary collapse

Attributes included from Model

#id

Class Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #update_attributes

Instance Attribute Details

#added_dateObject

Returns the value of attribute added_date.



13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 13

def added_date
  @added_date
end

#device_classObject

Returns the value of attribute device_class.



7
8
9
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 7

def device_class
  @device_class
end

#modelObject

Returns the value of attribute model.



8
9
10
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 8

def model
  @model
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 9

def name
  @name
end

#platformObject

Returns the value of attribute platform.



10
11
12
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 10

def platform
  @platform
end

#statusObject

Returns the value of attribute status.



11
12
13
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 11

def status
  @status
end

#udidObject

Returns the value of attribute udid.



12
13
14
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 12

def udid
  @udid
end

Class Method Details

.all(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

API



47
48
49
50
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 47

def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
  resps = Spaceship::ConnectAPI.get_devices(filter: filter, includes: includes).all_pages
  return resps.flat_map(&:to_models)
end

.typeObject



39
40
41
# File 'spaceship/lib/spaceship/connect_api/models/device.rb', line 39

def self.type
  return "devices"
end