Sha256: d78c88904b54bcc9add70404bc3ee11ae3be1968ac544122c1c8a34c8afd68e5

Contents?: true

Size: 1.16 KB

Versions: 108

Compression:

Stored size: 1.16 KB

Contents

require_relative '../model'
module Spaceship
  class ConnectAPI
    class Device
      include Spaceship::ConnectAPI::Model

      attr_accessor :device_class
      attr_accessor :model
      attr_accessor :name
      attr_accessor :platform
      attr_accessor :status
      attr_accessor :udid
      attr_accessor :added_date

      attr_mapping({
        "deviceClass" => "device_class",
        "model" => "model",
        "name" => "name",
        "platform" => "platform",
        "status" => "status",
        "udid" => "udid",
        "addedDate" => "added_date"
      })

      module DeviceClass
        APPLE_WATCH = "APPLE_WATCH"
        IPAD = "IPAD"
        IPHONE = "IPHONE"
        IPOD = "IPOD"
        APPLE_TV = "APPLE_TV"
        MAC = "MAC"
      end

      module Status
        ENABLED = "ENABLED"
        DISABLED = "DISABLED"
      end

      def self.type
        return "devices"
      end

      #
      # API
      #

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

Version data entries

108 entries across 108 versions & 2 rubygems

Version Path
fastlane-2.131.0.beta.20190910200104 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190909200058 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190908200041 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190907200030 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190906200026 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190905200113 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190904200040 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190903200013 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190902200022 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190901200035 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190831200041 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190830200038 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190829200051 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190828200015 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190827200051 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190826200016 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190825200030 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190824200021 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.130.0.beta.20190823200017 spaceship/lib/spaceship/connect_api/models/device.rb